Ad
  • Default User Avatar

    same here!

  • Default User Avatar

    My solution fails on this test for the end solution:

    page_index returned incorrect value when provided a item_index argument that was out of range. pageIndex(-23) shoudl return -1

    Strange thing is, my test case that deals with this, does pass.

    Test.assert_equals(PaginationHelper.new(['a','b','c','d','e','f'], 4).page_index(-23), -1, "Does not return correct itenm count”)

  • Default User Avatar

    You should use TDD to create the code. In other words, you should write the tests yourself :)