Ejemplo n.º 1
0
 public void testShouldNotImportInvalidXmlBeansManifest() {
   XmlBeanServiceManifestDocument manifestDocument = getManifest().toXmlBeanObject();
   manifestDocument.getServiceManifest().setManifestId("test");
   try {
     Manifest.Factory.newInstance(manifestDocument);
     fail("An exception should have been thrown");
   } catch (InvalidDocumentException e) {
     assertTrue("this exception was expected", true);
     System.out.println(e.getMessage());
   }
 }
Ejemplo n.º 2
0
 public void testShouldNotImportInvalidString() {
   String string = getManifest().toString();
   string = string.replaceFirst("jboss", "test");
   try {
     Manifest.Factory.newInstance(string);
     fail("An exception should have been thrown");
   } catch (InvalidDocumentException e) {
     System.out.println("This exception was expected: " + e.getMessage());
     assertTrue("this exception was expected", true);
   }
 }
Ejemplo n.º 3
0
 public void testShouldNotImportInvalidJaxBManifest() {
   JaxBServiceManifest jaxb = getManifest().toJaxB();
   jaxb.setManifestId("test");
   try {
     Manifest.Factory.newInstance(jaxb);
     fail("An exception should have been thrown");
   } catch (InvalidDocumentException e) {
     assertTrue("this exception was expected", true);
     System.out.println(e.getMessage());
   }
 }