Examples of MyRunnable


Examples of test.compliance.standard.support.MyRunnable

   }

   public void testGetImplementationSpecified()
      throws Exception
   {
      Object obj = new MyRunnable();
      StandardMBean std = new StandardMBean(obj, Runnable.class);
      assertTrue("MyRunnable is the implementation", obj == std.getImplementation());
      assertTrue("MyRunnable is the implementation class", obj.getClass() == std.getImplementationClass());
   }
View Full Code Here

Examples of test.compliance.standard.support.MyRunnable

   }

   public void testMBeanInterfaceSpecified()
      throws Exception
   {
      Object obj = new MyRunnable();
      StandardMBean std = new StandardMBean(obj, Runnable.class);
      assertTrue("MyRunnable has Runnable as a management interface", Runnable.class == std.getMBeanInterface());
   }
View Full Code Here

Examples of test.compliance.standard.support.MyRunnable

      assertTrue("Expected IllegalArgumentException for null implementation", caught);

      caught = false;
      try
      {
         new StandardMBean(new MyRunnable(), ArbitraryInterface.class);
      }
      catch (NotCompliantMBeanException e)
      {
         caught = true;
      }
      assertTrue("Expected NotCompliantMBeanException for the wrong management interface", caught);

      caught = false;
      try
      {
         new StandardMBean(new MyRunnable(), null);
      }
      catch (NotCompliantMBeanException e)
      {
         caught = true;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.