public void Paged_Results_Are_Valid() { Initialize(true); using (var repository = new NHibernateBlogService()) { for (int i = 0; i < 15; i++) { repository.Save(DummyLivePost()); } Assert.AreEqual(4, repository.GetPostsPaged(4, 1).Count); Assert.AreEqual(4, repository.GetPostsPaged(4, 2).Count); Assert.AreEqual(4, repository.GetPostsPaged(4, 3).Count); Assert.AreEqual(3, repository.GetPostsPaged(4, 4).Count); } }
public void Can_Retrieve_Many_Saved_Posts_Paged() { Initialize(true); using (var repository = new NHibernateBlogService()) { for (int i = 0; i < 10; i++) { repository.Save(DummyLivePost()); } Assert.AreEqual(4, repository.GetPostsPaged(4, 1).Count); } }