Skip to content

Commit

Permalink
fix: Testcase related to code refactor (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi-mParticle authored Nov 6, 2024
1 parent 268d850 commit 669ae88
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class KitManagerImplTest {
manager.updateKits(kitConfiguration)
Assert.assertEquals(0, manager.providers.size)
Mockito.`when`(mockUser.isLoggedIn).thenReturn(true)
Mockito.`when`(manager.mCoreCallbacks.latestKitConfiguration).thenReturn(kitConfiguration)
Mockito.`when`(manager.mCoreCallbacks.getLatestKitConfiguration()).thenReturn(kitConfiguration)
manager.onUserIdentified(mockUser, null)
TestCase.assertEquals(3, manager.providers.size)
}
Expand Down Expand Up @@ -377,7 +377,7 @@ class KitManagerImplTest {
manager.updateKits(kitConfiguration)
Assert.assertEquals(3, manager.providers.size)
Mockito.`when`(mockUser.isLoggedIn).thenReturn(false)
Mockito.`when`(mockCoreCallbacks.latestKitConfiguration).thenReturn(kitConfiguration)
Mockito.`when`(mockCoreCallbacks.getLatestKitConfiguration()).thenReturn(kitConfiguration)
manager.onUserIdentified(mockUser, null)
TestCase.assertEquals(0, manager.providers.size)
}
Expand Down Expand Up @@ -573,7 +573,7 @@ class KitManagerImplTest {
put(JSONObject().apply { put("id", idOne) })
put(JSONObject().apply { put("id", idTwo) })
}
Mockito.`when`(manager.mCoreCallbacks.latestKitConfiguration).thenReturn(kitConfiguration)
Mockito.`when`(manager.mCoreCallbacks.getLatestKitConfiguration()).thenReturn(kitConfiguration)
val factory = Mockito.mock(
KitIntegrationFactory::class.java
)
Expand Down Expand Up @@ -613,7 +613,7 @@ class KitManagerImplTest {
val kitConfiguration = JSONArray()
kitConfiguration.put(JSONObject("{\"id\":1}"))
kitConfiguration.put(JSONObject("{\"id\":2}"))
Mockito.`when`(manager.mCoreCallbacks.latestKitConfiguration).thenReturn(kitConfiguration)
Mockito.`when`(manager.mCoreCallbacks.getLatestKitConfiguration()).thenReturn(kitConfiguration)
val factory = Mockito.mock(
KitIntegrationFactory::class.java
)
Expand Down

0 comments on commit 669ae88

Please sign in to comment.