public PostsForCategory ( string categorySlug, int pageNo, int pageSize ) : IList |
||
categorySlug | string | Category's url slug |
pageNo | int | Page index |
pageSize | int | Page size |
return | IList |
public void PostForCategory_for_programming_returns_zero() { var testRepo = new BlogRepository(MockContext); IList<Post> result = testRepo.PostsForCategory("programming", 0, 5); Assert.That(result.Count, Is.EqualTo(0)); }
public void PostForCategory_for_humor_returns_three_posts() { string testSlug = "humor"; { var testRepo = new BlogRepository(MockContext); IList<Post> result = testRepo.PostsForCategory("humor", 0, 5); Assert.That(result.Count, Is.EqualTo(3)); } }