SQLResultSet implements IPentahoResultSet, IPeekable { public Object[] getDataRow( final int row ) { Object[] rowData = new Object[this.getColumnCount()]; for ( int column = 0; column < rowData.length; column++ ) { rowData[column] = getValueAt( row, column ); } return rowData; } SQLResultSet( final ResultSet nativeResultSet, final SQLConnection nativeConnection ); void setMetaData( final IPentahoMetaData metadata ); IPentahoMetaData getMetaData(); Object[] peek(); Object[] next(); void closeConnection(); void close(); void dispose(); boolean isScrollable(); int getColumnCount(); int getRowCount(); Object getValueAt( final int row, final int column ); IPentahoResultSet memoryCopy(); void beforeFirst(); Object[] getDataColumn( final int column ); Object[] getDataRow( final int row );  }
@Test public void testGetDataRow() throws SQLException { Object value = "testObject"; int rowCount = 1; when( nativeResultSet.getObject( anyInt() ) ).thenReturn( value ); when( nativeResultSet.getRow() ).thenReturn( rowCount ); when( nativeResultSet.last() ).thenReturn( true ); SQLResultSet resultSet = new SQLResultSet( nativeResultSet, nativeConnection ); assertEquals( value, resultSet.getDataRow( 0 )[0] ); }