Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
JUnit 最佳实践之一是:相同的包,不同的目录。我想知道模拟类的等价物是什么?您是否将它们与它们应该模拟的类放在同一个包中,但在测试目录中?或其他地方?
就像编程中的许多事情一样,“这取决于”。以下是我使用的一些经验法则:
我的代码中有所有这些实例。