use of de.westnordost.streetcomplete.data.osm.ElementGeometry in project StreetComplete by westnordost.
the class ElementGeometryDaoTest method testPolygonGeometryPutGet.
public void testPolygonGeometryPutGet() {
List<List<LatLon>> polygons = new ArrayList<>();
polygons.add(createSomeLatLons(0));
polygons.add(createSomeLatLons(10));
ElementGeometry geometry = new ElementGeometry(polygons, null);
dao.put(Element.Type.RELATION, 0, geometry);
ElementGeometry dbGeometry = dao.get(Element.Type.RELATION, 0);
assertEquals(geometry, dbGeometry);
}
use of de.westnordost.streetcomplete.data.osm.ElementGeometry in project StreetComplete by westnordost.
the class ElementGeometryDaoTest method testPolylineGeometryPutGet.
public void testPolylineGeometryPutGet() {
List<List<LatLon>> polylines = new ArrayList<>();
polylines.add(createSomeLatLons(0));
ElementGeometry geometry = new ElementGeometry(polylines, null);
dao.put(Element.Type.WAY, 0, geometry);
ElementGeometry dbGeometry = dao.get(Element.Type.WAY, 0);
assertEquals(geometry, dbGeometry);
}
use of de.westnordost.streetcomplete.data.osm.ElementGeometry in project StreetComplete by westnordost.
the class OsmQuestDaoTest method testGetNoNextNewAt.
public void testGetNoNextNewAt() {
ElementGeometry geom = new ElementGeometry(new OsmLatLon(5, 5));
OsmQuest quest = createNewQuest(new TestQuestType(), 1, Element.Type.NODE, geom);
quest.setStatus(QuestStatus.ANSWERED);
addToDaos(quest);
assertNull(dao.getNextNewAt(1, null));
}
Aggregations