You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2005/12/11 03:38:13 UTC

svn commit: r355874 - in /struts/shale/trunk/core-library: build.xml src/test/org/apache/shale/dialog/config/ConfigurationParserTestCase.java src/test/org/apache/shale/dialog/faces/DialogNavigationHandlerTestCase.java

Author: craigmcc
Date: Sat Dec 10 18:38:07 2005
New Revision: 355874

URL: http://svn.apache.org/viewcvs?rev=355874&view=rev
Log:
Adapt test cases to the semantics change on the getResource() method of
MockServletContext.

Modified:
    struts/shale/trunk/core-library/build.xml
    struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/config/ConfigurationParserTestCase.java
    struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/faces/DialogNavigationHandlerTestCase.java

Modified: struts/shale/trunk/core-library/build.xml
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/build.xml?rev=355874&r1=355873&r2=355874&view=diff
==============================================================================
--- struts/shale/trunk/core-library/build.xml (original)
+++ struts/shale/trunk/core-library/build.xml Sat Dec 10 18:38:07 2005
@@ -423,6 +423,8 @@
           printSummary="no">
 
       <jvmarg    value="-enableassertions:org.apache.shale..."/>
+      <sysproperty key="documentRoot"
+                 value="${build.home}/test-classes"/>
       <classpath refid="test.classpath"/>
       <formatter  type="plain"
                usefile="false"/>

Modified: struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/config/ConfigurationParserTestCase.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/config/ConfigurationParserTestCase.java?rev=355874&r1=355873&r2=355874&view=diff
==============================================================================
--- struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/config/ConfigurationParserTestCase.java (original)
+++ struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/config/ConfigurationParserTestCase.java Sat Dec 10 18:38:07 2005
@@ -16,6 +16,7 @@
 
 package org.apache.shale.dialog.config;
 
+import java.io.File;
 import java.util.Map;
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -54,6 +55,8 @@
         super.setUp();
 
         // Configure the test dialogs we will be using
+        servletContext.setDocumentRoot
+            (new File(System.getProperty("documentRoot")));
         servletContext.addInitParameter
             (Globals.CONFIGURATION_PARAM,
              "/org/apache/shale/dialog/faces/dialog-config.xml");

Modified: struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/faces/DialogNavigationHandlerTestCase.java
URL: http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/faces/DialogNavigationHandlerTestCase.java?rev=355874&r1=355873&r2=355874&view=diff
==============================================================================
--- struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/faces/DialogNavigationHandlerTestCase.java (original)
+++ struts/shale/trunk/core-library/src/test/org/apache/shale/dialog/faces/DialogNavigationHandlerTestCase.java Sat Dec 10 18:38:07 2005
@@ -16,6 +16,7 @@
 
 package org.apache.shale.dialog.faces;
 
+import java.io.File;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
@@ -59,6 +60,8 @@
         application.setNavigationHandler(nh);
 
         // Configure the test dialogs we will be using
+        servletContext.setDocumentRoot
+            (new File(System.getProperty("documentRoot")));
         servletContext.addInitParameter
           (Globals.CONFIGURATION_PARAM,
            "/org/apache/shale/dialog/faces/dialog-config.xml");



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org