Package java.sql

Examples of java.sql.SQLRecoverableException


    /**
     * @test java.sql.SQLRecoverableException(String, Throwable)
     */
    public void test_Constructor_LStringLThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                "MYTESTSTRING", cause);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The reason of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getMessage());
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        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, Throwable)
     */
    public void test_Constructor_LStringLThrowable_1() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                "MYTESTSTRING", (Throwable) null);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The reason of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", sQLRecoverableException.getMessage());
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        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, Throwable)
     */
    public void test_Constructor_LStringLThrowable_2() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, cause);
        assertNotNull(sQLRecoverableException);
        assertNull("The reason of SQLRecoverableException should be null",
                sQLRecoverableException.getMessage());
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertEquals("The error code of SQLRecoverableException should be 0",
                sQLRecoverableException.getErrorCode(), 0);
    }
View Full Code Here

    /**
     * @test java.sql.SQLRecoverableException(String, Throwable)
     */
    public void test_Constructor_LStringLThrowable_3() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                (String) null, (Throwable) null);
        assertNotNull(sQLRecoverableException);
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                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, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                "MYTESTSTRING1", "MYTESTSTRING2", 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, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_1() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                "MYTESTSTRING1", "MYTESTSTRING2", 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, Throwable)
     */
    public void test_Constructor_LStringLStringLThrowable_2() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                "MYTESTSTRING", null, 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_18() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, null, 1, cause);
        assertNotNull(sQLRecoverableException);
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                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_19() {
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, null, 1, null);
        assertNotNull(sQLRecoverableException);
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                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_20() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, null, 0, cause);
        assertNotNull(sQLRecoverableException);
        assertNull("The SQLState of SQLRecoverableException should be null",
                sQLRecoverableException.getSQLState());
        assertNull("The reason of SQLRecoverableException should be null",
                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

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.