示例#1
0
        public void SearchTest()
        {
            RestaurantsController controller = new RestaurantsController();

            ViewResult result = controller.Search("car") as ViewResult;

            Assert.IsNotNull(result);
        }
示例#2
0
        public void ActionSearchShould_CallServiceMethodGetAll_WhenSearchCriteriaIsNotPassed()
        {
            var criteria = new SearchCriteria();
            var result   = controller.Search(criteria);

            restaurantsServiceMock.Verify(s => s.GetAll(), Times.Once);
        }