aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-04 17:02:10 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-04 17:02:10 +1200
commit95d441ba8fc3459ef8edc78142b68917cb66c670 (patch)
tree5182d2ae051fcf7d14e766c3a0ac19624d5fdc04 /test/org
parent263fa7e52ae495b6cc05b045754940f2a342a706 (diff)
downloadtraccar-server-95d441ba8fc3459ef8edc78142b68917cb66c670.tar.gz
traccar-server-95d441ba8fc3459ef8edc78142b68917cb66c670.tar.bz2
traccar-server-95d441ba8fc3459ef8edc78142b68917cb66c670.zip
Fix json conversion unit test
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/web/JsonConverterTest.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/org/traccar/web/JsonConverterTest.java b/test/org/traccar/web/JsonConverterTest.java
index b02ec2d40..2b08c4f2c 100644
--- a/test/org/traccar/web/JsonConverterTest.java
+++ b/test/org/traccar/web/JsonConverterTest.java
@@ -19,7 +19,7 @@ public class JsonConverterTest {
"\"int\": 42, " +
"\"double\": 41.99, " +
"\"string\": \"discworld\", " +
- "\"date\":\"2015-07-09T19:02:17\"" +
+ "\"date\":\"2015-07-09T19:02:17+0000\"" +
"}"),
new Primitives());
@@ -27,15 +27,7 @@ public class JsonConverterTest {
assertEquals(42, o.getInt());
assertEquals(41.99, o.getDouble(), 0.001);
assertEquals("discworld", o.getString());
-
- Calendar c = Calendar.getInstance();
- c.setTime(o.getDate());
- assertEquals(2015, c.get(Calendar.YEAR));
- assertEquals(Calendar.JULY, c.get(Calendar.MONTH));
- assertEquals(9, c.get(Calendar.DAY_OF_MONTH));
- assertEquals(19, c.get(Calendar.HOUR_OF_DAY));
- assertEquals(2, c.get(Calendar.MINUTE));
- assertEquals(17, c.get(Calendar.SECOND));
+ assertEquals(1436468537000L, o.getDate().getTime());
}