public void Show_ReturnViewResult_True() { Dish dish = new Dish("spaghetti and meatballs"); DishesController controller = new DishesController(); ViewResult showView = controller.Show(dish.GetId()) as ViewResult; Assert.IsInstanceOfType(showView, typeof(ViewResult)); }
public void Show_HasCorrectModelType_DictionaryStringObject() { Dish dish = new Dish("spaghetti and meatballs"); DishesController controller = new DishesController(); ViewResult showView = controller.Show(dish.GetId()) as ViewResult; var result = showView.ViewData.Model; Assert.IsInstanceOfType(result, typeof(Dictionary <string, object>)); }