You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: