Examples of SQLTransactionRollbackException


Examples of java.sql.SQLTransactionRollbackException

    /**
     * @test java.sql.SQLTransactionRollbackException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_2() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING", null, cause);
        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 0",
                sQLTransactionRollbackException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLTransactionRollbackException set and get should be equivalent",
                cause, sQLTransactionRollbackException.getCause());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.