public void WhenDataPagingInfoIsNotNull_ThenSetDataPagingInfo()
            {
                var dataPagingInfo = new DataPagingInfo();

                var classUnderTest = new EntitiesPagingContainer <object>(new List <object>(), 1, dataPagingInfo);

                Assert.That(classUnderTest.DataPagingInfo, Is.SameAs(dataPagingInfo));
            }
Ejemplo n.º 2
0
            public void WhenCalled_ThenReturnsTheNumberOfItemsToSkip()
            {
                var classUnderTest = new DataPagingInfo(2, 50);

                Assert.That(classUnderTest.Skip, Is.EqualTo(100));
            }
Ejemplo n.º 3
0
            public void WhenPageSizeLessThanOne_ThenSetPageSizeToDefaultTen()
            {
                var classUnderTest = new DataPagingInfo(0, 0);

                Assert.That(classUnderTest.PageSize, Is.EqualTo(10));
            }
Ejemplo n.º 4
0
            public void WhenPageNumberLessThanZero_ThenSetPageNumberToDefaultZero()
            {
                var classUnderTest = new DataPagingInfo(-1, 10);

                Assert.That(classUnderTest.PageNumber, Is.EqualTo(0));
            }