public void AdjustPageSize(int expectedLength, int totalItemCount)
        {
            // Arrange

            // Act
            var result = m_settings.AdjustPageSize(totalItemCount);

            // Assert
            Assert.NotNull(result);
            Assert.Equal(expectedLength, result.Length);
            EnumerableHelper.ForEach(result, (pageSize) => Assert.True(EnumerableHelper.Contains(m_settings.PageSizes, pageSize)));
        }
        public static void AdjustPageSize_For_Single_PageSize(int totalItemCount)
        {
            // Arrange
            var settings = new PagingSettings()
            {
                PageCount           = 5,
                DefaultItemsPerPage = 10,
                PageSizes           = new[] { 10 }
            };

            // Act
            var result = settings.AdjustPageSize(totalItemCount);

            // Assert
            Assert.NotNull(result);
            Assert.Equal(0, result.Length);
        }