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