public void GetChairsPagedWithZeroPagesAndItemsExpectExeption()
        {
            //Setup
            Mock <IChairRepository> mockChairRepo = new Mock <IChairRepository>();
            IChairService           chairService  = new ChairService(mockChairRepo.Object);

            //Test
            Assert.Throws <InvalidDataException>(() => chairService.GetChairsPaged(1, 0));
            Assert.Throws <InvalidDataException>(() => chairService.GetChairsPaged(0, 1));
        }
        public void GetChairsPaged()
        {
            //Setup
            Mock <IChairRepository> mockChairRepo = new Mock <IChairRepository>();

            List <Chair> chairsFull = new List <Chair>();

            for (int i = 1; i < 30; i++)
            {
                chairsFull.Add(new Chair()
                {
                    Id = i
                });
            }

            mockChairRepo.Setup(x => x.GetChairs()).Returns(() => chairsFull);

            IChairService chairService = new ChairService(mockChairRepo.Object);

            //Test
            var page        = 1;
            var itemsOnPage = 10;
            var chairsPaged = chairService.GetChairsPaged(page, itemsOnPage);

            Assert.Equal(itemsOnPage, chairsPaged.Count);
            Assert.Equal(1, chairsPaged[0].Id);
            Assert.Equal(10, chairsPaged[9].Id);
        }