Changeset 8257 in josm for trunk/test/unit/org/openstreetmap


Ignore:
Timestamp:
2015-04-25T09:12:12+02:00 (10 years ago)
Author:
simon04
Message:

fix #11370 - "area" is not supported in validator asserts

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  
    22package org.openstreetmap.josm;
    33
    4 import static org.hamcrest.CoreMatchers.is;
    5 import static org.junit.Assert.assertThat;
    6 import static org.junit.Assert.assertTrue;
    74import static org.junit.Assert.fail;
    85
    96import java.util.Arrays;
    107import 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;
    168
    179/**
     
    5042    public static String getRegressionDataFile(int ticketid, String filename) {
    5143        return getRegressionDataDir(ticketid) + '/' + filename;
    52     }
    53 
    54     @Test
    55     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");
    6644    }
    6745
Note: See TracChangeset for help on using the changeset viewer.