@Test public void testCallExtensionPointWithTransMeta() throws Exception { NamedClusterService mockNamedClusterService = mock( NamedClusterService.class ); LogChannelInterface logChannelInterface = mock( LogChannelInterface.class ); TransMeta mockTransMeta = mock( TransMeta.class ); NamedClusterServiceExtensionPoint namedClusterServiceExtensionPoint = new NamedClusterServiceExtensionPoint( mockNamedClusterService ); namedClusterServiceExtensionPoint.callExtensionPoint( logChannelInterface, mockTransMeta ); verify( mockTransMeta ).setNamedClusterServiceOsgi( any( NamedClusterServiceOsgi.class ) ); }
@Override public void callExtensionPoint( LogChannelInterface log, Object object ) throws KettleException { AbstractMeta meta; if ( object instanceof Trans ) { meta = ( (Trans) object ).getTransMeta(); } else if ( object instanceof JobExecutionExtension ) { meta = ( (JobExecutionExtension) object ).job.getJobMeta(); } else { meta = (AbstractMeta) object; } meta.setNamedClusterServiceOsgi( namedClusterServiceOsgi ); }
NamedClusterServiceExtensionPoint implements ExtensionPointInterface { @Override public void callExtensionPoint( LogChannelInterface log, Object object ) throws KettleException { AbstractMeta meta; if ( object instanceof Trans ) { meta = ( (Trans) object ).getTransMeta(); } else if ( object instanceof JobExecutionExtension ) { meta = ( (JobExecutionExtension) object ).job.getJobMeta(); } else { meta = (AbstractMeta) object; } meta.setNamedClusterServiceOsgi( namedClusterServiceOsgi ); } }
NamedClusterServiceExtensionPoint implements ExtensionPointInterface { @Override public void callExtensionPoint( LogChannelInterface log, Object object ) throws KettleException { AbstractMeta meta; if ( object instanceof Trans ) { meta = ( (Trans) object ).getTransMeta(); } else if ( object instanceof JobExecutionExtension ) { meta = ( (JobExecutionExtension) object ).job.getJobMeta(); } else { meta = (AbstractMeta) object; } meta.setNamedClusterServiceOsgi( namedClusterServiceOsgi ); } NamedClusterServiceExtensionPoint( NamedClusterService namedClusterService ); }
NamedClusterServiceExtensionPoint implements ExtensionPointInterface { @Override public void callExtensionPoint( LogChannelInterface log, Object object ) throws KettleException { AbstractMeta meta; if ( object instanceof Trans ) { meta = ( (Trans) object ).getTransMeta(); } else if ( object instanceof JobExecutionExtension ) { meta = ( (JobExecutionExtension) object ).job.getJobMeta(); } else { meta = (AbstractMeta) object; } meta.setNamedClusterServiceOsgi( namedClusterServiceOsgi ); } NamedClusterServiceExtensionPoint( NamedClusterService namedClusterService ); @Override void callExtensionPoint( LogChannelInterface log, Object object ); }
NamedClusterServiceExtensionPoint implements ExtensionPointInterface { @Override public void callExtensionPoint( LogChannelInterface log, Object object ) throws KettleException { AbstractMeta meta; if ( object instanceof Trans ) { meta = ( (Trans) object ).getTransMeta(); } else if ( object instanceof JobExecutionExtension ) { meta = ( (JobExecutionExtension) object ).job.getJobMeta(); } else { meta = (AbstractMeta) object; } meta.setNamedClusterServiceOsgi( namedClusterServiceOsgi ); } NamedClusterServiceExtensionPoint( NamedClusterService namedClusterService ); @Override void callExtensionPoint( LogChannelInterface log, Object object );  }