Пример #1
0
        public void Can_Get_Correct_Items_Test()
        {
            //given
            IPagingService service = new PagingService();
            //when
            PagedResponse response = service.Get(new PagedCriteria()
            {
                PageNumber = 1, PageSize = 25, Posts = Data.Get()
            });

            //then
            response.Posts.Count().Should().Be(25);
        }
Пример #2
0
        public void Can_Get_Correct_Total_Test()
        {
            //given
            IPagingService service = new PagingService();
            //when
            PagedResponse response = service.Get(new PagedCriteria()
            {
                PageNumber = 1, PageSize = 10, Posts = Data.Get()
            });

            //then
            response.Total.Should().Be(100);
        }