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

Last change on this file since 2789 was 2789, checked in by jttt, 14 years ago

Fixed some FindBugs warnings

File size: 1.3 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.coor.LatLon;
9import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
10
11import static org.junit.Assert.*;
12
13public 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.