commonTest.io.islandtime.IslandTimeTest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core-metadata Show documentation
Show all versions of core-metadata Show documentation
A multiplatform library for working with dates and times
The newest version!
package io.islandtime
import io.islandtime.format.PlatformDateTimeTextProvider
import io.islandtime.zone.PlatformTimeZoneRulesProvider
import kotlin.test.AfterTest
import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertFailsWith
class IslandTimeTest {
@BeforeTest
fun setUp() {
IslandTime.reset()
}
@AfterTest
fun tearDown() {
IslandTime.reset()
}
@Test
fun `double initialization causes an exception`() {
IslandTime.initialize {
dateTimeTextProvider = PlatformDateTimeTextProvider
}
assertFailsWith {
IslandTime.initialize {
timeZoneRulesProvider = PlatformTimeZoneRulesProvider
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy