struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r586696 - /struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
Date Sat, 20 Oct 2007 10:04:57 GMT
Author: mrdon
Date: Sat Oct 20 03:04:53 2007
New Revision: 586696

URL: http://svn.apache.org/viewvc?rev=586696&view=rev
Log:
Adding test for original extension uri building
WW-2267

Modified:
    struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java

Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java?rev=586696&r1=586695&r2=586696&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
(original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapperTest.java
Sat Oct 20 03:04:53 2007
@@ -196,6 +196,17 @@
 
         assertEquals("/my/namespace/actionName!add.action", mapper.getUriFromActionMapping(mapping));
     }
+    
+    public void testGetUriWithOriginalExtension() throws Exception {
+        ActionMapping mapping = new ActionMapping("actionName", "/ns", null, new HashMap());
+        
+        ActionMapping orig = new ActionMapping();
+        orig.setExtension("foo");
+        ActionContext.getContext().put(ServletActionContext.ACTION_MAPPING, orig);
+        
+        DefaultActionMapper mapper = new DefaultActionMapper();
+        assertEquals("/ns/actionName.foo", mapper.getUriFromActionMapping(mapping));
+    }
 
     public void testGetMappingWithNoExtension() throws Exception {
         req.setupGetParameterMap(new HashMap());



Mime
View raw message