1 22 package org.jboss.test.system.controller.parse.test; 23 24 import javax.management.MalformedObjectNameException ; 25 26 import org.jboss.deployment.DeploymentException; 27 import org.jboss.test.system.controller.AbstractControllerTest; 28 import org.jboss.test.system.controller.support.SimpleMBean; 29 30 36 public abstract class ErrorInParseTest extends AbstractControllerTest 37 { 38 public ErrorInParseTest(String name) 39 { 40 super(name); 41 } 42 43 protected void errorInParse(Class <? extends Throwable > expected) throws Exception 44 { 45 String resource = getName(); 46 resource = resource.substring(4) + ".xml"; 47 assertInitialDeployFailure(resource, SimpleMBean.OBJECT_NAME, expected); 48 } 49 50 public void testNameMissing() throws Exception 51 { 52 errorInParse(DeploymentException.class); 53 } 54 55 public void testNameEmpty() throws Exception 56 { 57 errorInParse(DeploymentException.class); 58 } 59 60 public void testNameInvalid() throws Exception 61 { 62 errorInParse(MalformedObjectNameException .class); 63 } 64 } 65 | Popular Tags |