1 22 package org.jboss.test.jmx.test; 23 24 import javax.management.MalformedObjectNameException ; 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 import org.jboss.deployment.IncompleteDeploymentException; 32 33 public class NoInternalJBossUnitTestCase extends JBossTestCase 34 { 35 37 public NoInternalJBossUnitTestCase( String name ) 38 { 39 super( name ); 40 } 41 42 public static Test suite() 43 throws Exception 44 { 45 return getDeploySetup(NoInternalJBossUnitTestCase.class, "jmx-nointernal.sar"); 46 } 47 48 public void testNoInternalJBossLifecycle() throws Exception 49 { 50 Integer state = (Integer ) getServer().getAttribute(getObjectName(), "State"); 51 assertTrue("Should be started", state.intValue() == ServiceMBean.STARTED); 52 } 53 54 ObjectName getObjectName() throws MalformedObjectNameException 55 { 56 return new ObjectName ("jboss.test:service=NoInternalJBoss"); 57 } 58 } 59 | Popular Tags |