One of the JUnit best practices is : same package, separate directories. I am wondering what is the equivalent for Mock classes ? Do you keep them in the same package as classes they are supposed to mock, but in the test directory ? or elsewhere ?
Share
Like many things in programming, “it depends.” Here are some rules of thumb I use:
I have instances of all of these in my code.