source: josm/trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryNodeTest.java@ 1670

Last change on this file since 1670 was 1670, checked in by Gubaer, 15 years ago

fixed: bug in OsmApi.getOsmApi()
cleanup: exception handling in interfacing with OSM API
new: new action for updating individual elements with the their current state on the server (including new menu item in the file menu)
new: improved user feedback in case of conflicts
new: handles 410 Gone conflicts when uploading a changeset
new: undoable command for "purging" a primitive from the current dataset (necessary if the primitive is already deleted on the server and the user wants to remove it from its local dataset)
new: undoable command for "undeleting" an already deleted primitive on the server (kind of "cloning")
new: after a full upload, checks whether there are primitives in the local dataset which might be deleted on the server.
new: data structures for history data
new: history download support in io package

File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm.history;
3
4
5import java.util.Date;
6
7import org.junit.Test;
8import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
9
10import static org.junit.Assert.*;
11
12public class HistoryNodeTest {
13
14 @Test
15 public void HistoryNode() {
16 Date d = new Date();
17 HistoryNode node = new HistoryNode(
18 1,
19 2,
20 true,
21 "testuser",
22 3,
23 4,
24 d
25 );
26
27 assertEquals(1, node.getId());
28 assertEquals(2, node.getVersion());
29 assertEquals(true, node.isVisible());
30 assertEquals("testuser", node.getUser());
31 assertEquals(3, node.getUid());
32 assertEquals(4, node.getChangesetId());
33 assertEquals(d, node.getTimestamp());
34 }
35
36 @Test
37 public void getType() {
38 Date d = new Date();
39 HistoryNode node = new HistoryNode(
40 1,
41 2,
42 true,
43 "testuser",
44 3,
45 4,
46 d
47 );
48
49 assertEquals(OsmPrimitiveType.NODE, node.getType());
50 }
51}
Note: See TracBrowser for help on using the repository browser.