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
I'm trying to use typemoq in an Angular project to mock up certain behavior and verify calls to Excel API (which isn't available at the time of testing so I need to make use of the dynamic mocking). I use the setup to force relationships between certain objects, but later on down the line when I'm expecting something to be called once, it is actually called 9 times (from previous specs that were run).
How can I mitigate this situation? It seems like I need to be able to reset invocations of a call. However, I don't see this available in the API. Or is there a better way to write setups? I've also tried resetting the mock in question and reinitializing the original setup, but this leads to other problems...
The text was updated successfully, but these errors were encountered:
I'm facing the same problem. The aforementioned reset requires to do the setup again, so it will be something like setup -> call test -> reset -> setup again ... .
I'm trying to use typemoq in an Angular project to mock up certain behavior and verify calls to Excel API (which isn't available at the time of testing so I need to make use of the dynamic mocking). I use the setup to force relationships between certain objects, but later on down the line when I'm expecting something to be called once, it is actually called 9 times (from previous specs that were run).
How can I mitigate this situation? It seems like I need to be able to reset invocations of a call. However, I don't see this available in the API. Or is there a better way to write setups? I've also tried resetting the mock in question and reinitializing the original setup, but this leads to other problems...
The text was updated successfully, but these errors were encountered: