Code example for SQLFeatureNotSupportedException

Methods: getCause, getErrorCode, getMessage, getSQLState

0
     * @test java.sql.SQLFeatureNotSupportedException(String, String, int, 
     *       Throwable) 
     */ 
    public void test_Constructor_LStringLStringILThrowable_18() { 
        Throwable cause = new Exception("MYTHROWABLE");
        SQLFeatureNotSupportedException sQLFeatureNotSupportedException = new SQLFeatureNotSupportedException(
                null, null, 1, cause);
        assertNotNull(sQLFeatureNotSupportedException);
        assertNull(
                "The SQLState of SQLFeatureNotSupportedException should be null", 
                sQLFeatureNotSupportedException.getSQLState());
        assertNull(
                "The reason of SQLFeatureNotSupportedException should be null", 
                sQLFeatureNotSupportedException.getMessage());
        assertEquals(
                "The error code of SQLFeatureNotSupportedException should be 1", 
                sQLFeatureNotSupportedException.getErrorCode(), 1);
        assertEquals(
                "The cause of SQLFeatureNotSupportedException set and get should be equivalent", 
                cause, sQLFeatureNotSupportedException.getCause());
    } 
 
    /** 
     * @test java.sql.SQLFeatureNotSupportedException(String, String, int, 
     *       Throwable)