+
+ /**
+ * Resolves an existing file using a base path. Verifies the file is resolved correctly.
+ *
+ * @throws TransformerException
+ * @throws IOException
+ */
+ public void testResolveExistingFileLSResourceResolverUsingBasePath()
+ throws TransformerException, IOException {
+
+ resolver = new ClasspathUriResolver(PREFIX);
+ LSInput source = resolver.resolveResource(null, null, "kees",
+ REPORT_TO_HTML_XSL, null);
+ assertNotNull(source);
+
+ assertEquals("kees", source.getPublicId());
+ assertEquals(REPORT_TO_HTML_XSL, source.getSystemId());
+
+ String resolved = FileSystemUtils.read(source.getByteStream());
+
+ ClassPathResource resource = new ClassPathResource(
+ EXISTING_RESOURCE);
+ String expected = FileSystemUtils.read(resource.getInputStream());
+ assertEquals(expected, resolved);
+ }