コード例 #1
0
        public void IsCommentValid_WhenNotNullOrWhitespace_ShouldReturnTrue()
        {
            //---------------Arrange-------------------
            var comment = new TodoComment {
                Comment = "a comment"
            };
            //---------------Act----------------------
            var result = comment.IsCommentValid();

            //---------------Assert-----------------------
            Assert.IsTrue(result);
        }
コード例 #2
0
        public void IsCommentValid_WhenNullOrWhitespace_ShouldReturnFalse(string text)
        {
            //---------------Arrange-------------------
            var comment = new TodoComment {
                Comment = text
            };
            //---------------Act----------------------
            var result = comment.IsCommentValid();

            //---------------Assert-----------------------
            Assert.IsFalse(result);
        }
 private bool InvalidComment(TodoComment domainModel)
 {
     return(!domainModel.IsCommentValid());
 }