1 22 package org.jboss.test.system.controller; 23 24 import javax.management.MBeanServer ; 25 import javax.management.ObjectName ; 26 27 import org.jboss.system.ServiceController; 28 import org.jboss.system.ServiceControllerMBean; 29 30 import junit.framework.AssertionFailedError; 31 32 38 public class NewControllerTestDelegate extends ControllerTestDelegate 39 { 40 public NewControllerTestDelegate(Class clazz) 41 { 42 super(clazz); 43 } 44 45 public ServiceControllerMBean createServiceController() throws Exception 46 { 47 return new ServiceController(); 48 } 49 50 public void assertMBeanFailed(ObjectName name, boolean registered) throws Exception 51 { 52 MBeanServer server = getServer(); 53 if (server.isRegistered(name)) 54 throw new AssertionFailedError(name + " should not be registered after a failure"); 55 } 56 } 57 | Popular Tags |