Example #1
0
        public void TotalPage_should_return_correct_result(int total, int itemsPerPage, int expected)
        {
            int actual = PageCalculator.TotalPage(total, itemsPerPage);

            Assert.Equal(expected, actual);
        }
Example #2
0
 public void TotalPage_Should_Return_Ten_When_RowPerPage_Is_Ten_And_Total_Is_Hundred()
 {
     Assert.Equal(10, PageCalculator.TotalPage(100, 10));
 }
Example #3
0
 public void TotalPage_Should_Return_One_When_RowPerPage_Is_Ten_And_Total_Is_Seven()
 {
     Assert.Equal(1, PageCalculator.TotalPage(7, 10));
 }
Example #4
0
 public void TotalPage_Should_Return_One_When_RowPerPage_Is_Zero_And_Total_Is_Zero()
 {
     Assert.Equal(1, PageCalculator.TotalPage(0, 0));
 }
Example #5
0
 public void TotalPage_Should_Return_Five_When_RowPerPage_Is_Ten_And_Total_Is_FortyTwo()
 {
     Assert.Equal(5, PageCalculator.TotalPage(42, 10));
 }