Code example for SQLNonTransientConnectionException

Methods: getCause, getErrorCode, getMessage, getSQLState

0
 
    /** 
     * @test java.sql.SQLNonTransientConnectionException(String, Throwable) 
     */ 
    public void test_Constructor_LStringLThrowable_3() { 
        SQLNonTransientConnectionException sQLNonTransientConnectionException = new SQLNonTransientConnectionException(
                (String) null, (Throwable) null);
        assertNotNull(sQLNonTransientConnectionException);
        assertNull(
                "The SQLState of SQLNonTransientConnectionException should be null", 
                sQLNonTransientConnectionException.getSQLState());
        assertNull(
                "The reason of SQLNonTransientConnectionException should be null", 
                sQLNonTransientConnectionException.getMessage());
        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, String, 
     *       Throwable)