source: josm/trunk/test/unit/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberTableCellEditorTest.java@ 9945

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

add more unit tests

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.conflict.pair.relation;
3
4import static org.junit.Assert.assertEquals;
5import static org.junit.Assert.assertNotNull;
6import static org.junit.Assert.assertNull;
7
8import java.awt.Component;
9
10import org.junit.BeforeClass;
11import org.junit.Test;
12import org.openstreetmap.josm.JOSMFixture;
13import org.openstreetmap.josm.data.osm.Node;
14import org.openstreetmap.josm.data.osm.RelationMember;
15
16/**
17 * Unit tests of {@link RelationMemberTableCellEditor} class.
18 */
19public 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}
Note: See TracBrowser for help on using the repository browser.