public void SearchTest() { RestaurantsController controller = new RestaurantsController(); ViewResult result = controller.Search("car") as ViewResult; Assert.IsNotNull(result); }
public void ActionSearchShould_CallServiceMethodGetAll_WhenSearchCriteriaIsNotPassed() { var criteria = new SearchCriteria(); var result = controller.Search(criteria); restaurantsServiceMock.Verify(s => s.GetAll(), Times.Once); }