Code example for CertStoreException

Methods: getCause, getMessage

0
     * Test for <code>CertStoreException(String, Throwable)</code> constructor 
     * Assertion: constructs CertStoreException when <code>cause</code> is 
     * null <code>msg</code> is null 
     */ 
    public void testCertStoreException06() { 
        CertStoreException tE = new CertStoreException(null, null);
        assertNull("getMessage() must return null", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>CertStoreException(String, Throwable)</code> constructor 
     * Assertion: constructs CertStoreException when <code>cause</code> is 
     * null <code>msg</code> is not null 
     */ 
    public void testCertStoreException07() { 
        CertStoreException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new CertStoreException(msgs[i], null);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);