[weld-commits] Weld SVN: r5913 - in core/trunk/tests/src/test: java/org/jboss/weld/tests/jsp and 2 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sun Feb 21 07:02:21 EST 2010


Author: pete.muir at jboss.org
Date: 2010-02-21 07:02:20 -0500 (Sun, 21 Feb 2010)
New Revision: 5913

Added:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/jsp/
   core/trunk/tests/src/test/java/org/jboss/weld/tests/jsp/JspTest.java
   core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/
   core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/.faces-config.xml.jsfdia
   core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/faces-config.xml
   core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/home.jspx
   core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/index.jsp
   core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/web.xml
Log:
test for bug reported in forum

Added: core/trunk/tests/src/test/java/org/jboss/weld/tests/jsp/JspTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/jsp/JspTest.java	                        (rev 0)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/jsp/JspTest.java	2010-02-21 12:02:20 UTC (rev 5913)
@@ -0,0 +1,62 @@
+package org.jboss.weld.tests.jsp;
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * 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.
+ */
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.war.WebXml;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+import com.gargoylesoftware.htmlunit.Page;
+import com.gargoylesoftware.htmlunit.WebClient;
+
+/**
+ * @author Nicklas Karlsson
+ * @author Dan Allen
+ */
+ at Artifact(addCurrentPackage = false)
+ at IntegrationTest(runLocally = true)
+ at Resources( { 
+   @Resource(destination = "index.jsp", source = "index.jsp"),
+   @Resource(destination = "home.jspx", source = "home.jspx"),
+   @Resource(destination="/WEB-INF/faces-config.xml", source="faces-config.xml")
+})
+ at WebXml("web.xml")
+public class JspTest extends AbstractWeldTest
+{
+
+   @Test(groups = { "contexts" })
+   public void testConversationPropagationToNonExistentConversationLeadsException() throws Exception
+   {
+      WebClient client = new WebClient();
+      client.setThrowExceptionOnFailingStatusCode(false);
+      Page page = client.getPage(getPath("/index.jsp"));
+      assert page.getWebResponse().getStatusCode() == 300;
+      System.out.println(page.getWebResponse().getRequestUrl());
+   }
+
+   @Override
+   protected String getPath(String viewId)
+   {
+      return getContextPath() + viewId;
+   }
+
+}
\ No newline at end of file


Property changes on: core/trunk/tests/src/test/java/org/jboss/weld/tests/jsp/JspTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/.faces-config.xml.jsfdia
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/.faces-config.xml.jsfdia	                        (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/.faces-config.xml.jsfdia	2010-02-21 12:02:20 UTC (rev 5913)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS model-entity="JSFProcess"/>

Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/faces-config.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/faces-config.xml	                        (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/faces-config.xml	2010-02-21 12:02:20 UTC (rev 5913)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<faces-config version="1.2" 
+              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_1_2.xsd">
+   
+</faces-config>


Property changes on: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/home.jspx
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/home.jspx	                        (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/home.jspx	2010-02-21 12:02:20 UTC (rev 5913)
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" 
+          xmlns:h="http://java.sun.com/jsf/html"
+          xmlns:f="http://java.sun.com/jsf/core"
+          xmlns:s="http://jboss.com/products/seam/taglib"
+          xmlns="http://www.w3.org/1999/xhtml"
+          version="2.0">
+  <jsp:output doctype-root-element="html" 
+              doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+              doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+  <jsp:directive.page contentType="text/html"/>
+  <html>
+  <head>
+  </head>
+  <body>
+   <f:view>
+   </f:view>
+  </body>
+  </html>
+</jsp:root>
+


Property changes on: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/home.jspx
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/index.jsp
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/index.jsp	                        (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/index.jsp	2010-02-21 12:02:20 UTC (rev 5913)
@@ -0,0 +1 @@
+<% response.sendRedirect("home.jsf"); %>
\ No newline at end of file


Property changes on: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/index.jsp
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/web.xml
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/web.xml	                        (rev 0)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/web.xml	2010-02-21 12:02:20 UTC (rev 5913)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+    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">
+   
+   <display-name>JSR-299 TCK</display-name>
+
+   <!-- JSF -->
+
+   <servlet>
+      <servlet-name>Faces Servlet</servlet-name>
+      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+      <load-on-startup>1</load-on-startup>
+   </servlet>
+
+   <servlet-mapping>
+      <servlet-name>Faces Servlet</servlet-name>
+      <url-pattern>*.jsf</url-pattern>
+   </servlet-mapping>
+   
+   <context-param>
+      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+      <param-value>.jspx</param-value>
+   </context-param>
+
+   <session-config>
+      <session-timeout>10</session-timeout>
+   </session-config>
+
+</web-app>


Property changes on: core/trunk/tests/src/test/resources/org/jboss/weld/tests/jsp/web.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain



More information about the weld-commits mailing list