Code example for Timestamp

Methods: toString

0
    public void testToString() { 
        assertTrue(new CodeSigner(cpath, null).toString().contains(""));
        assertTrue(new CodeSigner(cpath, ts).toString().contains(""));
 
        assertTrue(new CodeSigner(cpath, null).toString().contains("Signer"));
        assertTrue(new CodeSigner(cpath, ts).toString().contains(ts.toString()));
    } 
 
    /** 
     * Tests CodeSigner.hashCode() 
     */ 
    public void testHashCode() { 
        CodeSigner cs1 = new CodeSigner(cpath, ts);
        CodeSigner cs2 = new CodeSigner(cpath, ts);
        CodeSigner cs3 = new CodeSigner(cpath, null);
 
        assertTrue(cs1.hashCode() == cs2.hashCode());
        assertTrue(cs2.hashCode() != cs3.hashCode());
    } 
 
Experience pair programming with AI  Get Codota for Java