1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.conflict.pair.relation;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertEquals;
|
---|
5 | import static org.junit.Assert.assertNotNull;
|
---|
6 | import static org.junit.Assert.assertNull;
|
---|
7 |
|
---|
8 | import java.awt.Component;
|
---|
9 |
|
---|
10 | import org.junit.BeforeClass;
|
---|
11 | import org.junit.Test;
|
---|
12 | import org.openstreetmap.josm.JOSMFixture;
|
---|
13 | import org.openstreetmap.josm.data.osm.Node;
|
---|
14 | import org.openstreetmap.josm.data.osm.RelationMember;
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * Unit tests of {@link RelationMemberTableCellEditor} class.
|
---|
18 | */
|
---|
19 | public class RelationMemberTableCellEditorTest {
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * Setup test.
|
---|
23 | */
|
---|
24 | @BeforeClass
|
---|
25 | public static void setUpBeforeClass() {
|
---|
26 | JOSMFixture.createUnitTestFixture().init();
|
---|
27 | }
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * Unit test of {@link RelationMemberTableCellEditor#RelationMemberTableCellEditor}.
|
---|
31 | */
|
---|
32 | @Test
|
---|
33 | public void testRelationMemberTableCellEditor() {
|
---|
34 | RelationMemberTableCellEditor editor = new RelationMemberTableCellEditor();
|
---|
35 | assertNull(editor.getTableCellEditorComponent(null, null, false, 0, 0));
|
---|
36 | Component component = editor.getTableCellEditorComponent(null, new RelationMember("foo", new Node()), false, 0, 0);
|
---|
37 | assertNotNull(component);
|
---|
38 | assertEquals("foo", editor.getCellEditorValue());
|
---|
39 | }
|
---|
40 | }
|
---|