diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt index b6fb9df060..23e63392b3 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt @@ -3,6 +3,7 @@ package de.westnordost.streetcomplete.data.osmnotes.edits import de.westnordost.streetcomplete.data.osmnotes.NoteController import de.westnordost.streetcomplete.data.osmnotes.NotesApi import de.westnordost.streetcomplete.data.osmnotes.StreetCompleteImageUploader +import de.westnordost.streetcomplete.data.osmtracks.TracksApi import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.data.upload.OnUploadedChangeListener import de.westnordost.streetcomplete.testutils.any @@ -26,6 +27,7 @@ class NoteEditsUploaderTest { private lateinit var noteController: NoteController private lateinit var noteEditsController: NoteEditsController private lateinit var notesApi: NotesApi + private lateinit var tracksApi: TracksApi private lateinit var imageUploader: StreetCompleteImageUploader private lateinit var uploader: NoteEditsUploader @@ -42,10 +44,11 @@ class NoteEditsUploaderTest { on(notesApi.comment(anyLong(), any())).thenReturn(note()) on(notesApi.create(any(), any())).thenReturn(note()) + tracksApi = mock() imageUploader = mock() listener = mock() - uploader = NoteEditsUploader(noteEditsController, noteController, notesApi, imageUploader) + uploader = NoteEditsUploader(noteEditsController, noteController, notesApi, tracksApi, imageUploader) uploader.uploadedChangeListener = listener } diff --git a/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt b/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt index bf26fe2fda..7be6f60ddf 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt @@ -22,6 +22,7 @@ import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEdit import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuest import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestHidden +import de.westnordost.streetcomplete.data.osmtracks.Trackpoint import de.westnordost.streetcomplete.data.quest.OsmQuestKey import de.westnordost.streetcomplete.data.quest.TestQuestTypeA import de.westnordost.streetcomplete.data.user.User @@ -89,7 +90,8 @@ fun noteEdit( timestamp: Long = 123L, imagePaths: List = emptyList(), pos: LatLon = p(1.0, 1.0), - isSynced: Boolean = false + isSynced: Boolean = false, + track: List = emptyList(), ) = NoteEdit( id, noteId, @@ -99,7 +101,8 @@ fun noteEdit( imagePaths, timestamp, isSynced, - imagePaths.isNotEmpty() + imagePaths.isNotEmpty(), + track ) fun edit(