[seam-commits] Seam SVN: r14592 - in branches/community/Seam_2_3/examples-ee6/registration/registration-tests: src/test/java/org/jboss/seam/example/registration/test and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Apr 16 12:06:54 EDT 2012
Author: maschmid
Date: 2012-04-16 12:06:53 -0400 (Mon, 16 Apr 2012)
New Revision: 14592
Added:
branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/arquillian.xml
branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/web.xml
Modified:
branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java
Log:
registration seamtest fix
Modified: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml 2012-04-16 15:46:07 UTC (rev 14591)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/pom.xml 2012-04-16 16:06:53 UTC (rev 14592)
@@ -52,11 +52,30 @@
<groupId>org.seleniumhq.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
</dependency>
+
<dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.arquillian.protocol</groupId>
+ <artifactId>arquillian-protocol-servlet</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>functional-tests</artifactId>
<scope>test</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.spec.javax.el</groupId>
+ <artifactId>jboss-el-api_2.2_spec</artifactId>
+ </dependency>
+
</dependencies>
<build>
@@ -65,6 +84,9 @@
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
+ <testResource>
+ <directory>src/test/resources-integration</directory>
+ </testResource>
</testResources>
<plugins>
<plugin>
@@ -78,7 +100,45 @@
</build>
<profiles>
+
<profile>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>arquillian</name>
+ </property>
+ </activation>
+ </profile>
+
+ <profile>
+ <id>arq-jbossas-7-managed</id>
+ <activation>
+ <property>
+ <name>arquillian</name>
+ <value>jbossas-managed-7</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>arq-jbossas-7-remote</id>
+ <activation>
+ <property>
+ <name>arquillian</name>
+ <value>jbossas-remote-7</value>
+ </property>
+ </activation>
+ </profile>
+
+ <profile>
<id>ftest-jbossas</id>
<properties>
<example.context.path>seam-registration</example.context.path>
Modified: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java 2012-04-16 15:46:07 UTC (rev 14591)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/java/org/jboss/seam/example/registration/test/RegisterTest.java 2012-04-16 16:06:53 UTC (rev 14592)
@@ -1,15 +1,40 @@
//$Id: RegisterTest.java 10428 2009-04-15 21:54:38Z norman.richards at jboss.com $
package org.jboss.seam.example.registration.test;
+import java.io.File;
+
import javax.faces.context.FacesContext;
-import org.jboss.seam.mock.SeamTest;
-import org.testng.annotations.Test;
-import org.junit.Ignore;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.mock.JUnitSeamTest;
+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;
- at Ignore
-public class RegisterTest extends SeamTest
+ at RunWith(Arquillian.class)
+public class RegisterTest extends JUnitSeamTest
{
+ @Deployment(name="RegisterTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-registration.ear").importFrom(new File("../registration-ear/target/seam-registration.ear"))
+ .as(EnterpriseArchive.class);
+ WebArchive web = er.getAsType(WebArchive.class, "registration-web.war");
+ web.addClasses(RegisterTest.class);
+
+ // Install org.jboss.seam.mock.MockSeamListener
+ web.delete("/WEB-INF/web.xml");
+ web.addAsWebInfResource("web.xml");
+
+ return er;
+ }
@Test
public void testLogin() throws Exception
Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/arquillian.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/arquillian.xml 2012-04-16 16:06:53 UTC (rev 14592)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://jboss.org/schema/arquillian"
+ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <engine>
+ <property name="deploymentExportPath">target/</property>
+ </engine>
+
+ <container qualifier="jboss" default="true">
+ <configuration>
+ <property name="javaVmArguments">-Xmx1024m -XX:MaxPermSize=512m</property>
+ <property name="jbossHome">target/jboss-as-${version.jbossas7}</property>
+ </configuration>
+ </container>
+
+</arquillian>
Added: branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/web.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/registration/registration-tests/src/test/resources-integration/web.xml 2012-04-16 16:06:53 UTC (rev 14592)
@@ -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>
More information about the seam-commits
mailing list