Search in sources :

Example 1 with OsmWay

use of de.westnordost.osmapi.map.data.OsmWay in project StreetComplete by westnordost.

the class WayDaoTest method testPutGetNoTags.

public void testPutGetNoTags() {
    Way way = new OsmWay(5, 1, Arrays.asList(1L, 2L, 3L, 4L), null);
    dao.put(way);
    Way dbWay = dao.get(5);
    checkEqual(way, dbWay);
}
Also used : OsmWay(de.westnordost.osmapi.map.data.OsmWay) Way(de.westnordost.osmapi.map.data.Way) OsmWay(de.westnordost.osmapi.map.data.OsmWay)

Example 2 with OsmWay

use of de.westnordost.osmapi.map.data.OsmWay in project StreetComplete by westnordost.

the class WayDaoTest method testPutGetWithTags.

public void testPutGetWithTags() {
    Map<String, String> tags = new HashMap<>();
    tags.put("a key", "a value");
    Way way = new OsmWay(5, 1, Arrays.asList(1L, 2L, 3L, 4L), tags);
    dao.put(way);
    Way dbWay = dao.get(5);
    checkEqual(way, dbWay);
}
Also used : OsmWay(de.westnordost.osmapi.map.data.OsmWay) HashMap(java.util.HashMap) Way(de.westnordost.osmapi.map.data.Way) OsmWay(de.westnordost.osmapi.map.data.OsmWay)

Aggregations

OsmWay (de.westnordost.osmapi.map.data.OsmWay)2 Way (de.westnordost.osmapi.map.data.Way)2 HashMap (java.util.HashMap)1