Author: jharting
Date: 2009-07-28 03:48:40 -0400 (Tue, 28 Jul 2009)
New Revision: 3304
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml
Log:
Added tests for Unified EL integration
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2009-07-28
07:48:40 UTC (rev 3304)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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.
+ */
+package org.jboss.jsr299.tck.tests.lookup.el.integration;
+
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+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.WarArtifactDescriptor;
+import org.testng.annotations.Test;
+
+import com.gargoylesoftware.htmlunit.WebClient;
+
+@Artifact
+@IntegrationTest(runLocally = true)
+@Resources( {
+ @Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source =
"web.xml"),
+ @Resource(destination = "WEB-INF/faces-config.xml", source =
"faces-config.xml"),
+ @Resource(destination = "JSFTestPage.jsp", source =
"JSFTestPage.jsp"),
+ @Resource(destination = "JSPTestPage.jsp", source =
"JSPTestPage.jsp")})
+@SpecVersion("2009625")
+public class IntegrationWithUnifiedELTest extends AbstractJSR299Test
+{
+ @Test(groups = { "ri-broken", "el" } )
+ @SpecAssertion(section = "5.8", id = "aaa")
+ public void testELResolverRegisteredWithJsf() throws Exception
+ {
+ WebClient webclient = new WebClient();
+ String content = webclient.getPage(getContextPath() +
"JSFTestPage.jsf").getWebResponse().getContentAsString();
+ assert content.contains("Dolly");
+ }
+
+ @Test(groups = { "ri-broken", "el" } )
+ @SpecAssertion(section = "5.8", id = "aba")
+ public void testELResolverRegisteredWithServletContainer() throws Exception
+ {
+ WebClient webclient = new WebClient();
+ String content = webclient.getPage(getContextPath() +
"JSPTestPage.jsp").getWebResponse().getContentAsString();
+ assert content.contains("Dolly");
+ }
+}
Added:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java
(rev 0)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/Sheep.java 2009-07-28
07:48:40 UTC (rev 3304)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, 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.
+ */
+package org.jboss.jsr299.tck.tests.lookup.el.integration;
+
+import javax.enterprise.inject.Named;
+
+@Named
+class Sheep
+{
+ private String name = "Dolly";
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Added:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp
===================================================================
---
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp
(rev 0)
+++
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSFTestPage.jsp 2009-07-28
07:48:40 UTC (rev 3304)
@@ -0,0 +1,14 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<html>
+ <head>
+ <title>JSF Test Page</title>
+ </head>
+ <body>
+ <f:view>
+ <h1>
+ <h:outputText value="#{sheep.name}"/>
+ </h1>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Added:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp
===================================================================
---
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp
(rev 0)
+++
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/JSPTestPage.jsp 2009-07-28
07:48:40 UTC (rev 3304)
@@ -0,0 +1,8 @@
+<html>
+ <head>
+ <title>JSP Test Page</title>
+ </head>
+ <body>
+ <h1>${sheep.name}</h1>
+ </body>
+</html>
\ No newline at end of file
Added:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml
===================================================================
---
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml
(rev 0)
+++
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/faces-config.xml 2009-07-28
07:48:40 UTC (rev 3304)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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_1_2.xsd"
+ version="1.2"/>
Added:
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml
===================================================================
---
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml
(rev 0)
+++
tck/trunk/impl/src/main/resources/org/jboss/jsr299/tck/tests/lookup/el/integration/web.xml 2009-07-28
07:48:40 UTC (rev 3304)
@@ -0,0 +1,23 @@
+<?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>Integration with Unified EL Test</display-name>
+ <servlet>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <servlet-class>org.jboss.testharness.impl.runner.servlet.ServletTestRunner</servlet-class>
+ </servlet>
+ <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>
+ <servlet-mapping>
+ <servlet-name>JBoss Test Harness Test Runner</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+</web-app>