mx4j/src/test/test/mx4j/tools/config ConfigurationLoaderTest.java,1.6,1.7

Simone Bordet <[email protected]> Mon, 07 Feb 2005 22:03:50 +0000
Newsgroups gmane.comp.java.mx4j.cvs
Message-ID <[email protected]>
Update of /cvsroot/mx4j/mx4j/src/test/test/mx4j/tools/config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27431/src/test/test/mx4j/tools/config

Modified Files:
	ConfigurationLoaderTest.java 
Log Message:
Added a test for a bug when the argument type is "object" in a call element

Index: ConfigurationLoaderTest.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/test/test/mx4j/tools/config/ConfigurationLoaderTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ConfigurationLoaderTest.java	13 Nov 2004 16:38:39 -0000	1.6
--- ConfigurationLoaderTest.java	7 Feb 2005 22:03:47 -0000	1.7
***************
*** 16,19 ****
--- 16,20 ----
  import java.util.ArrayList;
  import java.util.Hashtable;
+ 
  import javax.management.MBeanServer;
  import javax.management.MBeanServerFactory;
***************
*** 253,256 ****
--- 254,276 ----
     }
  
+    public void testCallElementWithObjectArgument() throws Exception
+    {
+       MBeanServer server = newMBeanServer();
+       String config =
+               "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+               "<configuration>" +
+               "  <startup>" +
+               "    <object objectid=\"list\">" +
+               "      <new classname=\"java.util.ArrayList\" />" +
+               "    </object>" +
+               "    <call refobjectid=\"list\" method=\"add\">" +
+               "      <arg type=\"object\">A String</arg>" +
+               "    </call>" +
+               "  </startup>" +
+               "</configuration>";
+       ConfigurationLoader loader = new ConfigurationLoader(server);
+       loader.startup(new StringReader(config));
+    }
+ 
     public void testCallElementObjectInvocation() throws Exception
     {



-------------------------------------------------------
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