Code example for SQLRecoverableException

Methods: getCause, getErrorCode, getMessage, getSQLState

0
 
    /** 
     * @test java.sql.SQLRecoverableException(String, Throwable) 
     */ 
    public void test_Constructor_LStringLThrowable_3() { 
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                (String) null, (Throwable) null);
        assertNotNull(sQLRecoverableException);
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertEquals("The error code of SQLRecoverableException should be 0",
                sQLRecoverableException.getErrorCode(), 0);
        assertNull("The cause of SQLRecoverableException should be null",
                sQLRecoverableException.getCause());
    } 
 
    /** 
     * @test java.sql.SQLRecoverableException(String, String, Throwable) 
     */