Ignore:
Timestamp:
2014-01-03T04:51:04+01:00 (11 years ago)
Author:
Don-vip
Message:

fix some Sonar issues

Location:
trunk/test/unit/org/openstreetmap/josm/data/validation/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java

    r6601 r6603  
    11package org.openstreetmap.josm.data.validation.tests;
    22
    3 import org.junit.Before;
    4 import org.junit.Test;
    5 import org.openstreetmap.TestUtils;
    6 import org.openstreetmap.josm.Main;
    7 import org.openstreetmap.josm.command.ChangePropertyCommand;
    8 import org.openstreetmap.josm.data.Preferences;
    9 import org.openstreetmap.josm.data.osm.Node;
    10 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    11 import org.openstreetmap.josm.data.osm.Tag;
    12 import org.openstreetmap.josm.data.validation.Severity;
    13 import org.openstreetmap.josm.data.validation.TestError;
    14 import org.openstreetmap.josm.tools.Predicate;
    15 import org.openstreetmap.josm.tools.Predicates;
    16 import org.openstreetmap.josm.tools.Utils;
     3import static org.hamcrest.CoreMatchers.is;
     4import static org.hamcrest.CoreMatchers.notNullValue;
     5import static org.junit.Assert.assertFalse;
     6import static org.junit.Assert.assertThat;
     7import static org.junit.Assert.assertTrue;
    178
    189import java.io.StringReader;
     
    2213import java.util.Map;
    2314
    24 import static org.hamcrest.CoreMatchers.is;
    25 import static org.hamcrest.CoreMatchers.notNullValue;
    26 import static org.junit.Assert.assertFalse;
    27 import static org.junit.Assert.assertThat;
    28 import static org.junit.Assert.assertTrue;
     15import org.junit.Before;
     16import org.junit.Test;
     17import org.openstreetmap.TestUtils;
     18import org.openstreetmap.josm.Main;
     19import org.openstreetmap.josm.command.ChangePropertyCommand;
     20import org.openstreetmap.josm.data.osm.Node;
     21import org.openstreetmap.josm.data.osm.OsmPrimitive;
     22import org.openstreetmap.josm.data.osm.Tag;
     23import org.openstreetmap.josm.data.validation.Severity;
     24import org.openstreetmap.josm.data.validation.TestError;
     25import org.openstreetmap.josm.tools.Predicate;
     26import org.openstreetmap.josm.tools.Utils;
    2927
    3028public class MapCSSTagCheckerTest {
     
    3230    @Before
    3331    public void setUp() throws Exception {
    34         Main.pref = new Preferences();
     32        Main.initApplicationPreferences();
    3533    }
    3634
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java

    r6556 r6603  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.validation.tests;
     3
     4import static org.CustomMatchers.isEmpty;
     5import static org.junit.Assert.assertThat;
     6
     7import java.io.FileInputStream;
    38
    49import org.junit.Before;
    510import org.junit.Test;
    611import org.openstreetmap.josm.Main;
    7 import org.openstreetmap.josm.data.Preferences;
    812import org.openstreetmap.josm.data.osm.DataSet;
    913import org.openstreetmap.josm.data.projection.Projections;
    1014import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    1115import org.openstreetmap.josm.io.OsmReader;
    12 
    13 import java.io.FileInputStream;
    14 
    15 import static org.CustomMatchers.isEmpty;
    16 import static org.junit.Assert.assertThat;
    1716
    1817public class UnconnectedWaysTest {
     
    2322    public void setUp() throws Exception {
    2423        bib = new UnconnectedWays.UnconnectedHighways();
    25         Main.pref = new Preferences();
     24        Main.initApplicationPreferences();
    2625        Main.setProjection(Projections.getProjectionByCode("EPSG:3857"));
    2726        bib.initialize();
Note: See TracChangeset for help on using the changeset viewer.