inputRowSet = currentInputStream(); row = inputRowSet.getRowImmediate(); inputRowSet = currentInputStream(); inputRowSet = currentInputStream(); inputRowSet = currentInputStream(); row = getRowFrom( inputRowSet );
@Test public void testGetRowSafeModeEnabled() throws KettleException { Trans transMock = mock( Trans.class ); when( transMock.isSafeModeEnabled() ).thenReturn( true ); BaseStep baseStepSpy = spy( new BaseStep( mockHelper.stepMeta, mockHelper.stepDataInterface, 0, mockHelper.transMeta, transMock ) ); doNothing().when( baseStepSpy ).waitUntilTransformationIsStarted(); doNothing().when( baseStepSpy ).openRemoteInputStepSocketsOnce(); BlockingRowSet rowSet = new BlockingRowSet( 1 ); List<ValueMetaInterface> valueMetaList = Arrays.asList( new ValueMetaInteger( "x" ), new ValueMetaString( "a" ) ); RowMeta rowMeta = new RowMeta(); rowMeta.setValueMetaList( valueMetaList ); final Object[] row = new Object[] {}; rowSet.putRow( rowMeta, row ); baseStepSpy.setInputRowSets( Arrays.asList( rowSet ) ); doReturn( rowSet ).when( baseStepSpy ).currentInputStream(); baseStepSpy.getRow(); verify( mockHelper.transMeta, times( 1 ) ).checkRowMixingStatically( any( StepMeta.class ), anyObject() ); } }