spring-projects / spring-framework

Spring Framework
https://spring.io/projects/spring-framework
Apache License 2.0
56.75k stars 38.16k forks source link

Unit testing for DomUtils. #33752

Closed kunaljani1100 closed 1 month ago

kunaljani1100 commented 1 month ago

Unit tests have been added for the DomUtils class to test whether all the functions in this class work according to their expected behavior. Since testing for this class was not present tests have been added for this class.

snicoll commented 1 month ago

Thanks for the PR. Unfortunately, using mocks this way means that we're recreating the expectations of the underlying library and that diminishes the purpose of those tests quite a bit.

We are a small team so we cannot justify to rework those tests or keep this PR open in its current state. If you really want to pursue with this, the tests should load small XML files from the test classpath and assert on the actual Element.