Changeset 8857 in josm for trunk/test/unit/org/openstreetmap/josm/actions
- Timestamp:
- 2015-10-11T17:28:19+02:00 (11 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/actions
- Files:
-
- 8 edited
-
AlignInLineActionTest.java (modified) (1 diff)
-
CombineWayActionTest.java (modified) (2 diffs)
-
CopyActionTest.java (modified) (4 diffs)
-
CreateCircleActionTest.java (modified) (1 diff)
-
SplitWayActionTest.java (modified) (1 diff)
-
UnJoinNodeWayActionTest.java (modified) (1 diff)
-
mapmode/SelectActionTest.java (modified) (4 diffs)
-
search/SearchCompilerTest.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java
r7937 r8857 16 16 17 17 /** 18 * Unit tests for class AlignInLineAction. 18 * Unit tests for class {@link AlignInLineAction}. 19 19 */ 20 20 public final class AlignInLineActionTest { -
trunk/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java
r8856 r8857 22 22 23 23 /** 24 * Unit tests for class CombineWayAction. 24 * Unit tests for class {@link CombineWayAction}. 25 25 */ 26 26 public class CombineWayActionTest { … … 31 31 @BeforeClass 32 32 public static void setUp() { 33 JOSMFixture.createUnitTestFixture().init( false);33 JOSMFixture.createUnitTestFixture().init(); 34 34 } 35 35 -
trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java
r8624 r8857 2 2 package org.openstreetmap.josm.actions; 3 3 4 import static org.hamcrest.CoreMatchers.is; 5 import static org.junit.Assert.assertThat; 4 import static org.junit.Assert.assertEquals; 6 5 7 6 import java.util.Arrays; … … 14 13 import org.openstreetmap.josm.data.osm.Way; 15 14 15 /** 16 * Unit tests for class {@link CopyAction}. 17 */ 16 18 public class CopyActionTest { 17 19 20 /** 21 * Setup test. 22 */ 18 23 @BeforeClass 19 24 public static void setUpBeforeClass() { … … 24 29 public void testCopyStringWay() throws Exception { 25 30 final Way way = new Way(123L); 26 assert That(CopyAction.getCopyString(Collections.singleton(way)), is("way 123"));31 assertEquals("way 123", CopyAction.getCopyString(Collections.singleton(way))); 27 32 } 28 33 … … 31 36 final Way way = new Way(123L); 32 37 final Relation relation = new Relation(456); 33 assert That(CopyAction.getCopyString(Arrays.asList(way, relation)), is("way 123,relation 456"));34 assert That(CopyAction.getCopyString(Arrays.asList(relation, way)), is("relation 456,way 123"));38 assertEquals("way 123,relation 456", CopyAction.getCopyString(Arrays.asList(way, relation))); 39 assertEquals("relation 456,way 123", CopyAction.getCopyString(Arrays.asList(relation, way))); 35 40 } 36 41 } -
trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java
r8624 r8857 31 31 32 32 /** 33 * Unit tests for class CreateCircleAction. 33 * Unit tests for class {@link CreateCircleAction}. 34 34 */ 35 35 public final class CreateCircleActionTest { -
trunk/test/unit/org/openstreetmap/josm/actions/SplitWayActionTest.java
r8624 r8857 18 18 19 19 /** 20 * Unit tests for class SplitWayAction. 20 * Unit tests for class {@link SplitWayAction}. 21 21 */ 22 22 public final class SplitWayActionTest { -
trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java
r8624 r8857 17 17 18 18 /** 19 * Unit tests for class UnJoinNodeWayAction. 19 * Unit tests for class {@link UnJoinNodeWayAction}. 20 20 */ 21 21 public final class UnJoinNodeWayActionTest { -
trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
r8836 r8857 24 24 import org.openstreetmap.josm.data.osm.DataSet; 25 25 import org.openstreetmap.josm.data.osm.Node; 26 import org.openstreetmap.josm.data.osm.OsmPrimitive;27 26 import org.openstreetmap.josm.data.osm.Way; 28 27 import org.openstreetmap.josm.gui.MapFrame; … … 30 29 import org.openstreetmap.josm.gui.layer.Layer; 31 30 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 32 import org.openstreetmap.josm.tools.Predicate;33 31 34 32 /** … … 37 35 public class SelectActionTest { 38 36 39 public class MapViewMock extends MapView { 40 public OsmDataLayer layer; 41 public DataSet currentDataSet; 42 43 public Predicate<OsmPrimitive> isSelectablePredicate = 44 new Predicate<OsmPrimitive>() { 45 @Override 46 public boolean evaluate(OsmPrimitive prim) { 47 return true; 48 } 49 }; 37 private class MapViewMock extends MapView { 38 private OsmDataLayer layer; 39 private DataSet currentDataSet; 50 40 51 41 MapViewMock(DataSet dataSet, OsmDataLayer layer) { … … 65 55 @Override 66 56 public void removeMouseListener(MouseListener ml) {} 67 68 public void addMouseMotionListener(MouseListener ml) {}69 70 public void removeMouseMotionListener(MouseListener ml) {}71 72 public void mvRepaint() {}73 57 74 58 @Override -
trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
r8838 r8857 13 13 import org.openstreetmap.josm.data.osm.Way; 14 14 15 /** 16 * Unit tests for class {@link SearchCompiler}. 17 */ 15 18 public class SearchCompilerTest { 16 19 … … 109 112 public void testNthParseNegative() throws Exception { 110 113 Assert.assertThat(SearchCompiler.compile("nth:-1").toString(), CoreMatchers.is("Nth{nth=-1, modulo=false}")); 111 112 114 } 113 115 }
Note:
See TracChangeset
for help on using the changeset viewer.
