Skip to content

Instantly share code, notes, and snippets.

@gbougeard
Created April 5, 2013 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbougeard/5320846 to your computer and use it in GitHub Desktop.
Save gbougeard/5320846 to your computer and use it in GitHub Desktop.
pom.xml
<profile>
<id>it</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<defaultGoal>verify</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<systemProperties>
<!-- Pour le mode embedded -->
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemProperties>
<environmentVariables>
<!-- Pour le mode managed -->
<JBOSS_HOME>/home/gbougeard/jboss-5.1.0.GA</JBOSS_HOME>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
</build>
<dependencies>
<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-jbossas-managed-5.1</artifactId>
<version>1.0.0.CR3</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-server-manager</artifactId>
<version>1.0.3.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>5.1.0.GA</version>
<type>pom</type>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-bom</artifactId>
<type>pom</type>
<version>1.1.2</version>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-bom</artifactId>
<type>pom</type>
<version>2.0.0-beta-2</version>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<type>pom</type>
<version>1.0.3.Final</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
@RunWith(Arquillian.class)
public class HotelCatalogBeanIT {
@Deployment
public static JavaArchive createDeployment() {
return ShrinkWrap.create(JavaArchive.class, "hotelCatalogBean.jar")
.addClasses(HotelCatalogBean.class, HotelCatalogService.class,
PartnerManagerBean.class, HotelPartnerService.class,
TextManagerBean.class, TextManagerService.class);
// .addManifestResource("test-persistence.xml", ArchivePaths.create("persistence.xml"));
}
@EJB
HotelCatalogService hotelCatalogService;
@Test
public void findIndexHotelTest() throws Exception {
Assert.assertTrue(!hotelCatalogService.findIndexHotel(2).isEmpty());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment