[seam-commits] Seam SVN: r15055 - in branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests: src and 4 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Aug 16 10:13:24 EDT 2012
Author: maschmid
Date: 2012-08-16 10:13:24 -0400 (Thu, 16 Aug 2012)
New Revision: 15055
Added:
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml
Modified:
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java
branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java
Log:
dvdstore-tests, deploy tests as a war
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/pom.xml 2012-08-16 14:13:24 UTC (rev 15055)
@@ -11,6 +11,11 @@
<groupId>org.jboss.seam.examples-ee6.dvdstore</groupId>
<artifactId>dvdstore-tests</artifactId>
<name>Dvdstore Integration Tests Module (EE6)</name>
+ <packaging>war</packaging>
+
+ <properties>
+ <jndiPattern>java:app/seam-dvdstore/#{ejbName}</jndiPattern>
+ </properties>
<dependencies>
<dependency>
@@ -18,13 +23,73 @@
<artifactId>dvdstore-ejb</artifactId>
<type>ejb</type>
<scope>test</scope>
- </dependency>
+ </dependency>
+
<dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>jbpm-jpdl</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.jackrabbit</groupId>
+ <artifactId>jackrabbit-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>hibernate-ehcache</artifactId>
+ <groupId>org.hibernate</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>dom4j</artifactId>
+ <groupId>dom4j</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-search</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>ejb3-persistence</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
- <scope>test</scope>
+ <scope>compile</scope>
</dependency>
+
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
@@ -38,10 +103,12 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
@@ -53,7 +120,7 @@
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
@@ -66,14 +133,15 @@
</dependency>
<dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>test</scope>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.el</groupId>
<artifactId>jboss-el-api_2.2_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
@@ -85,6 +153,17 @@
</dependencies>
<build>
+ <finalName>seam-dvdstore</finalName>
+
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>../dvdstore-ejb/src/main/resources</directory>
+ </resource>
+ </resources>
+
<testResources>
<testResource>
<directory>src/test/resources</directory>
@@ -109,6 +188,37 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp</directory>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <!-- Get jboss-deployment-strucutre.xml and the datasource. -->
+ <targetPath>WEB-INF</targetPath>
+ <directory>../dvdstore-ear/src/main/application/META-INF/</directory>
+ </resource>
+ <resource>
+ <!-- Get ejb-jar.xml -->
+ <targetPath>WEB-INF</targetPath>
+ <directory>../dvdstore-ejb/src/main/resources/META-INF/</directory>
+ <includes>
+ <include>ejb-jar.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>../dvdstore-web/src/main/webapp</directory>
+ <includes>
+ <include>WEB-INF/pages.xml</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
Added: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/components.xml 2012-08-16 14:13:24 UTC (rev 15055)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.org/schema/seam/components"
+ xmlns:core="http://jboss.org/schema/seam/core"
+ xmlns:bpm="http://jboss.org/schema/seam/bpm"
+ xmlns:persistence="http://jboss.org/schema/seam/persistence"
+ xmlns:security="http://jboss.org/schema/seam/security"
+ xmlns:framework="http://jboss.org/schema/seam/framework"
+ xmlns:transaction="http://jboss.org/schema/seam/transaction"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation=
+ "http://jboss.org/schema/seam/core http://jboss.org/schema/seam/core-2.3.xsd
+ http://jboss.org/schema/seam/framework http://jboss.org/schema/seam/transaction-2.3.xsd
+ http://jboss.org/schema/seam/bpm http://jboss.org/schema/seam/bpm-2.3.xsd
+ http://jboss.org/schema/seam/persistence http://jboss.org/schema/seam/persistence-2.3.xsd
+ http://jboss.org/schema/seam/security http://jboss.org/schema/seam/security-2.3.xsd
+ http://jboss.org/schema/seam/framework http://jboss.org/schema/seam/framework-2.3.xsd
+ http://jboss.org/schema/seam/components http://jboss.org/schema/seam/components-2.3.xsd">
+
+ <core:init debug="true" jndi-pattern="@jndiPattern@"/>
+ <transaction:ejb-transaction/>
+
+ <!-- 120 second conversation timeout -->
+ <core:manager conversation-timeout="120000"/>
+
+ <bpm:jbpm>
+ <bpm:process-definitions>
+ <value>ordermanagement1.jpdl.xml</value>
+ </bpm:process-definitions>
+ </bpm:jbpm>
+
+ <security:identity authenticate-method="#{authenticator.authenticate}"/>
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+ persistence-unit-jndi-name="java:/dvdstoreEntityManagerFactory" />
+
+ <factory name="order"
+ value="#{orderHome.instance}"
+ scope="stateless"
+ auto-create="true"/>
+ <framework:entity-home name="orderHome"
+ entity-class="com.jboss.dvd.seam.Order"
+ scope="conversation"
+ auto-create="true">
+ <framework:id>#{orderId}</framework:id>
+ </framework:entity-home>
+
+
+ <framework:entity-query name="allCategories"
+ ejbql="select c from Category c"
+ order="c.name">
+ <!-- waiting for hibernate issue EJB-277
+ <framework:hints>
+ <key>org.hibernate.cacheable</key>
+ <value>true</value>
+ </framework:hints>
+ -->
+ </framework:entity-query>
+
+
+ <factory name="topProducts"
+ value="#{topQuery.resultList}" />
+ <framework:entity-query name="topQuery"
+ ejbql="select p from Product p"
+ order="p.inventory.sales desc"
+ max-results="8" />
+
+</components>
Added: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/main/webapp/WEB-INF/web.xml 2012-08-16 14:13:24 UTC (rev 15055)
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?>
+
+<web-app version="3.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <listener>
+ <listener-class>org.jboss.seam.mock.MockSeamListener</listener-class>
+ </listener>
+
+</web-app>
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/BestSellersTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -11,12 +11,12 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.Product;
@RunWith(Arquillian.class)
@@ -28,15 +28,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(BestSellersTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/OrderTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -16,13 +16,13 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.jboss.dvd.seam.Order;
import com.jboss.dvd.seam.Order.Status;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.Product;
import com.jboss.dvd.seam.ShoppingCart;
import com.jboss.dvd.seam.User;
@@ -36,15 +36,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(OrderTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Test
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/ProductUnitTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -12,33 +12,27 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.Product;
@RunWith(Arquillian.class)
public class ProductUnitTest
extends JUnitSeamTest
-{
-
+{
@Deployment(name = "ProductUnitTest")
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(ProductUnitTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Ignore //AS7-4576
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/SearchTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -12,12 +12,12 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.FullTextSearch;
import com.jboss.dvd.seam.Product;
@@ -29,15 +29,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(SearchTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Test
Modified: branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java 2012-08-16 10:52:51 UTC (rev 15054)
+++ branches/community/Seam_2_3/examples-ee6/dvdstore/dvdstore-tests/src/test/java/com/jboss/dvd/seam/test/StoreManagerTest.java 2012-08-16 14:13:24 UTC (rev 15055)
@@ -10,12 +10,12 @@
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import com.jboss.dvd.seam.Accept;
import com.jboss.dvd.seam.StoreManager;
@RunWith(Arquillian.class)
@@ -27,15 +27,10 @@
@OverProtocol("Servlet 3.0")
public static Archive<?> createDeployment()
{
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.ear").importFrom(new File("../dvdstore-ear/target/seam-dvdstore.ear")).as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "dvdstore-web.war");
- web.addClasses(StoreManagerTest.class);
-
- // Install org.jboss.seam.mock.MockSeamListener
- web.delete("/WEB-INF/web.xml");
- web.addAsWebInfResource("web.xml");
+ WebArchive web = ShrinkWrap.create(ZipImporter.class, "seam-dvdstore.war").importFrom(new File("target/seam-dvdstore.war")).as(WebArchive.class);
+ web.addPackages(true, Accept.class.getPackage());
- return er;
+ return web;
}
@Test
More information about the seam-commits
mailing list