Rework FakeMatrixRoom so that it contains only lambdas. (#3229)

* Upgrade lint to 8.7.0-alpha01

* FakeMatrixRoom: lambda everywhere

Fix test compilation issues
This commit is contained in:
Benoit Marty 2024-07-22 10:39:48 +02:00 committed by GitHub
parent 8cb5e9e75b
commit 5bda29ca7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 1253 additions and 818 deletions

View file

@ -140,7 +140,9 @@ class DefaultLeaveRoomPresenterTest {
client = FakeMatrixClient().apply {
givenGetRoomResult(
roomId = A_ROOM_ID,
result = FakeMatrixRoom(),
result = FakeMatrixRoom(
leaveRoomLambda = { Result.success(Unit) }
),
)
},
roomMembershipObserver = roomMembershipObserver
@ -162,9 +164,9 @@ class DefaultLeaveRoomPresenterTest {
client = FakeMatrixClient().apply {
givenGetRoomResult(
roomId = A_ROOM_ID,
result = FakeMatrixRoom().apply {
this.leaveRoomLambda = { Result.failure(RuntimeException("Blimey!")) }
},
result = FakeMatrixRoom(
leaveRoomLambda = { Result.failure(RuntimeException("Blimey!")) }
),
)
}
)
@ -186,7 +188,9 @@ class DefaultLeaveRoomPresenterTest {
client = FakeMatrixClient().apply {
givenGetRoomResult(
roomId = A_ROOM_ID,
result = FakeMatrixRoom(),
result = FakeMatrixRoom(
leaveRoomLambda = { Result.success(Unit) }
),
)
}
)
@ -208,9 +212,9 @@ class DefaultLeaveRoomPresenterTest {
client = FakeMatrixClient().apply {
givenGetRoomResult(
roomId = A_ROOM_ID,
result = FakeMatrixRoom().apply {
this.leaveRoomLambda = { Result.failure(RuntimeException("Blimey!")) }
},
result = FakeMatrixRoom(
leaveRoomLambda = { Result.failure(RuntimeException("Blimey!")) }
),
)
}
)