use of org.pentaho.di.core.util.AbstractStepMeta in project pentaho-kettle by pentaho.
the class MissingTransStepTest method testInit.
@Test
public void testInit() {
StepMetaInterface stepMetaInterface = new AbstractStepMeta() {
@Override
public void setDefault() {
}
@Override
public StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans) {
return null;
}
};
StepMeta stepMeta = new StepMeta();
stepMeta.setName("TestMetaStep");
StepDataInterface stepDataInterface = mock(StepDataInterface.class);
Trans trans = new Trans();
LogChannel log = mock(LogChannel.class);
doAnswer(new Answer<Void>() {
public Void answer(InvocationOnMock invocation) {
return null;
}
}).when(log).logError(anyString());
trans.setLog(log);
TransMeta transMeta = new TransMeta();
transMeta.addStep(stepMeta);
MissingTransStep step = createAndInitStep(stepMetaInterface, stepDataInterface);
assertFalse(step.init(stepMetaInterface, stepDataInterface));
}
Aggregations