Search in sources :

Example 1 with QueryModelMetaData

use of org.pentaho.metadata.query.model.util.QueryModelMetaData in project pentaho-platform by pentaho.

the class SQLResultSetTest method testMemoryCopy_setMetadaQuery.

@Test
public void testMemoryCopy_setMetadaQuery() throws SQLException {
    IPentahoMetaData metadata = new QueryModelMetaData(mock(QueryModelMetaData.class));
    SQLResultSet resultSet = new SQLResultSet(nativeResultSet, nativeConnection);
    resultSet.setMetaData(metadata);
    IPentahoResultSet memoryCopyResultSet = resultSet.memoryCopy();
    assertEquals(metadata.getClass(), memoryCopyResultSet.getMetaData().getClass());
}
Also used : IPentahoResultSet(org.pentaho.commons.connection.IPentahoResultSet) QueryModelMetaData(org.pentaho.metadata.query.model.util.QueryModelMetaData) IPentahoMetaData(org.pentaho.commons.connection.IPentahoMetaData) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 IPentahoMetaData (org.pentaho.commons.connection.IPentahoMetaData)1 IPentahoResultSet (org.pentaho.commons.connection.IPentahoResultSet)1 QueryModelMetaData (org.pentaho.metadata.query.model.util.QueryModelMetaData)1