Changeset 8257 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2015-04-25T09:12:12+02:00 (10 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/TestUtils.java
r7937 r8257 2 2 package org.openstreetmap.josm; 3 3 4 import static org.hamcrest.CoreMatchers.is;5 import static org.junit.Assert.assertThat;6 import static org.junit.Assert.assertTrue;7 4 import static org.junit.Assert.fail; 8 5 9 6 import java.util.Arrays; 10 7 import java.util.Comparator; 11 12 import org.junit.Test;13 import org.openstreetmap.josm.data.osm.OsmPrimitive;14 import org.openstreetmap.josm.data.osm.OsmUtils;15 import org.openstreetmap.josm.data.osm.Way;16 8 17 9 /** … … 50 42 public static String getRegressionDataFile(int ticketid, String filename) { 51 43 return getRegressionDataDir(ticketid) + '/' + filename; 52 }53 54 @Test55 public void testCreatePrimitive() throws Exception {56 final OsmPrimitive p = OsmUtils.createPrimitive("way name=Foo railway=rail");57 assertTrue(p instanceof Way);58 assertThat(p.keySet().size(), is(2));59 assertThat(p.get("name"), is("Foo"));60 assertThat(p.get("railway"), is("rail"));61 }62 63 @Test(expected = IllegalArgumentException.class)64 public void testCreatePrimitiveFail() throws Exception {65 OsmUtils.createPrimitive("noway name=Foo");66 44 } 67 45
Note:
See TracChangeset
for help on using the changeset viewer.