diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-27 16:06:52 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-27 16:06:52 +0100 |
commit | c41488139136c213fd5d799523da5f318a0014a2 (patch) | |
tree | 7ac8ab40bf7e8bd289c6c081f9d65c3f4749aed1 /src/test/kotlin/util | |
parent | ee0526ac67e093f77d17747d9316765b2db272a2 (diff) | |
download | Firmament-c41488139136c213fd5d799523da5f318a0014a2.tar.gz Firmament-c41488139136c213fd5d799523da5f318a0014a2.tar.bz2 Firmament-c41488139136c213fd5d799523da5f318a0014a2.zip |
feat: Add item type function
Diffstat (limited to 'src/test/kotlin/util')
-rw-r--r-- | src/test/kotlin/util/skyblock/ItemTypeTest.kt | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/test/kotlin/util/skyblock/ItemTypeTest.kt b/src/test/kotlin/util/skyblock/ItemTypeTest.kt new file mode 100644 index 0000000..c89e57d --- /dev/null +++ b/src/test/kotlin/util/skyblock/ItemTypeTest.kt @@ -0,0 +1,53 @@ +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.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")) + ) + } +} |