1 22 package org.jboss.test.security.managers; 23 24 import javax.management.JMException ; 25 import javax.management.MBeanInfo ; 26 import javax.management.MBeanServerConnection ; 27 import javax.management.ObjectName ; 28 29 import org.jboss.test.JBossTestCase; 30 31 33 39 public class JASPISecurityManagerServiceUnitTestCase extends JBossTestCase 40 { 41 private ObjectName objectName = null; 42 43 public JASPISecurityManagerServiceUnitTestCase(String name) 44 throws JMException 45 { 46 super(name); 47 objectName = new ObjectName ("jboss.security:service=JASPISecurityManager"); 48 } 49 50 public void testJASPISecurityManagerServiceExistence() throws Exception 51 { 52 MBeanServerConnection server = this.getServer(); 53 MBeanInfo info = server.getMBeanInfo(objectName); 54 assertNotNull("MBeanInfo != null?", info); 55 String origAuthName = (String )server.getAttribute(objectName, "SecurityManagerClassName"); 56 assertNotNull("SecurityManager name != null", origAuthName); 57 } 58 } 59 | Popular Tags |