Package java.sql

Examples of java.sql.SQLTransientException


    /**
     * @test java.sql.SQLTransientException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_5() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1, null);
        assertNotNull(sQLTransientException);
        assertEquals(
                "The SQLState of SQLTransientException set and get should be equivalent",
                "MYTESTSTRING2", sQLTransientException.getSQLState());
        assertEquals(
                "The reason of SQLTransientException set and get should be equivalent",
                "MYTESTSTRING1", sQLTransientException.getMessage());
        assertEquals("The error code of SQLTransientException should be -1",
                sQLTransientException.getErrorCode(), -1);
        assertNull("The cause of SQLTransientException should be null",
                sQLTransientException.getCause());

    }
View Full Code Here


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

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

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

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

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

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

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

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

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

    }
View Full Code Here

TOP

Related Classes of java.sql.SQLTransientException

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.