Skip to content

Commit e261749

Browse files
#430: Add differentTimezonesTest
1 parent 6cb1b0c commit e261749

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

core/linux/test/TimeZoneNativeTest.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,20 @@ class TimeZoneNativeTest {
8282
)
8383
}
8484

85+
@Test
86+
fun differentTimezonesTest() = Testcontainers.runIfAvailable {
87+
root = "${RESOURCES}different-timezones/"
88+
89+
val exception = assertFailsWith<IllegalTimeZoneException> {
90+
TimeZone.currentSystemDefault()
91+
}
92+
93+
assertTrue(
94+
exception.message?.startsWith("Timezone mismatch") == true,
95+
"Exception message did not start with 'Timezone mismatch'"
96+
)
97+
}
98+
8599
companion object {
86100
const val RESOURCES = "./linux/test/time-zone-native-test-resources/"
87101
}
Binary file not shown.

0 commit comments

Comments
 (0)