Exemple #1
0
        public void Should_not_have_error_when_comment_is_specified()
        {
            var model = new BlogPostModel();

            model.AddNewComment.CommentText = "some comment";
            _validator.ShouldNotHaveValidationErrorFor(x => x.AddNewComment.CommentText, model);
        }
Exemple #2
0
        public void ShouldNotHaveErrorWhenCommentIsSpecified()
        {
            var model = new BlogPostModel {
                AddNewComment = { CommentText = "some comment" }
            };

            _validator.ShouldNotHaveValidationErrorFor(x => x.AddNewComment.CommentText, model);
        }