Closed singhvivek2503 closed 1 year ago
Why do you think you need to clear them?
Why do you need to clear them?
Writing updated versions of old tests and adding new tests. The contract json file preserves the older interactions which I don't need anymore.
Why does that matter? You shouldn't be uploading from a dirty development environment anyway.
If you need to clear old interactions, just delete the file
Why does that matter? You shouldn't be uploading from a dirty development environment anyway.
If you need to clear old interactions, just delete the file
Ok. Wondering if that's correct, why its there in here _mockProviderServiceInstance.ClearInteractions()
?
The ClearInteractions method was removed from PactNet in v4.x and is no longer required.
As @mefellows says, you should be starting each test run from a fresh environment with no existing Pact file so that older interactions aren't left behind.
I am using messaging pacts to contract test event based communication. Is there a way similar to
_mockProviderServiceInstance.ClearInteractions();
when using messaging pacts?