public void SendRequestLogsEventWithNullRequest()
 {
     EtwTracingHelper("SendRequest", new[] { "InvocationId", "Request" },
         () =>
         {
             EtwTracingInterceptor etwTracer = new EtwTracingInterceptor();
             etwTracer.SendRequest(null, null);
         },
         (dict) =>
         {
             Assert.Equal("", dict["InvocationId"]);
             Assert.Equal("", dict["Request"]);
         });
 }
        public void SendRequestLogsEventWithNonNullRequest()
        {
            var httpRequest = new HttpRequestMessage(HttpMethod.Get, "http://www.windowsazure.com/test");
            httpRequest.Headers.Add("x-ms-version", "2013-11-01");

            EtwTracingHelper("SendRequest", new[] { "InvocationId", "Request" },
                () =>
                {
                    EtwTracingInterceptor etwTracer = new EtwTracingInterceptor();
                    etwTracer.SendRequest("1", httpRequest);
                },
                (dict) =>
                {
                    Assert.Equal("1", dict["InvocationId"]);
                    Assert.Contains("RequestUri: 'http://www.windowsazure.com/test'", dict["Request"]);
                    Assert.Contains("x-ms-version: 2013-11-01", dict["Request"]);
                });
        }