1 22 package org.jboss.ejb3.test.servlet.unit; 23 24 import javax.management.Attribute ; 25 import javax.management.MBeanServerConnection ; 26 import javax.management.ObjectName ; 27 28 import junit.framework.Test; 29 30 import org.jboss.test.JBossTestCase; 31 32 36 public class AUnitTestCase extends JBossTestCase 37 { 38 private static final String USE_JBOSS = "UseJBossWebLoader"; 39 40 public AUnitTestCase(String name) 41 { 42 super(name); 43 } 44 45 public void testEJBServlet() throws Exception 46 { 47 MBeanServerConnection server = getServer(); 48 ObjectName tomcat = new ObjectName ("jboss.web:service=WebServer"); 49 50 try { 51 server.setAttribute(tomcat, new Attribute (USE_JBOSS, true)); 52 53 assertTrue((Boolean )server.getAttribute(tomcat, USE_JBOSS)); 54 } 55 finally 56 { 57 } 59 } 60 61 64 public static Test suite() throws Exception 65 { 66 return getDeploySetup(AUnitTestCase.class, ""); 67 } 68 69 70 } 71 | Popular Tags |