Package java.sql

Examples of java.sql.SQLTransactionRollbackException


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


    /**
     * @test java.sql.SQLTransactionRollbackException(String, String, int,
     *       Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_23() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                null, null, -1, null);
        assertNotNull(sQLTransactionRollbackException);
        assertNull(
                "The SQLState of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getSQLState());
        assertNull(
                "The reason of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getMessage());
        assertEquals(
                "The error code of SQLTransactionRollbackException should be -1",
                sQLTransactionRollbackException.getErrorCode(), -1);
        assertNull(
                "The cause of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException()
     */
    public void test_Constructor() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException();
        assertNotNull(sQLTransactionRollbackException);
        assertNull(
                "The SQLState of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getSQLState());
        assertNull(
                "The reason of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getMessage());
        assertEquals(
                "The error code of SQLTransactionRollbackException should be 0",
                sQLTransactionRollbackException.getErrorCode(), 0);
    }
View Full Code Here

public class SQLTransactionRollbackExceptionTest extends TestCase {

    private SQLTransactionRollbackException sQLTransactionRollbackException;

    protected void setUp() throws Exception {
        sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING", "MYTESTSTRING", 1, new Exception("MYTHROWABLE"));
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String)
     */
    public void test_Constructor_LString() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING");
        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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String)
     */
    public void test_Constructor_LString_1() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                (String) null);
        assertNotNull(sQLTransactionRollbackException);
        assertNull(
                "The SQLState of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getSQLState());
        assertNull(
                "The reason of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getMessage());
        assertEquals(
                "The error code of SQLTransactionRollbackException should be 0",
                sQLTransactionRollbackException.getErrorCode(), 0);
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String, String)
     */
    public void test_Constructor_LStringLString() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING1", "MYTESTSTRING2");
        assertNotNull(sQLTransactionRollbackException);
        assertEquals(
                "The SQLState of SQLTransactionRollbackException set and get should be equivalent",
                "MYTESTSTRING2", sQLTransactionRollbackException.getSQLState());
        assertEquals(
                "The reason of SQLTransactionRollbackException set and get should be equivalent",
                "MYTESTSTRING1", sQLTransactionRollbackException.getMessage());
        assertEquals(
                "The error code of SQLTransactionRollbackException should be 0",
                sQLTransactionRollbackException.getErrorCode(), 0);

    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String, String)
     */
    public void test_Constructor_LStringLString_1() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING", (String) null);
        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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String, String)
     */
    public void test_Constructor_LStringLString_2() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                null, "MYTESTSTRING");
        assertNotNull(sQLTransactionRollbackException);
        assertEquals(
                "The SQLState of SQLTransactionRollbackException set and get should be equivalent",
                "MYTESTSTRING", sQLTransactionRollbackException.getSQLState());
        assertNull(
                "The reason of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getMessage());
        assertEquals(
                "The error code of SQLTransactionRollbackException should be 0",
                sQLTransactionRollbackException.getErrorCode(), 0);
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String, String)
     */
    public void test_Constructor_LStringLString_3() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                (String) null, (String) null);
        assertNotNull(sQLTransactionRollbackException);
        assertNull(
                "The SQLState of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getSQLState());
        assertNull(
                "The reason of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getMessage());
        assertEquals(
                "The error code of SQLTransactionRollbackException should be 0",
                sQLTransactionRollbackException.getErrorCode(), 0);
    }
View Full Code Here

TOP

Related Classes of java.sql.SQLTransactionRollbackException

Copyright © 2018 www.massapicom. 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.