@Test public void testStart() throws Exception { BundleContext context = EasyMock.createMock(BundleContext.class); Activator activator = new Activator(); activator.start(context); PersistenceProviderResolver providerResolver = PersistenceProviderResolverHolder.getPersistenceProviderResolver(); Assert.assertNotNull("PersistenceProviderResolver not set", providerResolver); Assert.assertTrue("PersistenceProviderResolver not of the correct type. Expected com.sap.core.services.accessor.javax.persistence.extension.CompositePersistenceProviderResolver, but actually is [" + providerResolver.getClass().getName() + "]", (providerResolver instanceof CompositePersistenceProviderResolver)); }
public void start(BundleContext bundleContext) throws Exception { providerResolver = new CompositePersistenceProviderResolver(bundleContext); PersistenceProviderResolverHolder.setPersistenceProviderResolver(providerResolver); if (logger.isDebugEnabled()) { logger.debug("CompositePersistenceProviderResolver created"); } }
Activator implements BundleActivator { public void start(BundleContext bundleContext) throws Exception { providerResolver = new CompositePersistenceProviderResolver(bundleContext); PersistenceProviderResolverHolder.setPersistenceProviderResolver(providerResolver); if (logger.isDebugEnabled()) { logger.debug("CompositePersistenceProviderResolver created"); } } }
Activator implements BundleActivator { public void start(BundleContext bundleContext) throws Exception { providerResolver = new CompositePersistenceProviderResolver(bundleContext); PersistenceProviderResolverHolder.setPersistenceProviderResolver(providerResolver); if (logger.isDebugEnabled()) { logger.debug("CompositePersistenceProviderResolver created"); } }  }
Activator implements BundleActivator { public void start(BundleContext bundleContext) throws Exception { providerResolver = new CompositePersistenceProviderResolver(bundleContext); PersistenceProviderResolverHolder.setPersistenceProviderResolver(providerResolver); if (logger.isDebugEnabled()) { logger.debug("CompositePersistenceProviderResolver created"); } }  void start(BundleContext bundleContext); void stop(BundleContext bundleContext); }
Activator implements BundleActivator { public void start(BundleContext bundleContext) throws Exception { providerResolver = new CompositePersistenceProviderResolver(bundleContext); PersistenceProviderResolverHolder.setPersistenceProviderResolver(providerResolver); if (logger.isDebugEnabled()) { logger.debug("CompositePersistenceProviderResolver created"); } }  void start(BundleContext bundleContext); void stop(BundleContext bundleContext);  }