From 4e8b3e4c483edd7276abfd8409f332a6d404de37 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 28 May 2016 00:11:11 +0200 Subject: [PATCH] Use correct timezone in tests --- .../rhynodge/webpages/weather/wettercom/WetterComStateTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/kotlin/net/pterodactylus/rhynodge/webpages/weather/wettercom/WetterComStateTest.kt b/src/test/kotlin/net/pterodactylus/rhynodge/webpages/weather/wettercom/WetterComStateTest.kt index e6ab943..149b9a2 100644 --- a/src/test/kotlin/net/pterodactylus/rhynodge/webpages/weather/wettercom/WetterComStateTest.kt +++ b/src/test/kotlin/net/pterodactylus/rhynodge/webpages/weather/wettercom/WetterComStateTest.kt @@ -16,7 +16,7 @@ class WetterComStateTest { @Test fun statesWithoutHoursEqualOneAnother() { - val now = Instant.now().atZone(ZoneId.of("UTC")) + val now = Instant.now().atZone(ZoneId.of("Europe/Berlin")) val firstState = WetterComState(ZonedDateTime.from(now)) val secondState = WetterComState(ZonedDateTime.from(now)) assertThat(firstState, `is`(secondState)) @@ -24,7 +24,7 @@ class WetterComStateTest { @Test fun statesWithTheSameHoursAreEqual() { - val now = Instant.now().atZone(ZoneId.of("UTC")) + val now = Instant.now().atZone(ZoneId.of("Europe/Berlin")) val firstState = WetterComState(ZonedDateTime.from(now)) firstState.addHour(HourState(0, 10.0, 0.05, 0.0, WindDirection.NORTH, 5.0, "Fine", "http://1")) firstState.addHour(HourState(1, 12.0, 0.1, 2.0, WindDirection.WEST, 8.0, "Superb", "http://2")) @@ -36,7 +36,7 @@ class WetterComStateTest { @Test fun iteratingDeliversHourStates() { - val now = Instant.now().atZone(ZoneId.of("UTC")) + val now = Instant.now().atZone(ZoneId.of("Europe/Berlin")) val firstState = WetterComState(ZonedDateTime.from(now)) firstState.addHour(HourState(0, 10.0, 0.05, 0.0, WindDirection.NORTH, 5.0, "Fine", "http://1")) firstState.addHour(HourState(1, 12.0, 0.1, 2.0, WindDirection.WEST, 8.0, "Superb", "http://2")) -- 2.7.4