@@ -32,7 +32,7 @@ class DenyAllForTCFBridgeTest {
3232 @Test
3333 fun testInvoke () {
3434 val usercentricsSDK = mockk<UsercentricsSDK >()
35- every { usercentricsSDK.denyAllForTCF(any(), any()) }.returns(DenyAllForTCFMock .fake)
35+ every { usercentricsSDK.denyAllForTCF(any(), any(), any() ) }.returns(DenyAllForTCFMock .fake)
3636 val usercentricsProxy = FakeUsercentricsProxy (usercentricsSDK)
3737 val instance = DenyAllForTCFBridge (usercentricsProxy)
3838 val result = FakeFlutterResult ()
@@ -42,7 +42,30 @@ class DenyAllForTCFBridgeTest {
4242 verify(exactly = 1 ) {
4343 usercentricsSDK.denyAllForTCF(
4444 fromLayer = DenyAllForTCFMock .callFromLayer,
45- consentType = DenyAllForTCFMock .callConsentType
45+ consentType = DenyAllForTCFMock .callConsentType,
46+ unsavedPurposeLIDecisions = null
47+ )
48+ }
49+
50+ Assert .assertEquals(1 , result.successCount)
51+ Assert .assertEquals(DenyAllForTCFMock .expected, result.successResultArgument)
52+ }
53+
54+ @Test
55+ fun testInvokeWithUnsavedPurposeLIDecisions () {
56+ val usercentricsSDK = mockk<UsercentricsSDK >()
57+ every { usercentricsSDK.denyAllForTCF(any(), any(), any()) }.returns(DenyAllForTCFMock .fake)
58+ val usercentricsProxy = FakeUsercentricsProxy (usercentricsSDK)
59+ val instance = DenyAllForTCFBridge (usercentricsProxy)
60+ val result = FakeFlutterResult ()
61+
62+ instance.invoke(DenyAllForTCFMock .callWithUnsavedPurposeLIDecisions, result)
63+
64+ verify(exactly = 1 ) {
65+ usercentricsSDK.denyAllForTCF(
66+ fromLayer = DenyAllForTCFMock .callFromLayer,
67+ consentType = DenyAllForTCFMock .callConsentType,
68+ unsavedPurposeLIDecisions = DenyAllForTCFMock .callUnsavedPurposeLIDecisions
4669 )
4770 }
4871
0 commit comments