public async Task <ActionResult> AgreementNotSigned(LegalEntitySignedAgreementViewModel viewModel) { async Task <bool> IsLevyEmployer() { return((await Orchestrator.GetApprenticeshipEmployerType(viewModel.HashedAccountId)) == ApprenticeshipEmployerType.Levy); } viewModel.CanContinueAnyway = await IsLevyEmployer(); return(View(viewModel)); }
public void Arrange() { var autoFixture = new Fixture(); _employerAccountsService = new Mock <IEmployerAccountsService>(); _encodingService = new Mock <IEncodingService>(); _legalEntitySignedAgreementViewModel = autoFixture.Create <LegalEntitySignedAgreementViewModel>(); _account = autoFixture.Create <Account>(); _account.Id = 123; _encodingService.Setup(x => x.Decode(It.IsAny <string>(), EncodingType.AccountId)).Returns(123); _employerAccountsService.Setup(x => x.GetAccount(123)).ReturnsAsync(_account); _mapper = new LegalEntitySignedAgreementViewModelToAgreementNotSignedViewModelMapper(_employerAccountsService.Object, _encodingService.Object); }
public ActionResult AgreementNotSigned(LegalEntitySignedAgreementViewModel viewModel) { return(View(viewModel)); }
public ActionResult AgreementNotSigned(LegalEntitySignedAgreementViewModel viewModel) { return(RedirectPermanentCommitmentsUrl()); }
public async Task <ActionResult> AgreementNotSigned(LegalEntitySignedAgreementViewModel viewModel) { var response = await _modelMapper.Map <AgreementNotSignedViewModel>(viewModel); return(View(response)); }