70 references to Contains
Aspire.Dashboard.Tests (9)
Integration\OtlpCorsHttpServiceTests.cs (3)
105Assert.False(responseMessage.Headers.Contains("Access-Control-Allow-Origin")); 106Assert.False(responseMessage.Headers.Contains("Access-Control-Allow-Methods")); 107Assert.False(responseMessage.Headers.Contains("Access-Control-Allow-Headers"));
Integration\OtlpHttpServiceTests.cs (5)
54Assert.False(responseMessage.Headers.Contains("content-security-policy")); 180Assert.False(responseMessage.Headers.Contains("content-security-policy")); 295Assert.False(responseMessage.Headers.Contains("content-security-policy")); 324Assert.False(responseMessage.Headers.Contains("content-security-policy")); 353Assert.False(responseMessage.Headers.Contains("content-security-policy"));
Integration\StartupTests.cs (1)
413Assert.False(responseMessage.Headers.Contains("content-security-policy"));
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
168if (!header.Key.Equals("Content-Length") && message.Content.Headers.Contains(header.Key))
Binding.ReliableSession.IntegrationTests (2)
NetHttpBindingTests.cs (1)
284if (request.Headers.Contains(secondRequestHeaderName))
WSHttpBindingTests.cs (1)
284if (request.Headers.Contains(secondRequestHeaderName))
Microsoft.AspNetCore.Authentication.Test (3)
CookieTests.cs (1)
1915if (transaction.Response.Headers.Contains("Set-Cookie"))
OpenIdConnect\TestServerExtensions.cs (1)
35if (transaction.Response.Headers.Contains("Set-Cookie"))
TestExtensions.cs (1)
30if (transaction.Response.Headers.Contains("Set-Cookie"))
Microsoft.AspNetCore.CookiePolicy.Test (1)
TestExtensions.cs (1)
27if (transaction.Response.Headers.Contains("Set-Cookie"))
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (1)
HealthCheckMiddlewareTests.cs (1)
469Assert.False(response.Content.Headers.Contains(HeaderNames.Expires));
Microsoft.AspNetCore.HeaderPropagation.Tests (18)
HeaderPropagationIntegrationTest.cs (4)
117Assert.True(handler.Headers.Contains("out")); 144Assert.True(handler.Headers.Contains("first")); 146Assert.True(handler.Headers.Contains("second")); 190Assert.True(handler.Headers.Contains("different"));
HeaderPropagationMessageHandlerTest.cs (14)
49Assert.True(Handler.Headers.Contains("out")); 64Assert.True(Handler.Headers.Contains("out")); 78Assert.True(Handler.Content.Headers.Contains("Content-Type")); 92Assert.True(Handler.Content.Headers.Contains("Content-Language")); 106Assert.True(Handler.Content.Headers.Contains("Content-Language")); 121Assert.True(Handler.Headers.Contains("out")); 164Assert.True(Handler.Headers.Contains("inout")); 165Assert.True(Handler.Headers.Contains("another")); 183Assert.False(Handler.Headers.Contains("inout")); 204Assert.True(Handler.Headers.Contains("inout")); 220Assert.True(Handler.Headers.Contains("name")); 236Assert.True(Handler.Headers.Contains("name")); 238Assert.True(Handler.Headers.Contains("other")); 255Assert.True(Handler.Headers.Contains("name"));
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
651else if (httpClient.DefaultRequestHeaders.Contains(header.Key))
Microsoft.AspNetCore.Identity.FunctionalTests (3)
MapIdentityApiTests.cs (3)
113Assert.False(loginResponse.Headers.Contains(HeaderNames.SetCookie)); 1148Assert.False(infoPostResponse.Headers.Contains(HeaderNames.SetCookie)); 1169Assert.False(emailConfirmationResponse.Headers.Contains(HeaderNames.SetCookie));
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
444if (transaction.Response.Headers.Contains("Set-Cookie"))
Microsoft.AspNetCore.Mvc.FunctionalTests (3)
AuthMiddlewareAndFilterTestBase.cs (1)
282Assert.True(response.Headers.Contains("Set-Cookie"));
AuthMiddlewareUsingRequireAuthTest.cs (1)
84Assert.True(response.Headers.Contains("Set-Cookie"));
GlobalAuthorizationFilterTestBase.cs (1)
68Assert.True(response.Headers.Contains("Set-Cookie"));
Microsoft.AspNetCore.OutputCaching.Tests (3)
OutputCacheTests.cs (3)
1058Assert.True(subsequentResponse.Headers.Contains(HeaderNames.Age)); 1067Assert.False(subsequentResponse.Headers.Contains(HeaderNames.Age)); 1072Assert.True(initialResponse.Headers.Contains("X-Value"));
Microsoft.AspNetCore.ResponseCaching.Tests (3)
ResponseCachingTests.cs (3)
962Assert.True(subsequentResponse.Headers.Contains(HeaderNames.Age)); 971Assert.False(subsequentResponse.Headers.Contains(HeaderNames.Age)); 976Assert.True(initialResponse.Headers.Contains("X-Value"));
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
1323Assert.False(response.Headers.Contains(HeaderNames.Vary));
Microsoft.AspNetCore.Routing.FunctionalTests (4)
ShortCircuitTests.cs (4)
54Assert.True(response.Headers.Contains("Set")); 55Assert.False(response.Headers.Contains("NotSet")); 92Assert.False(response1.Headers.Contains("NotSet")); 96Assert.False(response2.Headers.Contains("NotSet"));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (9)
Listener\ResponseHeaderTests.cs (4)
89Assert.False(response.Content.Headers.Contains("Content-Length")); 118Assert.False(response.Content.Headers.Contains("Content-Length")); 176Assert.False(response.Content.Headers.Contains("Content-Length")); 199Assert.False(response.Content.Headers.Contains("Content-Length"));
ResponseHeaderTests.cs (3)
205Assert.False(response.Content.Headers.Contains("Content-Length")); 292Assert.False(headers.Contains(headerName)); 296Assert.True(headers.Contains(headerName));
ResponseTrailersTests.cs (2)
331Assert.False(headers.Contains(headerName)); 335Assert.True(headers.Contains(headerName));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
WebHostTests.cs (2)
327Assert.False(response1.Headers.Contains("alt-svc")); 340Assert.False(response2.Headers.Contains("alt-svc"));
Microsoft.AspNetCore.WebSockets.Tests (1)
WebSocketCompressionMiddlewareTests.cs (1)
69Assert.False(response.Headers.Contains(HeaderNames.SecWebSocketExtensions));
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
71Assert.True(req.Headers.Contains(TelemetryConstants.ClientApplicationNameHeader));
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
149if (resp.Headers.Contains(ETagHeader))
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (2)
134Assert.False(headers.Contains(headerName)); 138Assert.True(headers.Contains(headerName));