mkarg commented on pull request #421:
URL: https://github.com/apache/maven/pull/421#issuecomment-766006649


   > It is not necessary to test that setPath actually invokes setFile. Indeed 
it is a **bad idea** to test that setPath invokes setFile. Testing the 
implementation instead of the behavior leads to brittle tests that are tightly 
coupled to private implementation details.
   
   This is just your personal opinion. I think it is a pretty good idea to test 
whether a default methods does what I *want* it to do. Testing the 
implementation that solely was written for the sake of the test, makes no sense 
at all, as *any other* implementation would behave *differently* and possibly 
*wrong*. So the test would proof *nothing*.


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

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


Reply via email to