Ad
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Having a problem with this tests...
    My IDE runs the code (and the sample tests) within 0.007 sec.
    Also the Tests on CodeWars are fine.
    But when attampting to pass as solution, i get an java time out exception each time (it took more than 20 sec).

    Is this a failing Unit test?

  • Default User Avatar

    I believe, the Java Testcase has a compilation error

    /home/codewarrior/src/main/java/PaginationHelperTest.java:37: error: cannot find symbol
        assertEquals("itemCount is returning incorrect value", 24, helper.itemCount());
                                                                         ^
      symbol:   method itemCount()
      location: variable helper of type PaginationHelper<Integer>
    1 error
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':compileJava'.
    > Compilation failed; see the compiler error output for details.
    
    *:
    
    

    The Build Output:

    Dependencies:
    
    junit:junit:4.12
    org.projectlombok:lombok:1.16.18
    org.mockito:mockito-core:2.7.19
    org.assertj:assertj-core:3.8.0
    org.xerial:sqlite-jdbc:3.19.3
    
    Tasks:
    
    :compileJava FAILED
    1 actionable task: 1 executed
    
    
    Compiler Warnings:
    
    Note: /home/codewarrior/src/main/java/PaginationHelperTest.java uses unchecked or unsafe operations.
    
    Note: Recompile with -Xlint:unchecked for details.
    

    The code template uses "itemsCount()" not "itemCount()"