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

Last change on this file since 8514 was 8514, checked in by Don-vip, 9 years ago

checkstyle: various checks

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm.history;
3
4import static org.junit.Assert.assertEquals;
5import static org.junit.Assert.assertTrue;
6
7import java.util.Date;
8
9import org.junit.Test;
10import org.openstreetmap.josm.data.coor.LatLon;
11import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
12import org.openstreetmap.josm.data.osm.User;
13
14public class HistoryNodeTest {
15
16 @Test
17 public void historyNode() {
18 Date d = new Date();
19 HistoryNode node = new HistoryNode(
20 1L,
21 2L,
22 true,
23 User.createOsmUser(3, "testuser"),
24 4L,
25 d,
26 new LatLon(0, 0)
27 );
28
29 assertEquals(1, node.getId());
30 assertEquals(2, node.getVersion());
31 assertTrue(node.isVisible());
32 assertEquals("testuser", node.getUser().getName());
33 assertEquals(3, node.getUser().getId());
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 User.createOsmUser(3, "testuser"),
46 4,
47 d,
48 new LatLon(0, 0)
49 );
50
51 assertEquals(OsmPrimitiveType.NODE, node.getType());
52 }
53}
Note: See TracBrowser for help on using the repository browser.