阅读背景:

What's the difference between a stub and mock?

来源:互联网 

I believe the biggest distinction is that a stub you have already written with predetermined behavior. So you would have a class that implements the dependency (abstract class or interface most likely) you are faking for testing purposes and the methods would just be stubbed out with set responses. They wouldn't do anything fancy and I believe the biggest distinction is that a stu




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: