Copilot commented on code in PR #382:
URL: 
https://github.com/apache/maven-shared-utils/pull/382#discussion_r3505807649


##########
src/test/java/org/apache/maven/shared/utils/xml/PrettyPrintXmlWriterTest.java:
##########
@@ -93,6 +93,13 @@ public void testPrettyPrintXMLWriterWithGivenLineIndenter() 
throws IOException {
         assertEquals(expectedResult("    "), w.toString());
     }
 
+    @Test
+    public void testPrettyPrintXMLWriterWithNullLineIndent() throws 
IOException {
+        PrettyPrintXMLWriter writer = new PrettyPrintXMLWriter(new 
StringWriter(), (String) null);
+        writer.startElement("div");
+        writer.endElement();
+    }

Review Comment:
   The new test only exercises the constructor without asserting the expected 
fallback behavior. As written it would pass even if the writer uses the wrong 
default indentation/formatting, as long as it doesn’t throw. Consider asserting 
the rendered output matches the default pretty-printed format (and ideally add 
a similar assertion-based test for the `lineSeparator == null` constructor 
path).



-- 
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