kuzjka commented on code in PR #504:
URL: 
https://github.com/apache/santuario-xml-security-java/pull/504#discussion_r2515011497


##########
src/main/java/org/apache/xml/security/utils/XMLUtils.java:
##########


Review Comment:
   Please, take a look at 908c97f
   
   We can check the formatting in various scenarios with these steps:
   1. Annotate test class or method with `@FormattingTest` (this adds a JUnit 
tag)
   2. Get a `FormattingChecker` instance using `FormattingCheckerFactory` - it 
returns an implementation depending on system properties
   3. Implement test scenario, i.e. create an XML signature.
   4. Check line breaks in the whole document and formatting of Base64 values 
using `FormattingChecker`
   5. Maven Surefire takes care to run the tagged tests with various 
configurations because of additional `<executions>` 
   
   Looks a little clearer than cheating with class loaders.
   
   I started by refactoring the `XMLUtilsTest`, which can be retained as a unit 
test suite. It looks much simpler now.
   Now, if the approach looks good, I can add a few high-level tests for basic 
scenarios (signature/encryption, DOM/StAX)



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