|
|
@ -77,6 +77,7 @@ class FakeMatrixRoom( |
|
|
|
private var cancelSendResult = Result.success(Unit) |
|
|
|
private var cancelSendResult = Result.success(Unit) |
|
|
|
private var forwardEventResult = Result.success(Unit) |
|
|
|
private var forwardEventResult = Result.success(Unit) |
|
|
|
private var reportContentResult = Result.success(Unit) |
|
|
|
private var reportContentResult = Result.success(Unit) |
|
|
|
|
|
|
|
private var sendLocationResult = Result.success(Unit) |
|
|
|
|
|
|
|
|
|
|
|
var sendMediaCount = 0 |
|
|
|
var sendMediaCount = 0 |
|
|
|
private set |
|
|
|
private set |
|
|
@ -93,6 +94,9 @@ class FakeMatrixRoom( |
|
|
|
var reportedContentCount: Int = 0 |
|
|
|
var reportedContentCount: Int = 0 |
|
|
|
private set |
|
|
|
private set |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var sendLocationCount: Int = 0 |
|
|
|
|
|
|
|
private set |
|
|
|
|
|
|
|
|
|
|
|
var isInviteAccepted: Boolean = false |
|
|
|
var isInviteAccepted: Boolean = false |
|
|
|
private set |
|
|
|
private set |
|
|
|
|
|
|
|
|
|
|
@ -262,6 +266,14 @@ class FakeMatrixRoom( |
|
|
|
return reportContentResult |
|
|
|
return reportContentResult |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
override suspend fun sendLocation( |
|
|
|
|
|
|
|
body: String, |
|
|
|
|
|
|
|
geoUri: String |
|
|
|
|
|
|
|
): Result<Unit> = simulateLongTask { |
|
|
|
|
|
|
|
sendLocationCount++ |
|
|
|
|
|
|
|
return sendLocationResult |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun close() = Unit |
|
|
|
override fun close() = Unit |
|
|
|
|
|
|
|
|
|
|
|
fun givenLeaveRoomError(throwable: Throwable?) { |
|
|
|
fun givenLeaveRoomError(throwable: Throwable?) { |
|
|
@ -355,4 +367,8 @@ class FakeMatrixRoom( |
|
|
|
fun givenReportContentResult(result: Result<Unit>) { |
|
|
|
fun givenReportContentResult(result: Result<Unit>) { |
|
|
|
reportContentResult = result |
|
|
|
reportContentResult = result |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun givenSendLocationResult(result: Result<Unit>) { |
|
|
|
|
|
|
|
sendLocationResult = result |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|