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);
        }
Beispiel #3
0
 public ActionResult AgreementNotSigned(LegalEntitySignedAgreementViewModel viewModel)
 {
     return(View(viewModel));
 }
Beispiel #4
0
 public ActionResult AgreementNotSigned(LegalEntitySignedAgreementViewModel viewModel)
 {
     return(RedirectPermanentCommitmentsUrl());
 }
Beispiel #5
0
        public async Task <ActionResult> AgreementNotSigned(LegalEntitySignedAgreementViewModel viewModel)
        {
            var response = await _modelMapper.Map <AgreementNotSignedViewModel>(viewModel);

            return(View(response));
        }