java在Mockito文档中,“SRPy”代表什么
从http://docs.mockito.googlecode.com/hg/org/mockito/Mockito.html
As usual you are going to read the partial mock warning: Object oriented programming is more less tackling complexity by dividing the complexity into separate, specific, SRPy objects. How does partial mock fit into this paradigm? Well, it just doesn't... Partial mock usually means that the complexity has been moved to a different method on the same object. In most cases, this is not the way you want to design your application.
# 1 楼答案
根据Mockito文件{a1}
OO指的是面向对象的,SRP指的是单一责任原则。这是一种设计模式,说明类应该有一个且只有一个职责,在这种情况下,您可能会编写不需要测试内部方法是否被调用的代码
http://en.wikipedia.org/wiki/Single_responsibility_principle