Search in sources :

Example 16 with IMetaverseObjectFactory

use of org.pentaho.metaverse.api.IMetaverseObjectFactory in project pentaho-metaverse by pentaho.

the class MetaverseBuilderTest method testGetSetMetaverseObjectFactory.

@Test
public void testGetSetMetaverseObjectFactory() {
    IMetaverseObjectFactory objectFactory = mock(IMetaverseObjectFactory.class);
    builder.setMetaverseObjectFactory(objectFactory);
    assertEquals(objectFactory, builder.getMetaverseObjectFactory());
}
Also used : IMetaverseObjectFactory(org.pentaho.metaverse.api.IMetaverseObjectFactory) Test(org.junit.Test)

Example 17 with IMetaverseObjectFactory

use of org.pentaho.metaverse.api.IMetaverseObjectFactory in project pentaho-metaverse by pentaho.

the class DatabaseConnectionAnalyzerTest method setUp.

/**
 * @throws java.lang.Exception
 */
@Before
public void setUp() throws Exception {
    IMetaverseObjectFactory factory = MetaverseTestUtils.getMetaverseObjectFactory();
    when(builder.getMetaverseObjectFactory()).thenReturn(factory);
    dbConnectionAnalyzer = new StepDatabaseConnectionAnalyzer();
    dbConnectionAnalyzer.setMetaverseBuilder(builder);
}
Also used : IMetaverseObjectFactory(org.pentaho.metaverse.api.IMetaverseObjectFactory) StepDatabaseConnectionAnalyzer(org.pentaho.metaverse.api.analyzer.kettle.step.StepDatabaseConnectionAnalyzer) Before(org.junit.Before)

Example 18 with IMetaverseObjectFactory

use of org.pentaho.metaverse.api.IMetaverseObjectFactory in project pentaho-metaverse by pentaho.

the class JobEntryAnalyzerTest method testValidateStateNullMetaverseObjectFactory.

@Test(expected = MetaverseAnalyzerException.class)
public void testValidateStateNullMetaverseObjectFactory() throws MetaverseAnalyzerException {
    IMetaverseObjectFactory factory = null;
    when(mockBuilder.getMetaverseObjectFactory()).thenReturn(factory);
    analyzer.setMetaverseBuilder(mockBuilder);
    analyzer.validateState(mockDescriptor, mockJobEntryInterface);
}
Also used : IMetaverseObjectFactory(org.pentaho.metaverse.api.IMetaverseObjectFactory) Test(org.junit.Test)

Aggregations

IMetaverseObjectFactory (org.pentaho.metaverse.api.IMetaverseObjectFactory)18 Before (org.junit.Before)10 Test (org.junit.Test)7 MetaverseComponentDescriptor (org.pentaho.metaverse.api.MetaverseComponentDescriptor)6 IDocument (org.pentaho.metaverse.api.IDocument)3 IMetaverseBuilder (org.pentaho.metaverse.api.IMetaverseBuilder)3 INamespace (org.pentaho.metaverse.api.INamespace)3 Matchers.anyString (org.mockito.Matchers.anyString)2 IConnectionAnalyzer (org.pentaho.metaverse.api.IConnectionAnalyzer)2 IMetaverseNode (org.pentaho.metaverse.api.IMetaverseNode)2 Graph (com.tinkerpop.blueprints.Graph)1 TinkerGraph (com.tinkerpop.blueprints.impls.tg.TinkerGraph)1 AfterClass (org.junit.AfterClass)1 BeforeClass (org.junit.BeforeClass)1 JobEntryCopy (org.pentaho.di.job.entry.JobEntryCopy)1 JobEntryInterface (org.pentaho.di.job.entry.JobEntryInterface)1 IAnalysisContext (org.pentaho.metaverse.api.IAnalysisContext)1 IDocumentAnalyzer (org.pentaho.metaverse.api.IDocumentAnalyzer)1 IDocumentController (org.pentaho.metaverse.api.IDocumentController)1 MetaverseException (org.pentaho.metaverse.api.MetaverseException)1