[arquillian-issues] [JBoss JIRA] Updated: (ARQ-193) Create auxillary OSGi test bundle
Thomas Diesler (JIRA)
jira-events at lists.jboss.org
Tue Apr 26 06:01:20 EDT 2011
[ https://issues.jboss.org/browse/ARQ-193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Diesler updated ARQ-193:
-------------------------------
Git Pull Request: https://github.com/arquillian/arquillian-container-osgi/pull/1 (was: https://github.com/tdiesler/arquillian-container-osgi/commit/2772675776eb36788fefcfb6a61f82ee61647ff5)
> Create auxillary OSGi test bundle
> ---------------------------------
>
> Key: ARQ-193
> URL: https://issues.jboss.org/browse/ARQ-193
> Project: Arquillian
> Issue Type: Task
> Components: OSGi Containers
> Reporter: Thomas Diesler
> Assignee: Thomas Diesler
> Fix For: 1.0.0.Beta1
>
>
> Currently the test bundle must contain the test case and a number of Import-Package statemetns related to the test infrastructure
> @Deployment
> public static JavaArchive createdeployment()
> {
> final JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class);
> archive.setManifest(new Asset()
> {
> public InputStream openStream()
> {
> OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
> builder.addBundleSymbolicName(archive.getName());
> builder.addBundleManifestVersion(2);
> builder.addBundleActivator(SimpleActivator.class.getName());
> // [TODO] generate a separate bundle the contains the test case
> builder.addExportPackages(OSGiEmbeddedFrameworkTestCase.class);
> builder.addImportPackages("org.jboss.arquillian.junit", "org.jboss.shrinkwrap.api", "org.jboss.shrinkwrap.api.spec");
> builder.addImportPackages("javax.inject", "org.junit", "org.junit.runner");
> return builder.openStream();
> }
> });
> archive.addClasses(SimpleActivator.class, SimpleService.class);
> archive.addClasses(OSGiEmbeddedFrameworkTestCase.class);
> return archive;
> }
> There test bundle should not need to contain the test case nor these additional imports. An auxillary bundle that contains the test case should be generated and installed
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list