public void ReceiveResponseLogsEventWithNullRequest() { EtwTracingHelper("ReceiveResponse", new[] { "InvocationId", "Response" }, () => { EtwTracingInterceptor etwTracer = new EtwTracingInterceptor(); etwTracer.ReceiveResponse(null, null); }, (dict) => { Assert.Equal("", dict["InvocationId"]); Assert.Equal("", dict["Response"]); }); }
public void ReceiveResponseLogsEventWithNonNullRequest() { using (var httpRequest = new HttpResponseMessage(System.Net.HttpStatusCode.OK)) { httpRequest.Content = new StringContent("<body/>"); EtwTracingHelper("ReceiveResponse", new[] { "InvocationId", "Response" }, () => { EtwTracingInterceptor etwTracer = new EtwTracingInterceptor(); etwTracer.ReceiveResponse("1", httpRequest); }, (dict) => { Assert.Equal("1", dict["InvocationId"]); Assert.Contains("<body/>", dict["Response"]); }); } }