Skip to content

Commit

Permalink
Review corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
gstamatop committed Oct 10, 2024
1 parent ceb7b11 commit 8f3753c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class TestPresentationLoadingInteractor {

// Case 3:
// 1. deviceAuthenticationInteractor.getBiometricsAvailability returns:
// BiometricsAvailability.Failed
// BiometricsAvailability.Failure

// Case 3 Expected Result:
// resultHandler.onAuthenticationFailure called once.
Expand Down Expand Up @@ -291,8 +291,12 @@ class TestPresentationLoadingInteractor {

@Test
fun `when interactor stopPresentation is called then it delegates to walletCoreInteractor stopPresentation`() {
// When
interactor.stopPresentation()
verify(walletCorePresentationController, times(1)).stopPresentation()

// Then
verify(walletCorePresentationController, times(1))
.stopPresentation()
}

//endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import eu.europa.ec.testlogic.extension.runTest
import eu.europa.ec.testlogic.extension.toFlow
import eu.europa.ec.testlogic.rule.CoroutineTestRule
import junit.framework.TestCase.assertEquals
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOf
import org.junit.After
import org.junit.Before
import org.junit.Rule
Expand Down Expand Up @@ -420,13 +420,13 @@ class TestPresentationRequestInteractor {
private fun mockEmissionOfIntentionallyNotHandledEvents() {
whenever(walletCorePresentationController.events)
.thenReturn(
flow {
emit(TransferEventPartialState.Connected)
emit(TransferEventPartialState.Connecting)
emit(TransferEventPartialState.QrEngagementReady(""))
emit(TransferEventPartialState.Redirect(uri = URI("")))
emit(TransferEventPartialState.ResponseSent)
}
flowOf(
TransferEventPartialState.Connected,
TransferEventPartialState.Connecting,
TransferEventPartialState.QrEngagementReady(""),
TransferEventPartialState.Redirect(uri = URI("")),
TransferEventPartialState.ResponseSent,
)
)
}

Expand Down

0 comments on commit 8f3753c

Please sign in to comment.