public void PopulateDropdown_SendNull_ReturnListOfSelectListItems() { // Arrange ServiceListingsController controller = new ServiceListingsController(context); // Act var list = controller.PopulateDropdown(null); // Assert Assert.True(list.Count > 0); }
public async Task FilterServices_SendNullData_ReturnRedirect() { // Arrange ServiceListingsController controller = new ServiceListingsController(context); // Act var actionResult = await controller.FilterServices(null); // Assert Assert.IsType <ViewResult>(actionResult); }
public void Details_PassInNull_ReturnNotFound() { // Arrange ServiceListingsController controller = new ServiceListingsController(context); // Act var actionResult = controller.Details(null); // Assert Assert.IsType <NotFoundResult>(actionResult.Result); }
public async Task FilterServices_SendViableValues_ReturnView() { // Arrange ServiceListingsController controller = new ServiceListingsController(context); // Act var actionResult = await controller.FilterServices("Hello"); // Assert Assert.IsType <ViewResult>(actionResult); }
public async void Index_CallFunction_ReturnView() { // Arrange ServiceListingsController controller = new ServiceListingsController(context); // Act var actionResult = await controller.Index(); // Assert Assert.IsType <ViewResult>(actionResult); }