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:
+12
-8
@@ -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!")) }
|
||||
),
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user