Skip to content

Commit

Permalink
With Training provider panel scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
cofaulco committed Jul 6, 2022
1 parent 690d104 commit c59e70e
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,5 +204,31 @@ public void WhenSingleReservationAndApprenticeship_ThenShouldGetSingleApprentice
//Assert
panelViewModel.ViewName.Should().Be("SingleApprenticeshipContinueSetup");
}

[Test, RecursiveMoqAutoData]
public void WhenSingleReservationAndApprenticeship_ThenShouldGetSingleApprenticeshipWithTrainingProviderViewName(
CohortViewModel singleCohort,
Reservation singleReservation,
ApprenticeshipViewModel singleApprenticeship,
[NonLevyPanelView] PanelViewModel<AccountDashboardViewModel> panelViewModel,
EmployerTeamOrchestrator sut)
{
// Arrange
singleCohort.Apprenticeships = new List<ApprenticeshipViewModel> { singleApprenticeship };
singleCohort.CohortStatus = CohortStatus.WithTrainingProvider;
singleApprenticeship.ApprenticeshipStatus = ApprenticeshipStatus.Draft;
singleApprenticeship.NumberOfDraftApprentices = 1;
panelViewModel.Data.CallToActionViewModel.Cohorts = new List<CohortViewModel> { singleCohort };
panelViewModel.Data.CallToActionViewModel.Apprenticeships = new List<ApprenticeshipViewModel>();
panelViewModel.Data.CallToActionViewModel.Reservations = new List<Reservation> { singleReservation };
panelViewModel.Data.CallToActionViewModel.VacanciesViewModel = new VacanciesViewModel();
panelViewModel.Data.PendingAgreements.Clear(); // todo remove this and add to customization

// Act
sut.GetCallToActionViewName(panelViewModel);

//Assert
panelViewModel.ViewName.Should().Be("SingleApprenticeshipWithTrainingProvider");
}
}
}

0 comments on commit c59e70e

Please sign in to comment.