Code example for CertificateExpiredException

Methods: getCausegetMessage

0
    /** 
     * Test for <code>CertificateExpiredException()</code> constructor 
     * Assertion: constructs CertificateExpiredException with no detail message 
     */ 
    public void testCertificateExpiredException01() { 
        CertificateExpiredException tE = new CertificateExpiredException();
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>CertificateExpiredException(String)</code> constructor 
     * Assertion: constructs CertificateExpiredException with detail message 
     * msg. Parameter <code>msg</code> is not null. 
     */ 
    public void testCertificateExpiredException02() { 
        CertificateExpiredException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new CertificateExpiredException(msgs[i]);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);