forked from AlchemistSimulator/Alchemist
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(loading): fix broken assertion in
TestConstructorOverloading
- Loading branch information
Showing
1 changed file
with
2 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 2 additions & 4 deletions
6
alchemist-loading/src/test/kotlin/it/unibo/alchemist/test/TestConstructorOverloading.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
package it.unibo.alchemist.test | ||
|
||
import another.location.MyTestEnv | ||
import io.kotest.core.spec.style.StringSpec | ||
import io.kotest.matchers.nulls.beNull | ||
import io.kotest.matchers.shouldBe | ||
import io.kotest.matchers.nulls.shouldNotBeNull | ||
import io.kotest.matchers.shouldNot | ||
import io.kotest.matchers.types.instanceOf | ||
import it.unibo.alchemist.test.AlchemistTesting.loadAlchemistFromResource | ||
|
||
class TestConstructorOverloading : StringSpec({ | ||
"constructor overloading should not be ambiguous during loading" { | ||
val loader = loadAlchemistFromResource("regression/2024-depots-ambiguous-constructors.yml") | ||
loader shouldNot beNull() | ||
loader.getDefault<Nothing, Nothing>().environment shouldBe instanceOf(MyTestEnv::class) | ||
loader.getDefault<Nothing, Nothing>().environment.shouldNotBeNull() | ||
} | ||
}) |