Пример #1
0
        public void IndexViewResultNotNull()
        {
            // Arrange
            TESTController controller = new TESTController();
            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.NotNull(controller);
        }
Пример #2
0
        public void IndexViewNameEqualIndex()
        {
            // Arrange
            TESTController controller = new TESTController();
            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.Equal("Index", result?.ViewName);
        }
Пример #3
0
        public void IndexViewDataMessage()
        {
            // Arrange
            TESTController controller = new TESTController();

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

            // Assert
            Assert.Equal("For testing", result?.ViewBag.Message);
        }