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:
parent
8cb5e9e75b
commit
5bda29ca7e
30 changed files with 1253 additions and 818 deletions
|
|
@ -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!")) }
|
||||
),
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue