Skip to content

Instantly share code, notes, and snippets.

View gist:768579
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 Mar 15, 2011
Arquillian Container Deployment SPI, multiple known types, multiple interfaces
View ArquillianContainerSPI_1.java
public interface Container
{
}
public interface ControllableContainer extends Container
{
void setup();
void start();
void stop();
@aslakknutsen
aslakknutsen / ContextualDeploymentFromDifferentContainer.java
Created Mar 21, 2011
(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
View ContextualDeploymentFromDifferentContainer.java
@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 Mar 23, 2011
JAX-RS Arquillian TestCase with @ArquillianResource injection
View CustomerResourceClientTest.java
@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 Mar 23, 2011
GlassFish Embedded 3.1
View arquillian.xml
<?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 Mar 24, 2011
Arquillian Repo Split
View gist:884933
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
View ironjacamar-arq-alpha5.patch
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 Mar 29, 2011
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
View arquillian_weld_ee_container.patch
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>
View BeforeAfterTest.java
@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
View IronJacamarDescriptor.java
public class IronJacamarDescriptor implements Descriptor {
private String name;
private InputStream content;
public IronJacamarDescriptor(String name, InputStream content)
{
this.name = name;
this.content = content;
}