use of de.westnordost.osmapi.map.data.OsmLatLon in project StreetComplete by westnordost.
the class CreateNoteDaoTest method testAddGetDelete.
public void testAddGetDelete() {
CreateNote note = new CreateNote();
note.text = "text";
note.questTitle = "title";
note.position = new OsmLatLon(3, 5);
note.elementId = 123L;
note.elementType = Element.Type.NODE;
note.imagePaths = new ArrayList<>();
note.imagePaths.add("hullo");
note.imagePaths.add("hey");
assertTrue(dao.add(note));
CreateNote dbNote = dao.get(note.id);
assertEquals(note.text, dbNote.text);
assertEquals(note.questTitle, dbNote.questTitle);
assertEquals(note.id, dbNote.id);
assertEquals(note.position, dbNote.position);
assertEquals(note.elementType, dbNote.elementType);
assertEquals(note.elementId, dbNote.elementId);
assertEquals(note.imagePaths, dbNote.imagePaths);
assertTrue(dao.delete(note.id));
assertNull(dao.get(note.id));
}
Aggregations