Пример #1
0
        public void CreateComment_NotValidModel_ReturnsBadRequest()
        {
            blogController.ModelState.AddModelError("", "");

            ActionResult result = blogController.CreateComment(0, new Comment());

            Assert.IsInstanceOf <BadRequestObjectResult>(result);
            Assert.IsNotNull((result as BadRequestObjectResult).Value);
        }