Code example for SSLException

Methods: getCausegetMessage

0
    /** 
     * Test for <code>SSLException(Throwable)</code> constructor Assertion: 
     * constructs SSLException when <code>cause</code> is not null 
     */ 
    public void testSSLException04() { 
        SSLException tE = new SSLException(tCause);
        if (tE.getMessage() != null) {
            String toS = tCause.toString();
            String getM = tE.getMessage();
            assertTrue("getMessage() should contain ".concat(toS), (getM
                    .indexOf(toS) != -1));
        } 
        // SSLException is subclass of IOException, but IOException has not 
        // constructors with Throwable parameters 
        if (tE.getCause() != null) {
            //	assertNotNull("getCause() must not return null", tE.getCause()); 
            assertEquals("getCause() must return ".concat(tCause.toString()),
                    tE.getCause(), tCause);
        } 
    } 
 
    /** 
     * Test for <code>SSLException(String, Throwable)</code> constructor 
Experience pair programming with AI  Get Codota for Java