1 22 package org.jboss.test.jmx.test; 23 24 import javax.management.MBeanServerConnection ; 25 import javax.management.ObjectName ; 26 27 import junit.framework.Test; 28 29 import org.jboss.system.ServiceMBean; 30 import org.jboss.test.JBossTestCase; 31 32 39 public class ProxyScopedUnitTestCase 40 extends JBossTestCase 41 { 42 public ProxyScopedUnitTestCase(String name) 43 { 44 super(name); 45 } 46 47 public static Test suite() 48 throws Exception 49 { 50 return getDeploySetup(ProxyUnitTestCase.class, "jmxproxyscoped.sar"); 51 } 52 53 public void testStarted() 54 throws Exception 55 { 56 MBeanServerConnection server = getServer(); 58 ObjectName serviceName = new ObjectName ("jboss.test:name=ProxyTests"); 59 assertTrue("Proxy tests should be started", server.getAttribute(serviceName, "State").equals(new Integer (ServiceMBean.STARTED))); 60 serviceName = new ObjectName ("jboss.test:name=ProxyTestsNested"); 61 assertTrue("Proxy tests nested should be started", server.getAttribute(serviceName, "State").equals(new Integer (ServiceMBean.STARTED))); 62 serviceName = new ObjectName ("jboss.test:name=ProxyTestsAttribute"); 63 assertTrue("Proxy tests attribute should be started", server.getAttribute(serviceName, "State").equals(new Integer (ServiceMBean.STARTED))); 64 } 65 } 66 | Popular Tags |