use of org.pentaho.metaverse.api.model.IExecutionData in project pentaho-metaverse by pentaho.
the class StepExternalResourceConsumerListenerTest method testCallStepAddExternalResources.
@Test
public void testCallStepAddExternalResources() {
StepExternalResourceConsumerListener stepExtensionPoint = new StepExternalResourceConsumerListener();
stepExtensionPoint.addExternalResources(null, null);
StepInterface mockStep = mock(StepInterface.class);
Trans mockTrans = mock(Trans.class);
when(mockStep.getTrans()).thenReturn(mockTrans);
IExecutionProfile executionProfile = mock(IExecutionProfile.class);
IExecutionData executionData = mock(IExecutionData.class);
when(executionProfile.getExecutionData()).thenReturn(executionData);
LineageHolder holder = new LineageHolder();
holder.setExecutionProfile(executionProfile);
TransLineageHolderMap.getInstance().putLineageHolder(mockTrans, holder);
Collection<IExternalResourceInfo> externalResources = new ArrayList<IExternalResourceInfo>();
stepExtensionPoint.addExternalResources(externalResources, mockStep);
IExternalResourceInfo externalResource = mock(IExternalResourceInfo.class);
externalResources.add(externalResource);
stepExtensionPoint.addExternalResources(externalResources, mockStep);
}
use of org.pentaho.metaverse.api.model.IExecutionData in project pentaho-metaverse by pentaho.
the class FileSystemLineageWriterTest method setUp.
@Before
public void setUp() throws Exception {
FileSystemLineageWriter fslw = new FileSystemLineageWriter();
writer = spy(fslw);
holder = new LineageHolder();
IExecutionProfile profile = new ExecutionProfile();
profile.setName("test");
IExecutionData data = new ExecutionData();
data.setStartTime(now);
profile.setExecutionData(data);
holder.setExecutionProfile(profile);
writer.setOutputFolder("target/outputfiles");
}
Aggregations