Package org.jboss.test.jmx.compliance.server.support

Examples of org.jboss.test.jmx.compliance.server.support.InvocationHandlerTest


   public void testGetter()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);

      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);
      assertEquals("Attribute", proxy.getAttribute());
View Full Code Here


   public void testSetter()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);
      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      proxy.setAttribute("Changed");
      assertEquals("Changed", test.getAttribute());
   }
View Full Code Here

   public void testGetterPrimitiveBoolean()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);

      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      assertEquals(false, test.isIsPrimitive());
      test.setIsPrimitive(true);

      assertEquals(true, proxy.isIsPrimitive());
   }
View Full Code Here

   public void testSetterPrimitiveBoolean()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);
      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      assertEquals(false, test.isIsPrimitive());
      proxy.setIsPrimitive(true);

      assertEquals(true, test.isIsPrimitive());
   }
View Full Code Here

   public void testGetterTypeBoolean()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);

      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      assertEquals(null, test.getType());
      test.setType(new Boolean(true));

      assertEquals(true, proxy.getType().booleanValue());
   }
View Full Code Here

   public void testSetterTypeBoolean()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);
      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      assertEquals(null, test.getType());
      proxy.setType(new Boolean(true));

      assertEquals(true, test.getType().booleanValue());
   }
View Full Code Here

   public void testInvokeNoArgsNoReturn()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);
      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      proxy.invokeNoArgsNoReturn();
View Full Code Here

   public void testInvokeNoArgs()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);
      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      assertEquals("invokeNoArgs", proxy.invokeNoArgs());
View Full Code Here

   public void testInvoke()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);
      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      assertEquals("parameter", proxy.invoke("parameter"));
View Full Code Here

   public void testInvokeMixedParameters()
      throws Exception
   {
      MBeanServer server = MBeanServerFactory.newMBeanServer();
      InvocationHandlerTest test = new InvocationHandlerTest();
      server.registerMBean(test, invocationHandlerTestName);
      InvocationHandlerTestMBean proxy = (InvocationHandlerTestMBean) MBeanServerInvocationHandler.newProxyInstance(
         server, invocationHandlerTestName, InvocationHandlerTestMBean.class, false);

      Integer parameter = new Integer(20);
View Full Code Here

TOP

Related Classes of org.jboss.test.jmx.compliance.server.support.InvocationHandlerTest

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.