diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-06-26 19:15:38 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-06-26 19:15:38 +0200 |
| commit | a8f8382682fb70791ac5e5601f1c0c149df8c8eb (patch) | |
| tree | 82d8118f615d6b8c9a7332990df255c9e9467d8c /src/test/kotlin/util | |
| parent | 1c5d0df368471031f892330de7628ff78a6204ed (diff) | |
| download | Firmament-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.kt | 28 |
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 + ) + } +} |
