Package org.apache.aries.mocks

Examples of org.apache.aries.mocks.BundleContextMock$MockServiceFactory


   * @throws IllegalArgumentException
   */
  @Before
  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
  {
    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    new Activator().start(bc);
   
    Field f = ContextHelper.class.getDeclaredField("context");
    f.setAccessible(true);
    f.set(null, bc);
View Full Code Here


                new MethodCall(BundleContext.class, "getBundles"), new Bundle[] {framework, client, otherClient});
    }
   
    @Test
    public void testServices() throws Exception {
      BundleContext bc = Skeleton.newMock(new BundleContextMock(), BundleContext.class);
     
      GlobalPersistenceManager gpm = new GlobalPersistenceManager();
     
      BundleContextMock.assertNoServiceExists(PersistenceContextProvider.class.getName());
      BundleContextMock.assertNoServiceExists(JTAPersistenceContextManager.class.getName());
View Full Code Here

  static ParserProxy _parserProxy;
  static ModellingManager _modellingManager;
 
  @BeforeClass
  public static void setup() {
    BundleContext mockCtx = Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    NamespaceHandlerRegistry nhri = new NamespaceHandlerRegistryImpl (mockCtx);
    ParserService parserService = new ParserServiceImpl(nhri);
    mockCtx.registerService(ParserService.class.getName(), parserService, new Hashtable<String, String>());
    _parserProxy = new ParserProxyImpl();
    ((ParserProxyImpl)_parserProxy).setParserService(parserService);
View Full Code Here

  private SingleServiceTracker<String> sut;
  private SingleServiceTracker.SingleServiceListener listener;
 
  @Before
  public void setup() {
    ctx = Skeleton.newMock(new BundleContextMock(), BundleContext.class);
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.mocks.BundleContextMock$MockServiceFactory

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.