@Test public void testTransformXmlIntoHtmlByValidWithTwoCalls() { boolean isException = false; try { htmlResultExpectedUnix = htmlResultExpectedUnix.trim(); htmlResultExpectedWinows = htmlResultExpectedWinows.trim(); XmlTransformer xmlTransformer = new XmlTransformer(xsltStream); String htmlResult = xmlTransformer.transformXmlIntoHtml(xmlString); String htmlResult2 = xmlTransformer.transformXmlIntoHtml(xmlString); htmlResult = htmlResult.trim(); htmlResult2 = htmlResult2.trim(); assertTrue(htmlResult.equals(htmlResultExpectedUnix) || htmlResult.equals(htmlResultExpectedWinows)); assertTrue(htmlResult.equals(htmlResultExpectedUnix) || htmlResult.equals(htmlResultExpectedWinows)); } catch (Exception e) { isException = true; } assertFalse(isException); }
public String transformXmlIntoHtml(String xmlString) throws IllegalArgumentException, CdaXmlTransformerException { xmlString = deliverRelevantXML(xmlString); String htmlString = transformXmlAndXslIntoHtml(xmlString); htmlString = deliverRelevantHTML(htmlString); return htmlString; }
XmlTransformer { public String transformXmlIntoHtml(String xmlString) throws IllegalArgumentException, CdaXmlTransformerException { xmlString = deliverRelevantXML(xmlString); String htmlString = transformXmlAndXslIntoHtml(xmlString); htmlString = deliverRelevantHTML(htmlString); return htmlString; } }
XmlTransformer { public String transformXmlIntoHtml(String xmlString) throws IllegalArgumentException, CdaXmlTransformerException { xmlString = deliverRelevantXML(xmlString); String htmlString = transformXmlAndXslIntoHtml(xmlString); htmlString = deliverRelevantHTML(htmlString); return htmlString; } XmlTransformer(InputStream inputStream); }
XmlTransformer { public String transformXmlIntoHtml(String xmlString) throws IllegalArgumentException, CdaXmlTransformerException { xmlString = deliverRelevantXML(xmlString); String htmlString = transformXmlAndXslIntoHtml(xmlString); htmlString = deliverRelevantHTML(htmlString); return htmlString; } XmlTransformer(InputStream inputStream); String transformXmlIntoHtml(String xmlString); String deliverRelevantHTML(String htmlString); }
XmlTransformer { public String transformXmlIntoHtml(String xmlString) throws IllegalArgumentException, CdaXmlTransformerException { xmlString = deliverRelevantXML(xmlString); String htmlString = transformXmlAndXslIntoHtml(xmlString); htmlString = deliverRelevantHTML(htmlString); return htmlString; } XmlTransformer(InputStream inputStream); String transformXmlIntoHtml(String xmlString); String deliverRelevantHTML(String htmlString);  }