Skip to content

Commit

Permalink
Explicitly add deps on all CDI packages -- for CDI API instances serv…
Browse files Browse the repository at this point in the history
…ice events lookup.
  • Loading branch information
alesj committed Feb 1, 2013
1 parent 29ac5a1 commit c7fca08
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
Bundle-Activator org.jboss.weld.osgi.tests.bundle1.Activator

Import-Package javax.enterprise.context; \
javax.enterprise.context.spi; \
javax.enterprise.event; \
javax.enterprise.inject; \
javax.enterprise.inject.spi; \
javax.enterprise.util; version=1.0.0, \
*
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
Bundle-Activator org.jboss.weld.osgi.tests.bundle2.Activator

Import-Package javax.enterprise.context; \
javax.enterprise.context.spi; \
javax.enterprise.event; \
javax.enterprise.inject; \
javax.enterprise.inject.spi; \
javax.enterprise.util; version=1.0.0, \
*
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
Bundle-Activator org.jboss.weld.osgi.tests.bundle3.Activator

Import-Package javax.enterprise.context; \
javax.enterprise.context.spi; \
javax.enterprise.event; \
javax.enterprise.inject; \
javax.enterprise.inject.spi; \
javax.enterprise.util; version=1.0.0, \
*
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Import-Package javax.enterprise.context; \
javax.enterprise.context.spi; \
javax.enterprise.event; \
javax.enterprise.inject; \
javax.enterprise.inject.spi; \
javax.enterprise.util; version=1.0.0, \
*
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Bundle-Activator org.jboss.weld.osgi.tests.lifecycle.OSGiActivator

Export-Package org.jboss.weld.osgi.tests.lifecycle
Export-Package org.jboss.weld.osgi.tests.lifecycle

Import-Package javax.enterprise.context; \
javax.enterprise.context.spi; \
javax.enterprise.event; \
javax.enterprise.inject; \
javax.enterprise.inject.spi; \
javax.enterprise.util; version=1.0.0, \
*
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Import-Package javax.enterprise.context; \
javax.enterprise.context.spi; \
javax.enterprise.event; \
javax.enterprise.inject; \
javax.enterprise.inject.spi; \
javax.enterprise.util; version=1.0.0, \
*
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
Embed-Dependency *; scope=compile; inline=false
Embed-Dependency *; scope=compile; inline=false

Import-Package javax.enterprise.context; \
javax.enterprise.context.spi; \
javax.enterprise.event; \
javax.enterprise.inject; \
javax.enterprise.inject.spi; \
javax.enterprise.util; version=1.0.0, \
*
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ public void eventTest() throws InterruptedException, InvalidSyntaxException, Bun
int offset = 1; // TODO -- why this offset?
Assert.assertEquals("The number of listened BundleInstalled event was wrong", offset, bundleInstalled);
Assert.assertEquals("The number of listened BundleUninstalled event was wrong", 0, bundleUninstalled);
Assert.assertEquals("The number of listened BundleResolved event was wrong", 2 + offset, bundleResolved);
Assert.assertEquals("The number of listened BundleResolved event was wrong", 3 + offset, bundleResolved);
Assert.assertEquals("The number of listened BundleUnresolved event was wrong", 0, bundleUnresolved);
Assert.assertEquals("The number of listened BundleStarting event was wrong", 2 + offset, bundleStarting);
Assert.assertEquals("The number of listened BundleStarted event was wrong", 3, bundleStarted);
Assert.assertEquals("The number of listened BundleStarting event was wrong", 3 + offset, bundleStarting);
Assert.assertEquals("The number of listened BundleStarted event was wrong", 4, bundleStarted);
Assert.assertEquals("The number of listened BundleStopping event was wrong", 0, bundleStopping);
Assert.assertEquals("The number of listened BundleStopped event was wrong", 0, bundleStopped);
Assert.assertEquals("The number of listened BundleUpdated event was wrong", 0, bundleUpdated);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ public void launchTest() throws InterruptedException, BundleException, InvalidSy

Collection<ServiceRegistration> registrations1 = container1.getRegistrations();
Collection<ServiceRegistration> registrations2 = container2.getRegistrations();
Assert.assertEquals("The registration collection 1 had the wrong number of registrations", (3 + 9 + 3), registrations1.size());
Assert.assertEquals("The registration collection 2 had the wrong number of registrations", (3 + 2), registrations2.size());
Assert.assertEquals("The registration collection 1 had the wrong number of registrations", (5 + 9 + 3), registrations1.size());
Assert.assertEquals("The registration collection 2 had the wrong number of registrations", (4 + 2), registrations2.size());

Collection<String> beanClasses1 = container1.getBeanClasses();
Collection<String> beanClasses2 = container2.getBeanClasses();
Expand Down

0 comments on commit c7fca08

Please sign in to comment.