public void cleanUp() { KettleLogStore.setLogChannelInterfaceFactory( originalLogChannelInterfaceFactory ); }
@After public void tearDown() { KettleLogStore.setLogChannelInterfaceFactory( oldLogChannelInterfaceFactory ); }
@Before public void setUp() throws Exception { LogChannelInterfaceFactory logChannelInterfaceFactory = mock( LogChannelInterfaceFactory.class ); LogChannelInterface logChannelInterface = mock( LogChannelInterface.class ); KettleLogStore.setLogChannelInterfaceFactory( logChannelInterfaceFactory ); when( logChannelInterfaceFactory.create( any(), any( LoggingObjectInterface.class ) ) ).thenReturn( logChannelInterface ); }
@Before public void setUp() throws Exception { KettleLogStore.setLogChannelInterfaceFactory( logChannelFactory ); when( logChannelFactory.create( any(), any() ) ).thenReturn( logChannel ); }
@Before public void setUp() throws Exception { KettleLogStore.setLogChannelInterfaceFactory( this.logChannelFactory ); Mockito.when( this.logChannelFactory.create( any(), any() ) ).thenReturn( this.logChannel ); }
@Before public void setUp() throws Exception { LogChannelInterfaceFactory logChannelInterfaceFactory = mock( LogChannelInterfaceFactory.class ); LogChannelInterface logChannelInterface = mock( LogChannelInterface.class ); oldLogChannelInterfaceFactory = KettleLogStore.getLogChannelInterfaceFactory(); KettleLogStore.setLogChannelInterfaceFactory( logChannelInterfaceFactory ); when( logChannelInterfaceFactory.create( any(), any( LoggingObjectInterface.class ) ) ).thenReturn( logChannelInterface ); }
public StepMockHelper( String stepName, Class<Meta> stepMetaClass, Class<Data> stepDataClass ) { originalLogChannelInterfaceFactory = KettleLogStore.getLogChannelInterfaceFactory(); logChannelInterfaceFactory = mock( LogChannelInterfaceFactory.class ); logChannelInterface = mock( LogChannelInterface.class ); KettleLogStore.setLogChannelInterfaceFactory( logChannelInterfaceFactory ); stepMeta = mock( StepMeta.class ); when( stepMeta.getName() ).thenReturn( stepName ); stepDataInterface = mock( stepDataClass ); transMeta = mock( TransMeta.class ); when( transMeta.findStep( stepName ) ).thenReturn( stepMeta ); trans = mock( Trans.class ); initStepMetaInterface = mock( stepMetaClass ); initStepDataInterface = mock( stepDataClass ); processRowsStepDataInterface = mock( stepDataClass ); processRowsStepMetaInterface = mock( stepMetaClass ); }
@Before public void setUp() throws Exception { meta = new StuffStreamMeta(); KettleLogStore.setLogChannelInterfaceFactory( logChannelFactory ); when( logChannelFactory.create( any(), any() ) ).thenReturn( logChannel ); when( logChannelFactory.create( any() ) ).thenReturn( logChannel ); when( mappingMetaRetriever.get( any(), any(), any(), any() ) ).thenReturn( subTransMeta ); when( subTransMeta.getPrevStepFields( anyString() ) ).thenReturn( prevRowMeta ); when( subTransMeta.getSteps() ).thenReturn( singletonList( subTransStepMeta ) ); when( subTransStepMeta.getStepMetaInterface() ).thenReturn( stepMetaInterface ); when( subTransStepMeta.getName() ).thenReturn( "SubStepName" ); meta.mappingMetaRetriever = mappingMetaRetriever; }
@Before public void setUp() throws KettleException { KettleLogStore.setLogChannelInterfaceFactory( logChannelFactory ); when( logChannelFactory.create( any(), any() ) ).thenReturn( logChannel ); StepMeta stepMeta = new StepMeta( "BaseStreamStep", meta ); TransMeta transMeta = new TransMeta(); transMeta.addStep( stepMeta ); Trans trans = new Trans( transMeta ); baseStreamStep = new BaseStreamStep( stepMeta, stepData, 1, transMeta, trans ); baseStreamStep.source = streamSource; baseStreamStep.window = streamWindow; baseStreamStep.setParentVariableSpace( new Variables() ); StepMetaDataCombi stepMetaDataCombi = new StepMetaDataCombi(); stepMetaDataCombi.step = baseStreamStep; stepMetaDataCombi.data = stepData; stepMetaDataCombi.stepMeta = stepMeta; stepMetaDataCombi.meta = meta; trans.prepareExecution( new String[ 0 ] ); trans.getSteps().add( stepMetaDataCombi ); }
void cleanUp() { KettleClientEnvironment.reset(); PluginRegistry.getInstance().reset(); MetricsRegistry.getInstance().reset(); ExtensionPointMap.getInstance().reset(); if ( KettleLogStore.isInitialized() ) { KettleLogStore.getInstance().reset(); } KettleLogStore.setLogChannelInterfaceFactory( new LogChannelFactory() ); if ( Props.isInitialized() ) { Props.getInstance().reset(); } KettleVFS.getInstance().reset(); XMLHandlerCache.getInstance().clear(); ValueMetaFactory.pluginRegistry = PluginRegistry.getInstance(); // under no circumstance reset the LoggingRegistry // LoggingRegistry.getInstance().reset(); }