1 16 17 package org.apache.axis2.deployment; 18 19 import org.apache.axis2.AbstractTestCase; 20 import org.apache.axis2.engine.AxisConfigurationImpl; 21 22 import java.io.FileInputStream ; 23 import java.io.FileNotFoundException ; 24 import java.io.InputStream ; 25 26 public class BadModuleTest extends AbstractTestCase { 27 30 public BadModuleTest(String testName) { 31 super(testName); 32 } 33 34 public void testBadModuleXML() { 35 try { 36 InputStream in = new FileInputStream (getTestResourceFile("deployment/Badmodule.xml")); 37 DeploymentParser parser = new DeploymentParser(in, null); 38 AxisConfigurationImpl glabl = new AxisConfigurationImpl(); 39 parser.processGlobalConfig(glabl,DeploymentConstants.AXIS2CONFIG); 40 fail("this must failed gracefully with DeploymentException or FileNotFoundException"); 41 } catch (FileNotFoundException e) { 42 return; 43 } catch (DeploymentException e) { 44 return; 45 } catch (Exception e) { 46 return; 47 } 48 49 } 50 } 51 | Popular Tags |