Package org.pentaho.platform.api.engine

Examples of org.pentaho.platform.api.engine.IPentahoInitializer


    when( mockContext.getServiceReferences( IPentahoInitializer.class, null ) )
      .thenReturn( Collections.singletonList( ref ) );


    final AtomicBoolean initialized = new AtomicBoolean( false );
    IPentahoInitializer initializer = new IPentahoInitializer() {

      @Override
      public void init( IPentahoSession session ) {
        initialized.set( true );
      }
    };
    when( mockContext.getService( ref ) ).thenReturn( initializer );

    assertTrue( "initializer should be rested", initialized.get() == false );

    OSGIObjectFactory factory = new OSGIObjectFactory( mockContext );
    IPentahoInitializer actual = factory.get( IPentahoInitializer.class, session );

    assertSame( initializer, actual );
    assertTrue( "initializer not called", initialized.get() );

    verify( mockContext ).getServiceReferences( IPentahoInitializer.class, null );
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.engine.IPentahoInitializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.