示例#1
0
        public void GetOddSequence()
        {
            HomeController controller = new HomeController();
            string expectedResult = "1,3,5";
            string actualResult = string.Empty;

            actualResult = controller.GetOddSequence(5);
            Assert.AreEqual(expectedResult, actualResult);
        }
示例#2
0
        public void GetConditionalSequence()
        {
            HomeController controller = new HomeController();
            string expectedResult = "1,2,C,4,E";
            string actualResult = string.Empty;

            actualResult = controller.GetConditionalSequence(5);
            Assert.AreEqual(expectedResult, actualResult);
        }
示例#3
0
        public void Contact()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.IsNotNull(result);
        }
示例#4
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);
        }