Inheritance: Controller
        public void About()
        {
            var sut = new HomeController();
            var result = sut.About() as ViewResult;

            Assert.IsNotNull(result);
        }
        public void Contact()
        {
            var sut = new HomeController();
            var result = sut.Contact() as ViewResult;

            Assert.NotNull(result);
        }
        public void Contact()
        {
            // Arrange
            HomeController controller = new HomeController(new Subject());

            // Act
            ViewResult result = controller.Contact() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController(new Subject());

            // Act
            ViewResult result = controller.About() as ViewResult;

            // Assert
            Assert.AreEqual("Your RRW -3 application description page.", result.ViewBag.Message);
        }
Ejemplo n.º 5
0
        public void Index()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.AreEqual("Modify this template to jump-start your ASP.NET MVC application.", result.ViewBag.Message);
        }
Ejemplo n.º 6
0
        public void About()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.About() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Ejemplo n.º 7
0
        public void Index()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Home Page", result.ViewBag.Title);
        }