Hello, I'm trying to implement multiple test cases for a
pact.net consumer unit test. Whenever I increase the number of test cases, for example from one test case to two test cases or from two to three the pact.VerfiyAsync() method of one of the test cases throws the following exception:
System.InvalidOperationException : Unable to start mock server
If I reduce again the number of test case, for example by commenting out one of the test case methods, everything works again.
I have created an example project based on the
pact.net basic .net example with some files from my project added to that and was able to reproduce the behavior:
https://github.com/cyrusdevnomad/test-project-for-error-reproducing
You can try it for yourself. But make sure to change the number of unit test cases (the exception is thrown if the number of unit test cases is increased) by uncommenting/commenting out unit test case methods to see the exception mentioned above.