Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
feat: add new unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
giulia-tremolada committed Jan 17, 2024
1 parent 7436e37 commit 85a5718
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,20 @@ void shouldOnboardingInstitution() {
assertDoesNotThrow(() -> onboardingServiceImpl.onboardingInstitution(onboardingRequest, mock(SelfCareUser.class)));
}

@Test
void shouldOnboardingInstitutionProdPagoPa() {
OnboardingInstitutionStrategy mockInstitutionStrategy = mock(OnboardingInstitutionStrategy.class);
when(institutionStrategyFactory.retrieveOnboardingInstitutionStrategy(any(), any(), any()))
.thenReturn(mockInstitutionStrategy);
doNothing().when(mockInstitutionStrategy).onboardingInstitution(any(),any());

OnboardingRequest onboardingRequest = new OnboardingRequest();
onboardingRequest.setProductId(ProductId.PROD_PAGOPA.getValue());
onboardingRequest.setInstitutionUpdate(TestUtils.createSimpleInstitutionUpdate());

assertDoesNotThrow(() -> onboardingServiceImpl.onboardingInstitution(onboardingRequest, mock(SelfCareUser.class)));
}

@ParameterizedTest
@ValueSource(strings = {"ipa", "regulatedMarket", "establishedByRegulatoryProvision", "agentOfPublicService"})
void shouldOnboardingInstitutionWithAdditionalInfo(String type) {
Expand Down

0 comments on commit 85a5718

Please sign in to comment.