Skip to content

Commit eb26703

Browse files
committed
extra test
1 parent d748626 commit eb26703

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/test/java/com/jcabi/xml/XSLDocumentTest.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,28 @@ void catchesXslErrorMessages() {
205205
);
206206
}
207207

208+
@Test
209+
void printsSystemIdInErrorMessages() {
210+
MatcherAssert.assertThat(
211+
Assertions.assertThrows(
212+
RuntimeException.class,
213+
() -> new XSLDocument(
214+
StringUtils.join(
215+
" <xsl:stylesheet",
216+
" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'",
217+
" version='2.0'><xsl:template match='/'>",
218+
"<xsl:value-of select='$xx'/></xsl:template>",
219+
" </xsl:stylesheet>"
220+
),
221+
"some-fake-systemId"
222+
).transform(new XMLDocument("<ooo/>"))
223+
).getLocalizedMessage(),
224+
Matchers.containsString(
225+
"Failed to create transformer by net.sf.saxon.TransformerFactoryImpl"
226+
)
227+
);
228+
}
229+
208230
@Test
209231
void catchesSaxonWarnings() {
210232
new XSLDocument(

0 commit comments

Comments
 (0)