Package java.sql

Examples of java.sql.SQLTransientException


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

    /**
     * @test java.sql.SQLTransientException(String, String, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_6() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                null, null, 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, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_7() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                null, null, 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, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", 1, 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 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_1() {
        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_2() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", 0, 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, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_3() {
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", 0, 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, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_4() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLTransientException sQLTransientException = new SQLTransientException(
                "MYTESTSTRING1", "MYTESTSTRING2", -1, 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 -1",
                sQLTransientException.getErrorCode(), -1);
        assertEquals(
                "The cause of SQLTransientException set and get should be equivalent",
                cause, 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.