Examples of SQLNonTransientConnectionException


Examples of java.sql.SQLNonTransientConnectionException

    /**
     * @test java.sql.SQLNonTransientConnectionException(Throwable)
     */
    public void test_Constructor_LThrowable() {
        Throwable cause = new Exception("MYTHROWABLE");
        SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
                cause);
        assertNotNull(sQLNonTransientConnectionException);
        assertEquals(
                "The reason of SQLNonTransientConnectionException should be equals to cause.toString()",
                "java.lang.Exception: MYTHROWABLE",
                sQLNonTransientConnectionException.getMessage());
        assertNull(
                "The SQLState of SQLNonTransientConnectionException should be null",
                sQLNonTransientConnectionException.getSQLState());
        assertEquals(
                "The error code of SQLNonTransientConnectionException should be 0",
                sQLNonTransientConnectionException.getErrorCode(), 0);
        assertEquals(
                "The cause of SQLNonTransientConnectionException set and get should be equivalent",
                cause, sQLNonTransientConnectionException.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.