From d267913e206f5f7bfc16607c0dc058290e6b556f Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Wed, 13 Nov 2024 13:40:50 +0100 Subject: test: Add sack util test --- src/test/kotlin/util/skyblock/SackUtilTest.kt | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/test/kotlin/util/skyblock/SackUtilTest.kt (limited to 'src/test/kotlin/util/skyblock/SackUtilTest.kt') diff --git a/src/test/kotlin/util/skyblock/SackUtilTest.kt b/src/test/kotlin/util/skyblock/SackUtilTest.kt new file mode 100644 index 0000000..e0e3e63 --- /dev/null +++ b/src/test/kotlin/util/skyblock/SackUtilTest.kt @@ -0,0 +1,29 @@ +package moe.nea.firmament.test.util.skyblock + +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 + +class SackUtilTest { + @Test + fun testOneRottenFlesh() { + Assertions.assertEquals( + listOf( + SackUtil.SackUpdate(SkyBlockItems.ROTTEN_FLESH, "Rotten Flesh", 1) + ), + SackUtil.getUpdatesFromMessage(ItemResources.loadText("sacks/gain-rotten-flesh")) + ) + } + + @Test + fun testAFewRegularItems() { + Assertions.assertEquals( + listOf( + SackUtil.SackUpdate(SkyBlockItems.ROTTEN_FLESH, "Rotten Flesh", 1) + ), + SackUtil.getUpdatesFromMessage(ItemResources.loadText("sacks/gain-and-lose-regular")) + ) + } +} -- cgit