Exemple #1
0
            public void HasValidNextPageAndEmptyPreviousPage()
            {
                PageNumberAndSizeTests.AssertIsEmpty(this.defaultPagingInfo.PreviousPage);

                Assert.AreEqual(PageNumberAndSize.DefaultPageSize, this.defaultPagingInfo.CurrentPage.Size);
                Assert.AreEqual(this.defaultPagingInfo.CurrentPage.Size, this.defaultPagingInfo.NextPage.Size);
            }
Exemple #2
0
            public void HasEmptyPages()
            {
                PageNumberAndSizeTests.AssertIsEmpty(this.emptyPagingInfo.CurrentPage);
                PageNumberAndSizeTests.AssertIsEmpty(this.emptyPagingInfo.FirstPage);
                PageNumberAndSizeTests.AssertIsEmpty(this.emptyPagingInfo.LastPage);
                PageNumberAndSizeTests.AssertIsEmpty(this.emptyPagingInfo.NextPage);
                PageNumberAndSizeTests.AssertIsEmpty(this.emptyPagingInfo.PreviousPage);

                Assert.AreEqual(0, this.emptyPagingInfo.ItemCount);
                Assert.IsNull(this.emptyPagingInfo.AllPages);
                Assert.IsFalse(this.emptyPagingInfo.IsFirstPage);
                Assert.IsFalse(this.emptyPagingInfo.IsLastPage);
            }
Exemple #3
0
            public void ReturnsEmptyFromEmpty()
            {
                PageNumberAndSize newPage = PagingInfo.Empty.TurnToPage(6);

                PageNumberAndSizeTests.AssertIsEmpty(newPage);
            }
Exemple #4
0
 public void HasEmptyNextAndPreviousPages()
 {
     PageNumberAndSizeTests.AssertIsEmpty(this.unboundedPagingInfo.NextPage);
     PageNumberAndSizeTests.AssertIsEmpty(this.unboundedPagingInfo.PreviousPage);
 }