Changeset 15455 in josm for trunk/test/unit


Ignore:
Timestamp:
2019-10-12T22:12:57+02:00 (5 years ago)
Author:
Don-vip
Message:

see #18219, see #18216 - update unit tests

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/MergeLayerActionTest.java

    r14332 r15455  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.actions;
     3
     4import static org.junit.Assert.assertEquals;
     5import static org.junit.Assert.assertNull;
    36
    47import javax.swing.JLabel;
    58import javax.swing.JPanel;
    69
    7 import static org.junit.Assert.assertEquals;
    8 import static org.junit.Assert.assertNull;
    9 
    1010import org.junit.Before;
    1111import org.junit.Rule;
    1212import org.junit.Test;
     13import org.openstreetmap.josm.TestUtils;
    1314import org.openstreetmap.josm.data.osm.DataSet;
    1415import org.openstreetmap.josm.gui.ExtendedDialog;
     
    1718import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1819import org.openstreetmap.josm.gui.widgets.JosmComboBox;
    19 import org.openstreetmap.josm.TestUtils;
    2020import org.openstreetmap.josm.testutils.JOSMTestRules;
    2121import org.openstreetmap.josm.testutils.mockers.ExtendedDialogMocker;
     
    3636    @Rule
    3737    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    38     public JOSMTestRules test = new JOSMTestRules().main();
     38    public JOSMTestRules test = new JOSMTestRules().main().projection();
    3939
    4040    /**
     
    108108        TestUtils.assumeWorkingJMockit();
    109109        final MergeLayerExtendedDialogMocker edMocker = new MergeLayerExtendedDialogMocker();
    110         edMocker.getMockResultMap().put("Please select the target layer.", "Merge");
     110        edMocker.getMockResultMap().put("Please select the target layer.", "Merge layer");
    111111
    112112        OsmDataLayer layer1 = new OsmDataLayer(new DataSet(), "1", null);
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/RelationCheckerTest.java

    r14990 r15455  
    137137
    138138        List<TestError> errors = testRelation(r);
    139         assertEquals(1, errors.size());
    140         assertEquals("Role of relation member does not match template expression 'power' in preset Power Route", errors.get(0).getDescription());
     139        assertEquals(2, errors.size());
     140        assertEquals("Role 'line' missing", errors.get(0).getDescription());
     141        assertEquals("Empty role found when expecting one of 'line/substation'", errors.get(1).getDescription());
    141142    }
    142143
Note: See TracChangeset for help on using the changeset viewer.