Beispiel #1
0
        public void Test_GetCount_IgnoresDeleted()
        {
            var builder = new PostServiceBuilder7();
            var service = builder.WithPost().WithDeletedPost().Build();

            var postCount = service.GetPostsCount(builder.Tag);

            Assert.AreEqual(1, postCount);
        }
Beispiel #2
0
        public void Test_GetPosts()
        {
            var builder = new PostServiceBuilder7();
            var service = builder.WithPost("Title").Build();

            var posts = service.GetPosts(builder.Tag);

            new[] { new PostView {
                        Name = "Title"
                    } }.Should().BeEquivalentTo(posts);
        }