aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/util
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-06-26 18:21:02 +0200
committerLinnea Gräf <nea@nea.moe>2025-06-26 18:21:11 +0200
commit1c5d0df368471031f892330de7628ff78a6204ed (patch)
tree6d222fb45f3fbacff255de5347314204189a8b3c /src/test/kotlin/util
parente926550bd19bddb0a0e026723bc6113ac09ea76f (diff)
downloadFirmament-1c5d0df368471031f892330de7628ff78a6204ed.tar.gz
Firmament-1c5d0df368471031f892330de7628ff78a6204ed.tar.bz2
Firmament-1c5d0df368471031f892330de7628ff78a6204ed.zip
feat(internal): Add a tab list api
Diffstat (limited to 'src/test/kotlin/util')
-rw-r--r--src/test/kotlin/util/skyblock/TabListAPITest.kt48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/test/kotlin/util/skyblock/TabListAPITest.kt b/src/test/kotlin/util/skyblock/TabListAPITest.kt
new file mode 100644
index 0000000..26eafe0
--- /dev/null
+++ b/src/test/kotlin/util/skyblock/TabListAPITest.kt
@@ -0,0 +1,48 @@
+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.TabListAPI
+
+class TabListAPITest {
+ val tablist = ItemResources.loadTablist("dungeon_hub")
+
+ @Test
+ fun checkWithTitle() {
+ Assertions.assertEquals(
+ listOf(
+ "Profile: Strawberry",
+ " SB Level: [210] 26/100 XP",
+ " Bank: 1.4B",
+ " Interest: 12 Hours (689.1k)",
+ ),
+ TabListAPI.getWidgetLines(TabListAPI.WidgetName.PROFILE, includeTitle = true, from = tablist).map { it.string })
+ }
+
+ @Test
+ fun checkEndOfColumn() {
+ Assertions.assertEquals(
+ listOf(
+ " Bonzo IV: 110/150",
+ " Scarf II: 25/50",
+ " The Professor IV: 141/150",
+ " Thorn I: 29/50",
+ " Livid II: 91/100",
+ " Sadan V: 388/500",
+ " Necron VI: 531/750",
+ ),
+ TabListAPI.getWidgetLines(TabListAPI.WidgetName.COLLECTION, from = tablist).map { it.string }
+ )
+ }
+
+ @Test
+ fun checkWithoutTitle() {
+ Assertions.assertEquals(
+ listOf(
+ " Undead: 1,907",
+ " Wither: 318",
+ ),
+ TabListAPI.getWidgetLines(TabListAPI.WidgetName.ESSENCE, from = tablist).map { it.string })
+ }
+}