@@ -46,7 +46,7 @@ class LoginUserOperationExecutorTests : FunSpec({
4646 test("login anonymous user successfully creates user") {
4747 /* Given */
4848 val mockUserBackendService = mockk<IUserBackendService >()
49- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
49+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
5050 CreateUserResponse (
5151 mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId),
5252 PropertiesObject (),
@@ -80,15 +80,14 @@ class LoginUserOperationExecutorTests : FunSpec({
8080 appId,
8181 mapOf(),
8282 any(),
83- any(),
8483 )
8584 }
8685 }
8786
8887 test("login anonymous user fails with retry when network condition exists") {
8988 /* Given */
9089 val mockUserBackendService = mockk<IUserBackendService >()
91- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } throws BackendException (408, "TIMEOUT ")
90+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } throws BackendException (408, "TIMEOUT ")
9291
9392 val mockIdentityOperationExecutor = mockk<IdentityOperationExecutor >()
9493
@@ -104,13 +103,13 @@ class LoginUserOperationExecutorTests : FunSpec({
104103
105104 /* Then */
106105 response.result shouldBe ExecutionResult .FAIL_RETRY
107- coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(), any(), any() ) }
106+ coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(), any()) }
108107 }
109108
110109 test("login anonymous user fails with no retry when backend error condition exists") {
111110 /* Given */
112111 val mockUserBackendService = mockk<IUserBackendService >()
113- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } throws BackendException (404, "NOT FOUND ")
112+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } throws BackendException (404, "NOT FOUND ")
114113
115114 val mockIdentityOperationExecutor = mockk<IdentityOperationExecutor >()
116115
@@ -126,13 +125,13 @@ class LoginUserOperationExecutorTests : FunSpec({
126125
127126 /* Then */
128127 response.result shouldBe ExecutionResult .FAIL_NORETRY
129- coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(), any(), any() ) }
128+ coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(), any()) }
130129 }
131130
132131 test("login identified user without association successfully creates user") {
133132 /* Given */
134133 val mockUserBackendService = mockk<IUserBackendService >()
135- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
134+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
136135 CreateUserResponse (mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId), PropertiesObject (), listOf())
137136
138137 val mockIdentityOperationExecutor = mockk<IdentityOperationExecutor >()
@@ -149,7 +148,7 @@ class LoginUserOperationExecutorTests : FunSpec({
149148
150149 /* Then */
151150 response.result shouldBe ExecutionResult .SUCCESS
152- coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(IdentityConstants .EXTERNAL_ID to "externalId"), any(), any() ) }
151+ coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(IdentityConstants .EXTERNAL_ID to "externalId"), any()) }
153152 }
154153
155154 test("login identified user with association succeeds when association is successful") {
@@ -188,7 +187,7 @@ class LoginUserOperationExecutorTests : FunSpec({
188187 test("login identified user with association fails with retry when association fails with retry") {
189188 /* Given */
190189 val mockUserBackendService = mockk<IUserBackendService >()
191- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
190+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
192191 CreateUserResponse (mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId), PropertiesObject (), listOf())
193192
194193 val mockIdentityOperationExecutor = mockk<IdentityOperationExecutor >()
@@ -223,7 +222,7 @@ class LoginUserOperationExecutorTests : FunSpec({
223222 test("login identified user with association successfully creates user when association fails with no retry") {
224223 /* Given */
225224 val mockUserBackendService = mockk<IUserBackendService >()
226- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
225+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
227226 CreateUserResponse (mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId), PropertiesObject (), listOf())
228227
229228 val mockIdentityOperationExecutor = mockk<IdentityOperationExecutor >()
@@ -253,13 +252,13 @@ class LoginUserOperationExecutorTests : FunSpec({
253252 },
254253 )
255254 }
256- coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(IdentityConstants .EXTERNAL_ID to "externalId"), any(), any() ) }
255+ coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(IdentityConstants .EXTERNAL_ID to "externalId"), any()) }
257256 }
258257
259258 test("login identified user with association fails with retry when association fails with no retry and network condition exists") {
260259 /* Given */
261260 val mockUserBackendService = mockk<IUserBackendService >()
262- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } throws BackendException (408, "TIMEOUT ")
261+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } throws BackendException (408, "TIMEOUT ")
263262
264263 val mockIdentityOperationExecutor = mockk<IdentityOperationExecutor >()
265264 coEvery { mockIdentityOperationExecutor.execute(any()) } returns ExecutionResponse (ExecutionResult .FAIL_NORETRY )
@@ -288,13 +287,13 @@ class LoginUserOperationExecutorTests : FunSpec({
288287 },
289288 )
290289 }
291- coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(IdentityConstants .EXTERNAL_ID to "externalId"), any(), any() ) }
290+ coVerify(exactly = 1) { mockUserBackendService.createUser(appId, mapOf(IdentityConstants .EXTERNAL_ID to "externalId"), any()) }
292291 }
293292
294293 test("creating user will merge operations into one backend call") {
295294 /* Given */
296295 val mockUserBackendService = mockk<IUserBackendService >()
297- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
296+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
298297 CreateUserResponse (
299298 mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId),
300299 PropertiesObject (),
@@ -351,14 +350,6 @@ class LoginUserOperationExecutorTests : FunSpec({
351350 mockUserBackendService.createUser(
352351 appId,
353352 mapOf("aliasLabel1" to "aliasValue1-2"),
354- withArg {
355- it.country shouldBe "country"
356- it.language shouldBe "lang2"
357- it.timezoneId shouldBe "timezone"
358- it.latitude shouldBe 123.45
359- it.longitude shouldBe 678.90
360- it.tags shouldBe mapOf("tagKey1" to "tagValue1-2")
361- },
362353 withArg {
363354 it.count() shouldBe 1
364355 it[0].type shouldBe SubscriptionObjectType .ANDROID_PUSH
@@ -373,7 +364,7 @@ class LoginUserOperationExecutorTests : FunSpec({
373364 test("creating user will hydrate when the user hasn't changed") {
374365 /* Given */
375366 val mockUserBackendService = mockk<IUserBackendService >()
376- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
367+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
377368 CreateUserResponse (
378369 mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId),
379370 PropertiesObject (),
@@ -432,15 +423,14 @@ class LoginUserOperationExecutorTests : FunSpec({
432423 appId,
433424 mapOf(),
434425 any(),
435- any(),
436426 )
437427 }
438428 }
439429
440430 test("creating user will not hydrate when the user has changed") {
441431 /* Given */
442432 val mockUserBackendService = mockk<IUserBackendService >()
443- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
433+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
444434 CreateUserResponse (
445435 mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId),
446436 PropertiesObject (),
@@ -499,15 +489,14 @@ class LoginUserOperationExecutorTests : FunSpec({
499489 appId,
500490 mapOf(),
501491 any(),
502- any(),
503492 )
504493 }
505494 }
506495
507496 test("creating user will provide local to remote translations") {
508497 /* Given */
509498 val mockUserBackendService = mockk<IUserBackendService >()
510- coEvery { mockUserBackendService.createUser(any(), any(), any(), any() ) } returns
499+ coEvery { mockUserBackendService.createUser(any(), any(), any()) } returns
511500 CreateUserResponse (
512501 mapOf(IdentityConstants .ONESIGNAL_ID to remoteOneSignalId),
513502 PropertiesObject (),
@@ -547,7 +536,6 @@ class LoginUserOperationExecutorTests : FunSpec({
547536 appId,
548537 mapOf(),
549538 any(),
550- any(),
551539 )
552540 }
553541 }
0 commit comments