I have a WCF service with a simple Gallio unit test that calls the service. However, I am confused by the framework's behavior. When I start visual studio for the first time, and try to run the unit test, I get the following error:
System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://localhost:43671/MyService.svc/MyService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:43671 ErrorCode: 10061
However, if I right click on the Service Reference in the unit test project and do "Update service reference", a popup saying that ASP.NET Development server on port 43671 has been started shows up, and the unit test works fine.
How do I add the server start up code to my unit test so I don't have to "Update service reference" every time I want to run a unit test?
Thanks.