Code example for SQLTransactionRollbackException

Methods: getCause, getErrorCode, getMessage, getSQLState

0
    /** 
     * @test java.sql.SQLTransactionRollbackException(String, String, int, 
     *       Throwable) 
     */ 
    public void test_Constructor_LStringLStringILThrowable_7() { 
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING", null, 1, null); 
        assertNotNull(sQLTransactionRollbackException);
        assertNotNull(sQLTransactionRollbackException);
        assertNull(
                "The SQLState of SQLTransactionRollbackException should be null", 
                sQLTransactionRollbackException.getSQLState());
        assertEquals(
                "The reason of SQLTransactionRollbackException set and get should be equivalent", 
                "MYTESTSTRING", sQLTransactionRollbackException.getMessage());
        assertEquals(
                "The error code of SQLTransactionRollbackException should be 1", 
                sQLTransactionRollbackException.getErrorCode(), 1);
        assertNull(
                "The cause of SQLTransactionRollbackException should be null", 
                sQLTransactionRollbackException.getCause());
    } 
 
    /** 
     * @test java.sql.SQLTransactionRollbackException(String, String, int, 
     *       Throwable)