[seam-commits] Seam SVN: r14384 - in branches/community/Seam_2_3/examples-ee6/messages: messages-tests and 14 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Mar 12 16:30:48 EDT 2012
Author: dhinojosa
Date: 2012-03-12 16:30:45 -0400 (Mon, 12 Mar 2012)
New Revision: 14384
Added:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties
Removed:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties
Log:
restored message testing from the update svn merge . -r14346:14345
Property changes on: branches/community/Seam_2_3/examples-ee6/messages/messages-tests
___________________________________________________________________
Added: svn:ignore
+ *.iml
target
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
- <parent>
- <artifactId>messages</artifactId>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <version>2.3.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <artifactId>messages-tests</artifactId>
- <name>Messages Integration Tests Module (EE6)</name>
-
- <dependencies>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <artifactId>messages-ejb</artifactId>
- <type>ejb</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-jsf2</artifactId>
- <type>ejb</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.seleniumhq.selenium.server</groupId>
- <artifactId>selenium-server</artifactId>
- <classifier>standalone</classifier>
- </dependency>
- <dependency>
- <groupId>org.seleniumhq.selenium.client-drivers</groupId>
- <artifactId>selenium-java-client-driver</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>functional-tests</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</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.protocol</groupId>
- <artifactId>arquillian-protocol-servlet</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <filtering>true</filtering>
- </testResource>
- <testResource>
- <directory>src/test/resources-integration</directory>
- </testResource>
- </testResources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </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-messages</example.context.path>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jboss-maven-plugin</artifactId>
- <configuration>
- <jbossHome>${jboss.home}</jbossHome>
- <serverName>${jboss.domain}</serverName>
- <fileNames>
- <param>${basedir}/../messages-ear/target/seam-messages.ear</param>
- </fileNames>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>selenium-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>failsafe-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>ftest-tomcat</id>
- <properties>
- <example.context.path>jboss-seam-messages</example.context.path>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>selenium-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>failsafe-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <parent>
+ <artifactId>messages</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <artifactId>messages-tests</artifactId>
+ <name>Messages Integration Tests Module (EE6)</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <artifactId>messages-ejb</artifactId>
+ <type>ejb</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jsf2</artifactId>
+ <type>ejb</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium.server</groupId>
+ <artifactId>selenium-server</artifactId>
+ <classifier>standalone</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+ <artifactId>selenium-java-client-driver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>functional-tests</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</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.protocol</groupId>
+ <artifactId>arquillian-protocol-servlet</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources-integration</directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </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-messages</example.context.path>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-maven-plugin</artifactId>
+ <configuration>
+ <jbossHome>${jboss.home}</jbossHome>
+ <serverName>${jboss.domain}</serverName>
+ <fileNames>
+ <param>${basedir}/../messages-ear/target/seam-messages.ear</param>
+ </fileNames>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>ftest-tomcat</id>
+ <properties>
+ <example.context.path>jboss-seam-messages</example.context.path>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,115 +0,0 @@
-//$Id: MessageListTest.java 2383 2006-10-26 18:53:00Z gavin $
-package org.jboss.seam.example.messages.test;
-import javax.faces.model.DataModel;
-
-import java.io.File;
-
-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.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.junit.runner.RunWith;
-import org.junit.Test;
-
- at RunWith(Arquillian.class)
-public class MessageListTest extends JUnitSeamTest
-{
- @Deployment(name="MessageListTest")
- @OverProtocol("Servlet 3.0")
- public static Archive<?> createDeployment()
- {
- EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-messages.ear").importFrom(new File("../messages-ear/target/seam-messages.ear"))
- .as(EnterpriseArchive.class);
- WebArchive web = er.getAsType(WebArchive.class, "messages-web.war");
- web.addClasses(MessageListTest.class);
-
- return er;
- }
-
- @Test
- public void testMessageList() throws Exception
- {
- new NonFacesRequest()
- {
-
- @Override
- protected void renderResponse() throws Exception {
- DataModel list = (DataModel) getInstance("messageList");
- assert list.getRowCount()==2;
- }
-
- }.run();
-
- new FacesRequest()
- {
-
- @Override
- protected void updateModelValues() throws Exception {
- DataModel list = (DataModel) getInstance("messageList");
- assert list.getRowCount()==2;
- list.setRowIndex(1);
- }
-
-
- @Override
- protected void invokeApplication() throws Exception {
- invokeMethod("#{messageManager.select}");
- }
-
-
- @Override
- protected void renderResponse() throws Exception {
- DataModel list = (DataModel) getInstance("messageList");
- assert list.getRowCount()==2;
- assert getValue("#{message.title}").equals("Hello World");
- assert getValue("#{message.read}").equals(true);
- }
-
- }.run();
-
- new FacesRequest()
- {
-
- @Override
- protected void updateModelValues() throws Exception {
- DataModel list = (DataModel) getInstance("messageList");
- assert list.getRowCount()==2;
- list.setRowIndex(0);
- }
-
-
- @Override
- protected void invokeApplication() throws Exception {
- invokeMethod("#{messageManager.delete}");
- }
-
-
- @Override
- protected void renderResponse() throws Exception {
- DataModel list = (DataModel) getInstance("messageList");
- assert list.getRowCount()==1;
- }
-
- }.run();
-
- new NonFacesRequest()
- {
-
- @Override
- protected void renderResponse() throws Exception {
- DataModel list = (DataModel) getInstance("messageList");
- assert list.getRowCount()==1;
- }
-
- }.run();
-
- }
-
-}
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java 2012-03-12 20:30:45 UTC (rev 14384)
@@ -0,0 +1,115 @@
+//$Id: MessageListTest.java 2383 2006-10-26 18:53:00Z gavin $
+package org.jboss.seam.example.messages.test;
+import javax.faces.model.DataModel;
+
+import java.io.File;
+
+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.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.junit.runner.RunWith;
+import org.junit.Test;
+
+ at RunWith(Arquillian.class)
+public class MessageListTest extends JUnitSeamTest
+{
+ @Deployment(name="MessageListTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class, "seam-messages.ear").importFrom(new File("../messages-ear/target/seam-messages.ear"))
+ .as(EnterpriseArchive.class);
+ WebArchive web = er.getAsType(WebArchive.class, "messages-web.war");
+ web.addClasses(MessageListTest.class);
+
+ return er;
+ }
+
+ @Test
+ public void testMessageList() throws Exception
+ {
+ new NonFacesRequest()
+ {
+
+ @Override
+ protected void renderResponse() throws Exception {
+ DataModel list = (DataModel) getInstance("messageList");
+ assert list.getRowCount()==2;
+ }
+
+ }.run();
+
+ new FacesRequest()
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ DataModel list = (DataModel) getInstance("messageList");
+ assert list.getRowCount()==2;
+ list.setRowIndex(1);
+ }
+
+
+ @Override
+ protected void invokeApplication() throws Exception {
+ invokeMethod("#{messageManager.select}");
+ }
+
+
+ @Override
+ protected void renderResponse() throws Exception {
+ DataModel list = (DataModel) getInstance("messageList");
+ assert list.getRowCount()==2;
+ assert getValue("#{message.title}").equals("Hello World");
+ assert getValue("#{message.read}").equals(true);
+ }
+
+ }.run();
+
+ new FacesRequest()
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ DataModel list = (DataModel) getInstance("messageList");
+ assert list.getRowCount()==2;
+ list.setRowIndex(0);
+ }
+
+
+ @Override
+ protected void invokeApplication() throws Exception {
+ invokeMethod("#{messageManager.delete}");
+ }
+
+
+ @Override
+ protected void renderResponse() throws Exception {
+ DataModel list = (DataModel) getInstance("messageList");
+ assert list.getRowCount()==1;
+ }
+
+ }.run();
+
+ new NonFacesRequest()
+ {
+
+ @Override
+ protected void renderResponse() throws Exception {
+ DataModel list = (DataModel) getInstance("messageList");
+ assert list.getRowCount()==1;
+ }
+
+ }.run();
+
+ }
+
+}
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.seam.example.messages.test.selenium;
-
-import java.text.MessageFormat;
-
-import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
-import static org.testng.AssertJUnit.assertTrue;
-import static org.testng.AssertJUnit.assertFalse;
-import static org.testng.AssertJUnit.assertEquals;
-
-/**
- * Test for messages example
- * @author Jozef Hartinger
- *
- */
-public class MessageTest extends SeamSeleniumTest
-{
-
- public static final String MESSAGES_URL = "/messages.seam";
- public static final String MESSAGES_LINK = "messages:{0}:link";
- public static final String MESSAGES_DELETE = "messages:{0}:delete";
- public static final String MESSAGES_CHECKBOX = "messages:{0}:read";
- public static final String MESSAGES_COUNT = "//table[@id='messages']/tbody/tr";
- public static final String MESSAGE_TITLE = "title";
- public static final String MESSAGE_TEXT = "text";
-
- @Override
- @BeforeMethod
- public void setUp()
- {
- super.setUp();
- browser.open(CONTEXT_PATH + MESSAGES_URL);
- }
-
- @Test(dataProvider = "messages")
- public void readMessageTest(int i, String title, String text)
- {
- browser.clickAndWait(MessageFormat.format(MESSAGES_LINK, i));
- assertEquals("Unexpected message title displayed.", title, browser.getText(MESSAGE_TITLE));
- assertEquals("Unexpected message text displayed.", text, browser.getText(MESSAGE_TEXT));
- assertTrue("Checkbox should be checked after message is read.", browser.isChecked(MessageFormat.format(MESSAGES_CHECKBOX, i)));
- }
-
- @Test(dependsOnMethods = {"readMessageTest"}, dataProvider = "messages")
- public void deleteMessageTest(int i, String title, String name)
- {
- int messageCount = browser.getXpathCount(MESSAGES_COUNT).intValue();
- // delete first message in a table
- browser.clickAndWait(MessageFormat.format(MESSAGES_DELETE, 0));
- assertEquals("Unexpected count of messages.", --messageCount, browser.getXpathCount(MESSAGES_COUNT));
- assertFalse("Message title still present.", browser.isTextPresent(title));
- }
-
- @DataProvider(name = "messages")
- public Object[][] getMessages()
- {
- Object[][] messages = { { 0, "Greetings Earthling", "This is another example of a message." }, { 1, "Hello World", "This is an example of a message." } };
- return messages;
- }
-}
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/selenium/MessageTest.java 2012-03-12 20:30:45 UTC (rev 14384)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.messages.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * Test for messages example
+ * @author Jozef Hartinger
+ *
+ */
+public class MessageTest extends SeamSeleniumTest
+{
+
+ public static final String MESSAGES_URL = "/messages.seam";
+ public static final String MESSAGES_LINK = "messages:{0}:link";
+ public static final String MESSAGES_DELETE = "messages:{0}:delete";
+ public static final String MESSAGES_CHECKBOX = "messages:{0}:read";
+ public static final String MESSAGES_COUNT = "//table[@id='messages']/tbody/tr";
+ public static final String MESSAGE_TITLE = "title";
+ public static final String MESSAGE_TEXT = "text";
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + MESSAGES_URL);
+ }
+
+ @Test(dataProvider = "messages")
+ public void readMessageTest(int i, String title, String text)
+ {
+ browser.clickAndWait(MessageFormat.format(MESSAGES_LINK, i));
+ assertEquals("Unexpected message title displayed.", title, browser.getText(MESSAGE_TITLE));
+ assertEquals("Unexpected message text displayed.", text, browser.getText(MESSAGE_TEXT));
+ assertTrue("Checkbox should be checked after message is read.", browser.isChecked(MessageFormat.format(MESSAGES_CHECKBOX, i)));
+ }
+
+ @Test(dependsOnMethods = {"readMessageTest"}, dataProvider = "messages")
+ public void deleteMessageTest(int i, String title, String name)
+ {
+ int messageCount = browser.getXpathCount(MESSAGES_COUNT).intValue();
+ // delete first message in a table
+ browser.clickAndWait(MessageFormat.format(MESSAGES_DELETE, 0));
+ assertEquals("Unexpected count of messages.", --messageCount, browser.getXpathCount(MESSAGES_COUNT));
+ assertFalse("Message title still present.", browser.isTextPresent(title));
+ }
+
+ @DataProvider(name = "messages")
+ public Object[][] getMessages()
+ {
+ Object[][] messages = { { 0, "Greetings Earthling", "This is another example of a message." }, { 1, "Hello World", "This is an example of a message." } };
+ return messages;
+ }
+}
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<components xmlns="http://jboss.com/products/seam/components"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
-
- <component name="org.jboss.seam.core.init">
- <property name="jndiPattern">#{ejbName}/local</property>
- </component>
-
-</components>
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/WEB-INF/components.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
+
+ <component name="org.jboss.seam.core.init">
+ <property name="jndiPattern">#{ejbName}/local</property>
+ </component>
+
+</components>
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
- "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
-<datasources>
- <local-tx-datasource>
- <jndi-name>jboss/datasources/ExampleDS</jndi-name>
- <connection-url>jdbc:hsqldb:.</connection-url>
- <driver-class>org.hsqldb.jdbcDriver</driver-class>
- <user-name>sa</user-name>
- </local-tx-datasource>
-</datasources>
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/jboss-seam-messaging-ds.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>jboss/datasources/ExampleDS</jndi-name>
+ <connection-url>jdbc:hsqldb:.</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ </local-tx-datasource>
+</datasources>
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,3 +0,0 @@
-#debug is explicitly disabled in test to avoid JBIDE-3623
-#Thu Dec 31 16:24:37 CET 2009
-org.jboss.seam.core.init.debug=false
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources/seam.properties 2012-03-12 20:30:45 UTC (rev 14384)
@@ -0,0 +1,3 @@
+#debug is explicitly disabled in test to avoid JBIDE-3623
+#Thu Dec 31 16:24:37 CET 2009
+org.jboss.seam.core.init.debug=false
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,26 +0,0 @@
-
- <!--
- JBoss, Home of Professional Open Source Copyright 2008, Red Hat
- Middleware LLC, and individual contributors by the @authors tag. See
- the copyright.txt in the distribution for a full listing of individual
- contributors. This is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version. This software is
- distributed in the hope that it will be useful, but WITHOUT ANY
- WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
- License for more details. You should have received a copy of the GNU
- Lesser General Public License along with this software; if not, write
- to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- -->
-<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-<suite name="Messages example" verbose="2" parallel="false">
- <test name="messages_tests">
- <parameter name="PROPERTY_FILE" value="" />
- <classes>
- <class name="org.jboss.seam.example.messages.test.selenium.MessageTest" />
- </classes>
- </test>
-</suite>
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-ftest/testng.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -0,0 +1,26 @@
+
+ <!--
+ JBoss, Home of Professional Open Source Copyright 2008, Red Hat
+ Middleware LLC, and individual contributors by the @authors tag. See
+ the copyright.txt in the distribution for a full listing of individual
+ contributors. This is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version. This software is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details. You should have received a copy of the GNU
+ Lesser General Public License along with this software; if not, write
+ to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Messages example" verbose="2" parallel="false">
+ <test name="messages_tests">
+ <parameter name="PROPERTY_FILE" value="" />
+ <classes>
+ <class name="org.jboss.seam.example.messages.test.selenium.MessageTest" />
+ </classes>
+ </test>
+</suite>
Deleted: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml 2012-03-06 12:01:31 UTC (rev 14345)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -1,17 +0,0 @@
-<?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>
Copied: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml (from rev 14345, branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml)
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml 2012-03-12 20:30:45 UTC (rev 14384)
@@ -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>
More information about the seam-commits
mailing list