Changeset 2690 in josm for trunk/test/unit/org
- Timestamp:
- 2009-12-28T00:16:32+01:00 (15 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 3 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/OsmChangeBuilderTest.groovy
r2605 r2690 1 // License: GPL. For details, see LICENSE file.2 3 1 package org.openstreetmap.josm.io; 4 2 5 3 import org.junit.Test 6 import org.openstreetmap.josm.data.osm.Changeset 7 import org.openstreetmap.josm.data.osm.Node 8 import org.openstreetmap.josm.data.coor.LatLon 9 4 import org.openstreetmap.josm.data.coor.LatLon 5 import org.openstreetmap.josm.data.osm.Changeset 10 6 11 7 import static org.junit.Assert.*; 12 8 13 9 class OsmChangeBuilderTest { 14 10 … … 30 26 builder = new OsmChangeBuilder(cs, null) 31 27 32 builder = new OsmChangeBuilder(null, null) 28 builder = new OsmChangeBuilder(null, null) 33 29 } 34 30 … … 43 39 44 40 final shouldFail = new GroovyTestCase().&shouldFail 45 41 46 42 // should be OK 47 43 builder.start() … … 51 47 52 48 shouldFail(IllegalStateException) { 53 49 builder = new OsmChangeBuilder(cs) 54 50 builder.append n 55 51 } … … 61 57 62 58 shouldFail(IllegalStateException) { 63 59 builder = new OsmChangeBuilder(cs) 64 60 builder.finish() 65 61 } … … 69 65 builder.start() 70 66 builder.start() 71 } 67 } 72 68 } 73 69 … … 97 93 assert node.@lat != null 98 94 assert node.@lon != null 99 assert node.@changeset == cs.id.toString() 100 } 101 102 103 * Test building a coument with a modified node104 95 assert node.@changeset == cs.id.toString() 96 } 97 98 /** 99 * Test building a document with a modified node 100 */ 105 101 @Test 106 102 public void testDocumentWithModifiedNode() { … … 191 187 builder.append([n1,n2,n3]) 192 188 builder.finish() 193 189 194 190 def doc = new XmlParser().parseText(builder.document) 195 191 … … 206 202 207 203 node = doc.children()[2].node[0] 208 assert node.@id == n3.uniqueId.toString() 204 assert node.@id == n3.uniqueId.toString() 209 205 } 210 206 }
Note:
See TracChangeset
for help on using the changeset viewer.