Author: apetrelli
Date: Tue Feb 27 00:39:19 2007
New Revision: 512177

URL: http://svn.apache.org/viewvc?view=rev&rev=512177
Log:
TILES-122
Added test page to check if, when an exception happens, the remaining 
attributes are evaluated correctly.

Added:
    tiles/framework/trunk/tiles-test/src/main/webapp/exception.jsp   (with 
props)
    
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
   (with props)
    
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
   (with props)
Modified:
    tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
    tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp
    tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html

Modified: 
tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml?view=diff&rev=512177&r1=512176&r2=512177
==============================================================================
--- tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml 
(original)
+++ tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml Tue 
Feb 27 00:39:19 2007
@@ -48,6 +48,12 @@
       <put-attribute name="body"   value="/body.jsp"/>
   </definition>
 
+  <definition name="test.definition.exception" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/exception.jsp"/>
+      <put-attribute name="body"   value="/body.jsp"/>
+  </definition>
+
   <definition name="test.composite.definition" template="/layout.jsp">
       <put-attribute name="title"  value="This is a configured composite 
definition."/>
       <put-attribute name="header" value="/header.jsp"/>

Added: tiles/framework/trunk/tiles-test/src/main/webapp/exception.jsp
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/exception.jsp?view=auto&rev=512177
==============================================================================
--- tiles/framework/trunk/tiles-test/src/main/webapp/exception.jsp (added)
+++ tiles/framework/trunk/tiles-test/src/main/webapp/exception.jsp Tue Feb 27 
00:39:19 2007
@@ -0,0 +1,25 @@
+<%--
+/*
+ * $Id$
+ *
+ * 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.
+ *
+ */
+--%>
+<strong>This throws an exception</strong>
+<% throw new Exception("This is a test exception"); %>
\ No newline at end of file

Propchange: tiles/framework/trunk/tiles-test/src/main/webapp/exception.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tiles/framework/trunk/tiles-test/src/main/webapp/exception.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp?view=diff&rev=512177&r1=512176&r2=512177
==============================================================================
--- tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp (original)
+++ tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp Tue Feb 27 
00:39:19 2007
@@ -40,6 +40,7 @@
     <a href="testinsertdefinition_override_and_not.jsp">Test Insert Configured 
Definition with an overridden content and one with original content</a><br/>
     <a href="testinsertdefinition_inline.jsp">Test Insert Configured 
Definition with an inline content</a><br/>
     <a href="testinsertdefinition_composite.jsp">Test Insert Configured 
Definition that contains another definition inside</a><br/>
+    <a href="testinsertdefinition_exception.jsp">Test Insert Configured 
Definition with an exception in an attribute page</a><br/>
     <a href="testput.jsp">Test Put Tag</a><br/>
     <a href="testput_el.jsp">Test Put Tag using EL</a><br/>
     <a href="testput_servlet.jsp">Test Put Tag using a servlet mapping as a 
template</a><br/>

Added: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp?view=auto&rev=512177
==============================================================================
--- 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
 (added)
+++ 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
 Tue Feb 27 00:39:19 2007
@@ -0,0 +1,26 @@
+<%--
+/*
+ * $Id$
+ *
+ * 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.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles"; prefix="tiles" %>
+
+<tiles:insertDefinition name="test.definition.exception" />

Propchange: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertdefinition_exception.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html?view=auto&rev=512177
==============================================================================
--- 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
 (added)
+++ 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
 Tue Feb 27 00:39:19 2007
@@ -0,0 +1,57 @@
+<!--
+/*
+ * $Id$
+ *
+ * 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.
+ *
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Definition with Exception 
Test</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/tiles-test/index.jsp</td>
+       <td></td>
+</tr>
+<tr>
+       <td>clickAndWait</td>
+       <td>link=Test Insert Configured Definition with an exception in an 
attribute page</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is the title.</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is a body</td>
+       <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>

Propchange: 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredDefinitionExceptionTest.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html?view=diff&rev=512177&r1=512176&r2=512177
==============================================================================
--- tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html (original)
+++ tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html Tue Feb 
27 00:39:19 2007
@@ -56,6 +56,9 @@
         <td><a href="ConfiguredCompositeDefinitionTest.html">Configured 
Composite Definition Test</a></td>
     </tr>
     <tr>
+        <td><a href="ConfiguredDefinitionExceptionTest.html">Configured 
Definition with Exception Test</a></td>
+    </tr>
+    <tr>
         <td><a href="PutTagTest.html">Put Tag Test</a></td>
     </tr>
     <tr>


Reply via email to