Added: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/index.jsp?rev=431139&view=auto
==============================================================================
--- shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/index.jsp 
(added)
+++ shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/index.jsp 
Sat Aug 12 20:09:20 2006
@@ -0,0 +1,21 @@
+<%--
+
+ Copyright 2006 The Apache Software Foundation.
+ 
+ Licensed 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.
+
+ $Id$
+
+--%>
+
+<jsp:forward page="/menu.faces"/>

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/index.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/menu.jsp
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/menu.jsp?rev=431139&view=auto
==============================================================================
--- shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/menu.jsp 
(added)
+++ shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/menu.jsp 
Sat Aug 12 20:09:20 2006
@@ -0,0 +1,49 @@
+<%--
+
+ Copyright 2006 The Apache Software Foundation.
+ 
+ Licensed 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.
+
+ $Id$
+
+--%>
+
+<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %>
+<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %>
+
+<f:view>
+<html>
+<head>
+    <title>Shale Test App (Tiger Extensions)</title>
+</head>
+<body>
+
+    <h3>Shale Test App (Tiger Extensions)</h3>
+
+    <ul>
+        <li><a href="annotated.faces">Annotated ViewController Lifecycle 
Events</a></li>
+        <li><a href="standard.faces">Standard ViewController Lifecycle 
Events</a></li>
+        <li><a href="status.faces">Static Status Information</a></li>
+    </ul>
+
+
+    <h3>Test Description</h3>
+
+    <p>Each page of this application is designed to be executed automatically
+    by the corresponding system integration test cases.  However, suitable
+    navigation links are included so that the pages may be executed by hand
+    as well.</p>
+
+</body>
+</html>
+</f:view>

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/menu.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/menu.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/standard.jsp
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/standard.jsp?rev=431139&view=auto
==============================================================================
--- 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/standard.jsp 
(added)
+++ 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/standard.jsp 
Sat Aug 12 20:09:20 2006
@@ -0,0 +1,85 @@
+<%--
+
+ Copyright 2006 The Apache Software Foundation.
+ 
+ Licensed 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.
+
+ $Id$
+
+--%>
+
+<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %>
+<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %>
+
+<f:view>
+<html>
+<head>
+    <title>Standard ViewController Lifecycle Events</title>
+</head>
+<body>
+
+    <h3>Standard ViewController Lifecycle Events</h3>
+
+    <table cellspacing="5">
+        <tr>
+            <th align="center">Event</th>
+            <th align="center">Called Order</th>
+        </tr>
+        <tr>
+            <th align="right">init()</th>
+            <td><h:outputText id="initCalled"
+                           value="#{standard.initCalled}"/></td>
+        </tr>
+        <tr>
+            <th align="right">preprocess()</th>
+            <td><h:outputText id="preprocessCalled"
+                           value="#{standard.preprocessCalled}"/></td>
+        </tr>
+        <tr>
+            <th align="right">prerender()</th>
+            <td><h:outputText id="prerenderCalled"
+                           value="#{standard.prerenderCalled}"/></td>
+        </tr>
+        <tr>
+            <th align="right">destroy()</th>
+            <td><h:outputText id="destroyCalled"
+                           value="#{standard.destroyCalled}"/></td>
+        </tr>
+        <tr>
+            <th align="right">postBack:</th>
+            <td><h:outputText id="postBack"
+                           value="#{standard.postBack}"/></td>
+        </tr>
+    </table>
+
+    <h:form id="form">
+      <h:commandLink id="resubmit" value="Resubmit" 
action="#{standard.resubmit}"/>
+    </h:form>
+
+    <h3>Test Description</h3>
+
+    <p>Describes the order in which lifecycle events were called during
+    the processing of this page (zero means the method was not called).
+    When first entered from the menu, only init() and prerender() should
+    be listed.  If you click the "Resubmit" link, you should see calls
+    to init, preprocess, and prerender.</p>
+
+    <p>NOTE:  The destroy() method shows that it has never been called
+    because the view is rendered before that event occurs.  Other tests
+    will be required to validate that it is, indeed, called correctly.</p>
+
+    <p><a href="menu.faces">Back</a> to main menu</p>
+
+</body>
+</html>
+</f:view>

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/standard.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/standard.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/status.jsp
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/status.jsp?rev=431139&view=auto
==============================================================================
--- 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/status.jsp 
(added)
+++ 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/status.jsp 
Sat Aug 12 20:09:20 2006
@@ -0,0 +1,65 @@
+<%--
+
+ Copyright 2006 The Apache Software Foundation.
+ 
+ Licensed 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.
+
+ $Id$
+
+--%>
+
+<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"; %>
+<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"; %>
+
+<f:view>
+<html>
+<head>
+    <title>Static Status Information</title>
+</head>
+<body>
+
+    <h3>Static Status Information</h3>
+
+    <table cellspacing="5">
+        <tr>
+            <th align="center">Label</th>
+            <th align="center">Value</th>
+        </tr>
+        <tr>
+            <th align="right">EXCEPTION_HANDLER Class:</th>
+            <td><h:outputText id="exceptionHandler"
+                           value="#{status.exceptionHandler}"/></td>
+        </tr>
+        <tr>
+            <th align="right">VIEW_CALLBACKS Class:</th>
+            <td><h:outputText id="viewCallbacks"
+                           value="#{status.viewCallbacks}"/></td>
+        </tr>
+        <tr>
+            <th align="right">VIEW_MAPPER Class:</th>
+            <td><h:outputText id="viewMapper"
+                           value="#{status.viewMapper}"/></td>
+        </tr>
+    </table>
+
+
+    <h3>Test Description</h3>
+
+    <p>Each output component listed above displays static state information
+    about the application (typically as configured at deployment time).</p>
+
+    <p><a href="menu.faces">Back</a> to main menu</p>
+
+</body>
+</html>
+</f:view>

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/status.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/main/webapp/status.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: shale/framework/trunk/shale-apps/shale-test-tiger/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-tiger/src/site/site.xml?rev=431139&view=auto
==============================================================================
--- shale/framework/trunk/shale-apps/shale-test-tiger/src/site/site.xml (added)
+++ shale/framework/trunk/shale-apps/shale-test-tiger/src/site/site.xml Sat Aug 
12 20:09:20 2006
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="Apache Shale Framework - Blank Starter App">
+
+  <body>
+
+    <menu name="Quick Links">
+        <item name="JavaServer Faces"   
+              href="http://java.sun.com/j2ee/javaserverfaces"/>
+        <item name="MyFaces"
+              href="http://myfaces.apache.org"/>
+        <item name="Shale"             
+              href="http://shale.apache.org"/>
+        <item name="Struts"             
+              href="http://struts.apache.org"/>
+        <item name="Struts-Faces Integration Library" 
+              href="http://struts.apache.org/struts-action/struts-faces"/>
+    </menu>
+
+    <menu name="Sub-Project Documentation">
+        <item name="Clay Plug-In"       href="../../shale-clay/index.html"/>
+        <item name="Core Library"       href="../../shale-core/index.html"/>
+        <item name="Spring Integration" href="../../shale-spring/index.html"/>
+        <item name="Test Framework"     href="../../shale-test/index.html"/>
+        <item name="Tiles Integration"  href="../../shale-tiles/index.html"/>
+        <item name="Tiger Extensions"   href="../../shale-tiger/index.html"/>
+    </menu>
+
+    <menu name="Sample Apps Documentation">
+        <item name="Blank Starter"      href="../shale-blank/index.html"/>
+        <item name="Clay Use Cases"     
href="../shale-clay-usecases/index.html"/>
+        <item name="Mail Reader"        href="../shale-mailreader/index.html"/>
+        <item name="SQL Browser"        
href="../shale-sql-browser/index.html"/>
+        <item name="Use Cases"          href="../shale-usecases/index.html"/>
+    </menu>
+
+    ${reports}
+    
+  </body>
+
+</project>

Propchange: shale/framework/trunk/shale-apps/shale-test-tiger/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: shale/framework/trunk/shale-apps/shale-test-tiger/src/site/site.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java
URL: 
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java?rev=431139&view=auto
==============================================================================
--- 
shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java
 (added)
+++ 
shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java
 Sat Aug 12 20:09:20 2006
@@ -0,0 +1,232 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ *
+ * $Id$
+ */
+
+package org.apache.shale.examples.test.tiger.systest;
+
+import com.gargoylesoftware.htmlunit.html.HtmlAnchor;
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.apache.shale.test.cargo.CargoTestSetup;
+import org.apache.shale.test.htmlunit.AbstractHtmlUnitTestCase;
+
+/**
+ * <p>Integration tests for the Shale Tiger Extensions Library.</p>
+ */
+public class IntegrationTestCase extends AbstractHtmlUnitTestCase {
+    
+
+    // ------------------------------------------------------------ 
Constructors
+
+
+    /**
+     * <p>Construct a new instance of this test case.</p>
+     *
+     * @param name Name of the new test case
+     */
+    public IntegrationTestCase(String name) {
+
+        super(name);
+
+    }
+
+
+    // ------------------------------------------------------ Test Setup 
Methods
+
+
+    /**
+     * <p>Set up the instance variables required for this test case.</p>
+     */
+    protected void setUp() throws Exception {
+
+        super.setUp();
+        page("/");
+
+    }
+
+
+    /**
+     * <p>Return the set of tests included in this test suite.</p>
+     */
+    public static Test suite() {
+
+        return new CargoTestSetup(new TestSuite(IntegrationTestCase.class));
+
+    }
+
+
+    /**
+     * <p>Tear down instance variables required by this test case.</p>
+     */
+    protected void tearDown() throws Exception {
+
+        super.tearDown();
+
+    }
+
+
+
+    // ------------------------------------------------- Individual Test 
Methods
+
+
+    // Test /annotated.jsp
+    public void testAnnotated() throws Exception {
+
+        HtmlElement element;
+        page("/annotated.faces");
+        assertEquals("Annotated ViewController Lifecycle Events", title());
+
+        // Validate values for initial non-postback call
+        
+        element = element("initCalled");
+        assertNotNull(element);
+        assertEquals("1", element.asText());
+
+        element = element("preprocessCalled");
+        assertNotNull(element);
+        assertEquals("0", element.asText());
+
+        element = element("prerenderCalled");
+        assertNotNull(element);
+        assertEquals("2", element.asText());
+
+        element = element("destroyCalled");
+        assertNotNull(element);
+        assertEquals("0", element.asText());
+
+        // Click the resubmit hyperlink
+
+        HtmlAnchor anchor = (HtmlAnchor) element("form:resubmit");
+        assertNotNull(anchor);
+        link(anchor);
+
+        // Validate values for subsequent postback call
+        
+        element = element("initCalled");
+        assertNotNull(element);
+        assertEquals("1", element.asText());
+
+        element = element("preprocessCalled");
+        assertNotNull(element);
+        assertEquals("2", element.asText());
+
+        element = element("prerenderCalled");
+        assertNotNull(element);
+        assertEquals("3", element.asText());
+
+        element = element("destroyCalled");
+        assertNotNull(element);
+        assertEquals("0", element.asText());
+
+    }
+
+
+    // Test /menu.jsp
+    public void testMenu() throws Exception {
+
+        assertEquals("Shale Test App (Tiger Extensions)", title());
+
+    }
+
+
+    // Test /standard.jsp
+    public void testStandard() throws Exception {
+
+        HtmlElement element;
+        page("/standard.faces");
+        assertEquals("Standard ViewController Lifecycle Events", title());
+
+        // Validate values for initial non-postback call
+        
+        element = element("initCalled");
+        assertNotNull(element);
+        assertEquals("1", element.asText());
+
+        element = element("preprocessCalled");
+        assertNotNull(element);
+        assertEquals("0", element.asText());
+
+        element = element("prerenderCalled");
+        assertNotNull(element);
+        assertEquals("2", element.asText());
+
+        element = element("destroyCalled");
+        assertNotNull(element);
+        assertEquals("0", element.asText());
+
+        element = element("postBack");
+        assertNotNull(element);
+        assertEquals("false", element.asText());
+
+        // Click the resubmit hyperlink
+
+        HtmlAnchor anchor = (HtmlAnchor) element("form:resubmit");
+        assertNotNull(anchor);
+        link(anchor);
+
+        // Validate values for subsequent postback call
+        
+        element = element("initCalled");
+        assertNotNull(element);
+        assertEquals("1", element.asText());
+
+        element = element("preprocessCalled");
+        assertNotNull(element);
+        assertEquals("2", element.asText());
+
+        element = element("prerenderCalled");
+        assertNotNull(element);
+        assertEquals("3", element.asText());
+
+        element = element("destroyCalled");
+        assertNotNull(element);
+        assertEquals("0", element.asText());
+
+        element = element("postBack");
+        assertNotNull(element);
+        assertEquals("true", element.asText());
+
+    }
+
+
+    // Test access /status.jsp
+    public void testStatus() throws Exception {
+
+        HtmlElement element;
+        page("/status.faces");
+        assertEquals("Static Status Information", title());
+
+        element = element("exceptionHandler");
+        assertNotNull(element);
+        assertEquals("org.apache.shale.view.impl.DefaultExceptionHandler",
+                     element.asText());
+
+        element = element("viewCallbacks");
+        assertNotNull(element);
+        
assertEquals("org.apache.shale.tiger.view.faces.ViewControllerCallbacks2",
+                     element.asText());
+
+        element = element("viewMapper");
+        assertNotNull(element);
+        assertEquals("org.apache.shale.view.impl.DefaultViewControllerMapper",
+                     element.asText());
+
+    }
+
+
+}

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
shale/framework/trunk/shale-apps/shale-test-tiger/src/test/java/org/apache/shale/examples/test/tiger/systest/IntegrationTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL


Reply via email to