kriegaex commented on PR #133: URL: https://github.com/apache/xalan-java/pull/133#issuecomment-1836364876
> In the current case, the same test coverage can be achieved without Mockito (see below) Not true. Did you even read myprevious reply? The parsing logic is not using any mocks already. The only mock used is to stub out the I/O operation, and for that the isolated staic method mock is necessary. I do not want any I/O in a unit test. Your example is irrelevant, because it targets the wrong method. Of course I could factor out that class, I even was the first one to suggest it. But I am not doing it, because that code is nicely covered without any mocks already. Over-engineering. I had absolutely no problem to get 100% test coverage for this class without any complicated test code. The test is straightforward. > Of course, there are cases when mocks are helpful. I just mean in the current case, Mockito does add much It adds I/O isolation. Valuable enough for me. > adding more complicated mocks would be a definite overkill for testing versions. Nothing is complicated here. If any developer thinks that this mock usage is complicated, he has not seen any complicated mocks yet. > the Maven part of the build prints 5900 messages which makes it hard to scroll and understand. Can you somehow adjust the configuration so it does not print that many noisy messages? If anything goes wrong in the build, I want to see the details. Won't do. > CI prints a stack trace even though the tests pass: https://github.com/apache/xalan-java/actions/runs/7055388836/job/19206140606?pr=133#step:4:2885 Can you somehow make it avoid printing the error in case the exception was intentional? It is meant to print that stack trace,because that is the defined behaviour. I want to see it, because the test is verifying that error condition. -- 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: dev-unsubscr...@xalan.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For additional commands, e-mail: dev-h...@xalan.apache.org