Esempio n. 1
0
        public WhenCallingGetWhoWillEnterTheDetailsTestsFixture() : base()
        {
            _request   = _autoFixture.Create <ChangeOfProviderRequest>();
            _viewModel = _autoFixture.Create <WhoWillEnterTheDetailsViewModel>();

            _mockMapper.Setup(m => m.Map <WhoWillEnterTheDetailsViewModel>(_request))
            .ReturnsAsync(_viewModel);
        }
Esempio n. 2
0
        public async Task <IActionResult> WhoWillEnterTheDetails(WhoWillEnterTheDetailsViewModel vm)
        {
            var request = await _modelMapper.Map <ChangeOfProviderRequest>(vm);

            if (vm.EmployerWillAdd == true)
            {
                return(RedirectToRoute(RouteNames.WhatIsTheNewStartDate, request));
            }
            else
            {
                return(RedirectToRoute(RouteNames.SendRequestNewTrainingProvider, request));
            }
        }
 public async Task <IActionResult> WhoWillEnterTheDetails(WhoWillEnterTheDetailsViewModel viewModel)
 {
     return(await _controller.WhoWillEnterTheDetails(viewModel));
 }