mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 06:28:45 +03:00
Fix unit tests
This commit is contained in:
parent
f5d3bcbb94
commit
f5e33ca980
1 changed files with 4 additions and 3 deletions
|
@ -163,7 +163,7 @@ internal class DefaultLocationSharingServiceTest {
|
||||||
val error = Throwable()
|
val error = Throwable()
|
||||||
coEvery { stopLiveLocationShareTask.execute(any()) } returns UpdateLiveLocationShareResult.Failure(error)
|
coEvery { stopLiveLocationShareTask.execute(any()) } returns UpdateLiveLocationShareResult.Failure(error)
|
||||||
|
|
||||||
val result = defaultLocationSharingService.startLiveLocationShare(A_TIMEOUT)
|
val result = defaultLocationSharingService.startLiveLocationShare(A_TIMEOUT, A_DESCRIPTION)
|
||||||
|
|
||||||
result shouldBeEqualTo UpdateLiveLocationShareResult.Failure(error)
|
result shouldBeEqualTo UpdateLiveLocationShareResult.Failure(error)
|
||||||
val expectedCheckExistingParams = CheckIfExistingActiveLiveTask.Params(
|
val expectedCheckExistingParams = CheckIfExistingActiveLiveTask.Params(
|
||||||
|
@ -181,7 +181,7 @@ internal class DefaultLocationSharingServiceTest {
|
||||||
coEvery { checkIfExistingActiveLiveTask.execute(any()) } returns false
|
coEvery { checkIfExistingActiveLiveTask.execute(any()) } returns false
|
||||||
coEvery { startLiveLocationShareTask.execute(any()) } returns UpdateLiveLocationShareResult.Success(AN_EVENT_ID)
|
coEvery { startLiveLocationShareTask.execute(any()) } returns UpdateLiveLocationShareResult.Success(AN_EVENT_ID)
|
||||||
|
|
||||||
val result = defaultLocationSharingService.startLiveLocationShare(A_TIMEOUT)
|
val result = defaultLocationSharingService.startLiveLocationShare(A_TIMEOUT, A_DESCRIPTION)
|
||||||
|
|
||||||
result shouldBeEqualTo UpdateLiveLocationShareResult.Success(AN_EVENT_ID)
|
result shouldBeEqualTo UpdateLiveLocationShareResult.Success(AN_EVENT_ID)
|
||||||
val expectedCheckExistingParams = CheckIfExistingActiveLiveTask.Params(
|
val expectedCheckExistingParams = CheckIfExistingActiveLiveTask.Params(
|
||||||
|
@ -190,7 +190,8 @@ internal class DefaultLocationSharingServiceTest {
|
||||||
coVerify { checkIfExistingActiveLiveTask.execute(expectedCheckExistingParams) }
|
coVerify { checkIfExistingActiveLiveTask.execute(expectedCheckExistingParams) }
|
||||||
val expectedStartParams = StartLiveLocationShareTask.Params(
|
val expectedStartParams = StartLiveLocationShareTask.Params(
|
||||||
roomId = A_ROOM_ID,
|
roomId = A_ROOM_ID,
|
||||||
timeoutMillis = A_TIMEOUT
|
timeoutMillis = A_TIMEOUT,
|
||||||
|
description = A_DESCRIPTION
|
||||||
)
|
)
|
||||||
coVerify { startLiveLocationShareTask.execute(expectedStartParams) }
|
coVerify { startLiveLocationShareTask.execute(expectedStartParams) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue