Skip to content

Instantly share code, notes, and snippets.

input jbossHome = integration-tests/target/integ-dist/jboss/
converted return new File(jbossHome).getAbsolutePath();
jbossHome = C:\Users\bob\torquebox\torquebox\integration-tests\
protected String getStartClasspath()
{
File runjar = new File(jbossHome + "/bin/run.jar");
File javaJar = new File(javaHome + "/lib/tools.jar");
return runjar.toString() + File.pathSeparator + javaJar.toString();
}
@aslakknutsen
aslakknutsen / ArquillianContainerSPI_1.java
Created March 15, 2011 10:05
Arquillian Container Deployment SPI, multiple known types, multiple interfaces
public interface Container
{
}
public interface ControllableContainer extends Container
{
void setup();
void start();
void stop();
@aslakknutsen
aslakknutsen / ContextualDeploymentFromDifferentContainer.java
Created March 21, 2011 18:00
(1:) Inject DeploymentContextual information from Deployment 1 during in container testing operating under Deployment 2 (2:) Lazy create the Deployments in order, so Deployment 2 can depend on Contextual Data from Deployment 1
@RunWith(Arquillian.class)
public class ContextualDeploymentFromDifferentContainer
{
@Deployment(name = "Dep-1") @TargetsContainer("Cont-1")
public static WebArchive create()
{
return ShrinkWrap.create(WebArchive.class)
.addClass(RESTServlet.class);
}
@aslakknutsen
aslakknutsen / CustomerResourceClientTest.java
Created March 23, 2011 00:23
JAX-RS Arquillian TestCase with @ArquillianResource injection
@RunWith(Arquillian.class)
public class CustomerResourceClientTest
{
private static final String REST_PATH = "rest";
@Deployment(testable = false)
public static Archive<?> createDeployment()
{
return ShrinkWrap.create(WebArchive.class)
.addPackage(Customer.class.getPackage())
@aslakknutsen
aslakknutsen / arquillian.xml
Created March 23, 2011 20:54
GlassFish Embedded 3.1
<?xml version="1.0" encoding="UTF-8"?>
<arquillian
xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<container qualifier="glassfish" default="true">
<configuration>
<property name="sunResourcesXml">src/test/resources/sun-resources.xml</property>
<property name="bindHttpPort">7070</property>
@aslakknutsen
aslakknutsen / gist:884933
Created March 24, 2011 11:48
Arquillian Repo Split
Repositories:
arquillian-container-jbossas
git filter-branch --index-filter 'git ls-tree -r --name-only --full-tree $GIT_COMMIT | grep -v "^\(container.\?/\?jboss.*\)" | xargs -I {} git rm --cached -r {}' --tag-name-filter cat --prune-empty -- --all
arquillian-container-weld
git filter-branch --index-filter 'git ls-tree -r --name-only --full-tree $GIT_COMMIT | grep -v "^\(container.\?/\?weld.*\)" | xargs -I {} git rm --cached -r {}' --tag-name-filter cat --prune-empty -- --all
Index: embedded/src/main/java/org/jboss/jca/embedded/arquillian/EmbeddedJCAContainerConfiguration.java
===================================================================
--- embedded/src/main/java/org/jboss/jca/embedded/arquillian/EmbeddedJCAContainerConfiguration.java (revision 111054)
+++ embedded/src/main/java/org/jboss/jca/embedded/arquillian/EmbeddedJCAContainerConfiguration.java (working copy)
@@ -21,8 +21,7 @@
*/
package org.jboss.jca.embedded.arquillian;
-import org.jboss.arquillian.spi.ContainerConfiguration;
-import org.jboss.arquillian.spi.ContainerProfile;
@aslakknutsen
aslakknutsen / arquillian_weld_ee_container.patch
Created March 29, 2011 16:57
Patch to use the Arquillian Alpha5 Weld EE Container. Update the weld provided Container by using this branch: https://github.com/weld/arquillian-weld-embedded-1.1/tree/arquillian
diff --git a/inject-tck-runner/pom.xml b/inject-tck-runner/pom.xml
index 571ccc3..8b76dbb 100644
--- a/inject-tck-runner/pom.xml
+++ b/inject-tck-runner/pom.xml
@@ -44,7 +44,7 @@
</dependency>
<dependency>
- <groupId>org.jboss.weld.arquillian.container</groupId>
+ <groupId>org.jboss.arquillian.container</groupId>
@RunWith(Arquillian.class)
public class BeforeAfterTest {
@Deployment(name = "X") @TargetsContainer("A")
public static void WebArchive create1() {}
@Deployment(name = "Y") @TargetsContainer("B")
public static void WebArchive create1() {}
// executed incontainer with testInContainerOnContainerA
public class IronJacamarDescriptor implements Descriptor {
private String name;
private InputStream content;
public IronJacamarDescriptor(String name, InputStream content)
{
this.name = name;
this.content = content;
}