use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class JobJobEntryAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
when(metaverseBuilder.getMetaverseObjectFactory()).thenReturn(objectFactory);
when(objectFactory.createNodeObject(anyString(), anyString(), anyString())).thenReturn(new MetaverseTransientNode("name"));
when(jobEntryJob.getName()).thenReturn("job entry");
when(jobEntryJob.getSpecificationMethod()).thenReturn(ObjectLocationSpecificationMethod.FILENAME);
when(jobEntryJob.getFilename()).thenReturn(TEST_FILE_NAME);
when(jobEntryJob.getParentJob()).thenReturn(mockParentJob);
when(mockParentJob.getJobMeta()).thenReturn(mockParentJobMeta);
when(namespace.getParentNamespace()).thenReturn(namespace);
when(mockParentJobMeta.environmentSubstitute(anyString())).thenAnswer(new Answer<String>() {
@Override
public String answer(InvocationOnMock invocation) throws Throwable {
return (String) invocation.getArguments()[0];
}
});
descriptor = new MetaverseComponentDescriptor("job entry", DictionaryConst.NODE_TYPE_JOB_ENTRY, namespace);
analyzer = new JobJobEntryAnalyzer();
spyAnalyzer = spy(analyzer);
spyAnalyzer.setMetaverseBuilder(metaverseBuilder);
spyAnalyzer.setDescriptor(descriptor);
doReturn(childJobMeta).when(spyAnalyzer).getSubJobMeta(anyString());
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class CsvFileInputStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
when(mockNamespace.getParentNamespace()).thenReturn(mockNamespace);
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer = spy(new CsvFileInputStepAnalyzer());
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(MetaverseTestUtils.getMetaverseObjectFactory());
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class ExcelInputStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
when(mockNamespace.getParentNamespace()).thenReturn(mockNamespace);
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer = spy(new ExcelInputStepAnalyzer());
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(MetaverseTestUtils.getMetaverseObjectFactory());
consumer = new ExcelInputExternalResourceConsumer();
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class ExcelOutputStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
when(mockNamespace.getParentNamespace()).thenReturn(mockNamespace);
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer = spy(new ExcelOutputStepAnalyzer());
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(MetaverseTestUtils.getMetaverseObjectFactory());
inputs = new StepNodes();
inputs.addNode("previousStep", "first", node);
inputs.addNode("previousStep", "last", node);
inputs.addNode("previousStep", "age", node);
inputs.addNode("previousStep", "filename", node);
doReturn(inputs).when(analyzer).getInputs();
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class HTTPClientStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
analyzer = spy(new HTTPClientStepAnalyzer());
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(MetaverseTestUtils.getMetaverseObjectFactory());
when(mockHTTP.getStepMetaInterface()).thenReturn(meta);
when(mockHTTP.getStepMeta()).thenReturn(mockStepMeta);
when(mockStepMeta.getStepMetaInterface()).thenReturn(meta);
}
Aggregations