diff options
Diffstat (limited to 'src/test/kotlin/util')
-rw-r--r-- | src/test/kotlin/util/TextUtilText.kt | 1 | ||||
-rw-r--r-- | src/test/kotlin/util/skyblock/AbilityUtilsTest.kt | 1 | ||||
-rw-r--r-- | src/test/kotlin/util/skyblock/ItemTypeTest.kt | 69 | ||||
-rw-r--r-- | src/test/kotlin/util/skyblock/SackUtilTest.kt | 1 |
4 files changed, 21 insertions, 51 deletions
diff --git a/src/test/kotlin/util/TextUtilText.kt b/src/test/kotlin/util/TextUtilText.kt index e676d63..46ed3b4 100644 --- a/src/test/kotlin/util/TextUtilText.kt +++ b/src/test/kotlin/util/TextUtilText.kt @@ -2,7 +2,6 @@ package moe.nea.firmament.test.util import io.kotest.core.spec.style.AnnotationSpec import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test import moe.nea.firmament.test.testutil.ItemResources import moe.nea.firmament.util.getLegacyFormatString diff --git a/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt b/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt index dbce762..206a357 100644 --- a/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt +++ b/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt @@ -2,7 +2,6 @@ package moe.nea.firmament.test.util.skyblock import io.kotest.core.spec.style.AnnotationSpec import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds import net.minecraft.text.Text diff --git a/src/test/kotlin/util/skyblock/ItemTypeTest.kt b/src/test/kotlin/util/skyblock/ItemTypeTest.kt index c89e57d..cca3d13 100644 --- a/src/test/kotlin/util/skyblock/ItemTypeTest.kt +++ b/src/test/kotlin/util/skyblock/ItemTypeTest.kt @@ -1,53 +1,26 @@ package moe.nea.firmament.test.util.skyblock -import io.kotest.core.spec.style.AnnotationSpec -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test +import io.kotest.core.spec.style.ShouldSpec +import io.kotest.matchers.shouldBe import moe.nea.firmament.test.testutil.ItemResources import moe.nea.firmament.util.skyblock.ItemType -class ItemTypeTest : AnnotationSpec() { - @Test - fun testPetItem() { - Assertions.assertEquals( - ItemType.PET, - ItemType.fromItemStack(ItemResources.loadItem("pets/lion-item")) - ) - } - - @Test - fun testPetInUI() { - Assertions.assertEquals( - ItemType.PET, - ItemType.fromItemStack(ItemResources.loadItem("pets/rabbit-selected")) - ) - Assertions.assertEquals( - ItemType.PET, - ItemType.fromItemStack(ItemResources.loadItem("pets/mithril-golem-not-selected")) - ) - } - - @Test - fun testAOTV() { - Assertions.assertEquals( - ItemType.SWORD, - ItemType.fromItemStack(ItemResources.loadItem("aspect-of-the-void")) - ) - } - - @Test - fun testDrill() { - Assertions.assertEquals( - ItemType.DRILL, - ItemType.fromItemStack(ItemResources.loadItem("titanium-drill")) - ) - } - - @Test - fun testPickaxe() { - Assertions.assertEquals( - ItemType.PICKAXE, - ItemType.fromItemStack(ItemResources.loadItem("diamond-pickaxe")) - ) - } -} +class ItemTypeTest + : ShouldSpec( + { + context("ItemType.fromItemstack") { + listOf( + "pets/lion-item" to ItemType.PET, + "pets/rabbit-selected" to ItemType.PET, + "pets/mithril-golem-not-selected" to ItemType.PET, + "aspect-of-the-void" to ItemType.SWORD, + "titanium-drill" to ItemType.DRILL, + "diamond-pickaxe" to ItemType.PICKAXE, + "gemstone-gauntlet" to ItemType.GAUNTLET, + ).forEach { (name, typ) -> + should("return $typ for $name") { + ItemType.fromItemStack(ItemResources.loadItem(name)) shouldBe typ + } + } + } + }) diff --git a/src/test/kotlin/util/skyblock/SackUtilTest.kt b/src/test/kotlin/util/skyblock/SackUtilTest.kt index e1b106e..f93cd2b 100644 --- a/src/test/kotlin/util/skyblock/SackUtilTest.kt +++ b/src/test/kotlin/util/skyblock/SackUtilTest.kt @@ -2,7 +2,6 @@ package moe.nea.firmament.test.util.skyblock import io.kotest.core.spec.style.AnnotationSpec import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test import moe.nea.firmament.test.testutil.ItemResources import moe.nea.firmament.util.skyblock.SackUtil import moe.nea.firmament.util.skyblock.SkyBlockItems |