More to the point, you could easily inject a mock object instead of a real Speaker implementation, and you could do a test without affecting the rest of your code base.
更关键的是,您可以轻松地注入模拟对象来替代真正的Speaker实现,并且无需影响其他的代码基就可以进行测试。
More to the point, you could easily inject a mock object instead of a real Speaker implementation, and you could do a test without affecting the rest of your code base.
更关键的是,您可以轻松地注入模拟对象来替代真正的Speaker实现,并且无需影响其他的代码基就可以进行测试。
应用推荐