You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/09/08 05:28:22 UTC

svn commit: r993597 - in /myfaces/gsoc/webapptest/examples: ./ simple/ simple/src/ simple/src/main/ simple/src/main/java/ simple/src/main/java/org/ simple/src/main/java/org/apache/ simple/src/main/java/org/apache/myfaces/ simple/src/main/java/org/apach...

Author: lu4242
Date: Wed Sep  8 03:28:21 2010
New Revision: 993597

URL: http://svn.apache.org/viewvc?rev=993597&view=rev
Log:
reformat examples module

Added:
    myfaces/gsoc/webapptest/examples/simple/   (with props)
    myfaces/gsoc/webapptest/examples/simple/pom.xml
    myfaces/gsoc/webapptest/examples/simple/src/
    myfaces/gsoc/webapptest/examples/simple/src/main/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/org/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/webapp/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/webapp/examples/
    myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/webapp/examples/ExampleBean.java
    myfaces/gsoc/webapptest/examples/simple/src/main/resources/
    myfaces/gsoc/webapptest/examples/simple/src/main/webapp/
    myfaces/gsoc/webapptest/examples/simple/src/main/webapp/META-INF/
    myfaces/gsoc/webapptest/examples/simple/src/main/webapp/META-INF/MANIFEST.MF
    myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/
    myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/web.xml
    myfaces/gsoc/webapptest/examples/simple/src/main/webapp/test.xhtml
    myfaces/gsoc/webapptest/examples/simple/src/site/
    myfaces/gsoc/webapptest/examples/simple/src/test/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/ExampleTestCase.java
    myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/MyWebappTestCase.java
    myfaces/gsoc/webapptest/examples/simple/src/test/resources/
    myfaces/gsoc/webapptest/examples/simple/src/test/resources/arquillian.xml
    myfaces/gsoc/webapptest/examples/simple/src/test/resources/jndi.properties
    myfaces/gsoc/webapptest/examples/simple/src/test/resources/log4j.xml
Removed:
    myfaces/gsoc/webapptest/examples/src/
Modified:
    myfaces/gsoc/webapptest/examples/pom.xml

Modified: myfaces/gsoc/webapptest/examples/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/pom.xml?rev=993597&r1=993596&r2=993597&view=diff
==============================================================================
--- myfaces/gsoc/webapptest/examples/pom.xml (original)
+++ myfaces/gsoc/webapptest/examples/pom.xml Wed Sep  8 03:28:21 2010
@@ -9,230 +9,12 @@
         <artifactId>webapp-tests-project</artifactId>
         <version>1.0.0-SNAPSHOT</version>
     </parent>
-    <artifactId>webapp-tests-examples</artifactId>
-    <packaging>jar</packaging>
-    <name>MyFaces Automated Webapp Tests Examples</name>
-
-    <dependencies>
-        <!-- Internal dependency on another module -->
-        <dependency>
-            <groupId>org.apache.myfaces.test</groupId>
-            <artifactId>webapp-tests-api</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.myfaces.test</groupId>
-            <artifactId>webapp-tests-impl</artifactId>
-            <version>${project.version}</version>
-            <scope>test</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-        </dependency>       
-
-        <dependency>
-            <groupId>org.apache.myfaces.core</groupId>
-            <artifactId>myfaces-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.myfaces.core</groupId>
-            <artifactId>myfaces-impl</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>javax.inject</groupId>
-            <artifactId>javax.inject</artifactId>
-            <version>1</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.enterprise</groupId>
-            <artifactId>cdi-api</artifactId>
-            <version>1.0-SP1</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.el</groupId>
-            <artifactId>el-api</artifactId>
-            <version>2.2</version>
-            <scope>compile</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <testResources>
-            <testResource>
-                <directory>src/test/resources</directory>
-            </testResource>
-            <testResource>
-                <directory>src/main/webapp</directory>
-            </testResource>
-        </testResources>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>org/apache/myfaces/test/webapp/examples/*</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build> 
+    <artifactId>webapp-tests-examples-base</artifactId>
+    <packaging>pom</packaging>
+    <name>MyFaces Automated Webapp Tests Example Base Module</name>
     
-   <profiles>
-
-        <profile>
-            <id>tomcat-embedded</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-
-            <dependencies>
-                <dependency>
-                    <groupId>org.jboss.arquillian.container</groupId>
-                    <artifactId>arquillian-tomcat-embedded-6</artifactId>
-                    <version>${arquillian.version}</version>
-                </dependency>
-
-                <dependency>
-                    <groupId>org.apache.tomcat</groupId>
-                    <artifactId>catalina</artifactId>
-                    <version>6.0.26</version>
-                    <scope>test</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.tomcat</groupId>
-                    <artifactId>coyote</artifactId>
-                    <version>6.0.26</version>
-                    <scope>provided</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.tomcat</groupId>
-                    <artifactId>jasper</artifactId>
-                    <version>6.0.26</version>
-                    <scope>provided</scope>
-                </dependency>
-                <!-- Weld servlet, EL and JSP required for testing CDI injections -->
-<!--                <dependency>
-                    <groupId>org.jboss.weld.servlet</groupId>
-                    <artifactId>weld-servlet</artifactId>
-                    <version>1.0.1-Final</version>
-                    <scope>test</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.glassfish.web</groupId>
-                    <artifactId>el-impl</artifactId>
-                    <version>2.2</version>
-                    <scope>test</scope>
-                </dependency>-->
-<!--                <dependency>
-                    <groupId>javax.servlet.jsp</groupId>
-                    <artifactId>jsp-api</artifactId>
-                    <version>2.2</version>
-                    <scope>test</scope>
-                </dependency>-->
-            </dependencies>
-
-
-        </profile>
-
-        <profile>
-            <id>jbossas-remote-60</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-
-            <dependencies>
-                <dependency>
-                    <groupId>org.jboss.arquillian.container</groupId>
-                    <artifactId>arquillian-jbossas-remote-60</artifactId>
-                    <version>${arquillian.version}</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>6.0.0.20100429-M3</version>
-                    <type>pom</type>
-                </dependency>
-            </dependencies>
-        </profile>
-
-        <profile>
-            <id>openwebbeans-embedded</id>
-            <dependencies>
-                <dependency>
-                    <groupId>org.jboss.arquillian.container</groupId>
-                    <artifactId>arquillian-openwebbeans-embedded</artifactId>
-                    <version>${arquillian.version}</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-spi</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.openwebbeans</groupId>
-                    <artifactId>openwebbeans-impl</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-el_2.2_spec</artifactId>
-                    <version>1.0</version>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jta_1.1_spec</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-validation_1.0_spec</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.apache.geronimo.specs</groupId>
-                    <artifactId>geronimo-servlet_2.5_spec</artifactId>
-                </dependency>
-            </dependencies>
-            <dependencyManagement>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.apache.openwebbeans</groupId>
-                        <artifactId>openwebbeans</artifactId>
-                        <version>1.0.0-M4</version>
-                        <type>pom</type>
-                        <scope>import</scope>
-                    </dependency>
-                </dependencies>
-            </dependencyManagement>
-        </profile>
-
-    </profiles>
+    <modules>
+        <module>simple</module>
+    </modules>
 
 </project>
\ No newline at end of file

Propchange: myfaces/gsoc/webapptest/examples/simple/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Sep  8 03:28:21 2010
@@ -0,0 +1,4 @@
+*.classpath
+*.project
+*.settings
+target

Added: myfaces/gsoc/webapptest/examples/simple/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/pom.xml?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/pom.xml (added)
+++ myfaces/gsoc/webapptest/examples/simple/pom.xml Wed Sep  8 03:28:21 2010
@@ -0,0 +1,238 @@
+<?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/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+         
+    <parent>
+        <groupId>org.apache.myfaces.test</groupId>
+        <artifactId>webapp-tests-examples-base</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>webapp-tests-examples-simple</artifactId>
+    <packaging>jar</packaging>
+    <name>MyFaces Automated Webapp Tests Examples</name>
+
+    <dependencies>
+        <!-- Internal dependency on another module -->
+        <dependency>
+            <groupId>org.apache.myfaces.test</groupId>
+            <artifactId>webapp-tests-api</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.myfaces.test</groupId>
+            <artifactId>webapp-tests-impl</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+        </dependency>       
+
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.myfaces.core</groupId>
+            <artifactId>myfaces-impl</artifactId>
+        </dependency>
+        
+        <dependency>
+            <groupId>javax.inject</groupId>
+            <artifactId>javax.inject</artifactId>
+            <version>1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.enterprise</groupId>
+            <artifactId>cdi-api</artifactId>
+            <version>1.0-SP1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.el</groupId>
+            <artifactId>el-api</artifactId>
+            <version>2.2</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+            </testResource>
+            <testResource>
+                <directory>src/main/webapp</directory>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>org/apache/myfaces/test/webapp/examples/*</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build> 
+    
+   <profiles>
+
+        <profile>
+            <id>tomcat-embedded</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+
+            <dependencies>
+                <dependency>
+                    <groupId>org.jboss.arquillian.container</groupId>
+                    <artifactId>arquillian-tomcat-embedded-6</artifactId>
+                    <version>${arquillian.version}</version>
+                </dependency>
+
+                <dependency>
+                    <groupId>org.apache.tomcat</groupId>
+                    <artifactId>catalina</artifactId>
+                    <version>6.0.26</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.tomcat</groupId>
+                    <artifactId>coyote</artifactId>
+                    <version>6.0.26</version>
+                    <scope>provided</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.tomcat</groupId>
+                    <artifactId>jasper</artifactId>
+                    <version>6.0.26</version>
+                    <scope>provided</scope>
+                </dependency>
+                <!-- Weld servlet, EL and JSP required for testing CDI injections -->
+<!--                <dependency>
+                    <groupId>org.jboss.weld.servlet</groupId>
+                    <artifactId>weld-servlet</artifactId>
+                    <version>1.0.1-Final</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <groupId>org.glassfish.web</groupId>
+                    <artifactId>el-impl</artifactId>
+                    <version>2.2</version>
+                    <scope>test</scope>
+                </dependency>-->
+<!--                <dependency>
+                    <groupId>javax.servlet.jsp</groupId>
+                    <artifactId>jsp-api</artifactId>
+                    <version>2.2</version>
+                    <scope>test</scope>
+                </dependency>-->
+            </dependencies>
+
+
+        </profile>
+
+        <profile>
+            <id>jbossas-remote-60</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+
+            <dependencies>
+                <dependency>
+                    <groupId>org.jboss.arquillian.container</groupId>
+                    <artifactId>arquillian-jbossas-remote-60</artifactId>
+                    <version>${arquillian.version}</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>6.0.0.20100429-M3</version>
+                    <type>pom</type>
+                </dependency>
+            </dependencies>
+        </profile>
+
+        <profile>
+            <id>openwebbeans-embedded</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.jboss.arquillian.container</groupId>
+                    <artifactId>arquillian-openwebbeans-embedded</artifactId>
+                    <version>${arquillian.version}</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.openwebbeans</groupId>
+                    <artifactId>openwebbeans-spi</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.openwebbeans</groupId>
+                    <artifactId>openwebbeans-impl</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-el_2.2_spec</artifactId>
+                    <version>1.0</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-jta_1.1_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-validation_1.0_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-interceptor_1.1_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-atinject_1.0_spec</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-servlet_2.5_spec</artifactId>
+                </dependency>
+            </dependencies>
+            <dependencyManagement>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.openwebbeans</groupId>
+                        <artifactId>openwebbeans</artifactId>
+                        <version>1.0.0-M4</version>
+                        <type>pom</type>
+                        <scope>import</scope>
+                    </dependency>
+                </dependencies>
+            </dependencyManagement>
+        </profile>
+
+    </profiles>
+
+</project>
\ No newline at end of file

Added: myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/webapp/examples/ExampleBean.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/webapp/examples/ExampleBean.java?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/webapp/examples/ExampleBean.java (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/main/java/org/apache/myfaces/test/webapp/examples/ExampleBean.java Wed Sep  8 03:28:21 2010
@@ -0,0 +1,51 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.test.webapp.examples;
+
+import java.awt.event.ActionEvent;
+
+/**
+ * @author Cosmin Martinconi, 16.06.2010
+ */
+public class ExampleBean
+{
+
+    private String input = "default value";
+
+    public String getInput()
+    {
+        return input;
+    }
+
+    public void setInput(String input)
+    {
+        this.input = input;
+    }
+
+    public String action(){
+        input = "after action value";
+        return null;
+    }
+
+    public void actionListener(ActionEvent e)
+    {
+
+    }
+ 
+}

Added: myfaces/gsoc/webapptest/examples/simple/src/main/webapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/main/webapp/META-INF/MANIFEST.MF?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/main/webapp/META-INF/MANIFEST.MF (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/main/webapp/META-INF/MANIFEST.MF Wed Sep  8 03:28:21 2010
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+

Added: myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/faces-config.xml?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/faces-config.xml Wed Sep  8 03:28:21 2010
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+<faces-config 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-facesconfig_2_0.xsd" version="2.0">
+
+
+    <managed-bean>
+        <managed-bean-name>exampleBean</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.test.webapp.examples.ExampleBean</managed-bean-class>
+        <managed-bean-scope>request</managed-bean-scope>
+    </managed-bean>
+
+</faces-config>

Added: myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/web.xml?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/main/webapp/WEB-INF/web.xml Wed Sep  8 03:28:21 2010
@@ -0,0 +1,58 @@
+<?xml version = '1.0' encoding = 'ISO-8859-1'?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<web-app 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_2_5.xsd"
+         version="2.5">
+
+    <context-param>
+        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+        <param-value>.xhtml</param-value>
+    </context-param>
+
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet>
+       <servlet-name>ServletTestRunner</servlet-name>
+       <servlet-class>org.apache.myfaces.test.webapp.api.runner.WebappServletTestRunner</servlet-class>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>/faces/*</url-pattern>
+        <url-pattern>*.xhtml</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+       <servlet-name>ServletTestRunner</servlet-name>
+       <url-pattern>/ArquillianServletRunner</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>test.xhtml</welcome-file>
+    </welcome-file-list>
+
+</web-app>
+                                    
\ No newline at end of file

Added: myfaces/gsoc/webapptest/examples/simple/src/main/webapp/test.xhtml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/main/webapp/test.xhtml?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/main/webapp/test.xhtml (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/main/webapp/test.xhtml Wed Sep  8 03:28:21 2010
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->        
+
+<!DOCTYPE html
+        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core">
+
+<head>
+    <title>Automated webapp testing</title>
+</head>
+<body>
+    <h:form id="testForm">
+        <h:outputText value="Input field"/>
+        <h:inputText id="fieldId" value="#{exampleBean.input}"/>
+        <h:commandButton id="buttonId" action="#{exampleBean.action}"/>
+    </h:form>
+</body>
+</html>
\ No newline at end of file

Added: myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/ExampleTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/ExampleTestCase.java?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/ExampleTestCase.java (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/ExampleTestCase.java Wed Sep  8 03:28:21 2010
@@ -0,0 +1,72 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.test.webapp.examples;
+
+import org.apache.myfaces.test.webapp.api.annotation.*;
+import org.apache.myfaces.test.webapp.api.runner.WebappTestRunner;
+import org.apache.myfaces.test.webapp.api.tester.WebappTester;
+import org.jboss.arquillian.api.Deployment;
+
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import javax.faces.event.PhaseId;
+
+/**
+ * @author Cosmin Martinconi, 16.06.2010
+ */
+@View(id = "test.xhtml", pageBeans = @PageBean(clazz = ExampleBean.class))
+
+@RunWith(WebappTestRunner.class)
+public class ExampleTestCase{
+
+    @Tester
+    private static WebappTester webappTestCase;
+
+    @Assertable
+    private ExampleBean exampleBean;
+
+    @Deployment
+    public static Archive<?> createDeployment() {
+        return webappTestCase.createArchive(null);
+    }
+
+    @Test
+    public void testWithFailures() throws Exception {
+
+        webappTestCase.assertThat(exampleBean.getInput()).is("default value"). before(PhaseId.RENDER_RESPONSE);
+        webappTestCase.input("test value").into("testForm:fieldId");
+        webappTestCase.click("testForm:buttonId");
+
+        webappTestCase.assertThat(webappTestCase.getFacesContext().getExternalContext()).is("String");
+        webappTestCase.assertThat(exampleBean.getInput()).is("test value").before(PhaseId.INVOKE_APPLICATION);
+        webappTestCase.assertThat("#{exampleBean.input}").is("test value").after(PhaseId.INVOKE_APPLICATION);
+        webappTestCase.expectCall(exampleBean.action()).in(PhaseId.INVOKE_APPLICATION);
+        exampleBean.actionListener(null);
+        webappTestCase.expectLastCall().in(PhaseId.INVOKE_APPLICATION);}
+
+
+    @Test
+    public void testDummy() throws Exception {
+
+        //dummy test
+    }
+
+}
\ No newline at end of file

Added: myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/MyWebappTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/MyWebappTestCase.java?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/MyWebappTestCase.java (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/test/java/org/apache/myfaces/test/webapp/examples/MyWebappTestCase.java Wed Sep  8 03:28:21 2010
@@ -0,0 +1,68 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.test.webapp.examples;
+
+import javax.faces.event.PhaseId;
+
+import org.apache.myfaces.test.webapp.api.annotation.Assertable;
+import org.apache.myfaces.test.webapp.api.annotation.PageBean;
+import org.apache.myfaces.test.webapp.api.annotation.Tester;
+import org.apache.myfaces.test.webapp.api.annotation.View;
+import org.apache.myfaces.test.webapp.api.runner.WebappTestRunner;
+import org.apache.myfaces.test.webapp.api.tester.WebappTester;
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Jakob Korherr
+ */
+@View(id = "test.xhtml", pageBeans = @PageBean(clazz = ExampleBean.class))
+
+@RunWith(WebappTestRunner.class)
+public class MyWebappTestCase
+{
+
+    @Tester
+    private static WebappTester webappTestCase;
+
+    @Assertable
+    private ExampleBean exampleBean;
+
+    @Deployment
+    public static Archive<?> createDeployment()
+    {
+        return webappTestCase.createArchive(null);
+    }
+
+    @Test
+    public void testApplyInputValue() throws Exception
+    {
+        webappTestCase.assertThat(exampleBean.getInput()).is("default value").after(PhaseId.RENDER_RESPONSE);
+        webappTestCase.assertThat("#{exampleBean.input}").is("default value").after(PhaseId.RENDER_RESPONSE); 
+        
+        webappTestCase.input("test value").into("testForm:fieldId");
+        webappTestCase.click("testForm:buttonId");
+        
+        webappTestCase.assertThat(exampleBean.getInput()).is("test value").after(PhaseId.UPDATE_MODEL_VALUES);
+        webappTestCase.assertThat(exampleBean.getInput()).is("after action value").after(PhaseId.INVOKE_APPLICATION);
+    }
+    
+}

Added: myfaces/gsoc/webapptest/examples/simple/src/test/resources/arquillian.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/test/resources/arquillian.xml?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/test/resources/arquillian.xml (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/test/resources/arquillian.xml Wed Sep  8 03:28:21 2010
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<arquillian xmlns="http://jboss.com/arquillian"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xmlns:tomcat6="urn:arq:org.jboss.arquillian.container.tomcat.embedded_6">
+
+    <tomcat6:container>
+        <!-- must be true to use annotation scanning (access to WEB-INF/classes/) -->
+        <tomcat6:unpackArchive>true</tomcat6:unpackArchive>
+    </tomcat6:container>
+
+</arquillian>

Added: myfaces/gsoc/webapptest/examples/simple/src/test/resources/jndi.properties
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/test/resources/jndi.properties?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/test/resources/jndi.properties (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/test/resources/jndi.properties Wed Sep  8 03:28:21 2010
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming\:org.jnp.interfaces 
+java.naming.provider.url=jnp://localhost:1099
\ No newline at end of file

Added: myfaces/gsoc/webapptest/examples/simple/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/myfaces/gsoc/webapptest/examples/simple/src/test/resources/log4j.xml?rev=993597&view=auto
==============================================================================
--- myfaces/gsoc/webapptest/examples/simple/src/test/resources/log4j.xml (added)
+++ myfaces/gsoc/webapptest/examples/simple/src/test/resources/log4j.xml Wed Sep  8 03:28:21 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+    <appender name="console" class="org.apache.log4j.ConsoleAppender">
+        <param name="Target" value="System.out"/>
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="%-5p %m%n"/>
+        </layout>
+    </appender>
+
+    <category name="org">
+        <priority value="INFO"/>
+    </category>
+
+    <category name="com">
+        <priority value="INFO"/>
+    </category>
+
+    <category name="sun">
+        <priority value="INFO"/>
+    </category>
+
+    <root>
+        <priority value="debug"/>
+        <appender-ref ref="console"/>
+    </root>
+
+</log4j:configuration>
\ No newline at end of file