Rename class (code quality)

This commit is contained in:
Benoit Marty
2024-05-23 14:42:00 +02:00
parent d4d12503c6
commit c71656df0c
13 changed files with 61 additions and 61 deletions

View File

@@ -25,7 +25,7 @@ import io.element.android.libraries.matrix.test.A_USER_ID
import io.element.android.libraries.matrix.test.A_USER_ID_2
import io.element.android.libraries.matrix.test.A_USER_ID_3
import io.element.android.libraries.matrix.test.FakeMatrixClient
import io.element.android.libraries.matrix.test.auth.FakeAuthenticationService
import io.element.android.libraries.matrix.test.auth.FakeMatrixAuthenticationService
import io.element.android.libraries.push.test.FakePusherSubscriber
import io.element.android.libraries.pushproviders.api.PusherSubscriber
import io.element.android.libraries.pushstore.api.UserPushStoreFactory
@@ -66,7 +66,7 @@ class DefaultFirebaseNewTokenHandlerTest {
storeData(aSessionData(A_USER_ID_2))
storeData(aSessionData(A_USER_ID_3))
},
matrixAuthenticationService = FakeAuthenticationService(
matrixAuthenticationService = FakeMatrixAuthenticationService(
matrixClientResult = { sessionId ->
when (sessionId) {
A_USER_ID -> Result.success(aMatrixClient1)
@@ -105,7 +105,7 @@ class DefaultFirebaseNewTokenHandlerTest {
sessionStore = InMemoryMultiSessionsStore().apply {
storeData(aSessionData(A_USER_ID))
},
matrixAuthenticationService = FakeAuthenticationService(
matrixAuthenticationService = FakeMatrixAuthenticationService(
matrixClientResult = { _ ->
Result.failure(IllegalStateException())
}
@@ -131,7 +131,7 @@ class DefaultFirebaseNewTokenHandlerTest {
sessionStore = InMemoryMultiSessionsStore().apply {
storeData(aSessionData(A_USER_ID))
},
matrixAuthenticationService = FakeAuthenticationService(
matrixAuthenticationService = FakeMatrixAuthenticationService(
matrixClientResult = { _ ->
Result.success(aMatrixClient1)
}
@@ -154,7 +154,7 @@ class DefaultFirebaseNewTokenHandlerTest {
pusherSubscriber: PusherSubscriber = FakePusherSubscriber(),
sessionStore: SessionStore = InMemorySessionStore(),
userPushStoreFactory: UserPushStoreFactory = FakeUserPushStoreFactory(),
matrixAuthenticationService: MatrixAuthenticationService = FakeAuthenticationService(),
matrixAuthenticationService: MatrixAuthenticationService = FakeMatrixAuthenticationService(),
firebaseStore: FirebaseStore = InMemoryFirebaseStore(),
): FirebaseNewTokenHandler {
return DefaultFirebaseNewTokenHandler(

View File

@@ -22,7 +22,7 @@ import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService
import io.element.android.libraries.matrix.test.A_SECRET
import io.element.android.libraries.matrix.test.A_USER_ID
import io.element.android.libraries.matrix.test.FakeMatrixClient
import io.element.android.libraries.matrix.test.auth.FakeAuthenticationService
import io.element.android.libraries.matrix.test.auth.FakeMatrixAuthenticationService
import io.element.android.libraries.push.test.FakePusherSubscriber
import io.element.android.libraries.pushproviders.api.PusherSubscriber
import io.element.android.libraries.pushstore.api.UserPushStoreFactory
@@ -86,7 +86,7 @@ class DefaultUnifiedPushNewGatewayHandlerTest {
pusherSubscriber = FakePusherSubscriber(
registerPusherResult = { _, _, _ -> Result.failure(IllegalStateException("an error")) }
),
matrixAuthenticationService = FakeAuthenticationService(matrixClientResult = { Result.success(aMatrixClient) }),
matrixAuthenticationService = FakeMatrixAuthenticationService(matrixClientResult = { Result.success(aMatrixClient) }),
)
val result = defaultUnifiedPushNewGatewayHandler.handle(
endpoint = "aEndpoint",
@@ -114,7 +114,7 @@ class DefaultUnifiedPushNewGatewayHandlerTest {
pusherSubscriber = FakePusherSubscriber(
registerPusherResult = lambda
),
matrixAuthenticationService = FakeAuthenticationService(matrixClientResult = { Result.success(aMatrixClient) }),
matrixAuthenticationService = FakeMatrixAuthenticationService(matrixClientResult = { Result.success(aMatrixClient) }),
)
val result = defaultUnifiedPushNewGatewayHandler.handle(
endpoint = "aEndpoint",
@@ -131,7 +131,7 @@ class DefaultUnifiedPushNewGatewayHandlerTest {
pusherSubscriber: PusherSubscriber = FakePusherSubscriber(),
userPushStoreFactory: UserPushStoreFactory = FakeUserPushStoreFactory(),
pushClientSecret: PushClientSecret = FakePushClientSecret(),
matrixAuthenticationService: MatrixAuthenticationService = FakeAuthenticationService()
matrixAuthenticationService: MatrixAuthenticationService = FakeMatrixAuthenticationService()
): DefaultUnifiedPushNewGatewayHandler {
return DefaultUnifiedPushNewGatewayHandler(
pusherSubscriber = pusherSubscriber,