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