Search in sources :

Example 6 with NoteComment

use of de.westnordost.osmapi.notes.NoteComment in project StreetComplete by westnordost.

the class NoteDaoTest method checkEqual.

private void checkEqual(Note note, Note dbNote) {
    assertEquals(note.id, dbNote.id);
    assertEquals(note.position, dbNote.position);
    assertEquals(note.status, dbNote.status);
    assertEquals(note.dateCreated, dbNote.dateCreated);
    assertEquals(note.dateClosed, dbNote.dateClosed);
    assertEquals(note.comments.size(), dbNote.comments.size());
    ListIterator<NoteComment> it, dbIt;
    it = note.comments.listIterator();
    dbIt = dbNote.comments.listIterator();
    while (it.hasNext() && dbIt.hasNext()) {
        NoteComment comment = it.next();
        NoteComment dbComment = dbIt.next();
        assertEquals(comment.action, dbComment.action);
        assertEquals(comment.date, dbComment.date);
        assertEquals(comment.text, dbComment.text);
        assertEquals(comment.user.displayName, dbComment.user.displayName);
        assertEquals(comment.user.id, dbComment.user.id);
    }
}
Also used : NoteComment(de.westnordost.osmapi.notes.NoteComment)

Aggregations

NoteComment (de.westnordost.osmapi.notes.NoteComment)6 Date (java.util.Date)4 OsmLatLon (de.westnordost.osmapi.map.data.OsmLatLon)3 Note (de.westnordost.osmapi.notes.Note)3 ViewGroup (android.view.ViewGroup)1 TextView (android.widget.TextView)1 User (de.westnordost.osmapi.user.User)1