source: josm/trunk/test/unit/org/openstreetmap/josm/gui/tagging/TagEditorModelTest.java@ 17531

Last change on this file since 17531 was 17275, checked in by Don-vip, 4 years ago

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

  • Property svn:eol-style set to native
File size: 857 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.tagging;
3
4import static org.junit.jupiter.api.Assertions.assertEquals;
5
6import org.junit.jupiter.api.Test;
7
8/**
9 * Unit tests of {@link TagEditorModel} class.
10 */
11class 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.