Package java.sql

Examples of java.sql.SQLRecoverableException


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


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

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

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

    }
View Full Code Here

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

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

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

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

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

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

TOP

Related Classes of java.sql.SQLRecoverableException

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.