|
|
|
|
|
by oslac
1096 days ago
|
|
Mock has expectations about how the function is called. If you read a file from a disk, and you expect it only to be done once, a mock is "usable" in this scenario to count the number of invocations. Note that there aren't outside, observable, state changes or behavior involved in this. It is about the non-functional introspection. Fake is just a simple implementation, like in-memory db to stand-in for a real one. In the optimal case, provided by library authors. |
|