geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/modules/common/src/test/org/apache/geronimo/common/jmx MBeanProxyFactoryTest.java
Date Mon, 01 Sep 2003 15:12:36 GMT
jdillon     2003/09/01 08:12:36

  Modified:    modules/common/src/test/org/apache/geronimo/common/jmx
                        MBeanProxyFactoryTest.java
  Log:
   o added tests for ops with the same name & diff params
  
  Revision  Changes    Path
  1.3       +28 -1     incubator-geronimo/modules/common/src/test/org/apache/geronimo/common/jmx/MBeanProxyFactoryTest.java
  
  Index: MBeanProxyFactoryTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/common/src/test/org/apache/geronimo/common/jmx/MBeanProxyFactoryTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MBeanProxyFactoryTest.java	30 Aug 2003 20:38:46 -0000	1.2
  +++ MBeanProxyFactoryTest.java	1 Sep 2003 15:12:36 -0000	1.3
  @@ -137,6 +137,19 @@
           assertEquals(targetObject.setPoorlyNameOperation(), value);
       }
       
  +    public void testOperation_SameNameDiffArgs() throws Exception
  +    {
  +        MockObjectMBean bean = (MockObjectMBean)
  +            MBeanProxyFactory.create(MockObjectMBean.class, server, target);
  +        assertNotNull(bean);
  +        
  +        String value = bean.someOperation();
  +        assertEquals(targetObject.someOperation(), value);
  +        
  +        value = bean.someOperation("foo");
  +        assertEquals(targetObject.someOperation("foo"), value);
  +    }
  +    
       public void testMBeanProxyContext() throws Exception
       {
           MockObjectMBean bean = (MockObjectMBean)
  @@ -166,6 +179,10 @@
           String doIt();
           
           String setPoorlyNameOperation();
  +        
  +        String someOperation();
  +        
  +        String someOperation(Object arg);
       }
       
       public static class MockObject
  @@ -202,6 +219,16 @@
           public String setPoorlyNameOperation()
           {
               return "bad";
  +        }
  +        
  +        public String someOperation()
  +        {
  +            return "someop";
  +        }
  +        
  +        public String someOperation(Object arg)
  +        {
  +            return "someop" + arg;
           }
       }
   }
  
  
  

Mime
View raw message