コード例 #1
0
        public void Create_ReturnsCorrectView_True()
        {
            string phrase                   = "";
            bool   isPalindrome             = false;
            PalindromeController controller = new PalindromeController();
            ActionResult         indexView  = controller.Create(phrase, isPalindrome);

            Assert.IsInstanceOfType(indexView, typeof(ViewResult));
        }
コード例 #2
0
        public void Create_HasCorrectModelType_Palindromes()
        {
            string phrase                   = "";
            bool   isPalindrome             = false;
            PalindromeController controller = new PalindromeController();
            ViewResult           createView = controller.Create(phrase, isPalindrome) as ViewResult;
            var result = createView.ViewData.Model;

            Assert.IsInstanceOfType(result, typeof(Palindrome));
        }