← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19353: Removed locale dependency, test was failing in norwegian locale

 

------------------------------------------------------------
revno: 19353
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-06-11 09:33:22 +0200
message:
  Removed locale dependency, test was failing in norwegian locale
modified:
  dhis-2/dhis-web/dhis-web-ohie/src/test/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/GeoUtilsTest.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/test/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/GeoUtilsTest.java'
--- dhis-2/dhis-web/dhis-web-ohie/src/test/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/GeoUtilsTest.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/test/java/org/hisp/dhis/web/ohie/fred/webapi/v1/utils/GeoUtilsTest.java	2015-06-11 07:33:22 +0000
@@ -30,6 +30,7 @@
 
 import org.junit.Assert;
 import org.junit.Test;
+import java.util.Locale;
 
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
@@ -42,7 +43,7 @@
         Double lat = 1.0d;
         Double lng = 2.0d;
 
-        String coordinatesString = String.format( "[%f, %f]", lat, lng );
+        String coordinatesString = String.format( Locale.ENGLISH, "[%f, %f]", lat, lng );
 
         GeoUtils.Coordinates coordinates = GeoUtils.parseCoordinates( coordinatesString, GeoUtils.CoordinateOrder.COORDINATE_LATLNG );
 
@@ -56,7 +57,7 @@
         Double lat = 1.0d;
         Double lng = 2.0d;
 
-        String coordinatesString = String.format( "[%f, %f]", lng, lat );
+        String coordinatesString = String.format( Locale.ENGLISH, "[%f, %f]", lng, lat );
 
         GeoUtils.Coordinates coordinates = GeoUtils.parseCoordinates( coordinatesString, GeoUtils.CoordinateOrder.COORDINATE_LNGLAT );