Changeset 1813 in josm for trunk/test/functional
- Timestamp:
- 2009-07-19T18:31:22+02:00 (15 years ago)
- Location:
- trunk/test/functional/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/gui/history/HistoryBrowserTest.java
r1709 r1813 19 19 import org.openstreetmap.josm.data.osm.history.HistoryDataSet; 20 20 import org.openstreetmap.josm.data.projection.Mercator; 21 import org.openstreetmap.josm.gui. PleaseWaitDialog;21 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 22 22 import org.openstreetmap.josm.io.OsmServerHistoryReader; 23 23 import org.openstreetmap.josm.io.OsmTransferException; … … 54 54 } 55 55 System.setProperty("josm.home", josmHome); 56 Main.pleaseWaitDlg = new PleaseWaitDialog(null);57 56 Main.pref.init(false); 58 57 … … 74 73 HistoryDataSet ds = null; 75 74 try { 76 ds = reader.parseHistory( );75 ds = reader.parseHistory(NullProgressMonitor.INSTANCE); 77 76 } catch(OsmTransferException e) { 78 77 e.printStackTrace(); -
trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
r1806 r1813 3 3 4 4 import static org.junit.Assert.assertEquals; 5 import static org.junit.Assert.assertFalse; 5 6 import static org.junit.Assert.assertNotNull; 7 import static org.junit.Assert.assertTrue; 6 8 import static org.junit.Assert.fail; 7 import static org.junit.Assert.*;8 9 9 10 import java.io.File; … … 31 32 import org.openstreetmap.josm.data.osm.Way; 32 33 import org.openstreetmap.josm.data.projection.Mercator; 33 import org.openstreetmap.josm.gui. PleaseWaitDialog;34 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 34 35 import org.xml.sax.SAXException; 35 36 … … 39 40 /** 40 41 * builds a large data set to be used later for testing MULTI FETCH on the server 41 * 42 * 42 43 * @return a large data set 43 44 */ … … 120 121 /** 121 122 * creates the dataset on the server. 122 * 123 * 123 124 * @param ds the data set 124 125 * @throws OsmTransferException … … 132 133 133 134 OsmServerWriter writer = new OsmServerWriter(); 134 writer.uploadOsm("0.6", primitives );135 writer.uploadOsm("0.6", primitives, NullProgressMonitor.INSTANCE); 135 136 } 136 137 … … 177 178 // 178 179 System.setProperty("josm.home", josmHome); 179 Main.pleaseWaitDlg = new PleaseWaitDialog(null);180 180 Main.pref.init(false); 181 181 // don't use atomic upload, the test API server can't cope with large diff uploads … … 237 237 ds = new DataSet(); 238 238 FileInputStream fis = new FileInputStream(f); 239 ds = OsmReader.parseDataSet(fis, Main.pleaseWaitDlg);239 ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE); 240 240 fis.close(); 241 241 } … … 248 248 reader.append(nodes.get(i)); 249 249 } 250 DataSet out = reader.parseOsm( );250 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 251 251 assertEquals(10, out.nodes.size()); 252 252 Iterator<Node> it = out.nodes.iterator(); … … 267 267 reader.append(ways.get(i)); 268 268 } 269 DataSet out = reader.parseOsm( );269 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 270 270 assertEquals(10, out.ways.size()); 271 271 Iterator<Way> it = out.ways.iterator(); … … 287 287 reader.append(relations.get(i)); 288 288 } 289 DataSet out = reader.parseOsm( );289 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 290 290 assertEquals(10, out.relations.size()); 291 291 Iterator<Relation> it = out.relations.iterator(); … … 307 307 reader.append(nodes.get(i)); 308 308 } 309 DataSet out = reader.parseOsm( );309 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 310 310 assertEquals(812, out.nodes.size()); 311 311 Iterator<Node> it = out.nodes.iterator(); … … 328 328 Node n = new Node(9999999); 329 329 reader.append(n); // doesn't exist 330 DataSet out = reader.parseOsm( );330 DataSet out = reader.parseOsm(NullProgressMonitor.INSTANCE); 331 331 assertEquals(10, out.nodes.size()); 332 332 Iterator<Node> it = out.nodes.iterator(); -
trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
r1806 r1813 31 31 import org.openstreetmap.josm.data.osm.Way; 32 32 import org.openstreetmap.josm.data.projection.Mercator; 33 import org.openstreetmap.josm.gui. PleaseWaitDialog;33 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 34 34 import org.xml.sax.SAXException; 35 35 … … 123 123 /** 124 124 * creates the dataset on the server. 125 * 125 * 126 126 * @param ds the data set 127 127 * @throws OsmTransferException … … 134 134 primitives.addAll(ds.relations); 135 135 OsmServerWriter writer = new OsmServerWriter(); 136 writer.uploadOsm("0.6", primitives );136 writer.uploadOsm("0.6", primitives, NullProgressMonitor.INSTANCE); 137 137 } 138 138 … … 182 182 // 183 183 System.setProperty("josm.home", josmHome); 184 Main.pleaseWaitDlg = new PleaseWaitDialog(null);185 184 Main.pref.init(false); 186 185 // don't use atomic upload, the test API server can't cope with large diff uploads … … 241 240 ds = new DataSet(); 242 241 FileInputStream fis = new FileInputStream(f); 243 ds = OsmReader.parseDataSet(fis, Main.pleaseWaitDlg);242 ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE); 244 243 fis.close(); 245 244 } … … 254 253 OsmServerBackreferenceReader reader = new OsmServerBackreferenceReader(n); 255 254 reader.setReadFull(false); 256 DataSet referers = reader.parseOsm( );255 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 257 256 assertEquals(10, referers.nodes.size()); 258 257 assertEquals(1, referers.ways.size()); … … 273 272 OsmServerBackreferenceReader reader = new OsmServerBackreferenceReader(n); 274 273 reader.setReadFull(true); 275 DataSet referers = reader.parseOsm( );274 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 276 275 assertEquals(10, referers.nodes.size()); 277 276 assertEquals(1, referers.ways.size()); … … 293 292 OsmServerBackreferenceReader reader = new OsmServerBackreferenceReader(w); 294 293 reader.setReadFull(false); 295 DataSet referers = reader.parseOsm( );294 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 296 295 assertEquals(0, referers.nodes.size()); // no nodes loaded 297 296 assertEquals(6, referers.ways.size()); // 6 ways referred by two relations … … 317 316 OsmServerBackreferenceReader reader = new OsmServerBackreferenceReader(w); 318 317 reader.setReadFull(true); 319 DataSet referers = reader.parseOsm( );318 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 320 319 assertEquals(6, referers.ways.size()); // 6 ways referred by two relations 321 320 for (Way w1: referers.ways) { … … 352 351 OsmServerBackreferenceReader reader = new OsmServerBackreferenceReader(r); 353 352 reader.setReadFull(false); 354 DataSet referers = reader.parseOsm( );353 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 355 354 356 355 Set<Long> referringRelationsIds = new HashSet<Long>(); … … 448 447 OsmServerBackreferenceReader reader = new OsmServerBackreferenceReader(r); 449 448 reader.setReadFull(true); 450 DataSet referers = reader.parseOsm( );449 DataSet referers = reader.parseOsm(NullProgressMonitor.INSTANCE); 451 450 452 451 Set<Long> referringRelationsIds = new HashSet<Long>(); -
trunk/test/functional/org/openstreetmap/josm/io/OsmServerHistoryReaderTest.java
r1703 r1813 8 8 import org.openstreetmap.josm.data.osm.history.History; 9 9 import org.openstreetmap.josm.data.osm.history.HistoryDataSet; 10 import org.openstreetmap.josm.gui. PleaseWaitDialog;10 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 11 11 12 12 public class OsmServerHistoryReaderTest { … … 15 15 public static void init() { 16 16 System.setProperty("josm.home", "C:\\data\\projekte\\osm\\tag-editor-plugin"); 17 Main.pleaseWaitDlg = new PleaseWaitDialog(null);18 17 Main.pref.init(false); 19 18 } … … 22 21 public void test1() throws OsmTransferException { 23 22 OsmServerHistoryReader reader = new OsmServerHistoryReader(OsmPrimitiveType.NODE,266187); 24 HistoryDataSet ds = reader.parseHistory( );23 HistoryDataSet ds = reader.parseHistory(NullProgressMonitor.INSTANCE); 25 24 History h = ds.getHistory(266187); 26 25 System.out.println("num versions: " + h.getNumVersions()); … … 30 29 public void test2() throws OsmTransferException { 31 30 OsmServerHistoryReader reader = new OsmServerHistoryReader(OsmPrimitiveType.WAY,32916); 32 HistoryDataSet ds = reader.parseHistory( );31 HistoryDataSet ds = reader.parseHistory(NullProgressMonitor.INSTANCE); 33 32 History h = ds.getHistory(32916); 34 33 System.out.println("num versions: " + h.getNumVersions()); … … 38 37 public void test3() throws OsmTransferException { 39 38 OsmServerHistoryReader reader = new OsmServerHistoryReader(OsmPrimitiveType.RELATION,49); 40 HistoryDataSet ds = reader.parseHistory( );39 HistoryDataSet ds = reader.parseHistory(NullProgressMonitor.INSTANCE); 41 40 History h = ds.getHistory(49); 42 41 System.out.println("num versions: " + h.getNumVersions());
Note:
See TracChangeset
for help on using the changeset viewer.