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); }
public void ShouldNotHaveErrorWhenCommentIsSpecified() { var model = new BlogPostModel { AddNewComment = { CommentText = "some comment" } }; _validator.ShouldNotHaveValidationErrorFor(x => x.AddNewComment.CommentText, model); }