Changeset 8880 in josm


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

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java

    r8871 r8880  
    118118    @Override
    119119    public String toString() {
    120         return originalPrimitive.getPrimitiveId() + " at index " + pos + " with role " + role + " in " + relation.getUniqueId() + " => " + decision;
     120        return originalPrimitive.getPrimitiveId() + " at index " + pos + " with role " + role + " in " + relation.getUniqueId()
     121            + " => " + decision;
    121122    }
    122123}
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java

    r8874 r8880  
    320320        @Override
    321321        protected boolean matches(Environment env) {
    322             for (Map.Entry<String,String> kv: env.osm.getKeys().entrySet()) {
     322            for (Map.Entry<String, String> kv: env.osm.getKeys().entrySet()) {
    323323                if (keyPattern.matcher(kv.getKey()).find() && pattern.matcher(kv.getValue()).find()) {
    324324                    return true;
  • 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.