diff options
author | Leif Åstrand <leif@vaadin.com> | 2014-02-07 14:23:18 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-02-10 15:42:58 +0000 |
commit | 5e993486f1196971596ee0add0c73dd9603d9068 (patch) | |
tree | 08a4f357c6902c7c10cbc332592826efe98ef72c /uitest | |
parent | 9bab554ec1386f1cc2c9fa3f1cf064e80ffa997e (diff) | |
download | vaadin-framework-5e993486f1196971596ee0add0c73dd9603d9068.tar.gz vaadin-framework-5e993486f1196971596ee0add0c73dd9603d9068.zip |
Use consistent date output in serializer test (#13073)
Change-Id: I32e9377d5ef8a8e88a8126ece78f0b8750cfa2ea
Diffstat (limited to 'uitest')
-rw-r--r-- | uitest/src/com/vaadin/tests/serialization/SerializerTest.java | 9 | ||||
-rw-r--r-- | uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerTest.java b/uitest/src/com/vaadin/tests/serialization/SerializerTest.java index 1184be79d4..d4849ce667 100644 --- a/uitest/src/com/vaadin/tests/serialization/SerializerTest.java +++ b/uitest/src/com/vaadin/tests/serialization/SerializerTest.java @@ -16,6 +16,7 @@ package com.vaadin.tests.serialization; +import java.text.DateFormat; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -23,9 +24,11 @@ import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import java.util.TimeZone; import com.vaadin.annotations.Widgetset; import com.vaadin.server.VaadinRequest; @@ -321,7 +324,11 @@ public class SerializerTest extends AbstractTestUI { @Override public void sendDate(Date date) { - log.log("sendDate: " + date.toString()); + DateFormat format = DateFormat.getDateTimeInstance( + DateFormat.LONG, DateFormat.FULL, + new Locale("en", "fi")); + format.setTimeZone(TimeZone.getTimeZone("UTC")); + log.log("sendDate: " + format.format(date)); } }); diff --git a/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java b/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java index 518c222bc3..d093a30ea7 100644 --- a/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java +++ b/uitest/src/com/vaadin/tests/serialization/SerializerTestTest.java @@ -27,9 +27,9 @@ public class SerializerTestTest extends MultiBrowserTest { openTestURL(); int logRow = 0; - Assert.assertEquals("sendDate: Fri May 31 11:12:13 CEST 2013", + Assert.assertEquals("sendDate: May 31, 2013 8:12:13 AM UTC", getLogRow(logRow++)); - Assert.assertEquals("sendDate: Thu Jan 01 01:00:00 CET 1970", + Assert.assertEquals("sendDate: January 1, 1970 12:00:00 AM UTC", getLogRow(logRow++)); Assert.assertEquals( "sendEnum: PREFORMATTED, [HTML, RAW], [PREFORMATTED, XML]", |