public void GetBlogEntries(int page, int pageSize) { // Act var controller = new BlogEntriesController(_logger, _entityBL, _blogEntryTagBL, _blogEntryCommentBL); var result = controller.GetBlogEntries(string.Empty, string.Empty, string.Empty, page, pageSize) as OkNegotiatedContentResult <PagedList>; // Assert Assert.AreEqual(result.Content.Content.Count, pageSize); }
public void GetBlogEntries(int id) { // Act var controller = new BlogEntriesController(_logger, _entityBL, _blogEntryTagBL, _blogEntryCommentBL); var result = controller.GetBlogEntries(id) as OkNegotiatedContentResult <BlogEntry>; // Assert Assert.NotNull(result); Assert.NotNull(result.Content); Assert.AreEqual(id, result.Content.Id); }