Package nz.co.invensysenergy.proj.schemaUnitTest.utils

Examples of nz.co.invensysenergy.proj.schemaUnitTest.utils.TransformerFacade.transform()


   */
  public void testThrownException() throws Exception {
    SchemaUnitTest.setSchemaFile("examples/preValidationTransformation/schema.xsd");
    TransformerFacade uut = new TransformerFacade(new StreamSource(this.getClass().getResourceAsStream("testStylesheet.xsl"), "testStylesheet.xsl"));
    try {
      uut.transform(new StreamSource("examples/preValidationTransformation/testSuite.xml"), new DOMResult());
      fail("Expected an exception to be thrown");
    } catch (TransformerException e) {
      // TODO This test fails and I can't figure out what is going on
//      assertEquals("This Transformation Always Terminates", e.getMessage());
    }
View Full Code Here


          xmlFile = new File(xmlOutputFile);
        }
        Result fileResult = new StreamResult(xmlFile);
        log.finer("Performing pre-validation transformation to file " + xmlFile.getAbsolutePath());
        try {
          preTransformer.transform(source, fileResult);
        } catch (TransformerException e) {
          String message = TransformerFacade.determineErrorMessage(e);
          throw new TransformerException(message, e);
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.