@Test public void testCompileXslShouldReturnXsltExecutable() throws SaxonApiException { given(processor.newXsltCompiler()).willReturn(xsltCompiler); given(streamSourceFactory.createStreamSource(inputStream)).willReturn(source); given(xsltCompiler.compile(source)).willReturn(xsltExecutable); XsltExecutable actual = underTest.compileXsl(inputStream, processor); assertEquals(actual, xsltExecutable); }
public XsltExecutable compileXsl(final InputStream inputStream, final Processor processor) throws SaxonApiException { XsltCompiler xsltCompiler = processor.newXsltCompiler(); Source xslSource = streamSourceFactory.createStreamSource(inputStream); xsltCompiler.setErrorListener(errorListener); XsltExecutable xsltExecutable = xsltCompiler.compile(xslSource); return xsltExecutable; }
XslCompiler { public XsltExecutable compileXsl(final InputStream inputStream, final Processor processor) throws SaxonApiException { XsltCompiler xsltCompiler = processor.newXsltCompiler(); Source xslSource = streamSourceFactory.createStreamSource(inputStream); xsltCompiler.setErrorListener(errorListener); XsltExecutable xsltExecutable = xsltCompiler.compile(xslSource); return xsltExecutable; } }
XslCompiler { public XsltExecutable compileXsl(final InputStream inputStream, final Processor processor) throws SaxonApiException { XsltCompiler xsltCompiler = processor.newXsltCompiler(); Source xslSource = streamSourceFactory.createStreamSource(inputStream); xsltCompiler.setErrorListener(errorListener); XsltExecutable xsltExecutable = xsltCompiler.compile(xslSource); return xsltExecutable; }  }
XslCompiler { public XsltExecutable compileXsl(final InputStream inputStream, final Processor processor) throws SaxonApiException { XsltCompiler xsltCompiler = processor.newXsltCompiler(); Source xslSource = streamSourceFactory.createStreamSource(inputStream); xsltCompiler.setErrorListener(errorListener); XsltExecutable xsltExecutable = xsltCompiler.compile(xslSource); return xsltExecutable; }  XsltExecutable compileXsl(final InputStream inputStream, final Processor processor); }
XslCompiler { public XsltExecutable compileXsl(final InputStream inputStream, final Processor processor) throws SaxonApiException { XsltCompiler xsltCompiler = processor.newXsltCompiler(); Source xslSource = streamSourceFactory.createStreamSource(inputStream); xsltCompiler.setErrorListener(errorListener); XsltExecutable xsltExecutable = xsltCompiler.compile(xslSource); return xsltExecutable; }  XsltExecutable compileXsl(final InputStream inputStream, final Processor processor);  }