Пример #1
0
        public void ZeroCount_ShouldReturn_DefaultLoop()
        {
            var service = new StackService();

            var loop = service.GetPagination(0);

            Assert.That(loop.Page, Is.EqualTo(1));
            Assert.That(loop.ItemsCount, Is.EqualTo(1));
        }
Пример #2
0
        public void TwoHundredTwentyTwoCount_ShouldReturn_GoodLoop()
        {
            var service = new StackService();

            var loop = service.GetPagination(222);

            Assert.That(loop.Page, Is.EqualTo(3));
            Assert.That(loop.ItemsCount, Is.EqualTo(100));
        }
Пример #3
0
        public void FiftyFour_ShouldReturn_GoodLoop()
        {
            var service = new StackService();

            var loop = service.GetPagination(54);

            Assert.That(loop.Page, Is.EqualTo(1));
            Assert.That(loop.ItemsCount, Is.EqualTo(54));
        }
Пример #4
0
        public void OneHundred_ShouldReturn_GoodLoop()
        {
            var service = new StackService();

            var loop = service.GetPagination(100);

            Assert.That(loop.Page, Is.EqualTo(1));
            Assert.That(loop.ItemsCount, Is.EqualTo(100));
        }