source: josm/trunk/test/functional/org/openstreetmap/josm/io/OsmServerHistoryReaderTest.java@ 2041

Last change on this file since 2041 was 1813, checked in by jttt, 15 years ago

Make tests compile using new ProgressMonitor API

File size: 1.7 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.io;
3
4import org.junit.BeforeClass;
5import org.junit.Test;
6import org.openstreetmap.josm.Main;
7import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
8import org.openstreetmap.josm.data.osm.history.History;
9import org.openstreetmap.josm.data.osm.history.HistoryDataSet;
10import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
11
12public class OsmServerHistoryReaderTest {
13
14 @BeforeClass
15 public static void init() {
16 System.setProperty("josm.home", "C:\\data\\projekte\\osm\\tag-editor-plugin");
17 Main.pref.init(false);
18 }
19
20 @Test
21 public void test1() throws OsmTransferException {
22 OsmServerHistoryReader reader = new OsmServerHistoryReader(OsmPrimitiveType.NODE,266187);
23 HistoryDataSet ds = reader.parseHistory(NullProgressMonitor.INSTANCE);
24 History h = ds.getHistory(266187);
25 System.out.println("num versions: " + h.getNumVersions());
26 }
27
28 @Test
29 public void test2() throws OsmTransferException {
30 OsmServerHistoryReader reader = new OsmServerHistoryReader(OsmPrimitiveType.WAY,32916);
31 HistoryDataSet ds = reader.parseHistory(NullProgressMonitor.INSTANCE);
32 History h = ds.getHistory(32916);
33 System.out.println("num versions: " + h.getNumVersions());
34 }
35
36 @Test
37 public void test3() throws OsmTransferException {
38 OsmServerHistoryReader reader = new OsmServerHistoryReader(OsmPrimitiveType.RELATION,49);
39 HistoryDataSet ds = reader.parseHistory(NullProgressMonitor.INSTANCE);
40 History h = ds.getHistory(49);
41 System.out.println("num versions: " + h.getNumVersions());
42 }
43}
Note: See TracBrowser for help on using the repository browser.