Skip to content

Commit

Permalink
extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 1, 2022
1 parent d748626 commit eb26703
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/java/com/jcabi/xml/XSLDocumentTest.java
Expand Up @@ -205,6 +205,28 @@ void catchesXslErrorMessages() {
);
}

@Test
void printsSystemIdInErrorMessages() {
MatcherAssert.assertThat(
Assertions.assertThrows(
RuntimeException.class,
() -> new XSLDocument(
StringUtils.join(
" <xsl:stylesheet",
" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'",
" version='2.0'><xsl:template match='/'>",
"<xsl:value-of select='$xx'/></xsl:template>",
" </xsl:stylesheet>"
),
"some-fake-systemId"
).transform(new XMLDocument("<ooo/>"))
).getLocalizedMessage(),
Matchers.containsString(
"Failed to create transformer by net.sf.saxon.TransformerFactoryImpl"
)
);
}

@Test
void catchesSaxonWarnings() {
new XSLDocument(
Expand Down

0 comments on commit eb26703

Please sign in to comment.