@Test public void testDummyTransWritesOutputWithInputRow() throws KettleException { DummyTrans dummy = new DummyTrans( stepMockHelper.stepMeta, stepMockHelper.stepDataInterface, 0, stepMockHelper.transMeta, stepMockHelper.trans ); dummy.init( stepMockHelper.initStepMetaInterface, stepMockHelper.initStepDataInterface ); Object[] row = new Object[] { "abcd" }; RowSet rowSet = stepMockHelper.getMockInputRowSet( row ); RowMetaInterface inputRowMeta = mock( RowMetaInterface.class ); when( inputRowMeta.clone() ).thenReturn( inputRowMeta ); when( rowSet.getRowMeta() ).thenReturn( inputRowMeta ); dummy.getInputRowSets().add( rowSet ); RowSet outputRowSet = mock( RowSet.class ); dummy.getOutputRowSets().add( outputRowSet ); when( outputRowSet.putRow( inputRowMeta, row ) ).thenReturn( true ); dummy.processRow( stepMockHelper.processRowsStepMetaInterface, stepMockHelper.processRowsStepDataInterface ); verify( outputRowSet, times( 1 ) ).putRow( inputRowMeta, row ); }
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException { Object[] r = getRow(); if ( r == null ) { setOutputDone(); return false; } putRow( getInputRowMeta(), r ); if ( checkFeedback( getLinesRead() ) ) { if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, "DummyTrans.Log.LineNumber" ) + getLinesRead() ); } } return true; }
DummyTrans extends BaseStep implements StepInterface { public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException { Object[] r = getRow(); if ( r == null ) { setOutputDone(); return false; } putRow( getInputRowMeta(), r ); if ( checkFeedback( getLinesRead() ) ) { if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, "DummyTrans.Log.LineNumber" ) + getLinesRead() ); } } return true; } }
DummyTrans extends BaseStep implements StepInterface { public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException { Object[] r = getRow(); if ( r == null ) { setOutputDone(); return false; } putRow( getInputRowMeta(), r ); if ( checkFeedback( getLinesRead() ) ) { if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, "DummyTrans.Log.LineNumber" ) + getLinesRead() ); } } return true; } DummyTrans( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
    Trans trans ); }
DummyTrans extends BaseStep implements StepInterface { public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException { Object[] r = getRow(); if ( r == null ) { setOutputDone(); return false; } putRow( getInputRowMeta(), r ); if ( checkFeedback( getLinesRead() ) ) { if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, "DummyTrans.Log.LineNumber" ) + getLinesRead() ); } } return true; } DummyTrans( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
    Trans trans ); boolean processRow( StepMetaInterface smi, StepDataInterface sdi ); }
DummyTrans extends BaseStep implements StepInterface { public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException { Object[] r = getRow(); if ( r == null ) { setOutputDone(); return false; } putRow( getInputRowMeta(), r ); if ( checkFeedback( getLinesRead() ) ) { if ( log.isBasic() ) { logBasic( BaseMessages.getString( PKG, "DummyTrans.Log.LineNumber" ) + getLinesRead() ); } } return true; } DummyTrans( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
    Trans trans ); boolean processRow( StepMetaInterface smi, StepDataInterface sdi );  }