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);
}
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);
}
Aggregations