public void ValidateBlogPost_ValidBlogPost_Returns() { var validator = new BlogPostValidator(); var param_blogPost = new BlogPostFactory().Create(); validator.ValidateBlogPost(param_blogPost); }
public void ValidateBlogPost_NullBlogPost_ThrowsException() { var validator = new BlogPostValidator(); BlogPost param_blogPost = null; Assert.Throws <ArgumentNullException>( () => validator.ValidateBlogPost(param_blogPost)); }
public void ValidateBlogPost_PostTitleIsInvalid_ThrowsException(string invalidValue) { var validator = new BlogPostValidator(); var param_blogPost = new BlogPostFactory().Create(); param_blogPost.PostTitle = invalidValue; Assert.Throws <ArgumentException>( () => validator.ValidateBlogPost(param_blogPost)); }