Changeset 8880 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2015-10-15T00:11:11+02:00 (9 years ago)
- 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. 1 2 package org.openstreetmap.josm.gui.conflict.tags; 2 3 3 import static org. hamcrest.CoreMatchers.is;4 import static org.junit.Assert.assertEquals; 4 5 import static org.junit.Assert.assertFalse; 5 import static org.junit.Assert.assertThat;6 6 import static org.junit.Assert.assertTrue; 7 7 … … 16 16 import org.openstreetmap.josm.data.osm.DataSet; 17 17 import org.openstreetmap.josm.data.osm.Node; 18 import org.openstreetmap.josm.data.osm.OsmPrimitive;19 18 import org.openstreetmap.josm.data.osm.Relation; 20 19 import org.openstreetmap.josm.data.osm.RelationMember; … … 23 22 public class RelationMemberConflictResolverModelTest { 24 23 24 /** 25 * Setup test. 26 */ 25 27 @BeforeClass 26 28 public static void init() { … … 62 64 model.prepareDefaultRelationDecisions(); 63 65 assertTrue(model.isResolvedCompletely()); 64 assert That(model.getDecision(0).getDecision(), is(RelationMemberConflictDecisionType.KEEP));65 assert That(model.getDecision(0).getOriginalPrimitive(), is((OsmPrimitive) ways.get(0)));66 assert That(model.getDecision(0).getRole(), is("foo"));67 assert That(model.getDecision(1).getDecision(), is(RelationMemberConflictDecisionType.REMOVE));68 assert That(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()); 69 71 } 70 72 … … 109 111 model.prepareDefaultRelationDecisions(); 110 112 assertTrue(model.isResolvedCompletely()); 111 assert That(model.getDecision(0).getDecision(), is(RelationMemberConflictDecisionType.KEEP));112 assert That(model.getDecision(0).getOriginalPrimitive(), is((OsmPrimitive) ways.get(0)));113 assert That(model.getDecision(0).getRole(), is("foo"));114 assert That(model.getDecision(1).getDecision(), is(RelationMemberConflictDecisionType.KEEP));115 assert That(model.getDecision(1).getOriginalPrimitive(), is((OsmPrimitive) ways.get(0)));116 assert That(model.getDecision(1).getRole(), is("bar"));117 assert That(model.getDecision(2).getDecision(), is(RelationMemberConflictDecisionType.REMOVE));118 assert That(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()); 119 121 } 120 122 }
Note:
See TracChangeset
for help on using the changeset viewer.