use of org.apache.jena.assembler.exceptions.UnknownEncodingException in project jena by apache.
the class TestContentAssembler method testTrapsBadEncodings.
public void testTrapsBadEncodings() {
Assembler a = new ContentAssembler();
Resource root = resourceInModel("x rdf:type ja:Content; x ja:contentEncoding 'bogus'; x ja:literalContent 'sham'");
try {
a.open(root);
fail("should trap bad encoding");
} catch (UnknownEncodingException e) {
assertEquals("bogus", e.getEncoding());
assertEquals(resource("x"), e.getRoot());
}
}
Aggregations