@@ -40,12 +40,12 @@ public async Task SendAsync_ShouldLogRequestAndResponseToTrace_AndReturnCorrectR
4040 var tracingHandler = new HttpWireTracingHandler
4141 {
4242 //switch Trace one and off
43- LogToTrace = true ,
44- InnerHandler = innerHandler
43+ LogToTrace = true , InnerHandler = innerHandler
4544 } ;
4645
4746 using var client = new HttpClient ( tracingHandler ) ;
48- var requestContent = new StringContent ( "{\" input\" :\" data_from_riesa\" }" , Encoding . UTF8 , "application/json" ) ;
47+ var requestContent =
48+ new StringContent ( "{\" input\" :\" data_from_riesa\" }" , Encoding . UTF8 , "application/json" ) ;
4949
5050 try
5151 {
@@ -66,13 +66,17 @@ public async Task SendAsync_ShouldLogRequestAndResponseToTrace_AndReturnCorrectR
6666 Assert . IsTrue ( traceOutput . Contains ( "WIRE TRACE END" ) , "Trace missing end boundary." ) ;
6767
6868 // Assert 3: Validierung der Request-Daten (>)
69- Assert . IsTrue ( traceOutput . Contains ( "> POST /test/api/endpoint" ) , "Request method or path path not traced correctly." ) ;
69+ Assert . IsTrue ( traceOutput . Contains ( "> POST /test/api/endpoint" ) ,
70+ "Request method or path path not traced correctly." ) ;
7071 Assert . IsTrue ( traceOutput . Contains ( "> Host: localhost" ) , "Request host header missing in trace." ) ;
71- Assert . IsTrue ( traceOutput . Contains ( "Content-Type: application/json" ) , "Content-Type header missing in request trace." ) ;
72- Assert . IsTrue ( traceOutput . Contains ( "{\" input\" :\" data_from_riesa\" }" ) , "Request body payload missing in trace." ) ;
72+ Assert . IsTrue ( traceOutput . Contains ( "Content-Type: application/json" ) ,
73+ "Content-Type header missing in request trace." ) ;
74+ Assert . IsTrue ( traceOutput . Contains ( "{\" input\" :\" data_from_riesa\" }" ) ,
75+ "Request body payload missing in trace." ) ;
7376
7477 // Assert 4: Validierung der Response-Daten (<)
75- Assert . IsTrue ( traceOutput . Contains ( "< HTTP/1.1 200 OK" ) , "Response status code line missing or incorrect in trace." ) ;
78+ Assert . IsTrue ( traceOutput . Contains ( "< HTTP/1.1 200 OK" ) ,
79+ "Response status code line missing or incorrect in trace." ) ;
7680 Assert . IsTrue ( traceOutput . Contains ( expectedResponseBody ) , "Response body payload missing in trace." ) ;
7781 }
7882 finally
@@ -97,7 +101,8 @@ public MockHttpMessageHandler(HttpStatusCode statusCode, string content)
97101 _content = content ;
98102 }
99103
100- protected override Task < HttpResponseMessage > SendAsync ( HttpRequestMessage request , CancellationToken cancellationToken )
104+ protected override Task < HttpResponseMessage > SendAsync ( HttpRequestMessage request ,
105+ CancellationToken cancellationToken )
101106 {
102107 var response = new HttpResponseMessage ( _statusCode )
103108 {
0 commit comments