Trying to use the Mountebank .Net Client for the test project
_mbClient = new MountebankClient();
_mbClient.DeleteAllImposters();
HttpRequestException: No connection could be made because the target machine actively refused it
Trying to use the Mountebank .Net Client for the test project
_mbClient = new MountebankClient();
_mbClient.DeleteAllImposters();
HttpRequestException: No connection could be made because the target machine actively refused it
It turns out that the MbDotNet doesn't have Mountebank integrated which makes sense.
I thought that I only need to install this Nuget package and it includes everything.
So the answer is: I need to go to the Mountbank website and install it, after that run
mb
to start the server, then run my Xunit .Net Core code, then the magic will happen.
If you would like a different url to host the MB server, then use its command line command to run it against different port and remember to pass in the new port number into your MountebankClient constructor.
That's it :)