public void Index_Passes_GreetModel_To_View()
        {
            var controller = new GreetController();
            var result     = controller.Index("ThisIsSPAARTAAAA!");

            Assert.IsType <GreetModel>(result.Model);
        }
示例#2
0
        public void Greet_Index_Returns_ViewResult()
        {
            var controller = new GreetController();
            var result     = controller.Index("ThisIsAString");

            Assert.IsType <ViewResult>(result);
        }
示例#3
0
        public void Index_Returns_GreetingModel_To_View()
        {
            var controller = new GreetController();

            var result = controller.Index("ThisIsAString");

            Assert.IsType <GreetingModel>(result.Model);
        }
        public void Index_Sets_Name_On_Model()
        {
            var expectedName = "ExampleString";
            var controller   = new GreetController();

            var result = controller.Index(expectedName);

            var model = (GreetModel)result.Model;

            Assert.Equal(expectedName, model.Name);
        }