Package org.jboss.test.mx.mxbean.support

Examples of org.jboss.test.mx.mxbean.support.SimpleInterface


      assertEquals(test.toString(), compositeData.toString());
   }
  
   public void testGetSimpleTypes() throws Exception
   {
      SimpleInterface test = createTestCompositeDataProxy();
      assertEquals(SimpleInterface.bigDecimalValue, test.getBigDecimal());
      assertEquals(SimpleInterface.bigIntegerValue, test.getBigInteger());
      assertEquals(SimpleInterface.booleanValue, test.getBoolean());
      assertEquals(SimpleInterface.primitiveBooleanValue, test.isPrimitiveBoolean());
      assertEquals(SimpleInterface.byteValue, test.getByte());
      assertEquals(SimpleInterface.primitiveByteValue, test.getPrimitiveByte());
      assertEquals(SimpleInterface.characterValue, test.getCharacter());
      assertEquals(SimpleInterface.primitiveCharValue, test.getPrimitiveChar());
      assertEquals(SimpleInterface.dateValue, test.getDate());
      assertEquals(SimpleInterface.doubleValue, test.getDouble());
      assertEquals(SimpleInterface.primitiveDoubleValue, test.getPrimitiveDouble());
      assertEquals(SimpleInterface.floatValue, test.getFloat());
      assertEquals(SimpleInterface.primitiveFloatValue, test.getPrimitiveFloat());
      assertEquals(SimpleInterface.integerValue, test.getInteger());
      assertEquals(SimpleInterface.primitiveIntValue, test.getPrimitiveInt());
      assertEquals(SimpleInterface.longValue, test.getLong());
      assertEquals(SimpleInterface.primitiveLongValue, test.getPrimitiveLong());
      assertEquals(SimpleInterface.objectNameValue, test.getObjectName());
      assertEquals(SimpleInterface.shortValue, test.getShort());
      assertEquals(SimpleInterface.primitiveShortValue, test.getPrimitiveShort());
      assertEquals(SimpleInterface.stringValue, test.getString());
   }
View Full Code Here


      assertEquals(SimpleInterface.stringValue, test.getString());
   }
  
   public void testNullPrimitives() throws Exception
   {
      SimpleInterface test = createNullCompositeDataProxy();
      assertNull(test.getBigDecimal());
      assertNull(test.getBigInteger());
      assertNull(test.getBoolean());
      try
      {
         test.isPrimitiveBoolean();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(test.getByte());
      try
      {
         test.getPrimitiveByte();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(test.getCharacter());
      try
      {
         test.getPrimitiveChar();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(test.getDate());
      assertNull(test.getDouble());
      try
      {
         test.getPrimitiveDouble();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(test.getFloat());
      try
      {
         test.getPrimitiveFloat();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(test.getInteger());
      try
      {
         test.getPrimitiveInt();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(test.getLong());
      try
      {
         test.getPrimitiveLong();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(test.getObjectName());
      assertNull(test.getShort());
      try
      {
         test.getPrimitiveShort();
         fail("Should not be here");
      }
      catch (AssertionFailedError e)
      {
         throw e;
      }
      catch (Throwable t)
      {
         checkThrowableDeep(IllegalArgumentException.class, t);
      }
      assertNull(SimpleInterface.stringValue, test.getString());
   }
View Full Code Here

      ObjectName objectName = CompositeMXBeanSupportMXBean.REGISTERED_OBJECT_NAME;
      server.registerMBean(support, objectName);
      CompositeMXBeanSupportMXBean proxy = MXBeanFactory.makeProxy(server, objectName, CompositeMXBeanSupportMXBean.class);
      composite = new SimpleObject();
      composite.setString("hello");
      SimpleInterface result = proxy.echoReverse(composite);
      assertEquals("olleh", result.getString());
   }
View Full Code Here

      }
   }
  
   public void testToEquals() throws Exception
   {
      SimpleInterface test1 = createTestCompositeDataProxy("Test1");
     
      assertFalse(test1.equals(null));
      assertFalse(test1.equals(new Object()));
      assertTrue(test1.equals(test1));

      SimpleInterface test2 = createTestCompositeDataProxy("Test2");
     
      assertFalse(test1.equals(test2));
   }
View Full Code Here

   }
  
   public void testHashCode() throws Exception
   {
      CompositeData compositeData = createTestCompositeData();
      SimpleInterface test = createCompositeDataProxy(SimpleInterface.class, compositeData);

      assertEquals(test.hashCode(), compositeData.hashCode());
   }
View Full Code Here

   }
  
   public void testToString() throws Exception
   {
      CompositeData compositeData = createTestCompositeData();
      SimpleInterface test = createCompositeDataProxy(SimpleInterface.class, compositeData);

      assertEquals(test.toString(), compositeData.toString());
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.mx.mxbean.support.SimpleInterface

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.