public WhenPostingSelectDraftApprenticeshipsEntryMethodFixture()
 {
     _viewModel = new SelectDraftApprenticeshipsEntryMethodViewModel {
         ProviderId = ProviderId
     };
     Sut = new CohortController(Mock.Of <IMediator>(), Mock.Of <IModelMapper>(), Mock.Of <ILinkGenerator>(), Mock.Of <ICommitmentsApiClient>(), Mock.Of <IFeatureTogglesService <ProviderFeatureToggle> >(), Mock.Of <IEncodingService>());
 }
示例#2
0
 public IActionResult SelectDraftApprenticeshipsEntryMethod(SelectDraftApprenticeshipsEntryMethodViewModel viewModel)
 {
     if (viewModel.Selection == AddDraftApprenticeshipEntryMethodOptions.BulkCsv)
     {
         return(RedirectToAction(nameof(FileUploadInform), new { ProviderId = viewModel.ProviderId }));
     }
     else if (viewModel.Selection == AddDraftApprenticeshipEntryMethodOptions.Manual)
     {
         return(RedirectToAction(nameof(SelectAddDraftApprenticeshipJourney), new { ProviderId = viewModel.ProviderId }));
     }
     else
     {
         throw new InvalidOperationException();
     }
 }