|
|
|
|
|
by chunkyfunky
2076 days ago
|
|
Somewhat tangential to the conversation at hand, but I feel part of the problem here is having two methods i.e. ReadOne/ReadAll. Why not just embrace OOP and go with one method (Read) that takes a specification which itself encapsulates the set of files you want to read? Then it works for none, one, and all files...and makes the argument about Mocking vs Faking somewhat moot; the mock is a simple "for any args return this" and the fake is just as simple. I guess my point is that if you have to agonise over mock vs fake then really it's a sign that your design is not quite as testable as you might like :) |
|