Changeset 8914 in josm for trunk/test


Ignore:
Timestamp:
2015-10-19T23:49:11+02:00 (4 years ago)
Author:
Don-vip
Message:

improve unit tests

Location:
trunk/test/unit/org/openstreetmap/josm/command/conflict
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java

    r8910 r8914  
    33
    44import static org.junit.Assert.assertFalse;
     5import static org.junit.Assert.assertNotNull;
    56import static org.junit.Assert.assertTrue;
    67
     8import org.junit.BeforeClass;
    79import org.junit.Test;
     10import org.openstreetmap.josm.JOSMFixture;
    811import org.openstreetmap.josm.data.conflict.Conflict;
    912import org.openstreetmap.josm.data.osm.DataSet;
     13import org.openstreetmap.josm.data.osm.Node;
    1014import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1115import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     
    1519 */
    1620public class ConflictAddCommandTest {
     21
     22    /**
     23     * Setup test.
     24     */
     25    @BeforeClass
     26    public static void setUpBeforeClass() {
     27        JOSMFixture.createUnitTestFixture().init();
     28    }
    1729
    1830    /**
     
    3143        assertTrue(layer.getConflicts().isEmpty());
    3244    }
     45
     46    /**
     47     * Unit test of {@code ConflictAddCommand#getDescriptionIcon} method.
     48     */
     49    @Test
     50    public void testGetDescriptionIcon() {
     51        OsmDataLayer layer = new OsmDataLayer(new DataSet(), null, null);
     52        Conflict<Node> conflict = new Conflict<>(new Node(), new Node());
     53        assertNotNull(new ConflictAddCommand(layer, conflict).getDescriptionIcon());
     54    }
    3355}
Note: See TracChangeset for help on using the changeset viewer.