source: josm/trunk/test/unit/org/openstreetmap/josm/data/osm/TagMapTest.java@ 9969

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

sonar - Avoid appending characters as strings in StringBuffer.append + add unit test

File size: 615 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm;
3
4import static org.junit.Assert.assertEquals;
5
6import org.junit.Test;
7
8/**
9 * Unit tests of the {@code TagMap} class.
10 */
11public class TagMapTest {
12
13 /**
14 * Unit test for {@link TagMap#toString}
15 */
16 @Test
17 public void testToString() {
18 assertEquals("TagMap[]", new TagMap().toString());
19 assertEquals("TagMap[key=val]", new TagMap(new String[]{"key", "val"}).toString());
20 assertEquals("TagMap[key=val,foo=bar]", new TagMap(new String[]{"key", "val", "foo", "bar"}).toString());
21 }
22}
Note: See TracBrowser for help on using the repository browser.