Package java.sql

Examples of java.sql.SQLTransientConnectionException


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


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

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

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

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

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

    /**
     * @test java.sql.SQLTransientConnectionException(Throwable)
     */
    public void test_Constructor_LThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientConnectionException sQLTransientConnectionException = new SQLTransientConnectionException(
                cause);
        assertNotNull(sQLTransientConnectionException);
        assertEquals(
                "The reason of SQLTransientConnectionException should be equals to cause.toString()",
                "java.lang.Exception: MYTHROWABLE",
                sQLTransientConnectionException.getMessage());
        assertNull(
                "The SQLState of SQLTransientConnectionException should be null",
                sQLTransientConnectionException.getSQLState());
        assertEquals(
                "The error code of SQLTransientConnectionException should be 0",
                sQLTransientConnectionException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLTransientConnectionException set and get should be equivalent",
                cause, sQLTransientConnectionException.getCause());
    }
View Full Code Here

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

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

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

TOP

Related Classes of java.sql.SQLTransientConnectionException

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.