You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2006/10/09 16:46:12 UTC

svn commit: r454395 - in /tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration: IntegrationTests.java app1/pages/BadTemplate.java

Author: hlship
Date: Mon Oct  9 07:46:11 2006
New Revision: 454395

URL: http://svn.apache.org/viewvc?view=rev&rev=454395
Log:
Add integration test for the (initial version of) the ExceptionReport page.

Modified:
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/BadTemplate.java

Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/IntegrationTests.java?view=diff&rev=454395&r1=454394&r2=454395
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/IntegrationTests.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/IntegrationTests.java Mon Oct  9 07:46:11 2006
@@ -44,7 +44,7 @@
 
     private JettyRunner _jettyRunner;
 
-    @BeforeClass()
+    @BeforeClass
     public void startupBackground() throws Exception
     {
         _jettyRunner = new JettyRunner("src/test/app1");
@@ -195,5 +195,22 @@
         String body = _selenium.getBodyText();
 
         assertTrue(body.contains("[value provided by a template expansion]"));
+    }
+
+    @Test
+    public void app1_exception_report()
+    {
+        _selenium.open(BASE_URL);
+
+        clickAndWait("link=Bad Template Page");
+
+        String body = _selenium.getBodyText();
+
+        assertTrue(body.contains("org.apache.tapestry.internal.TapestryException"));
+        assertTrue(body
+                .contains("Failure parsing template classpath:org/apache/tapestry/integration/app1/pages/BadTemplate.html"));
+        assertTrue(body.contains("org.xml.sax.SAXParseException"));
+        assertTrue(body
+                .contains("XML document structures must start and end within the same entity."));
     }
 }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/BadTemplate.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/BadTemplate.java?view=diff&rev=454395&r1=454394&r2=454395
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/BadTemplate.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/BadTemplate.java Mon Oct  9 07:46:11 2006
@@ -1,3 +1,17 @@
+// 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.
+
 package org.apache.tapestry.integration.app1.pages;
 
 import org.apache.tapestry.annotations.ComponentClass;