Skip to content

Commit

Permalink
Removed invocation to REJECTED_OUTDATED_ONBOARDINGS fn
Browse files Browse the repository at this point in the history
  • Loading branch information
pierpaolodidato89 authored Oct 28, 2024
1 parent ff6f148 commit 4a70509
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ default String createInstitutionAndOnboarding(TaskOrchestrationContext ctx, Onbo
if (!onboarding.getWorkflowType().equals(WorkflowType.IMPORT)) {
ctx.callActivity(STORE_ONBOARDING_ACTIVATEDAT, onboardingWithInstitutionIdString, optionsRetry(), String.class).await();
}
ctx.callActivity(REJECT_OUTDATED_ONBOARDINGS, onboardingString, optionsRetry(), String.class).await();
//ctx.callActivity(REJECT_OUTDATED_ONBOARDINGS, onboardingString, optionsRetry(), String.class).await();

createTestEnvironmentsOnboarding(ctx, onboarding, onboardingWithInstitutionIdString);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ void onboardingOrchestratorContractRegistrationAggregator_Pending() {
function.onboardingsOrchestrator(orchestrationContext, executionContext);

ArgumentCaptor<String> captorActivity = ArgumentCaptor.forClass(String.class);
Mockito.verify(orchestrationContext, times(6))
Mockito.verify(orchestrationContext, times(5))
.callActivity(captorActivity.capture(), any(), any(), any());
assertEquals(CREATE_INSTITUTION_ACTIVITY, captorActivity.getAllValues().get(0));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(1));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(2));
assertEquals(STORE_ONBOARDING_ACTIVATEDAT, captorActivity.getAllValues().get(3));
assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(5));
//assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(4));

Mockito.verify(orchestrationContext, times(3))
.callSubOrchestrator(eq(ONBOARDINGS_AGGREGATE_ORCHESTRATOR), any(), any());
Expand Down Expand Up @@ -329,14 +329,14 @@ void onboardingsOrchestratorConfirmation() {
function.onboardingsOrchestrator(orchestrationContext, executionContext);

ArgumentCaptor<String> captorActivity = ArgumentCaptor.forClass(String.class);
verify(orchestrationContext, times(6))
verify(orchestrationContext, times(5))
.callActivity(captorActivity.capture(), any(), any(), any());
assertEquals(CREATE_INSTITUTION_ACTIVITY, captorActivity.getAllValues().get(0));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(1));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(2));
assertEquals(STORE_ONBOARDING_ACTIVATEDAT, captorActivity.getAllValues().get(3));
assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(5));
//assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(4));

verify(service, times(1))
.updateOnboardingStatus(onboarding.getId(), OnboardingStatus.COMPLETED);
Expand All @@ -356,16 +356,16 @@ void onboardingsOrchestratorConfirmationWithTestProductIds() {
function.onboardingsOrchestrator(orchestrationContext, executionContext);

ArgumentCaptor<String> captorActivity = ArgumentCaptor.forClass(String.class);
verify(orchestrationContext, times(8))
verify(orchestrationContext, times(7))
.callActivity(captorActivity.capture(), any(), any(), any());
assertEquals(CREATE_INSTITUTION_ACTIVITY, captorActivity.getAllValues().get(0));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(1));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(2));
assertEquals(STORE_ONBOARDING_ACTIVATEDAT, captorActivity.getAllValues().get(3));
assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(5));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(6));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(7));
//assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(4));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(5));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(6));

verify(service, times(1))
.updateOnboardingStatus(onboarding.getId(), OnboardingStatus.COMPLETED);
Expand Down Expand Up @@ -491,13 +491,13 @@ void onboardingsOrchestratorImport() {
function.onboardingsOrchestrator(orchestrationContext, executionContext);

ArgumentCaptor<String> captorActivity = ArgumentCaptor.forClass(String.class);
verify(orchestrationContext, times(4))
verify(orchestrationContext, times(3))
.callActivity(captorActivity.capture(), any(), any(), any());
assertEquals(CREATE_INSTITUTION_ACTIVITY, captorActivity.getAllValues().get(0));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(1));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(2));
// assertEquals(STORE_ONBOARDING_ACTIVATEDAT, captorActivity.getAllValues().get(3));
assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(3));
//assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(3));

verify(service, times(1))
.updateOnboardingStatus(onboarding.getId(), OnboardingStatus.COMPLETED);
Expand Down Expand Up @@ -561,14 +561,14 @@ void onboardingsOrchestratorForApprovePtWhenToBeValidated() {
function.onboardingsOrchestrator(orchestrationContext, executionContext);

ArgumentCaptor<String> captorActivity = ArgumentCaptor.forClass(String.class);
verify(orchestrationContext, times(6))
verify(orchestrationContext, times(5))
.callActivity(captorActivity.capture(), any(), any(), any());
assertEquals(CREATE_INSTITUTION_ACTIVITY, captorActivity.getAllValues().get(0));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(1));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(2));
assertEquals(STORE_ONBOARDING_ACTIVATEDAT, captorActivity.getAllValues().get(3));
assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(5));
//assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(4));

verify(service, times(1))
.updateOnboardingStatus(onboarding.getId(), OnboardingStatus.COMPLETED);
Expand Down Expand Up @@ -698,14 +698,14 @@ void onboardingCompletionOrchestrator() {
function.onboardingsOrchestrator(orchestrationContext, executionContext);

ArgumentCaptor<String> captorActivity = ArgumentCaptor.forClass(String.class);
verify(orchestrationContext, times(6))
verify(orchestrationContext, times(5))
.callActivity(captorActivity.capture(), any(), any(), any());
assertEquals(CREATE_INSTITUTION_ACTIVITY, captorActivity.getAllValues().get(0));
assertEquals(CREATE_ONBOARDING_ACTIVITY, captorActivity.getAllValues().get(1));
assertEquals(CREATE_USERS_ACTIVITY, captorActivity.getAllValues().get(2));
assertEquals(STORE_ONBOARDING_ACTIVATEDAT, captorActivity.getAllValues().get(3));
assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(5));
//assertEquals(REJECT_OUTDATED_ONBOARDINGS, captorActivity.getAllValues().get(4));
assertEquals(SEND_MAIL_COMPLETION_ACTIVITY, captorActivity.getAllValues().get(4));

verify(service, times(1))
.updateOnboardingStatus(onboarding.getId(), OnboardingStatus.COMPLETED);
Expand Down

0 comments on commit 4a70509

Please sign in to comment.