Created
October 10, 2013 23:37
-
-
Save johnament/6927348 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo; | |
import org.junit.Test; | |
import org.jboss.arquillian.container.test.api.Deployment; | |
import org.jboss.arquillian.junit.Arquillian; | |
import org.jboss.shrinkwrap.api.ShrinkWrap; | |
import org.jboss.shrinkwrap.api.asset.EmptyAsset; | |
import org.jboss.shrinkwrap.api.spec.JavaArchive; | |
import org.junit.runner.RunWith; | |
import javax.enterprise.event.Event; | |
import javax.inject.Inject; | |
@RunWith(Arquillian.class) | |
public class BeansTest { | |
@Deployment | |
public static JavaArchive createDeployment() { | |
return ShrinkWrap.create(JavaArchive.class) | |
// .addClass(StubUserBean.class).addClass(Event.class) | |
// .addClass(UserLoginAttemptEvent.class) | |
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml"); | |
} | |
@Inject | |
private Event<Object> objEvent; | |
@Test | |
public void testSendEvent() { | |
objEvent.fire("foo bar"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.tad.jee7</groupId> | |
<artifactId>javaee7-playground-tst</artifactId> | |
<packaging>jar</packaging> | |
<url>http://www.cnn.com</url> | |
<version>0.0.1-SNAPSHOT</version> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>org.jboss.arquillian</groupId> | |
<artifactId>arquillian-bom</artifactId> | |
<version>1.1.1.Final</version> | |
<scope>import</scope> | |
<type>pom</type> | |
</dependency> | |
</dependencies> | |
</dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.11</version> | |
<scope>test</scope> | |
</dependency> | |
<!-- Arquillian Dependencies --> | |
<dependency> | |
<groupId>org.jboss.shrinkwrap</groupId> | |
<artifactId>shrinkwrap-api</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.jboss.shrinkwrap</groupId> | |
<artifactId>shrinkwrap-impl-base</artifactId> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.jboss.arquillian.junit</groupId> | |
<artifactId>arquillian-junit-container</artifactId> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.jboss.arquillian.container</groupId> | |
<artifactId>arquillian-weld-ee-embedded-1.1</artifactId> | |
<version>1.0.0.CR3</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.jboss.weld</groupId> | |
<artifactId>weld-core</artifactId> | |
<version>1.1.5.Final</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>javax.ejb</groupId> | |
<artifactId>ejb-api</artifactId> | |
<version>3.0</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.jboss.spec</groupId> | |
<artifactId>jboss-javaee-6.0</artifactId> | |
<version>1.0.0.Final</version> | |
<type>pom</type> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<finalName>playground</finalName> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment