Ad
  • Default User Avatar

    It depends on the input string, doesn't it?

  • Custom User Avatar

    No, I've copied those tests from Java test suite, if you see other thing in sample tests, click reset. These should be the sample tests:

    	@Test
    	public void BasicTests() {
    		System.out.println("****** Basic Tests ******");
    		assertEquals(3, Persist.persistence(39));
    		assertEquals(0, Persist.persistence(4));
    	  assertEquals(2, Persist.persistence(25));
    	  assertEquals(4, Persist.persistence(999));
    	}
    
  • Custom User Avatar

    You're confusing the input of one test with the expected value of another.

        assertEquals(3, Persist.persistence(39));
        assertEquals(4, Persist.persistence(999));
    

    Those are the assertions and you can see they're both ok.

  • Custom User Avatar
    9*9*9 = 729 (1)
    7*2*9 = 126 (2)
    1*2*6 = 12  (3)
    1*2   = 2   (4) 
    

    The tests are ok. This case is even explained in the kata description.