Changeset 7851 in josm for trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java
- Timestamp:
- 2014-12-20T03:43:21+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java
r7850 r7851 46 46 @Test 47 47 public void nodesOpenWay() { 48 DataSet dataSet; 49 OsmDataLayer layer; 50 Node point1, point2, point3; 51 52 dataSet = new DataSet(); 53 layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null); 48 DataSet dataSet = new DataSet(); 49 OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null); 54 50 55 51 // Create test points, lower left is (0,0). … … 58 54 // - 3 - 2 59 55 // - - - - 60 point1 = new Node(new EastNorth(0, 2));61 point2 = new Node(new EastNorth(3, 1));62 point3 = new Node(new EastNorth(1, 1));56 Node point1 = new Node(new EastNorth(0, 2)); 57 Node point2 = new Node(new EastNorth(3, 1)); 58 Node point3 = new Node(new EastNorth(1, 1)); 63 59 64 60 try { … … 89 85 @Test 90 86 public void nodesClosedWay() { 91 DataSet dataSet; 92 OsmDataLayer layer; 93 Node point1, point2, point3, point4; 94 95 dataSet = new DataSet(); 96 layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null); 87 DataSet dataSet = new DataSet(); 88 OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null); 97 89 98 90 // Create test points, lower left is (0,0). … … 101 93 // - - - 102 94 // 1 - 2 103 point1 = new Node(new EastNorth(0, 0));104 point2 = new Node(new EastNorth(2, 0));105 point3 = new Node(new EastNorth(2, 2));106 point4 = new Node(new EastNorth(0, 2));95 Node point1 = new Node(new EastNorth(0, 0)); 96 Node point2 = new Node(new EastNorth(2, 0)); 97 Node point3 = new Node(new EastNorth(2, 2)); 98 Node point4 = new Node(new EastNorth(0, 2)); 107 99 108 100 try { … … 133 125 @Test 134 126 public void nodesOpenWays() { 135 DataSet dataSet; 136 OsmDataLayer layer; 137 Node point1, point2, point3, point4; 138 139 dataSet = new DataSet(); 140 layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null); 127 DataSet dataSet = new DataSet(); 128 OsmDataLayer layer = new OsmDataLayer(dataSet, OsmDataLayer.createNewName(), null); 141 129 142 130 // Create test points, lower left is (0,0). … … 145 133 // 3 - 2 146 134 // - - 4 147 point1 = new Node(new EastNorth(0, 2));148 point2 = new Node(new EastNorth(2, 1));149 point3 = new Node(new EastNorth(0, 1));150 point4 = new Node(new EastNorth(2, 0));135 Node point1 = new Node(new EastNorth(0, 2)); 136 Node point2 = new Node(new EastNorth(2, 1)); 137 Node point3 = new Node(new EastNorth(0, 1)); 138 Node point4 = new Node(new EastNorth(2, 0)); 151 139 152 140 try { … … 180 168 */ 181 169 private void createWay(DataSet dataSet, Node... nodes) { 182 Way way; 183 184 way = new Way(); 170 Way way = new Way(); 185 171 dataSet.addPrimitive(way); 186 172 … … 202 188 */ 203 189 private void assertCoordEq(Node node, double x, double y) { 204 EastNorth coordinate; 205 206 coordinate = node.getEastNorth(); 190 EastNorth coordinate = node.getEastNorth(); 207 191 assertEquals("Wrong x coordinate.", x, coordinate.getX(), LatLon.MAX_SERVER_PRECISION); 208 192 assertEquals("Wrong y coordinate.", y, coordinate.getY(), LatLon.MAX_SERVER_PRECISION);
Note:
See TracChangeset
for help on using the changeset viewer.