webwork/src/test/webwork/config included.xml,NONE,1.1 includedpath.xml,NONE,1.1 XMLActionConfigurationTestCase.java,1.1,1.2 simple-actions.xml,1.1,1.2

[email protected] Sun, 03 Apr 2005 18:02:12 -0700
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/test/webwork/config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13536/src/test/webwork/config

Modified Files:
	XMLActionConfigurationTestCase.java simple-actions.xml 
Added Files:
	included.xml includedpath.xml 
Log Message:
Added support for included actions files. Syntax is: <include path="foo.xml" /> for including files relative to the current file
OR <include resource="com/foo/bar.xml" /> for including xml files in the classpath of the app
Fixed WW-762

--- NEW FILE: included.xml ---
<actions>
    <action name="users.TestUsers" alias="TestUsers">
       <view name="success">/testusers.jsp</view>
    </action>
</actions>
--- NEW FILE: includedpath.xml ---
<actions>
    <action name="users.TestUsers2" alias="TestUsers2">
       <view name="success">/testusers2.jsp</view>
    </action>
</actions>
Index: XMLActionConfigurationTestCase.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/test/webwork/config/XMLActionConfigurationTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- XMLActionConfigurationTestCase.java	29 Dec 2003 01:16:12 -0000	1.1
+++ XMLActionConfigurationTestCase.java	4 Apr 2005 01:02:03 -0000	1.2
@@ -25,7 +25,7 @@
       iter.next();
       count++;
     }
-    assertEquals("Number Of Mappings", 8, count);
+    assertEquals("Number Of Mappings", 12, count);
   }
 
   public void testSimpleActionViewMappingsAreLoaded() throws Exception
@@ -61,6 +61,11 @@
     }
   }
 
+  public void testIncludeResource() throws Exception
+  {
+    assertEquals("TestUsers Action Mapping", "users.TestUsers", xmlActionConfig.getImpl("TestUsers.action"));
+  }
+  
   public void testSetImplNotSupported() throws Exception
   {
     try

Index: simple-actions.xml
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/test/webwork/config/simple-actions.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- simple-actions.xml	29 Dec 2003 01:16:12 -0000	1.1
+++ simple-actions.xml	4 Apr 2005 01:02:05 -0000	1.2
@@ -1,5 +1,6 @@
 <actions>
 
+    <include resource="webwork/config/included.xml" />
     <action name="security.LoginAction" alias="Login">
         <view name="success">/index.jsp</view>
         <view name="input">/login.jsp</view>
@@ -14,5 +15,6 @@
           <view name="success"> /users/adduser.jsp </view>
        </command>
     </action>
+    <include path="includedpath.xml" />
 
 </actions>
\ No newline at end of file



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click