Closed jamessimone closed 3 years ago
Makes sense to have a dedicated method to return void. What would be some scenarios/reasons where you would want to mock a method to return void
?
When I want to validate their inputs - but if this is already possible and I’m misremembering the API, I will gladly close!
I see. Yes, you don't have to mock a return value to validate the inputs or call counts after the test. The one scenario I can think of, is when you've overloaded methods. I think adding this to the api makes sense. Will do so. Thanks!
Added in #8 . Commit bcbb743726c5
I added a method to my own implementation:
However, you might have some opinion on a better implementation, and I'm all ears!