public async Task <IActionResult> GetSavedEmployerOpportunityAsync()
        {
            var username  = HttpContext.User.GetUserName();
            var viewModel = await _employerService.GetSavedEmployerOpportunitiesAsync(username);

            return(View("SavedEmployerOpportunity", viewModel));
        }
Exemple #2
0
        public async Task Then_Result_Should_Return_To_Start(
            [Frozen] IEmployerService employerService,
            EmployerController sut,
            int opportunityId)
        {
            //Arrange
            employerService.GetSavedEmployerOpportunitiesAsync(Arg.Any <string>()).Returns(new SavedEmployerOpportunityViewModel());

            //Act
            var result = await sut.DeleteEmployerAsync(opportunityId) as RedirectToRouteResult;

            //Assert
            result.Should().NotBeNull();
            result?.RouteName.Should().Be("Start");
            result?.RouteName.Should().NotBe("GetSavedEmployerOpportunity");
        }