use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class HTTPPostStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
analyzer = spy(new HTTPPostStepAnalyzer());
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(MetaverseTestUtils.getMetaverseObjectFactory());
when(mockHTTPPost.getStepMetaInterface()).thenReturn(meta);
when(mockHTTPPost.getStepMeta()).thenReturn(mockStepMeta);
when(mockStepMeta.getStepMetaInterface()).thenReturn(meta);
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class MongoDbInputStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
IMetaverseObjectFactory factory = MetaverseTestUtils.getMetaverseObjectFactory();
when(mockBuilder.getMetaverseObjectFactory()).thenReturn(factory);
analyzer = spy(new MongoDbInputStepAnalyzer());
analyzer.setConnectionAnalyzer(mock(IConnectionAnalyzer.class));
analyzer.setMetaverseBuilder(mockBuilder);
analyzer.setBaseStepMeta(meta);
analyzer.setRootNode(node);
analyzer.setParentTransMeta(mockTransMeta);
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(mockTransMeta);
when(parentStepMeta.getName()).thenReturn("test");
when(parentStepMeta.getStepID()).thenReturn("MongoDbInput");
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class RestClientStepAnalyzerTest method setUp.
@Before
public void setUp() throws Exception {
analyzer = spy(new RestClientStepAnalyzer());
descriptor = new MetaverseComponentDescriptor("test", DictionaryConst.NODE_TYPE_TRANS_STEP, mockNamespace);
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(MetaverseTestUtils.getMetaverseObjectFactory());
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-metaverse by pentaho.
the class StepAnalyzer method getPrevFieldDescriptor.
/**
* Create a new IComponentDescriptor for a field input into this step
*
* @param prevStepName
* @param fieldName
* @return
*/
protected IComponentDescriptor getPrevFieldDescriptor(String prevStepName, String fieldName) {
IComponentDescriptor prevFieldDescriptor = null;
if (StringUtils.isNotEmpty(prevStepName)) {
Object nsObj = rootNode.getProperty(DictionaryConst.PROPERTY_NAMESPACE);
INamespace ns = new Namespace(nsObj != null ? nsObj.toString() : null);
IMetaverseNode tmpOriginNode = getMetaverseObjectFactory().createNodeObject(ns, prevStepName, DictionaryConst.NODE_TYPE_TRANS_STEP);
INamespace stepFieldNamespace = new Namespace(tmpOriginNode.getLogicalId());
prevFieldDescriptor = new MetaverseComponentDescriptor(fieldName, getInputNodeType(), stepFieldNamespace, getDescriptor().getContext());
}
return prevFieldDescriptor;
}
use of org.pentaho.metaverse.api.MetaverseComponentDescriptor in project pentaho-kettle by pentaho.
the class GetXMLDataStepAnalyzerTest 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 GetXMLDataStepAnalyzer());
analyzer.setDescriptor(descriptor);
analyzer.setObjectFactory(metaverseObjectFactory);
analyzer.setRootNode(node);
analyzer.setParentTransMeta(parentTransMeta);
analyzer.setParentStepMeta(parentStepMeta);
}
Aggregations