示例#1
0
        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));
        }
示例#2
0
        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>));
        }