isCalledExactly(1) -> isCalledOnce()
This commit is contained in:
parent
3bde744d76
commit
fe771a37c2
7 changed files with 61 additions and 65 deletions
|
|
@ -70,8 +70,8 @@ class DefaultPushServiceTest {
|
|||
)
|
||||
assertThat(defaultPushService.testPush()).isTrue()
|
||||
testPushResult.assertions()
|
||||
.isCalledExactly(1)
|
||||
.withSequence(listOf(value(aConfig)))
|
||||
.isCalledOnce()
|
||||
.with(value(aConfig))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -177,11 +177,11 @@ class DefaultPushServiceTest {
|
|||
assertThat(result.isSuccess).isTrue()
|
||||
assertThat(userPushStore.getPushProviderName()).isEqualTo(aPushProvider.name)
|
||||
unregisterLambda.assertions()
|
||||
.isCalledExactly(1)
|
||||
.withSequence(listOf(value(client)))
|
||||
.isCalledOnce()
|
||||
.with(value(client))
|
||||
registerLambda.assertions()
|
||||
.isCalledExactly(1)
|
||||
.withSequence(listOf(value(client), value(aDistributor)))
|
||||
.isCalledOnce()
|
||||
.with(value(client), value(aDistributor))
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -99,21 +99,19 @@ class DefaultPusherSubscriberTest {
|
|||
)
|
||||
assertThat(result).isEqualTo(registerResult)
|
||||
setHttpPusherResult.assertions()
|
||||
.isCalledExactly(1)
|
||||
.withSequence(
|
||||
listOf(
|
||||
value(
|
||||
SetHttpPusherData(
|
||||
pushKey = "aPushKey",
|
||||
appId = PushConfig.PUSHER_APP_ID,
|
||||
url = "aGateway",
|
||||
appDisplayName = "MyApp",
|
||||
deviceDisplayName = "MyDevice",
|
||||
profileTag = DEFAULT_PUSHER_FILE_TAG + "_",
|
||||
lang = "en",
|
||||
defaultPayload = "{\"cs\":\"$A_SECRET\"}",
|
||||
),
|
||||
)
|
||||
.isCalledOnce()
|
||||
.with(
|
||||
value(
|
||||
SetHttpPusherData(
|
||||
pushKey = "aPushKey",
|
||||
appId = PushConfig.PUSHER_APP_ID,
|
||||
url = "aGateway",
|
||||
appDisplayName = "MyApp",
|
||||
deviceDisplayName = "MyDevice",
|
||||
profileTag = DEFAULT_PUSHER_FILE_TAG + "_",
|
||||
lang = "en",
|
||||
defaultPayload = "{\"cs\":\"$A_SECRET\"}",
|
||||
),
|
||||
)
|
||||
)
|
||||
assertThat(userPushStore.getCurrentRegisteredPushKey()).isEqualTo(
|
||||
|
|
@ -167,15 +165,13 @@ class DefaultPusherSubscriberTest {
|
|||
)
|
||||
assertThat(result).isEqualTo(unregisterResult)
|
||||
unsetHttpPusherResult.assertions()
|
||||
.isCalledExactly(1)
|
||||
.withSequence(
|
||||
listOf(
|
||||
value(
|
||||
UnsetHttpPusherData(
|
||||
pushKey = "aPushKey",
|
||||
appId = PushConfig.PUSHER_APP_ID,
|
||||
),
|
||||
)
|
||||
.isCalledOnce()
|
||||
.with(
|
||||
value(
|
||||
UnsetHttpPusherData(
|
||||
pushKey = "aPushKey",
|
||||
appId = PushConfig.PUSHER_APP_ID,
|
||||
),
|
||||
)
|
||||
)
|
||||
assertThat(userPushStore.getCurrentRegisteredPushKey()).isEqualTo(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue