use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class GenericJobEntryMetaAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
when(metaverseBuilder.getMetaverseObjectFactory()).thenReturn(objectFactory);
when(objectFactory.createNodeObject(anyString(), anyString(), anyString())).thenReturn(new MetaverseTransientNode("name"));
when(mockJobEntry.getName()).thenReturn("job entry");
when(mockJobEntry.getParentJob()).thenReturn(mockParentJob);
when(mockParentJob.getJobMeta()).thenReturn(mockParentJobMeta);
descriptor = new MetaverseComponentDescriptor("job entry", DictionaryConst.NODE_TYPE_JOB_ENTRY, namespace);
analyzer.setMetaverseBuilder(metaverseBuilder);
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class TransJobEntryAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
when(metaverseBuilder.getMetaverseObjectFactory()).thenReturn(objectFactory);
when(objectFactory.createNodeObject(anyString(), anyString(), anyString())).thenReturn(new MetaverseTransientNode("name"));
when(jobEntryTrans.getName()).thenReturn("job entry");
when(jobEntryTrans.getSpecificationMethod()).thenReturn(ObjectLocationSpecificationMethod.FILENAME);
when(jobEntryTrans.getFilename()).thenReturn(TEST_FILE_NAME);
when(jobEntryTrans.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 TransJobEntryAnalyzer();
spyAnalyzer = spy(analyzer);
spyAnalyzer.setMetaverseBuilder(metaverseBuilder);
spyAnalyzer.setDescriptor(descriptor);
doReturn(childTransMeta).when(spyAnalyzer).getSubTransMeta(anyString());
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class FixedFileInputStepAnalyzerTest 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 FixedFileInputStepAnalyzer());
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(MetaverseTestUtils.getMetaverseObjectFactory());
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class TableInputStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
analyzer = spy(new TableInputStepAnalyzer());
when(mockNamespace.getParentNamespace()).thenReturn(mockNamespace);
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer.setDescriptor(descriptor);
analyzer.setBaseStepMeta(meta);
IMetaverseObjectFactory factory = MetaverseTestUtils.getMetaverseObjectFactory();
when(builder.getMetaverseObjectFactory()).thenReturn(factory);
analyzer.setMetaverseBuilder(builder);
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class TableOutputStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
IMetaverseObjectFactory factory = MetaverseTestUtils.getMetaverseObjectFactory();
when(mockBuilder.getMetaverseObjectFactory()).thenReturn(factory);
analyzer = spy(new TableOutputStepAnalyzer());
analyzer.setConnectionAnalyzer(mock(IConnectionAnalyzer.class));
analyzer.setMetaverseBuilder(mockBuilder);
analyzer.setBaseStepMeta(meta);
analyzer.setRootNode(node);
analyzer.setParentTransMeta(parentTransMeta);
analyzer.setParentStepMeta(parentStepMeta);
when(mockNamespace.getParentNamespace()).thenReturn(mockNamespace);
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer.setDescriptor(descriptor);
when(meta.getParentStepMeta()).thenReturn(parentStepMeta);
when(parentStepMeta.getParentTransMeta()).thenReturn(parentTransMeta);
when(parentStepMeta.getName()).thenReturn("test");
when(parentStepMeta.getStepID()).thenReturn("TableOutputStep");
}
Aggregations