Code example for SQLNonTransientConnectionException

Methods: getCausegetMessagegetErrorCodegetSQLState

0
 
    /** 
     * @test java.sql.SQLNonTransientConnectionException(String, Throwable) 
     */ 
    public void test_Constructor_LStringLThrowable_1() { 
        SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
                "MYTESTSTRING", (Throwable) null);
        assertNotNull(sQLNonTransientConnectionException);
        assertEquals(
                "The reason of SQLNonTransientConnectionException set and get should be equivalent", 
                "MYTESTSTRING", sQLNonTransientConnectionException.getMessage());
        assertNull(
                "The SQLState of SQLNonTransientConnectionException should be null", 
                sQLNonTransientConnectionException.getSQLState());
        assertEquals(
                "The error code of SQLNonTransientConnectionException should be 0", 
                sQLNonTransientConnectionException.getErrorCode(), 0);
        assertNull(
                "The cause of SQLNonTransientConnectionException should be null", 
                sQLNonTransientConnectionException.getCause());
    } 
 
    /** 
     * @test java.sql.SQLNonTransientConnectionException(String, Throwable) 
     */