예제 #1
0
 public void Dispose()
 {
     if (_loopbackHttpServer != null)
     {
         _loopbackHttpServer.Stop();
         _loopbackHttpServer.Dispose();
         _loopbackHttpServer = null;
     }
 }
예제 #2
0
        public SoapRouterServiceMock(string webServiceAppEndpoint)
        {
            if (!webServiceAppEndpoint.StartsWith("/"))
            {
                webServiceAppEndpoint = "/" + webServiceAppEndpoint;
            }
            if (!webServiceAppEndpoint.EndsWith("/"))
            {
                webServiceAppEndpoint = webServiceAppEndpoint + "/";
            }

            _testRunnerServerUri = UnitaryWebServer.ResolveLocalRandomPrefix(webServiceAppEndpoint);
            _loopbackHttpServer  = new UnitaryWebServer(_testRunnerServerUri, this.RouteResponse);
            _loopbackHttpServer.Run();
        }