-
- /**
- * Tests resolving a file using {@link XslTransformer#resolve(String)}.
- *
- */
- public void testResolveWithDefaultResolver() throws Exception {
- XslTransformer transformer = new XslTransformer();
- File utilities = new File(FileSystemUtils.getTestInputDir(XslTransformerTest.class), "utilities.xsl");
- Source source = transformer.resolve(utilities.getAbsolutePath());
- assert(source instanceof StreamSource);
- StreamSource ssource = (StreamSource)source;
- String data = FileSystemUtils.read(ssource.getInputStream());
- String expected = FileSystemUtils.read(new ClassPathResource("org/wamblee/xml/utilities.xsl").getInputStream());
- assertEquals(expected, data);
- }