martin-g commented on a change in pull request #396: Wicket 6712 js time zone URL: https://github.com/apache/wicket/pull/396#discussion_r340442004
########## File path: wicket-core/src/test/java/org/apache/wicket/protocol/http/ClientPropertiesTest.java ########## @@ -149,4 +149,32 @@ void timezoneAET() assertEquals(TimeZone.getTimeZone("AET"), props.getTimeZone()); } + + /** + * jsTimeZone "positive" test + */ + @Test + void timezoneJsPositive() + { + ClientProperties props = new ClientProperties(); + props.setUtcOffset("11"); + props.setUtcDSTOffset("10"); + props.setJsTimeZone("Asia/Novosibirsk"); + + assertEquals(TimeZone.getTimeZone("Asia/Novosibirsk"), props.getTimeZone()); + } + + /** + * jsTimeZone "negative" test + */ + @Test + void timezoneJsNegative() + { + ClientProperties props = new ClientProperties(); + props.setUtcOffset("11"); + props.setUtcDSTOffset("10"); + props.setJsTimeZone("aaa"); + + assertEquals(TimeZone.getTimeZone("AET"), props.getTimeZone()); Review comment: Please add a test with `props.getJsTimeZone()` returning `null`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services