public void SearchEngineService_ReturnsCorrectNumberOfPostsByBlog() { _service.AddPost(new SearchEngineEntry() { EntryId = 1, BlogId = 1, Body = "This is a sample post", Title = "This is the title", Tags = "Title", BlogName = "MyTestBlog", IsPublished = true, PublishDate = DateTime.Now, EntryName = "this-is-the-title" } ); _service.AddPost(new SearchEngineEntry() { EntryId = 2, BlogId = 2, Body = "This is another sample post", Title = "This is another title", Tags = "Title another", BlogName = "MyTestBlog", IsPublished = true, PublishDate = DateTime.Now, EntryName = "this-is-the-title" } ); _service.AddPost(new SearchEngineEntry() { EntryId = 3, BlogId = 2, Body = "This is another sample post", Title = "This is another title", Tags = "Title another", BlogName = "MyTestBlog", IsPublished = true, PublishDate = DateTime.Now, EntryName = "this-is-the-title" } ); int postCountBlog1 = _service.GetIndexedEntryCount(1); int postCountBlog2 = _service.GetIndexedEntryCount(2); Assert.AreEqual(1, postCountBlog1); Assert.AreEqual(2, postCountBlog2); }