mbeckerle commented on code in PR #821:
URL: https://github.com/apache/daffodil/pull/821#discussion_r1055548215


##########
daffodil-japi/src/test/java/org/apache/daffodil/example/TestJavaAPI.java:
##########
@@ -1213,4 +1215,70 @@ public void testJavaAPI26() throws IOException, 
ClassNotFoundException, External
         assertTrue(DaffodilXMLEntityResolver.getXMLEntityResolver() != null);
         assertTrue(DaffodilXMLEntityResolver.getLSResourceResolver() != null);
     }
+
+    @Test
+    public void testJavaAPINullxmlOutputStyle() throws IOException, 
ClassNotFoundException {
+        ByteArrayOutputStream xmlBos = new ByteArrayOutputStream();
+        try {
+            XMLTextInfosetOutputter outputter = new 
XMLTextInfosetOutputter(xmlBos, true, null);
+        } catch (Exception e) {
+            assertTrue(e.getMessage().contains("Unrecognized value: null for 
parameter: xmlTextEscapeStyle"));

Review Comment:
   Suggest 
   ```
   val msg = e.getMessage().toLowerCase
   assertTrue(msg.contains("unrecognized")
   assertTrue(msg.contains("null")
   assertTrue(msg.contains("xmlTextEscapeStyle")
   ```
   That will be less fragile if the message changes slighly 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to