예제 #1
0
        public void CanPullComment()
        {
            // Arrange.
            BlogPost post = CreateBlogPost();

            post.Comments.Add(new Comment
            {
                Date = DateTime.Now,
                Name = "Tim Jones"
            });
            post.Save();

            // Act.
            BlogPost.Pull(post.ID, p => p.Comments, c => c.Name == "Tim Jones");

            // Assert.
            BlogPost myPost = BlogPost.Find(post.ID);

            Assert.That(myPost.Comments.Count, Is.EqualTo(0));
        }