source: josm/trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java@ 9775

Last change on this file since 9775 was 9669, checked in by bastiK, 8 years ago

add missing svn:eol-style=native (see #12410)

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.dialogs.relation;
3
4import static org.junit.Assert.assertNotNull;
5import static org.junit.Assert.assertNull;
6
7import java.util.Collections;
8
9import org.junit.BeforeClass;
10import org.junit.Test;
11import org.openstreetmap.josm.JOSMFixture;
12import org.openstreetmap.josm.data.osm.Node;
13import org.openstreetmap.josm.data.osm.OsmPrimitive;
14import org.openstreetmap.josm.data.osm.Relation;
15import org.openstreetmap.josm.data.osm.Way;
16
17/**
18 * Unit tests of {@link GenericRelationEditor} class.
19 */
20public class GenericRelationEditorTest {
21
22 /**
23 * Setup test.
24 */
25 @BeforeClass
26 public static void setUpBeforeClass() {
27 JOSMFixture.createUnitTestFixture().init();
28 }
29
30 /**
31 * Unit test of {@link GenericRelationEditor#addPrimitivesToRelation}.
32 */
33 @Test
34 public void testAddPrimitivesToRelation() {
35 assertNull(GenericRelationEditor.addPrimitivesToRelation(new Relation(1), Collections.<OsmPrimitive>emptyList()));
36 assertNull(GenericRelationEditor.addPrimitivesToRelation(new Relation(1), Collections.singleton(new Relation(1))));
37
38 assertNotNull(GenericRelationEditor.addPrimitivesToRelation(new Relation(1), Collections.singleton(new Node(1))));
39 assertNotNull(GenericRelationEditor.addPrimitivesToRelation(new Relation(1), Collections.singleton(new Way(1))));
40 assertNotNull(GenericRelationEditor.addPrimitivesToRelation(new Relation(1), Collections.singleton(new Relation(2))));
41 }
42
43}
Note: See TracBrowser for help on using the repository browser.