Code example for SQLNonTransientException

Methods: getCause, getErrorCode, getMessage, getSQLState

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