aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/util/skyblock/SackUtilTest.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-13 13:40:50 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-13 13:40:50 +0100
commitd267913e206f5f7bfc16607c0dc058290e6b556f (patch)
treeae586ff39bb970f51b84f89c7e0b96130e9f4e3b /src/test/kotlin/util/skyblock/SackUtilTest.kt
parentdb87e5293846e27dc684dd141744390ae6e8bc67 (diff)
downloadFirmament-d267913e206f5f7bfc16607c0dc058290e6b556f.tar.gz
Firmament-d267913e206f5f7bfc16607c0dc058290e6b556f.tar.bz2
Firmament-d267913e206f5f7bfc16607c0dc058290e6b556f.zip
test: Add sack util test
Diffstat (limited to 'src/test/kotlin/util/skyblock/SackUtilTest.kt')
-rw-r--r--src/test/kotlin/util/skyblock/SackUtilTest.kt29
1 files changed, 29 insertions, 0 deletions
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"))
+ )
+ }
+}