Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for DoThingsCallsOnCall(callCount, stub ...) similar to DoThingsReturnsOnCall(callCount) #193

Open
nitinkgp23 opened this issue Dec 6, 2021 · 0 comments

Comments

@nitinkgp23
Copy link

Suppose, MyInterface returns different values in different use cases. This can be handled by DoThingsReturnsOnCall(callCount), where we can initialise the fake interface by specifying what the return value should be on each call 0,1,2..
But how can we handle the case, when there is no return value, and the arguments are itself altered as a side effect by the function?

DoThingsCalls(stub) can be used to fake by passing stub to perform that specific side effect. But, what if similar to above, the function has different side effects on different calls?
There should be something on similar lines: DoThingsCallsOnCall(callCount, stub) , where we can specify different stubs while initialising, so that different side effects can be performed on each callCount 0,1,2..

If the above is supported via any other functionality available today, please do let know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant