[weld-commits] Weld SVN: r5716 - in core/trunk/tests/src/test: resources/org/jboss/weld/tests/contexts/errorpage and 1 other directory.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Wed Feb 3 11:37:55 EST 2010


Author: pete.muir at jboss.org
Date: 2010-02-03 11:37:55 -0500 (Wed, 03 Feb 2010)
New Revision: 5716

Modified:
   core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/ErrorPageTest.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/Rain.java
   core/trunk/tests/src/test/resources/org/jboss/weld/tests/contexts/errorpage/error.jsf
Log:
fix test up a bit

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/ErrorPageTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/ErrorPageTest.java	2010-02-02 16:57:49 UTC (rev 5715)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/ErrorPageTest.java	2010-02-03 16:37:55 UTC (rev 5716)
@@ -34,6 +34,7 @@
 import com.gargoylesoftware.htmlunit.html.HtmlElement;
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
+import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
 
 /**
  * <p>This test was mostly developed to test the scenario related to WELD-29.  Essentially
@@ -44,7 +45,7 @@
  *
  */
 @Artifact(addCurrentPackage=false)
- at Classes({Storm.class})
+ at Classes({Storm.class, Rain.class})
 @IntegrationTest(runLocally=true)
 @Resources({
   @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
@@ -62,10 +63,12 @@
       
       HtmlPage page = client.getPage(getPath("/storm.jsf"));
       HtmlSubmitInput disasterButton = getFirstMatchingElement(page, HtmlSubmitInput.class, "disasterButton");
+      HtmlTextInput strength = getFirstMatchingElement(page, HtmlTextInput.class, "stormStrength");
+      strength.setValueAttribute("10");
       page = disasterButton.click();
       assert "Application Error".equals(page.getTitleText());
       HtmlDivision conversationValue = getFirstMatchingElement(page, HtmlDivision.class, "conversation");
-      assert conversationValue.asText().equals("0");
+      assert conversationValue.asText().equals("10");
       HtmlDivision requestValue = getFirstMatchingElement(page, HtmlDivision.class, "request");
       assert requestValue.asText().equals("medium");
    }

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/Rain.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/Rain.java	2010-02-02 16:57:49 UTC (rev 5715)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/contexts/errorpage/Rain.java	2010-02-03 16:37:55 UTC (rev 5716)
@@ -17,8 +17,10 @@
 package org.jboss.weld.tests.contexts.errorpage;
 
 import javax.enterprise.context.RequestScoped;
+import javax.inject.Named;
 
 @RequestScoped
+ at Named
 public class Rain
 {
    public String getSeverityLevel()

Modified: core/trunk/tests/src/test/resources/org/jboss/weld/tests/contexts/errorpage/error.jsf
===================================================================
--- core/trunk/tests/src/test/resources/org/jboss/weld/tests/contexts/errorpage/error.jsf	2010-02-02 16:57:49 UTC (rev 5715)
+++ core/trunk/tests/src/test/resources/org/jboss/weld/tests/contexts/errorpage/error.jsf	2010-02-03 16:37:55 UTC (rev 5716)
@@ -16,8 +16,8 @@
   <h1>Application Error</h1>
   <p>The following error occurred while processing the request:</p>
   
-  <div id="request">${rain.serverityLevel}</div>
   <div id="conversation">${storm.strength}</div>
+  <div id="request">${rain.severityLevel}</div>
   
   </body>
   </html>



More information about the weld-commits mailing list