Package java.sql

Examples of java.sql.SQLTransientException


    /**
     * @test java.sql.SQLTransientException(Throwable)
     */
    public void test_Constructor_LThrowable_1() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                (Throwable) null);
        assertNotNull(sQLTransientException);
        assertNull("The SQLState of SQLTransientException should be null",
                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


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

    /**
     * @test java.sql.SQLTransientException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", cause);
        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 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, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_1() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", 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 0",
                sQLTransientException.getErrorCode(), 0);
        assertNull("The cause of SQLTransientException should be null",
                sQLTransientException.getCause());
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransientException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_2() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING", null, 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, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_3() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING", null, 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

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.