Ard Schrijvers pushed to branch master at cms-community / hippo-site-toolkit


Commits:
e921b850 by Ard Schrijvers at 2016-10-13T14:57:47+02:00
HSTTWO-3826 Fix unit test setup : Don't for UTC

- - - - -


1 changed file:

- 
content-beans/src/test/java/org/hippoecm/hst/content/beans/query/TestHstFilters.java


Changes:

=====================================
content-beans/src/test/java/org/hippoecm/hst/content/beans/query/TestHstFilters.java
=====================================
--- 
a/content-beans/src/test/java/org/hippoecm/hst/content/beans/query/TestHstFilters.java
+++ 
b/content-beans/src/test/java/org/hippoecm/hst/content/beans/query/TestHstFilters.java
@@ -16,6 +16,7 @@
 package org.hippoecm.hst.content.beans.query;
 
 
+import org.apache.jackrabbit.util.ISO8601;
 import org.hippoecm.hst.AbstractBeanTestCase;
 import org.hippoecm.hst.content.beans.query.exceptions.FilterException;
 import org.hippoecm.hst.content.beans.query.filter.Filter;
@@ -91,11 +92,8 @@ public class TestHstFilters extends AbstractBeanTestCase {
         // Calendar/Date
         Calendar cal = Calendar.getInstance(Locale.ENGLISH);
         cal.setTimeInMillis(1475155000000L);
-        cal.setTimeZone(TimeZone.getTimeZone("UTC"));
-        assertEquals("xs:dateTime('2016-09-29T13:16:40.000Z')", 
filter.getStringValue(cal));
-
-        // this should work but doesn't yet, see HSTTWO-3826
-        // assertEquals("xs:dateTime('2016-09-29T13:16:40.000Z')", 
filter.getStringValue(cal.getTime()));
+        assertEquals("xs:dateTime('"+ISO8601.format(cal)+"')", 
filter.getStringValue(cal));
+        assertEquals("xs:dateTime('" + ISO8601.format(cal) + "')", 
filter.getStringValue(cal.getTime()));
     }
 
     @Test(expected = FilterException.class)



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/e921b85096a43c54e3628a05aa91c269d10ed895
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to