james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r420589 - /james/server/trunk/src/test/org/apache/james/test/mock/mailet/MockMailetConfig.java
Date Mon, 10 Jul 2006 17:34:47 GMT
Author: norman
Date: Mon Jul 10 10:34:46 2006
New Revision: 420589

URL: http://svn.apache.org/viewvc?rev=420589&view=rev
Log:
Override setProperty(String,String) to work like aspected in the mocked object.

Modified:
    james/server/trunk/src/test/org/apache/james/test/mock/mailet/MockMailetConfig.java

Modified: james/server/trunk/src/test/org/apache/james/test/mock/mailet/MockMailetConfig.java
URL: http://svn.apache.org/viewvc/james/server/trunk/src/test/org/apache/james/test/mock/mailet/MockMailetConfig.java?rev=420589&r1=420588&r2=420589&view=diff
==============================================================================
--- james/server/trunk/src/test/org/apache/james/test/mock/mailet/MockMailetConfig.java (original)
+++ james/server/trunk/src/test/org/apache/james/test/mock/mailet/MockMailetConfig.java Mon
Jul 10 10:34:46 2006
@@ -30,6 +30,7 @@
     private String mailetName;
     private MailetContext mc;
 
+    
     public MockMailetConfig(String mailetName, MailetContext mc) {
         super();
         this.mailetName = mailetName;
@@ -58,4 +59,14 @@
         return mailetName;
     }
 
+    // Override setProperty to work like it should in this MockMailetConfig
+    public Object setProperty(String key, String value) {
+        String oldValue = getProperty(key);
+        String newValue = value;
+
+        if (oldValue != null) {
+            newValue = oldValue + "," + value;
+        }
+        return super.setProperty(key, newValue);
+    }
 }



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


Mime
View raw message