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);
                }
            }
        }
Example #2
0
        public static void StartServers(TestContext context)
        {
            // switch (Server)
            // {
            // case WebServer.WebDevServer:
            // WebDevServer40.EnsureIsRunning(
            // Port,
            // TestServerHelper.GetWebPathFromSolutionPath(context, @"Examples\CannonicalWorkflowHttpWebApp"));
            // break;
            // case WebServer.IISExpress:
            // IISExpressServer.EnsureIsRunning(
            // Port,
            // TestServerHelper.GetWebPathFromSolutionPath(context, @"Examples\CannonicalWorkflowHttpWebApp"));
            // break;
            // default:
            // throw new ArgumentOutOfRangeException();
            // }

            // TIP: Fiddler is a great tool for understanding HTTP traffic http://www.fiddler2.com
            if (UseFiddler)
            {
                FiddlerDebugProxy.EnsureIsRunning();
            }
        }