本文整理汇总了Java中org.pentaho.di.core.logging.KettleLogStore.setLogChannelInterfaceFactory方法的典型用法代码示例。如果您正苦于以下问题:Java KettleLogStore.setLogChannelInterfaceFactory方法的具体用法?Java KettleLogStore.setLogChannelInterfaceFactory怎么用?Java KettleLogStore.setLogChannelInterfaceFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.logging.KettleLogStore
的用法示例。
在下文中一共展示了KettleLogStore.setLogChannelInterfaceFactory方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: StepMockHelper
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
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 );
}
示例2: setKettleLogFactoryWithMock
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
/**
* set mock for log channel factory for skipping npe in tests
*/
public static void setKettleLogFactoryWithMock() {
LogChannelInterfaceFactory logChannelInterfaceFactory = mock( LogChannelInterfaceFactory.class );
logChannelInterface = mock( LogChannelInterface.class );
when( logChannelInterfaceFactory.create( any() ) ).thenReturn( logChannelInterface );
KettleLogStore.setLogChannelInterfaceFactory( logChannelInterfaceFactory );
}
示例3: before
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@Before public void before() throws MongoDbException {
MockitoAnnotations.initMocks( this );
MongoWrapperUtil.setMongoWrapperClientFactory( mongoClientWrapperFactory );
when( mongoClientWrapperFactory
.createMongoClientWrapper( any( MongoProperties.class ), any( MongoUtilLogger.class ) ) )
.thenReturn( mongoClientWrapper );
when( stepMeta.getName() ).thenReturn( "stepMetaName" );
when( transMeta.findStep( anyString() ) ).thenReturn( stepMeta );
when( logChannelFactory.create( any( BaseStep.class ), any( Trans.class ) ) ).thenReturn( mockLog );
KettleLogStore.setLogChannelInterfaceFactory( logChannelFactory );
}
示例4: setKettleLogFactoryWithMock
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
public static void setKettleLogFactoryWithMock() {
LogChannelInterfaceFactory logChannelInterfaceFactory = mock( LogChannelInterfaceFactory.class );
LogChannelInterface logChannelInterface = mock( LogChannelInterface.class );
when( logChannelInterfaceFactory.create( any() ) ).thenReturn(
logChannelInterface );
KettleLogStore.setLogChannelInterfaceFactory( logChannelInterfaceFactory );
}
示例5: setUp
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@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 );
}
示例6: setUp
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@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 );
}
示例7: setUp
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@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 );
}
示例8: tearDown
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@AfterClass
public static void tearDown() {
KettleLogStore.setLogChannelInterfaceFactory( oldLogChannelInterfaceFactory );
}
示例9: tearDown
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@After
public void tearDown() {
KettleLogStore.setLogChannelInterfaceFactory( oldLogChannelInterfaceFactory );
}
示例10: setUp
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
KettleLogStore.setLogChannelInterfaceFactory( logChannelFactory );
Mockito.when( logChannelFactory.create( any(), any() ) ).thenReturn( logChannel );
}
示例11: setUp
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
KettleLogStore.setLogChannelInterfaceFactory( this.logChannelFactory );
Mockito.when( this.logChannelFactory.create( any(), any() ) ).thenReturn( this.logChannel );
}
示例12: cleanUp
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
public void cleanUp() {
KettleLogStore.setLogChannelInterfaceFactory( originalLogChannelInterfaceFactory );
}
示例13: setKettleLogFactoryWithMock
import org.pentaho.di.core.logging.KettleLogStore; //导入方法依赖的package包/类
private void setKettleLogFactoryWithMock() {
LogChannelInterfaceFactory logChannelInterfaceFactory = mock( LogChannelInterfaceFactory.class );
logChannelInterface = mock( LogChannelInterface.class );
when( logChannelInterfaceFactory.create( any() ) ).thenReturn( logChannelInterface );
KettleLogStore.setLogChannelInterfaceFactory( logChannelInterfaceFactory );
}