use of org.pentaho.di.trans.steps.validator.ValidatorData in project pentaho-kettle by pentaho.
the class MappingInputTest method testSetConnectorSteps.
@Test
public void testSetConnectorSteps() throws Exception {
when(stepMockHelper.transMeta.getSizeRowset()).thenReturn(1);
MappingInputData mappingInputData = new MappingInputData();
MappingInput mappingInput = new MappingInput(stepMockHelper.stepMeta, mappingInputData, 0, stepMockHelper.transMeta, stepMockHelper.trans);
mappingInput.init(stepMockHelper.initStepMetaInterface, mappingInputData);
ValidatorData validatorData = new ValidatorData();
Validator previousStep = new Validator(stepMockHelper.stepMeta, validatorData, 0, stepMockHelper.transMeta, stepMockHelper.trans);
when(stepMockHelper.stepMeta.isDoingErrorHandling()).thenReturn(true);
StepErrorMeta stepErrorMeta = mock(StepErrorMeta.class);
when(stepErrorMeta.getTargetStep()).thenReturn(stepMockHelper.stepMeta);
when(stepMockHelper.stepMeta.getName()).thenReturn(stepName);
when(stepMockHelper.stepMeta.getStepErrorMeta()).thenReturn(stepErrorMeta);
StepInterface[] si = new StepInterface[] { previousStep };
mappingInput.setConnectorSteps(si, Collections.<MappingValueRename>emptyList(), stepName);
assertEquals(previousStep.getOutputRowSets().size(), 0);
}
Aggregations