Search in sources :

Example 31 with BaseStepMeta

use of org.pentaho.di.trans.step.BaseStepMeta in project pentaho-metaverse by pentaho.

the class AbstractStepMetaJsonSerializerTest method setUp.

@Before
public void setUp() throws Exception {
    repo = new LineageRepository();
    serializer = new BaseStepMetaJsonSerializer(BaseStepMeta.class, repo);
    spyMeta = spy(new BaseStepMeta());
    spyParent = spy(new StepMeta());
    spyParentTrans = spy(new TransMeta());
    when(spyMeta.getParentStepMeta()).thenReturn(spyParent);
    when(spyParent.getName()).thenReturn(STEP_META_NAME);
}
Also used : TransMeta(org.pentaho.di.trans.TransMeta) DummyTransMeta(org.pentaho.di.trans.steps.dummytrans.DummyTransMeta) LineageRepository(org.pentaho.metaverse.impl.model.kettle.LineageRepository) BaseStepMeta(org.pentaho.di.trans.step.BaseStepMeta) StepMeta(org.pentaho.di.trans.step.StepMeta) BaseStepMeta(org.pentaho.di.trans.step.BaseStepMeta) Before(org.junit.Before)

Example 32 with BaseStepMeta

use of org.pentaho.di.trans.step.BaseStepMeta in project pentaho-kettle by pentaho.

the class MetaFileLoaderImplTest method setupTransExecutorMeta.

private void setupTransExecutorMeta() throws Exception {
    TransExecutorMeta transExecutorMeta = new TransExecutorMeta();
    baseStepMeta = transExecutorMeta;
    TransMeta parentTransMeta = spy(new TransMeta());
    LogChannelInterface logger = mock(LogChannelInterface.class);
    metaFileCache = new MetaFileCacheImpl(logger);
    parentTransMeta.setMetaFileCache(metaFileCache);
    when(parentTransMeta.getNamedClusterEmbedManager()).thenReturn(namedClusterEmbedManager);
    StepMeta stepMeta = new StepMeta();
    stepMeta.setParentTransMeta(parentTransMeta);
    transExecutorMeta.setParentStepMeta(stepMeta);
    keyPath = getClass().getResource(TRANS_FILE).getPath();
    transExecutorMeta.setFileName(keyPath);
    Job job = new Job();
    space = job;
    targetMetaName = TRANS_FILE;
    transExecutorMeta.setTransName(targetMetaName);
    transExecutorMeta.setTransObjectId(null);
    // repo stuff
    keyPath = convertToRepoKeyPath(keyPath);
    transExecutorMeta.setDirectoryPath(keyPath.substring(0, keyPath.lastIndexOf("/")));
    transExecutorMeta.setTransObjectId(null);
    RepositoryDirectoryInterface rdi = mock(RepositoryDirectoryInterface.class);
    when(repository.findDirectory(transExecutorMeta.getDirectoryPath())).thenReturn(rdi);
    when(repository.loadRepositoryDirectoryTree()).thenReturn(rdi);
    TransMeta transMeta = new TransMeta();
    transMeta.setName(stripExtension(TRANS_FILE));
    when(repository.loadTransformation(TRANS_FILE, rdi, null, true, null)).thenReturn(transMeta);
}
Also used : RepositoryDirectoryInterface(org.pentaho.di.repository.RepositoryDirectoryInterface) TransExecutorMeta(org.pentaho.di.trans.steps.transexecutor.TransExecutorMeta) TransMeta(org.pentaho.di.trans.TransMeta) JobEntryJob(org.pentaho.di.job.entries.job.JobEntryJob) Job(org.pentaho.di.job.Job) LogChannelInterface(org.pentaho.di.core.logging.LogChannelInterface) StepMeta(org.pentaho.di.trans.step.StepMeta) BaseStepMeta(org.pentaho.di.trans.step.BaseStepMeta)

Aggregations

BaseStepMeta (org.pentaho.di.trans.step.BaseStepMeta)32 StepMeta (org.pentaho.di.trans.step.StepMeta)13 TransMeta (org.pentaho.di.trans.TransMeta)11 Test (org.junit.Test)10 HashSet (java.util.HashSet)7 StepMetaInterface (org.pentaho.di.trans.step.StepMetaInterface)6 IMetaverseNode (org.pentaho.metaverse.api.IMetaverseNode)6 KettleException (org.pentaho.di.core.exception.KettleException)5 ArrayList (java.util.ArrayList)4 Before (org.junit.Before)4 RowMetaInterface (org.pentaho.di.core.row.RowMetaInterface)4 StepField (org.pentaho.metaverse.api.StepField)4 IStepAnalyzer (org.pentaho.metaverse.api.analyzer.kettle.step.IStepAnalyzer)4 List (java.util.List)3 Set (java.util.Set)3 StepInterface (org.pentaho.di.trans.step.StepInterface)3 MetaverseComponentDescriptor (org.pentaho.metaverse.api.MetaverseComponentDescriptor)3 IStepExternalResourceConsumer (org.pentaho.metaverse.api.analyzer.kettle.step.IStepExternalResourceConsumer)3 IExternalResourceInfo (org.pentaho.metaverse.api.model.IExternalResourceInfo)3 Map (java.util.Map)2