Changeset 8880 in josm for trunk/test/unit/org/openstreetmap


Ignore:
Timestamp:
2015-10-15T00:11:11+02:00 (9 years ago)
Author:
Don-vip
Message:

checkstyle + remove call to org.hamcrest.CoreMatchers.is (generating a deprecation warning)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModelTest.java

    r8871 r8880  
     1// License: GPL. For details, see LICENSE file.
    12package org.openstreetmap.josm.gui.conflict.tags;
    23
    3 import static org.hamcrest.CoreMatchers.is;
     4import static org.junit.Assert.assertEquals;
    45import static org.junit.Assert.assertFalse;
    5 import static org.junit.Assert.assertThat;
    66import static org.junit.Assert.assertTrue;
    77
     
    1616import org.openstreetmap.josm.data.osm.DataSet;
    1717import org.openstreetmap.josm.data.osm.Node;
    18 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1918import org.openstreetmap.josm.data.osm.Relation;
    2019import org.openstreetmap.josm.data.osm.RelationMember;
     
    2322public class RelationMemberConflictResolverModelTest {
    2423
     24    /**
     25     * Setup test.
     26     */
    2527    @BeforeClass
    2628    public static void init() {
     
    6264        model.prepareDefaultRelationDecisions();
    6365        assertTrue(model.isResolvedCompletely());
    64         assertThat(model.getDecision(0).getDecision(), is(RelationMemberConflictDecisionType.KEEP));
    65         assertThat(model.getDecision(0).getOriginalPrimitive(), is((OsmPrimitive) ways.get(0)));
    66         assertThat(model.getDecision(0).getRole(), is("foo"));
    67         assertThat(model.getDecision(1).getDecision(), is(RelationMemberConflictDecisionType.REMOVE));
    68         assertThat(model.getDecision(1).getOriginalPrimitive(), is((OsmPrimitive) ways.get(1)));
     66        assertEquals(RelationMemberConflictDecisionType.KEEP, model.getDecision(0).getDecision());
     67        assertEquals(ways.get(0), model.getDecision(0).getOriginalPrimitive());
     68        assertEquals("foo", model.getDecision(0).getRole());
     69        assertEquals(RelationMemberConflictDecisionType.REMOVE, model.getDecision(1).getDecision());
     70        assertEquals(ways.get(1), model.getDecision(1).getOriginalPrimitive());
    6971    }
    7072
     
    109111        model.prepareDefaultRelationDecisions();
    110112        assertTrue(model.isResolvedCompletely());
    111         assertThat(model.getDecision(0).getDecision(), is(RelationMemberConflictDecisionType.KEEP));
    112         assertThat(model.getDecision(0).getOriginalPrimitive(), is((OsmPrimitive) ways.get(0)));
    113         assertThat(model.getDecision(0).getRole(), is("foo"));
    114         assertThat(model.getDecision(1).getDecision(), is(RelationMemberConflictDecisionType.KEEP));
    115         assertThat(model.getDecision(1).getOriginalPrimitive(), is((OsmPrimitive) ways.get(0)));
    116         assertThat(model.getDecision(1).getRole(), is("bar"));
    117         assertThat(model.getDecision(2).getDecision(), is(RelationMemberConflictDecisionType.REMOVE));
    118         assertThat(model.getDecision(3).getDecision(), is(RelationMemberConflictDecisionType.REMOVE));
     113        assertEquals(RelationMemberConflictDecisionType.KEEP, model.getDecision(0).getDecision());
     114        assertEquals(ways.get(0), model.getDecision(0).getOriginalPrimitive());
     115        assertEquals("foo", model.getDecision(0).getRole());
     116        assertEquals(RelationMemberConflictDecisionType.KEEP, model.getDecision(1).getDecision());
     117        assertEquals(ways.get(0), model.getDecision(1).getOriginalPrimitive());
     118        assertEquals("bar", model.getDecision(1).getRole());
     119        assertEquals(RelationMemberConflictDecisionType.REMOVE, model.getDecision(2).getDecision());
     120        assertEquals(RelationMemberConflictDecisionType.REMOVE, model.getDecision(3).getDecision());
    119121    }
    120122}
Note: See TracChangeset for help on using the changeset viewer.