Renaming method to create static location event
This commit is contained in:
parent
879cafc8d1
commit
707507202d
@ -38,7 +38,7 @@ internal class DefaultSendStaticLocationTask @Inject constructor(
|
|||||||
) : SendStaticLocationTask {
|
) : SendStaticLocationTask {
|
||||||
|
|
||||||
override suspend fun execute(params: SendStaticLocationTask.Params): Cancelable {
|
override suspend fun execute(params: SendStaticLocationTask.Params): Cancelable {
|
||||||
val event = localEchoEventFactory.createLocationEvent(
|
val event = localEchoEventFactory.createStaticLocationEvent(
|
||||||
roomId = params.roomId,
|
roomId = params.roomId,
|
||||||
latitude = params.latitude,
|
latitude = params.latitude,
|
||||||
longitude = params.longitude,
|
longitude = params.longitude,
|
||||||
|
@ -244,7 +244,7 @@ internal class LocalEchoEventFactory @Inject constructor(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun createLocationEvent(
|
fun createStaticLocationEvent(
|
||||||
roomId: String,
|
roomId: String,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
|
@ -55,13 +55,13 @@ internal class DefaultSendStaticLocationTaskTest {
|
|||||||
isUserLocation = true
|
isUserLocation = true
|
||||||
)
|
)
|
||||||
|
|
||||||
val event = fakeLocalEchoEventFactory.givenCreateLocationEvent(
|
val event = fakeLocalEchoEventFactory.givenCreateStaticLocationEvent(
|
||||||
withLocalEcho = true
|
withLocalEcho = true
|
||||||
)
|
)
|
||||||
|
|
||||||
defaultSendStaticLocationTask.execute(params)
|
defaultSendStaticLocationTask.execute(params)
|
||||||
|
|
||||||
fakeLocalEchoEventFactory.verifyCreateLocationEvent(
|
fakeLocalEchoEventFactory.verifyCreateStaticLocationEvent(
|
||||||
roomId = params.roomId,
|
roomId = params.roomId,
|
||||||
latitude = params.latitude,
|
latitude = params.latitude,
|
||||||
longitude = params.longitude,
|
longitude = params.longitude,
|
||||||
|
@ -28,10 +28,10 @@ internal class FakeLocalEchoEventFactory {
|
|||||||
|
|
||||||
val instance = mockk<LocalEchoEventFactory>()
|
val instance = mockk<LocalEchoEventFactory>()
|
||||||
|
|
||||||
fun givenCreateLocationEvent(withLocalEcho: Boolean): Event {
|
fun givenCreateStaticLocationEvent(withLocalEcho: Boolean): Event {
|
||||||
val event = Event()
|
val event = Event()
|
||||||
every {
|
every {
|
||||||
instance.createLocationEvent(
|
instance.createStaticLocationEvent(
|
||||||
roomId = any(),
|
roomId = any(),
|
||||||
latitude = any(),
|
latitude = any(),
|
||||||
longitude = any(),
|
longitude = any(),
|
||||||
@ -64,7 +64,7 @@ internal class FakeLocalEchoEventFactory {
|
|||||||
return event
|
return event
|
||||||
}
|
}
|
||||||
|
|
||||||
fun verifyCreateLocationEvent(
|
fun verifyCreateStaticLocationEvent(
|
||||||
roomId: String,
|
roomId: String,
|
||||||
latitude: Double,
|
latitude: Double,
|
||||||
longitude: Double,
|
longitude: Double,
|
||||||
@ -72,7 +72,7 @@ internal class FakeLocalEchoEventFactory {
|
|||||||
isUserLocation: Boolean
|
isUserLocation: Boolean
|
||||||
) {
|
) {
|
||||||
verify {
|
verify {
|
||||||
instance.createLocationEvent(
|
instance.createStaticLocationEvent(
|
||||||
roomId = roomId,
|
roomId = roomId,
|
||||||
latitude = latitude,
|
latitude = latitude,
|
||||||
longitude = longitude,
|
longitude = longitude,
|
||||||
|
Loading…
Reference in New Issue
Block a user