From f8a839bd381eef52f65c8774818be7e432a84ae4 Mon Sep 17 00:00:00 2001 From: Archifer Date: Thu, 23 Mar 2023 17:04:06 +0100 Subject: [PATCH] FP-Hotfixtests hot fox for some failing android tests --- .../mobile/sdk/PinRegistrationRequestAcceptUseCaseTest.kt | 2 ++ .../java/com/onegini/mobile/sdk/ResourceRequestUseCaseTests.kt | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/test/java/com/onegini/mobile/sdk/PinRegistrationRequestAcceptUseCaseTest.kt b/android/src/test/java/com/onegini/mobile/sdk/PinRegistrationRequestAcceptUseCaseTest.kt index 20455726..af09ab5e 100644 --- a/android/src/test/java/com/onegini/mobile/sdk/PinRegistrationRequestAcceptUseCaseTest.kt +++ b/android/src/test/java/com/onegini/mobile/sdk/PinRegistrationRequestAcceptUseCaseTest.kt @@ -30,6 +30,8 @@ class PinRegistrationRequestAcceptUseCaseTest { @Test fun `When no pin registration callback is set, Then it should resolve with an error`() { + PinRequestHandler.CALLBACK = null + val result = pinRegistrationRequestAcceptUseCase("12345").exceptionOrNull() SdkErrorAssert.assertEquals(REGISTRATION_NOT_IN_PROGRESS, result) } diff --git a/android/src/test/java/com/onegini/mobile/sdk/ResourceRequestUseCaseTests.kt b/android/src/test/java/com/onegini/mobile/sdk/ResourceRequestUseCaseTests.kt index 211be6f9..bdbf1db0 100644 --- a/android/src/test/java/com/onegini/mobile/sdk/ResourceRequestUseCaseTests.kt +++ b/android/src/test/java/com/onegini/mobile/sdk/ResourceRequestUseCaseTests.kt @@ -122,7 +122,6 @@ class ResourceRequestUseCaseTests { private fun setupErrorFullResponseMock() { whenever(responseMock.code).thenReturn(400) - whenever(responseMock.isSuccessful).thenReturn(false) val headers = Headers.Builder().add("headerKey", "headerValue").build() whenever(responseMock.headers).thenReturn(headers) }