Package org.jboss.mx.mxbean

Examples of org.jboss.mx.mxbean.CompositeDataInvocationHandler


      {
         assertEquals(expected, actual);
         return;
      }

      CompositeDataInvocationHandler handler = (CompositeDataInvocationHandler) Proxy.getInvocationHandler(actual);
      CompositeData data = handler.getCompositeData();
      CompositeType type = data.getCompositeType();
      Set<String> names = type.keySet();
      Class clazz = expected.getClass();
      for (String name : names)
      {
         OpenType itemType = type.getType(name);
         try
         {
            Method method = MXBeanUtils.getCompositeDataMethod(clazz, name, itemType == SimpleType.BOOLEAN);
            Object expectedValue = method.invoke(expected, null);
            Object actualValue = handler.invoke(actual, method, null);
            assertEquals(expectedValue, actualValue);
         }
         catch (RuntimeException e)
         {
            throw e;
View Full Code Here


   }
  
   public void testGetCompositeData() throws Exception
   {
      CompositeData compositeData = createTestCompositeData();
      CompositeDataInvocationHandler test = new CompositeDataInvocationHandler(compositeData);
      assertTrue(compositeData == test.getCompositeData());
   }
View Full Code Here

  
   public void testNullCompositeData() throws Exception
   {
      try
      {
         new CompositeDataInvocationHandler(null);
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
View Full Code Here

TOP

Related Classes of org.jboss.mx.mxbean.CompositeDataInvocationHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.