Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.tagging;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 |
|
---|
6 | import org.junit.jupiter.api.Test;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Unit tests of {@link TagEditorModel} class.
|
---|
10 | */
|
---|
11 | class TagEditorModelTest {
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Unit test of {@link TagEditorModel#TagEditorModel}.
|
---|
15 | */
|
---|
16 | @Test
|
---|
17 | void testTagEditorModel() {
|
---|
18 | TagEditorModel tem = new TagEditorModel();
|
---|
19 | tem.add(null, null);
|
---|
20 | assertEquals(1, tem.getRowCount());
|
---|
21 | assertEquals(2, tem.getColumnCount());
|
---|
22 | tem.add("key", "val");
|
---|
23 | assertEquals(2, tem.getRowCount());
|
---|
24 | assertEquals(2, tem.getColumnCount());
|
---|
25 | tem.delete(null);
|
---|
26 | tem.delete("");
|
---|
27 | assertEquals(1, tem.getRowCount());
|
---|
28 | tem.delete("key");
|
---|
29 | assertEquals(0, tem.getRowCount());
|
---|
30 | }
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.