use of org.pentaho.metaverse.api.analyzer.kettle.DatabaseConnectionAnalyzer in project pentaho-metaverse by pentaho.
the class TableInputStepAnalyzerTest method testSetBaseStepMeta.
@Test
public void testSetBaseStepMeta() throws Exception {
analyzer.setBaseStepMeta(meta);
DatabaseConnectionAnalyzer dbAnalyzer = mock(DatabaseConnectionAnalyzer.class);
doReturn(dbAnalyzer).when(analyzer).getConnectionAnalyzer();
analyzer.getConnectionNode();
verify(meta, times(1)).getDatabaseMeta();
}
use of org.pentaho.metaverse.api.analyzer.kettle.DatabaseConnectionAnalyzer in project pentaho-metaverse by pentaho.
the class JobEntryAnalyzerTest method addConnectionNodes.
@Test
public void addConnectionNodes() throws MetaverseAnalyzerException {
DatabaseMeta[] dbs = new DatabaseMeta[] { mockDatabaseMeta };
analyzer.jobEntryInterface = mockJobEntryInterface;
// analyzer.addConnectionNodes( mockDescriptor );
DatabaseConnectionAnalyzer dbAnalyzer = new JobEntryDatabaseConnectionAnalyzer();
dbAnalyzer.setMetaverseBuilder(mockBuilder);
analyzer.setConnectionAnalyzer(dbAnalyzer);
when(analyzer.getConnectionAnalyzer()).thenReturn(dbAnalyzer);
when(mockJobEntryInterface.getUsedDatabaseConnections()).thenReturn(dbs);
analyzer.addConnectionNodes(mockDescriptor);
}
use of org.pentaho.metaverse.api.analyzer.kettle.DatabaseConnectionAnalyzer in project pentaho-metaverse by pentaho.
the class TableInputStepAnalyzerTest method testGetConnectionNode.
@Test
public void testGetConnectionNode() throws Exception {
DatabaseConnectionAnalyzer dbAnalyzer = mock(DatabaseConnectionAnalyzer.class);
when(meta.getDatabaseMeta()).thenReturn(dbMeta);
when(dbAnalyzer.analyze(descriptor, dbMeta)).thenReturn(connectionNode);
doReturn(dbAnalyzer).when(analyzer).getConnectionAnalyzer();
IMetaverseNode node = analyzer.getConnectionNode();
verify(analyzer).getConnectionAnalyzer();
verify(dbAnalyzer).analyze(descriptor, dbMeta);
assertEquals(node, connectionNode);
}
Aggregations