Exemple #1
0
        public void ctor_does_calculate_page_Count()
        {
            var sut = TestablePagedList.Create();

            Assert.Equal(2, sut.PageCount);
            Assert.Equal(1, sut.Page);
            Assert.Equal(20, sut.PageSize);
            Assert.Equal(40, sut.TotalCount);
        }
Exemple #2
0
        public void ctor_does_return_second_page()
        {
            var request = new PagingRequest();

            request.NextPage();

            var sut = TestablePagedList.Create(request: request);

            for (var i = 0; i < sut.Count; i++)
            {
                var number = i + 21;
                Assert.Equal(number, sut[i].Number);
            }
        }