From 707507202d4ee22e8ac6962242554f0cd9c5e541 Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Tue, 14 Jun 2022 11:06:17 +0200 Subject: [PATCH] Renaming method to create static location event --- .../session/room/location/SendStaticLocationTask.kt | 2 +- .../internal/session/room/send/LocalEchoEventFactory.kt | 2 +- .../room/location/DefaultSendStaticLocationTaskTest.kt | 4 ++-- .../android/sdk/test/fakes/FakeLocalEchoEventFactory.kt | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/location/SendStaticLocationTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/location/SendStaticLocationTask.kt index 65b11472ea..e08b82f3d4 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/location/SendStaticLocationTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/location/SendStaticLocationTask.kt @@ -38,7 +38,7 @@ internal class DefaultSendStaticLocationTask @Inject constructor( ) : SendStaticLocationTask { override suspend fun execute(params: SendStaticLocationTask.Params): Cancelable { - val event = localEchoEventFactory.createLocationEvent( + val event = localEchoEventFactory.createStaticLocationEvent( roomId = params.roomId, latitude = params.latitude, longitude = params.longitude, diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt index 3b9ca44d18..bcaa257d78 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt @@ -244,7 +244,7 @@ internal class LocalEchoEventFactory @Inject constructor( ) } - fun createLocationEvent( + fun createStaticLocationEvent( roomId: String, latitude: Double, longitude: Double, diff --git a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/session/room/location/DefaultSendStaticLocationTaskTest.kt b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/session/room/location/DefaultSendStaticLocationTaskTest.kt index 440d27657e..3a09ea51c1 100644 --- a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/session/room/location/DefaultSendStaticLocationTaskTest.kt +++ b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/internal/session/room/location/DefaultSendStaticLocationTaskTest.kt @@ -55,13 +55,13 @@ internal class DefaultSendStaticLocationTaskTest { isUserLocation = true ) - val event = fakeLocalEchoEventFactory.givenCreateLocationEvent( + val event = fakeLocalEchoEventFactory.givenCreateStaticLocationEvent( withLocalEcho = true ) defaultSendStaticLocationTask.execute(params) - fakeLocalEchoEventFactory.verifyCreateLocationEvent( + fakeLocalEchoEventFactory.verifyCreateStaticLocationEvent( roomId = params.roomId, latitude = params.latitude, longitude = params.longitude, diff --git a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeLocalEchoEventFactory.kt b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeLocalEchoEventFactory.kt index 72fc1cc97e..50ec85f14a 100644 --- a/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeLocalEchoEventFactory.kt +++ b/matrix-sdk-android/src/test/java/org/matrix/android/sdk/test/fakes/FakeLocalEchoEventFactory.kt @@ -28,10 +28,10 @@ internal class FakeLocalEchoEventFactory { val instance = mockk() - fun givenCreateLocationEvent(withLocalEcho: Boolean): Event { + fun givenCreateStaticLocationEvent(withLocalEcho: Boolean): Event { val event = Event() every { - instance.createLocationEvent( + instance.createStaticLocationEvent( roomId = any(), latitude = any(), longitude = any(), @@ -64,7 +64,7 @@ internal class FakeLocalEchoEventFactory { return event } - fun verifyCreateLocationEvent( + fun verifyCreateStaticLocationEvent( roomId: String, latitude: Double, longitude: Double, @@ -72,7 +72,7 @@ internal class FakeLocalEchoEventFactory { isUserLocation: Boolean ) { verify { - instance.createLocationEvent( + instance.createStaticLocationEvent( roomId = roomId, latitude = latitude, longitude = longitude,