public class TimeZoneTestListener
extends TimeZoneListener
Replaces the default TimeZone
This function replaces the current default timezone with timeZone, then executes the test and finally returns the original default timezone to it's place.
Attention: This code is subject to race conditions. The System can only have one default timezone, and if you change the timezone while it was already changed, the result may be inconsistent.
| Constructor and Description |
|---|
TimeZoneTestListener(java.util.TimeZone timeZone)
Replaces the default TimeZone
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterTest(io.kotlintest.TestCase testCase,
io.kotlintest.TestResult result) |
void |
beforeTest(io.kotlintest.TestCase testCase) |
changeTimeZone, resetTimeZonepublic TimeZoneTestListener(java.util.TimeZone timeZone)
Replaces the default TimeZone
This function replaces the current default timezone with timeZone, then executes the test and finally returns the original default timezone to it's place.
Attention: This code is subject to race conditions. The System can only have one default timezone, and if you change the timezone while it was already changed, the result may be inconsistent.