Пример #1
0
        public void ShouldEqualPageNumber()
        {
            var expectedPageNumber = 2;
            var sut = new PaginableRequest(expectedPageNumber, 10);

            sut.PageNumber.ShouldBeEquivalentTo(expectedPageNumber);
        }
Пример #2
0
        public void ShouldEqualItemCountPerPage()
        {
            var expectedItemCountPerPage = 12;
            var sut = new PaginableRequest(2, expectedItemCountPerPage);

            sut.ItemCountPerPage.ShouldBeEquivalentTo(expectedItemCountPerPage);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }