public async Task EmployeeControllerPostAddClientShouldReturnRedirect() { //arrange var adminController = new AdminController(new FakeDeclarationFormRepository(), new FakeEmployeeRepository(), new FakeClientRepository()); //act var actionResult = await adminController.AddClient(new ClientModel()); //assert Assert.IsInstanceOfType(actionResult, typeof(RedirectToActionResult)); }
public async Task EmployeeControllerAddClientViewResultShouldHaveClientModel() { //arrange var adminController = new AdminController(new FakeDeclarationFormRepository(), new FakeEmployeeRepository(), new FakeClientRepository()); //act var actionResult = await adminController.AddClient(); var viewResult = (ViewResult)actionResult; var viewModel = viewResult.Model; //assert Assert.IsInstanceOfType(viewModel, typeof(ClientModel)); }