You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2012/10/08 22:18:51 UTC
[3/4] git commit: DELTASPIKE-266 refactor JSF test setup
DELTASPIKE-266 refactor JSF test setup
Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/a8a2815c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/a8a2815c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/a8a2815c
Branch: refs/heads/master
Commit: a8a2815cdf14fbcc8854338bf98e344f7b4f149c
Parents: ab3e38b
Author: Mark Struberg <st...@apache.org>
Authored: Mon Oct 8 10:59:56 2012 +0200
Committer: Mark Struberg <st...@apache.org>
Committed: Mon Oct 8 20:48:20 2012 +0200
----------------------------------------------------------------------
.../jsf/impl/scope/view/ViewScopedContextTest.java | 7 +-
.../src/test/resources/default/WEB-INF/web.xml | 34 +++++++++++
.../viewScopedContextTest/WEB-INF/web.xml | 34 -----------
.../resources/viewScopedContextTest/index.html | 24 --------
.../resources/viewScopedContextTest/page.xhtml | 44 +++++++++++++++
.../resources/viewScopedContextTest/page1.xhtml | 44 ---------------
6 files changed, 81 insertions(+), 106 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a8a2815c/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/view/ViewScopedContextTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/view/ViewScopedContextTest.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/view/ViewScopedContextTest.java
index e00fa89..1fb578f 100644
--- a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/view/ViewScopedContextTest.java
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/scope/view/ViewScopedContextTest.java
@@ -65,9 +65,8 @@ public class ViewScopedContextTest
.create(WebArchive.class, "viewScopedContextTest.war")
.addPackage(BackingBean.class.getPackage())
.addAsLibraries(ArchiveUtils.getDeltaSpikeCoreAndJsfArchive())
- .addAsWebInfResource("viewScopedContextTest/WEB-INF/web.xml", "web.xml")
- .addAsWebResource("viewScopedContextTest/index.html", "index.html")
- .addAsWebResource("viewScopedContextTest/page1.xhtml", "page1.xhtml")
+ .addAsWebInfResource("default/WEB-INF/web.xml", "web.xml")
+ .addAsWebResource("viewScopedContextTest/page.xhtml", "page.xhtml")
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
@@ -76,7 +75,7 @@ public class ViewScopedContextTest
@RunAsClient
public void testViewScopedContext() throws Exception
{
- driver.get(new URL(contextPath, "page1.xhtml").toString());
+ driver.get(new URL(contextPath, "page.xhtml").toString());
WebElement inputField = driver.findElement(By.id("test:valueInput"));
inputField.sendKeys("23");
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a8a2815c/deltaspike/modules/jsf/impl/src/test/resources/default/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/resources/default/WEB-INF/web.xml b/deltaspike/modules/jsf/impl/src/test/resources/default/WEB-INF/web.xml
new file mode 100644
index 0000000..5e874fd
--- /dev/null
+++ b/deltaspike/modules/jsf/impl/src/test/resources/default/WEB-INF/web.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+ 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.
+-->
+
+<web-app 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"
+ version="2.5">
+ <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>*.xhtml</url-pattern>
+ </servlet-mapping>
+</web-app>
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a8a2815c/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/WEB-INF/web.xml b/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/WEB-INF/web.xml
deleted file mode 100644
index 5e874fd..0000000
--- a/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/WEB-INF/web.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<!--
- 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.
--->
-
-<web-app 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"
- version="2.5">
- <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>*.xhtml</url-pattern>
- </servlet-mapping>
-</web-app>
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a8a2815c/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/index.html
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/index.html b/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/index.html
deleted file mode 100644
index f2d6e35..0000000
--- a/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
- 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>
-<body>
-index page works!
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a8a2815c/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page.xhtml
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page.xhtml b/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page.xhtml
new file mode 100644
index 0000000..ead5230
--- /dev/null
+++ b/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page.xhtml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+<body>
+<div>
+ it works!
+</div>
+<div>
+ <h:form id="test">
+ <h:outputLabel for="valueInput" value="ViewScoped value:"/>
+ <h:inputText id="valueInput" value="#{viewScopedBean.i}"/>
+ <br/>
+ <h:outputLabel for="valueOutput" value="backing bean value:"/>
+ <h:outputText id="valueOutput" value="#{viewScopedBean.i}"/>
+ <br/>
+ <h:commandButton id="saveButton" action="#{viewScopedBean.someAction}" value="save"/>
+ </h:form>
+</div>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/a8a2815c/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page1.xhtml
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page1.xhtml b/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page1.xhtml
deleted file mode 100644
index ead5230..0000000
--- a/deltaspike/modules/jsf/impl/src/test/resources/viewScopedContextTest/page1.xhtml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:c="http://java.sun.com/jsp/jstl/core">
-
-<body>
-<div>
- it works!
-</div>
-<div>
- <h:form id="test">
- <h:outputLabel for="valueInput" value="ViewScoped value:"/>
- <h:inputText id="valueInput" value="#{viewScopedBean.i}"/>
- <br/>
- <h:outputLabel for="valueOutput" value="backing bean value:"/>
- <h:outputText id="valueOutput" value="#{viewScopedBean.i}"/>
- <br/>
- <h:commandButton id="saveButton" action="#{viewScopedBean.someAction}" value="save"/>
- </h:form>
-</div>
-</body>
-</html>