Code example for CodeSigner

0
 
    private Timestamp ts = new Timestamp(now, cpath);
 
    /** 
     * must throw NPE if signerCertPath is null 
     */ 
    @TestTargetNew( 
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "NPE case", 
        method = "CodeSigner", 
        args = {java.security.cert.CertPath.class, java.security.Timestamp.class}
    ) 
    public void testCodeSigner_00() { 
        try { 
            new CodeSigner(null, ts);
            fail("must not accept null");
        } catch (NullPointerException ex) {
            /* it's ok */ 
        } 
    }