public void ShouldEqualPageNumber() { var expectedPageNumber = 2; var sut = new PaginableRequest(expectedPageNumber, 10); sut.PageNumber.ShouldBeEquivalentTo(expectedPageNumber); }
public void ShouldEqualItemCountPerPage() { var expectedItemCountPerPage = 12; var sut = new PaginableRequest(2, expectedItemCountPerPage); sut.ItemCountPerPage.ShouldBeEquivalentTo(expectedItemCountPerPage); }
public void ShouldEqualPageNumber() { var source = Enumerable.Range(10, 50).AsQueryable(); var expectedPageNumber = 2; var paginableInfo = new PaginableRequest(expectedPageNumber, 10); var sut = source.ToPaginable(paginableInfo); sut.PageNumber.ShouldBeEquivalentTo(expectedPageNumber); }
public void ShouldEqualItemCountPerPage() { var source = Enumerable.Range(11, 100).AsQueryable(); var expectedItemCountPerPage = 12; var paginableInfo = new PaginableRequest(2, expectedItemCountPerPage); var sut = source.ToPaginable(paginableInfo); sut.ItemCountPerPage.ShouldBeEquivalentTo(expectedItemCountPerPage); }