@Deployment(name = "EventTest") public static Archive<?> createTestArchive() { return ShrinkWrap.create(WebArchive.class, "eventTest.war") .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive()) .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") .addClasses(EventTest.class, EventQualifier.class, EventQualifierLiteral.class); }
/** Deploy package classes with project-stage integration-test */ @Deployment public static WebArchive deploy() { URL deltaSpikeConfig = ExcludeIntegrationTest.class .getClassLoader() .getResource("META-INF/apache-deltaspike.properties"); URL testExtensionsFileUrl = ExcludeIntegrationTest.class .getClassLoader() .getResource("META-INF/services/test.javax.enterprise.inject.spi.Extension"); JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "excludeIntegrationTest.jar") .addPackage("org.apache.deltaspike.test.core.api.exclude") .addPackage("org.apache.deltaspike.test.core.impl.activation") .addPackage("org.apache.deltaspike.test.category") .addPackage("org.apache.deltaspike.integration.core.api.exclude") .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); return ShrinkWrap.create(WebArchive.class, "excludeIntegration.war") .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive()) .addAsLibraries(testJar) .addAsResource( FileUtils.getFileForURL(deltaSpikeConfig.toString()), "META-INF/apache-deltaspike.properties") .addAsResource( FileUtils.getFileForURL(testExtensionsFileUrl.toString()), "META-INF/services/javax.enterprise.inject.spi.Extension") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); }
@Deployment public static WebArchive deploy() { String simpleName = ExplicitlyGroupedConversationsTest.class.getSimpleName(); String archiveName = simpleName.substring(0, 1).toLowerCase() + simpleName.substring(1); JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, archiveName + ".jar") .addPackage(ExplicitlyGroupedConversationsTest.class.getPackage().getName()) .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); return ShrinkWrap.create(WebArchive.class, archiveName + ".war") .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive()) .addAsLibraries(testJar) .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); }