Exemplo n.º 1
0
        public void Test_GetNextPage(int startPage, int expected)
        {
            var cut = new PaginationService(100, 10);

            cut.GetPage(startPage);
            var actual = cut.GetNextPage();

            Assert.Equal(expected, actual);
        }
        public void GetNextPage_ProvideCurrentPageNumberAndPagesCount_ShouldReturnNextPageNumber(int currentPage, int expectedNextPage, int pagesCount)
        {
            // Arrange:
            var service = new PaginationService(null, null);

            // Act:
            var result = service.GetNextPage(currentPage, pagesCount);

            // Assert:
            Assert.AreEqual(expectedNextPage, result);
        }