Package java.sql

Examples of java.sql.SQLTransactionRollbackException


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

    /**
     * @test java.sql.SQLTransactionRollbackException(Throwable)
     */
    public void test_Constructor_LThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                cause);
        assertNotNull(sQLTransactionRollbackException);
        assertEquals(
                "The reason of SQLTransactionRollbackException should be equals to cause.toString()",
                "java.lang.Exception: MYTHROWABLE",
                sQLTransactionRollbackException.getMessage());
        assertNull(
                "The SQLState of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getSQLState());
        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

    /**
     * @test java.sql.SQLTransactionRollbackException(Throwable)
     */
    public void test_Constructor_LThrowable_1() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                (Throwable) 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);
        assertNull(
                "The cause of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String, Throwable)
     */
    public void test_Constructor_LStringLThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING", cause);
        assertNotNull(sQLTransactionRollbackException);
        assertEquals(
                "The reason of SQLTransactionRollbackException set and get should be equivalent",
                "MYTESTSTRING", sQLTransactionRollbackException.getMessage());
        assertNull(
                "The SQLState of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getSQLState());
        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

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

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

    /**
     * @test java.sql.SQLTransactionRollbackException(String, Throwable)
     */
    public void test_Constructor_LStringLThrowable_3() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                (String) null, (Throwable) 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);
        assertNull(
                "The cause of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING1", "MYTESTSTRING2", cause);
        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);
        assertEquals(
                "The cause of SQLTransactionRollbackException set and get should be equivalent",
                cause, sQLTransactionRollbackException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransactionRollbackException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_1() {
        SQLTransactionRollbackException sQLTransactionRollbackException = new SQLTransactionRollbackException(
                "MYTESTSTRING1", "MYTESTSTRING2", null);
        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);
        assertNull(
                "The cause of SQLTransactionRollbackException should be null",
                sQLTransactionRollbackException.getCause());
    }
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.