http://xunitpatterns.com/Test%20Double.html
A stub has no logic, and only returns what you tell it to return.
A mock has expectations about the way it should be called, and a test should fail if it’s not called that way. Mocks are used to test interactions between objects, and are useful in cases where there are no other visible state changes or return results that you can verify (e.g. if your code reads from disk and you want to ensure that it doesn't do more than one disk read, you can use a mock to verify that the method that does the read is only called once).
A fake doesn’t use a mocking framework: it’s a lightweight implementation of an API that behaves like the real implementation, but isn't suitable for production
标签:return,no,implementation,单元测试,doesn,替身,测试,disk,called From: https://www.cnblogs.com/clarino/p/17017582.html