Ejemplo n.º 1
0
        public void Test_030()
        {
            WebApplicationTest.Controllers.HomeController
                homeController = new WebApplicationTest.Controllers.HomeController();

            var result =
                homeController.Action0200(name: "Dariush");

            Xunit.Assert.IsType <Microsoft.AspNetCore.Mvc.ViewResult>(@object: result);
        }
Ejemplo n.º 2
0
        public void Test_050()
        {
            // ************************************************
            Test_040();
            // ************************************************

            WebApplicationTest.Controllers.HomeController
                homeController = new WebApplicationTest.Controllers.HomeController();

            var result =
                homeController.Action0200(name: "Dariush")
                as Microsoft.AspNetCore.Mvc.ViewResult;

            object actual =
                result.ViewData["Message"];

            Xunit.Assert.IsType <string>(@object: actual);
        }
Ejemplo n.º 3
0
        public void Test_040()
        {
            // ************************************************
            Test_030();
            // ************************************************

            WebApplicationTest.Controllers.HomeController
                homeController = new WebApplicationTest.Controllers.HomeController();

            var result =
                homeController.Action0200(name: "Dariush")
                as Microsoft.AspNetCore.Mvc.ViewResult;

            bool actual =
                result.ViewData.Keys.Contains("Message");

            Xunit.Assert.True(condition: actual);
        }
Ejemplo n.º 4
0
        public void Test_060()
        {
            // ************************************************
            Test_050();
            // ************************************************

            WebApplicationTest.Controllers.HomeController
                homeController = new WebApplicationTest.Controllers.HomeController();

            var result =
                homeController.Action0200(name: "Dariush")
                as Microsoft.AspNetCore.Mvc.ViewResult;

            object actual =
                result.ViewData["Message"] as string;

            string expected =
                "Hello, Dariush!";

            Xunit.Assert.Equal
                (expected: expected, actual: actual);
        }