aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/util
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-06-26 19:15:38 +0200
committerLinnea Gräf <nea@nea.moe>2025-06-26 19:15:38 +0200
commita8f8382682fb70791ac5e5601f1c0c149df8c8eb (patch)
tree82d8118f615d6b8c9a7332990df255c9e9467d8c /src/test/kotlin/util
parent1c5d0df368471031f892330de7628ff78a6204ed (diff)
downloadFirmament-a8f8382682fb70791ac5e5601f1c0c149df8c8eb.tar.gz
Firmament-a8f8382682fb70791ac5e5601f1c0c149df8c8eb.tar.bz2
Firmament-a8f8382682fb70791ac5e5601f1c0c149df8c8eb.zip
feat: add creation timestamp in lore
Diffstat (limited to 'src/test/kotlin/util')
-rw-r--r--src/test/kotlin/util/skyblock/TimestampTest.kt28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/kotlin/util/skyblock/TimestampTest.kt b/src/test/kotlin/util/skyblock/TimestampTest.kt
new file mode 100644
index 0000000..b960cb9
--- /dev/null
+++ b/src/test/kotlin/util/skyblock/TimestampTest.kt
@@ -0,0 +1,28 @@
+package moe.nea.firmament.test.util.skyblock
+
+import java.time.Instant
+import java.time.ZonedDateTime
+import org.junit.jupiter.api.Assertions
+import org.junit.jupiter.api.Test
+import moe.nea.firmament.test.testutil.ItemResources
+import moe.nea.firmament.util.SBData
+import moe.nea.firmament.util.timestamp
+
+class TimestampTest {
+
+ @Test
+ fun testLongTimestamp() {
+ Assertions.assertEquals(
+ Instant.ofEpochSecond(1658091600),
+ ItemResources.loadItem("hyperion").timestamp
+ )
+ }
+
+ @Test
+ fun testStringTimestamp() {
+ Assertions.assertEquals(
+ ZonedDateTime.of(2021, 10, 11, 15, 39, 0, 0, SBData.hypixelTimeZone).toInstant(),
+ ItemResources.loadItem("backpack-in-menu").timestamp
+ )
+ }
+}