Jeroen Hoffman pushed to branch master at cms-community / 
hippo-addon-search-service


Commits:
bbc3baee by Jeroen Hoffman at 2016-10-24T12:41:53+02:00
CMS-10508 set default locales in methods testing DateConstraint#toString

- - - - -


1 changed file:

- commons/src/test/java/org/onehippo/cms7/services/search/query/QueryTest.java


Changes:

=====================================
commons/src/test/java/org/onehippo/cms7/services/search/query/QueryTest.java
=====================================
--- 
a/commons/src/test/java/org/onehippo/cms7/services/search/query/QueryTest.java
+++ 
b/commons/src/test/java/org/onehippo/cms7/services/search/query/QueryTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2012-2016 Hippo B.V. (http://www.onehippo.com)
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,6 +17,7 @@ package org.onehippo.cms7.services.search.query;
 
 import java.util.Calendar;
 import java.util.Date;
+import java.util.Locale;
 
 import org.junit.Test;
 import org.onehippo.cms7.services.search.commons.query.InitialQueryImpl;
@@ -121,6 +122,9 @@ public class QueryTest {
 
     @Test
     public void testStringVisitor() throws Exception {
+
+        Locale.setDefault(Locale.Category.FORMAT, Locale.ENGLISH);
+
         long fixedTime = 1348827767244L;
         QueryImpl query =  new InitialQueryImpl()
                 .ofType("hippo:document")
@@ -140,6 +144,9 @@ public class QueryTest {
 
     @Test
     public void testStringVisitorRangeQuery() throws Exception {
+
+        Locale.setDefault(Locale.Category.FORMAT, Locale.ENGLISH);
+
         long fixedTime = 1348827767244L;
         Date after = new Date(fixedTime);
         Calendar beforeCal = Calendar.getInstance();
@@ -164,6 +171,9 @@ public class QueryTest {
 
     @Test
     public void testStringVisitorRangeQueryNonDefaultResolution() throws 
Exception {
+
+        Locale.setDefault(Locale.Category.FORMAT, Locale.ENGLISH);
+
         long fixedTime = 1348827767244L;
         Date after = new Date(fixedTime);
         Calendar beforeCal = Calendar.getInstance();



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-search-service/commit/bbc3baee62056788f8abec784d8d6abc5818431d
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to