@Override public void evaluate() throws Throwable { boolean runInContainer = getDeploymentMethod(target).getAnnotation(Deployment.class).testable(); if (runInContainer) { evaluateParametersInContainer(base, target); } else { evaluateParametersInClient(base, target); } } };
@RunWith(Arquillian.class) @RunAsClient public abstract class AbstractClientArquillianTest {
@Deployment(testable = false) public static WebArchive createDeployment() { File file = findPomFile(); return ShrinkWrap.create(MavenImporter.class) .loadPomFromFile(file) .importBuildOutput() .as(WebArchive.class); }
@Deployment @TargetsContainer("test-domain") public static WebArchive create1() { return ShrinkWrap.create(WebArchive.class, "test.war"); }
@Deployment @OverProtocol("jmx-as7") public static JavaArchive processArchive() { return ShrinkWrap.create(JavaArchive.class) .addClass(AbstractFoxPlatformIntegrationTest.class) .addClass(DefaultEjbProcessApplication.class) .addAsResource("META-INF/processes.xml", "META-INF/processes.xml") .addAsResource("org/camunda/bpm/integrationtest/testDeployProcessArchive.bpmn20.xml"); }
@Test @RunAsClient public void testDeployDroolsFails() { try { deployer.deploy("deployment"); Assert.fail("exception expected"); }catch (Exception e) { // expected } }
@Before public void setUp() { try { deployer.deploy("deployment"); // The failing configurator provokes a RuntimeException in a servlet context listener. // Apparently such an exception needs not cancel the deployment of a Java EE application. // That means deployment fails for some servers and for others not. // => we don't care if there is an exception here or not }catch (Exception e) { } }
@Deployment public static WebArchive deploy() throws Exception { final WebArchive war = ShrinkWrap.create( WebArchive.class, ARCHIVE_NAME + ".war" ) .setManifest( "org/hibernate/test/wf/ddl/manifest.mf" ) .addClasses( WildFlyDdlEntity.class ) .addAsResource( new StringAsset( hibernate_cfg ), "hibernate.cfg.xml" ) .addClasses( BmtSfStatefulBean.class ) .addClasses( DdlInWildFlyUsingBmtAndSfTest.class ); return war; }
@Test @RunAsClient public void testDeployProcessArchive() { try { deployer.deploy("deployment"); Assert.fail("exception expected"); }catch (Exception e) { // expected } }
@Deployment public static WebArchive deploy() throws Exception { final WebArchive war = ShrinkWrap.create( WebArchive.class, ARCHIVE_NAME + ".war" ) .setManifest( "org/hibernate/test/wf/ddl/manifest.mf" ) .addClasses( WildFlyDdlEntity.class ) .addAsResource( new StringAsset( hibernate_cfg ), "hibernate.cfg.xml" ) .addClasses( CmtSfStatefulBean.class ) .addClasses( DdlInWildFlyUsingCmtAndSfTest.class ); return war; }
@Deployment public static WebArchive createDeployment() { return ShrinkWrap.create( WebArchive.class ) .addClass( Kryptonite.class ) .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" ) .addAsResource( new StringAsset( persistenceXml().exportAsString() ), "META-INF/persistence.xml" ); }
@Deployment public static WebArchive createDeployment() { return ShrinkWrap.create( WebArchive.class ) .addClass( AuditedEntity.class ) .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" ) .addAsResource( new StringAsset( persistenceXml().exportAsString() ), "META-INF/persistence.xml" ); }
@Deployment public static WebArchive createDeployment() { return ShrinkWrap.create( WebArchive.class ) .addClass( Kryptonite.class ) .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" ) .addAsResource( new StringAsset( persistenceXml().exportAsString() ), "META-INF/persistence.xml" ); }
@Deployment public static WebArchive buildDeployment() { WebArchive war = ShrinkWrap.create( WebArchive.class ) .setManifest( "org/hibernate/test/wf/ddl/manifest.mf" ) .addClass( WildFlyDdlEntity.class ) // .addAsManifestResource( EmptyAsset.INSTANCE, "beans.xml") .addAsResource( new StringAsset( persistenceXml().exportAsString() ), PERSISTENCE_XML_RESOURCE_NAME ) .addAsResource( "org/hibernate/test/wf/ddl/log4j.properties", "log4j.properties" ); System.out.println( war.toString(true) ); return war; }
@Deployment(name="checker") public static WebArchive createDeployment2() { return initWebArchiveDeployment("checker.war"); }
@Deployment(name="deployment1") public static WebArchive processArchive() { return initWebArchiveDeployment("test.war", "jobExecutorActivate-processes.xml"); }
@Deployment(name="fail") public static WebArchive createDeployment1() { return TestPostDeployFailure_JBOSS.createDeployment1(); }
@Deployment public static WebArchive app1() { return initWebArchiveDeployment(); }
@Deployment public static WebArchive app1() { return initWebArchiveDeployment(); }
@Deployment public static WebArchive processArchive() { return initWebArchiveDeployment(); }