Пример #1
0
        public void ValidateBlogPost_WhenCalledWithInvalidBlogPost_ErrorsShouldNotBeEmpty()
        {
            //Arrange
            var invalidBlogPost = new BlogPost();

            //Act
            var result = invalidBlogPost.Validate();

            //Assert
            Assert.IsNotEmpty(invalidBlogPost.Errors);
        }
Пример #2
0
        public void ValidateBlogPost_InvalidBlogPost_ReturnsFalse()
        {
            //Arrange
            var invalidBlogPost = new BlogPost();

            //Act
            var result = invalidBlogPost.Validate();

            //Assert
            Assert.IsFalse(result);
        }