▲ | bluGill 2 days ago | |||||||
It is / or should be less tedious than a writting a custom class with the return values you need for everything. I still recomend hand written fakes - but only because and if they model real behavior without the unwanted effects. I find my handwritten cods often has more lines of test code to ensure it works than the real implementation. | ||||||||
▲ | vhantz 2 days ago | parent [-] | |||||||
> model real behavior without the unwanted effects. That's how I was looking at this since that's the experience I've had with mocks. For example, mocking an API to test a library that uses that API without incurring the real usage costs everytime the tests are ran. Going back over the github again, I can see this being useful if you have to fake a lot of APIs. Though my personal preference would always be to limit mocks as much as possible even with that framework available. | ||||||||
|