Examples of SQLRecoverableException


Examples of java.sql.SQLRecoverableException

    /**
     * @test java.sql.SQLRecoverableException(String, String, int, Throwable)
     */
    public void test_Constructor_LStringLStringILThrowable_12() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLRecoverableException sQLRecoverableException = new SQLRecoverableException(
                null, "MYTESTSTRING", 1, cause);
        assertNotNull(sQLRecoverableException);
        assertEquals(
                "The SQLState of SQLRecoverableException set and get should be equivalent",
                "MYTESTSTRING", 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
TOP
Copyright © 2018 www.massapi.com. 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.