public static void CloseServers() { // TIP: Use helper classes to close servers required for testing WCFWebDevServer40.Close(port); // Could also close Fiddler // FiddlerDebugProxy.Close(); }
public void InitializeResourceCollection() { // TIP: When testing services with ASP.NET Compatibility Mode Required you must host with IIS or ASP.NET Development Server WCFWebDevServer40.EnsureIsRunning(port, WCFWebDevServer40.GetWebPathFromSolutionPath(testContextInstance)); // TIP: Fiddler is a great tool for understanding HTTP traffice if (useFiddler) { FiddlerDebugProxy.EnsureIsRunning(); } using (HttpClient client = new HttpClient()) { // TIP: Initialize your service to a known state before each test Debug.WriteLine("Sending TESTINIT command to {0}", ServiceUri); using (HttpRequestMessage request = new HttpRequestMessage("TESTINIT", ServiceUri)) { client.Send(request); } } }