Changeset 9871 in josm


Ignore:
Timestamp:
2016-02-24T09:10:48+01:00 (4 years ago)
Author:
simon04
Message:

see #12563 - Fix unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java

    r9862 r9871  
    88import org.junit.Before;
    99import org.junit.Test;
    10 import org.openstreetmap.josm.Main;
    11 import org.openstreetmap.josm.data.projection.Projections;
     10import org.openstreetmap.josm.JOSMFixture;
    1211
    1312/**
     
    2120    @Before
    2221    public void setUp() {
    23         Locale.setDefault(Locale.GERMAN);
    24         Main.initApplicationPreferences();
    25         Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator
     22        JOSMFixture.createUnitTestFixture().init();
    2623    }
    2724
     
    167164        assertEquals("47.0", c.latToString(CoordinateFormat.DECIMAL_DEGREES));
    168165        assertEquals("19.0", c.lonToString(CoordinateFormat.DECIMAL_DEGREES));
    169         assertEquals("47°00'00,0\"N", c.latToString(CoordinateFormat.DEGREES_MINUTES_SECONDS));
    170         assertEquals("19°00'00,0\"E", c.lonToString(CoordinateFormat.DEGREES_MINUTES_SECONDS));
    171         assertEquals("47°00,000'N", c.latToString(CoordinateFormat.NAUTICAL));
    172         assertEquals("19°00,000'E", c.lonToString(CoordinateFormat.NAUTICAL));
     166        assertEquals("47°00'00.0\"N", c.latToString(CoordinateFormat.DEGREES_MINUTES_SECONDS));
     167        assertEquals("19°00'00.0\"E", c.lonToString(CoordinateFormat.DEGREES_MINUTES_SECONDS));
     168        assertEquals("47°00.000'N", c.latToString(CoordinateFormat.NAUTICAL));
     169        assertEquals("19°00.000'E", c.lonToString(CoordinateFormat.NAUTICAL));
    173170        assertEquals("5942074.0724311", c.latToString(CoordinateFormat.EAST_NORTH));
    174171        assertEquals("2115070.3250722", c.lonToString(CoordinateFormat.EAST_NORTH));
Note: See TracChangeset for help on using the changeset viewer.