Skip to content

Commit

Permalink
unbreak some tests after streetcomplete#3573
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoniecz committed May 16, 2022
1 parent d181c18 commit 06704ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -89,7 +90,8 @@ fun noteEdit(
timestamp: Long = 123L,
imagePaths: List<String> = emptyList(),
pos: LatLon = p(1.0, 1.0),
isSynced: Boolean = false
isSynced: Boolean = false,
track: List<Trackpoint> = emptyList(),
) = NoteEdit(
id,
noteId,
Expand All @@ -99,7 +101,8 @@ fun noteEdit(
imagePaths,
timestamp,
isSynced,
imagePaths.isNotEmpty()
imagePaths.isNotEmpty(),
track
)

fun edit(
Expand Down

0 comments on commit 06704ea

Please sign in to comment.