Package java.sql

Examples of java.sql.SQLTransientException


    /**
     * @test java.sql.SQLTransientException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_16() {
        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_17() {
        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_18() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                null, null, 1, cause);
        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 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_19() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                null, null, 1, 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 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_20() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                null, null, 0, cause);
        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);
        assertEquals(
                "The cause of SQLTransientException set and get should be equivalent",
                cause, sQLTransientException.getCause());
    }
View Full Code Here

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

    /**
     * @test java.sql.SQLTransientException(String, String)
     */
    public void test_Constructor_LStringLString_3() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                (String) null, (String) 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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransientException(String, String, int)
     */
    public void test_Constructor_LStringLStringI() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", 1);
        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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransientException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_1() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", 0);
        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);
    }
View Full Code Here

    /**
     * @test java.sql.SQLTransientException(String, String, int)
     */
    public void test_Constructor_LStringLStringI_2() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1);
        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);
    }
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.