586 references to Contains
Aspire.Components.Common.Tests (2)
ConformanceTests.cs (2)
319Assert.Contains(healthReport.Entries, entry => entry.Value.Status == expected); 453Assert.Contains(exportedActivities, activity => activity.Source.Name == ActivitySourceName);
Aspire.Confluent.Kafka.Tests (60)
MetricsTests.cs (60)
80Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 81Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 84Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 85Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 88Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 89Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 92Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 93Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 94Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 97Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 98Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 99Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 102Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 103Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 104Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 107Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 108Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 109Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 112Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 113Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 114Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 117Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 118Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 119Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 122Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 123Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 124Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 127Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 128Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 129Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 197Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 198Assert.Contains(collectorProducerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 201Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 202Assert.Contains(collectorConsumerQueueMessageCount.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 205Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 206Assert.Contains(collectorProducerQueueSize.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 209Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 210Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 211Assert.Contains(collectorNetworkTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 214Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 215Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 216Assert.Contains(collectorNetworkTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 219Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 220Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 221Assert.Contains(collectorNetworkRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 224Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 225Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 226Assert.Contains(collectorNetworkReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 229Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 230Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 231Assert.Contains(collectorMessageTx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 234Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 235Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 236Assert.Contains(collectorMessageTransmitted.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 239Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 240Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 241Assert.Contains(collectorMessageRx.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer"); 244Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "messaging.client_id" && t.Value!.ToString() == "rdkafka"); 245Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "name" && t.Value!.ToString() == "rdkafka#producer-1"); 246Assert.Contains(collectorMessageReceived.LastMeasurement!.Tags, t => t.Key == "type" && t.Value!.ToString() == "producer");
Aspire.Dashboard.Tests (2)
Integration\ResponseCompressionTests.cs (1)
54Assert.Contains(response.Content.Headers, h => h.Key == "Content-Encoding" && h.Value.Contains("br"));
Integration\StartupTests.cs (1)
341Assert.Contains(testSink.Writes, w =>
Aspire.Elastic.Clients.Elasticsearch.Tests (2)
AspireElasticClientExtensionsTest.cs (2)
63Assert.Contains(healthCheckReport.Entries, x => x.Key == healthCheckName); 165Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "elasticsearch");
Aspire.Hosting.Azure.Tests (1)
AzureFunctionsTests.cs (1)
24Assert.Contains(builder.Resources, resource =>
Aspire.Hosting.Containers.Tests (1)
WithDockerfileTests.cs (1)
82Assert.Contains(logs, log => log.Message.Contains("load build definition from Dockerfile"));
Aspire.Hosting.Kafka.Tests (2)
AddKafkaTests.cs (2)
127Assert.Contains(config, kvp => kvp.Key == "KAFKA_LOG_DIRS" && kvp.Value == "/var/lib/kafka/data"); 145Assert.Contains(config, kvp => kvp.Key == "KAFKA_LOG_DIRS" && kvp.Value == "/var/lib/kafka/data");
Aspire.Hosting.Milvus.Tests (2)
AddMilvusTests.cs (2)
115Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__my-milvus" && kvp.Value == "Endpoint=http://localhost:19530;Key=root:pass"); 126Assert.Contains(containerConfig, kvp => kvp.Key == "ConnectionStrings__my-milvus" && kvp.Value == "Endpoint=http://my-milvus:19530;Key=root:pass");
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
188Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__my-qdrant" && kvp.Value == "Endpoint=http://localhost:6334;Key=pass"); 189Assert.Contains(config, kvp => kvp.Key == "ConnectionStrings__my-qdrant_http" && kvp.Value == "Endpoint=http://localhost:6333;Key=pass"); 200Assert.Contains(containerConfig, kvp => kvp.Key == "ConnectionStrings__my-qdrant" && kvp.Value == "Endpoint=http://my-qdrant:6334;Key=pass"); 201Assert.Contains(containerConfig, kvp => kvp.Key == "ConnectionStrings__my-qdrant_http" && kvp.Value == "Endpoint=http://my-qdrant:6333;Key=pass");
Aspire.Hosting.Testing.Tests (4)
TestingBuilderTests.cs (2)
141Assert.Contains(appModel.GetContainerResources(), c => c.Name == "redis1"); 142Assert.Contains(appModel.GetProjectResources(), p => p.Name == "myworker1");
TestingFactoryTests.cs (2)
38Assert.Contains(appModel.GetContainerResources(), c => c.Name == "redis1"); 39Assert.Contains(appModel.GetProjectResources(), p => p.Name == "myworker1");
Aspire.Hosting.Tests (23)
AddParameterTests.cs (1)
93Assert.Contains(app.Services.GetServices<IDistributedApplicationLifecycleHook>(), hook => hook.GetType().Name == "WriteParameterLogsHook");
Dcp\ApplicationExecutorTests.cs (14)
580Assert.Contains(watchLogsResults1, l => l.Content.Contains("First")); 581Assert.Contains(watchLogsResults1, l => l.Content.Contains("Second")); 582Assert.Contains(watchLogsResults1, l => l.Content.Contains("Third")); 583Assert.Contains(watchLogsResults1, l => l.Content.Contains("Forth")); 584Assert.Contains(watchLogsResults1, l => l.Content.Contains("Fifth")); 585Assert.Contains(watchLogsResults1, l => l.Content.Contains("Sixth")); 586Assert.Contains(watchLogsResults1, l => l.Content.Contains("Seventh")); 592Assert.Contains(watchLogsResults2, l => l.Content.Contains("First")); 593Assert.Contains(watchLogsResults2, l => l.Content.Contains("Second")); 594Assert.Contains(watchLogsResults2, l => l.Content.Contains("Third")); 595Assert.Contains(watchLogsResults2, l => l.Content.Contains("Forth")); 596Assert.Contains(watchLogsResults2, l => l.Content.Contains("Fifth")); 597Assert.Contains(watchLogsResults2, l => l.Content.Contains("Sixth")); 598Assert.Contains(watchLogsResults2, l => l.Content.Contains("Seventh"));
HealthCheckTests.cs (1)
127Assert.Contains(
ProjectResourceTests.cs (1)
457Assert.Contains(resource.Annotations, a => a is DisableForwardedHeadersAnnotation);
ResourceNotificationTests.cs (5)
308Assert.Contains(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state: SomeState")); 328Assert.Contains(logs, l => l.Level == LogLevel.Debug && l.Message.Contains("Resource resource1/resource1 changed state: SomeState -> NewState")); 379Assert.Contains(logs, l => l.Level == LogLevel.Trace && l.Message.Contains("Resource resource1/resource1 update published:") && l.Message.Contains($"CreationTimeStamp = {createdDate:s}")); 380Assert.Contains(logs, l => l.Level == LogLevel.Trace && l.Message.Contains("Resource resource1/resource1 update published:") && l.Message.Contains("State = { Text = SomeState")); 381Assert.Contains(logs, l => l.Level == LogLevel.Trace && l.Message.Contains("Resource resource1/resource1 update published:") && l.Message.Contains("ExitCode = 0"));
WithReferenceTests.cs (1)
300Assert.Contains(config, kvp => kvp.Key == "services__petstore__default__0" && kvp.Value == "https://petstore.swagger.io/");
Aspire.Milvus.Client.Tests (1)
AspireMilvusExtensionTests.cs (1)
141Assert.Contains(healthCheckReport.Entries, x => x.Key == healthCheckName);
Aspire.MongoDB.Driver.Tests (2)
AspireMongoDBDriverExtensionsTests.cs (2)
138Assert.Contains(healthCheckReport.Entries, x => x.Key == healthCheckName); 182Assert.Contains(healthCheckReport.Entries, x => x.Key == healthCheckName);
Aspire.NATS.Net.Tests (2)
AspireNatsClientExtensionsTests.cs (2)
175Assert.Contains(healthCheckReport.Entries, x => x.Key == healthCheckName); 231Assert.Contains(activity.Tags, kvp => kvp.Key == "messaging.system" && kvp.Value == "nats");
Aspire.Oracle.EntityFrameworkCore.Tests (2)
ConformanceTests.cs (2)
178Assert.Contains(exportedActivities, activity => activity.Tags.Any(x => x.Key == "server.address")); 179Assert.Contains(exportedActivities, activity => activity.Tags.Any(x => x.Key == "db.system"));
Aspire.Qdrant.Client.Tests (1)
AspireQdrantClientExtensionsTest.cs (1)
55Assert.Contains(healthCheckReport.Entries, x => x.Key == healthCheckName);
Aspire.StackExchange.Redis.DistributedCaching.Tests (3)
DistributedCacheConformanceTests.cs (3)
73Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 78Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 83Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis");
Aspire.StackExchange.Redis.OutputCaching.Tests (3)
OutputCacheConformanceTests.cs (3)
73Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 78Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis"); 83Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis");
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
295Assert.Contains(activity.Tags, kvp => kvp.Key == "db.system" && kvp.Value == "redis");
Diagnostics.EFCore.FunctionalTests (2)
DatabaseErrorPageMiddlewareTest.cs (2)
409Assert.Contains(logProvider.Logger.Messages.ToList(), m => 457Assert.Contains(logProvider.Logger.Messages.ToList(), m =>
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
230Assert.Contains(TestSink.Writes, context => context.Message.Contains(version + @"\aspnetcorev2_outofprocess.dll"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (1)
302Assert.Contains(TestSink.Writes, context => context.Message.Contains(firstWriteString));
IIS.LongTests (3)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
IIS.NewHandler.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
IIS.NewShim.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
IISExpress.FunctionalTests (6)
InProcess\AppOfflineIISExpressTests.cs (1)
58Assert.Contains(TestSink.Writes, context => context.Message.Contains("Drained all requests, notifying managed."));
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
230Assert.Contains(TestSink.Writes, context => context.Message.Contains(version + @"\aspnetcorev2_outofprocess.dll"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (1)
302Assert.Contains(TestSink.Writes, context => context.Message.Contains(firstWriteString));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (3)
982Assert.Contains(TestSink.Writes, context => context.Message.Contains("An unhandled exception was thrown by the application.")); 1006Assert.Contains(TestSink.Writes, context => context.Message.Contains(expectedLogString)); 1049Assert.Contains(TestSink.Writes, context => context.Message.Contains("Is Console redirection: True"));
InMemory.FunctionalTests (29)
BadHttpRequestTests.cs (1)
231Assert.Contains(TestSink.Writes, w => w.EventId.Id == 17);
ConnectionMiddlewareTests.cs (1)
265Assert.Contains(LogMessages, m => m.Message.Contains("Unhandled exception while processing " + connectionId + "."));
Http2\Http2ConnectionTests.cs (2)
1351Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 5361Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body."));
Http2\Http2StreamTests.cs (7)
1350Assert.Contains(LogMessages, m => m.Exception?.Message.Contains("Response Content-Length mismatch: too many bytes written (12 of 11).") ?? false); 1926Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2013Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2076Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 3111Assert.Contains(LogMessages, m => (m.Exception?.Message.Contains("App Faulted") ?? false) && m.LogLevel == LogLevel.Error); 4723Assert.Contains(TestSink.Writes, w => w.EventId.Id == 13 && w.LogLevel == LogLevel.Error 5878Assert.Contains(LogMessages, m => m.Message.Equals("One or more of the following response headers have been removed because they are invalid for HTTP/2 and HTTP/3 responses: 'Connection', 'Transfer-Encoding', 'Keep-Alive', 'Upgrade' and 'Proxy-Connection'."));
Http2\Http2TestBase.cs (2)
1326Assert.Contains(expectedErrorMessage, expected => message.Exception.Message.Contains(expected)); 1346Assert.Contains(LogMessages, m => m.Exception?.Message.Contains(expectedErrorMessage) ?? false);
Http2\Http2TimeoutTests.cs (1)
234Assert.Contains(TestSink.Writes, w => w.EventId.Name == "ResponseMinimumDataRateNotSatisfied");
Http3\Http3StreamTests.cs (5)
675Assert.Contains(LogMessages, m => m.Message.Equals("One or more of the following response headers have been removed because they are invalid for HTTP/2 and HTTP/3 responses: 'Connection', 'Transfer-Encoding', 'Keep-Alive', 'Upgrade' and 'Proxy-Connection'.")); 2557Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2630Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2685Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body.")); 2874Assert.Contains(LogMessages, m => m.Message.Contains("the application completed without reading the entire request body."));
Http3\Http3TestBase.cs (2)
133Assert.Contains(LogMessages, m => m.Exception?.Message.Contains(expectedErrorMessage) ?? false); 143Assert.Contains(expectedErrorMessage, expected => message.Exception.Message.Contains(expected));
Http3\Http3TimeoutTests.cs (1)
418Assert.Contains(TestSink.Writes, w => w.EventId.Name == "ResponseMinimumDataRateNotSatisfied");
RequestBodyTimeoutTests.cs (2)
143Assert.Contains(TestSink.Writes, w => w.EventId.Id == 32 && w.LogLevel == LogLevel.Information); 144Assert.Contains(TestSink.Writes, w => w.EventId.Id == 33 && w.LogLevel == LogLevel.Information);
ResponseTests.cs (5)
510Assert.Contains(TestSink.Writes, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException 2028Assert.Contains(LogMessages, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException 2145Assert.Contains(LogMessages, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException 4133Assert.Contains(TestSink.Writes, w => w.EventId.Id == 13 && w.LogLevel == LogLevel.Error 4764Assert.Contains(testSink.Writes, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
2099Assert.Contains(TestSink.Writes, m => m.Message.Contains("Some connections failed to close gracefully during server shutdown."));
Microsoft.AspNetCore.App.Analyzers.Test (4)
Dependencies\ExtensionMethodsCompletionProviderTests.cs (4)
40Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "AddOpenApi"); 63Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "AddOpenApi"); 109Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "MapOpenApi"); 132Assert.Contains(result.Completions.ItemsList, item => item.DisplayText == "MapOpenApi");
Microsoft.AspNetCore.Authentication.Negotiate.Test (1)
NegotiateHandlerTests.cs (1)
446Assert.Contains(
Microsoft.AspNetCore.Authentication.Test (2)
GoogleTests.cs (1)
138Assert.Contains(transaction.SetCookie, cookie => cookie.StartsWith(".AspNetCore.Correlation.", StringComparison.Ordinal));
OpenIdConnect\OpenIdConnectTests.cs (1)
369Assert.Contains(remoteSignOutTransaction.Response.Headers, h => h.Key == "Set-Cookie");
Microsoft.AspNetCore.Authorization.Test (12)
AuthorizationPolicyFacts.cs (11)
41Assert.Contains(combined.Requirements, r => r is DenyAnonymousAuthorizationRequirement); 109Assert.Contains(combined.Requirements, r => r is RolesAuthorizationRequirement); 112Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r1")); 113Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r2")); 132Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a1")); 133Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a2")); 152Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a1")); 153Assert.Contains(combined.AuthenticationSchemes, a => a.Equals("a2")); 170Assert.Contains(combined.Requirements, r => r is RolesAuthorizationRequirement); 173Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r1")); 174Assert.Contains(rolesAuthorizationRequirement.AllowedRoles, r => r.Equals("r2"));
PolicyEvaluatorTests.cs (1)
156Assert.Contains(result.AuthorizationFailure.FailedRequirements, requirement => requirement is DummyRequirement);
Microsoft.AspNetCore.Components.Endpoints.Tests (7)
HotReloadServiceTests.cs (1)
120Assert.Contains(updatedEndpoint.Metadata, (element) => element is TestMetadata);
RazorComponentEndpointFactoryTest.cs (6)
39Assert.Contains(endpoint.Metadata, m => m is RootComponentMetadata); 40Assert.Contains(endpoint.Metadata, m => m is ComponentTypeMetadata); 41Assert.Contains(endpoint.Metadata, m => m is SuppressLinkGenerationMetadata); 42Assert.Contains(endpoint.Metadata, m => m is AuthorizeAttribute); 77Assert.Contains(endpoint.Metadata, m => m is AuthorizeAttribute); 105Assert.Contains(endpoint.Metadata, m => m is AuthorizeAttribute);
Microsoft.AspNetCore.Components.Tests (1)
RendererTest.cs (1)
3105Assert.Contains(latestDiff.Edits, edit =>
Microsoft.AspNetCore.Cors.Test (2)
CorsMiddlewareTests.cs (2)
990Assert.Contains(httpContext.Items, item => string.Equals(item.Key as string, "__CorsMiddlewareWithEndpointInvoked")); 1014Assert.Contains(httpContext.Items, item => string.Equals(item.Key as string, "__CorsMiddlewareWithEndpointInvoked"));
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (4)
CertificateManagerTests.cs (4)
66Assert.Contains( 74Assert.Contains( 80Assert.Contains( 88Assert.Contains(
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (2)
JsonTranscodingServiceMethodProviderTests.cs (2)
151Assert.Contains(testSink.Writes, c => c.Message == "Unable to bind GetClientStreaming on transcoding.JsonTranscodingStreaming to gRPC JSON transcoding. Client and bidirectional streaming methods are not supported."); 152Assert.Contains(testSink.Writes, c => c.Message == "Unable to bind GetBidiStreaming on transcoding.JsonTranscodingStreaming to gRPC JSON transcoding. Client and bidirectional streaming methods are not supported.");
Microsoft.AspNetCore.Hosting.Tests (15)
HostingApplicationDiagnosticsTests.cs (11)
746Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1"); 747Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2"); 775Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1"); 776Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2"); 805Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1"); 806Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2"); 836Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value3"); 837Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value4"); 903Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1/1"); 938Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key1" && pair.Value == "value1"); 939Assert.Contains(Activity.Current.Baggage, pair => pair.Key == "Key2" && pair.Value == "value2");
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (1)
548Assert.Contains(directory, file => string.Equals(file.Name, expected));
WebHostBuilderTests.cs (3)
1077Assert.Contains(sink.Writes, w => w.State.ToString() == "From startup"); 1230Assert.Contains(sink.Writes, w => w.Exception?.Message == "Startup exception"); 1254Assert.Contains(testSink.Writes, w => w.Exception?.Message == "Startup exception");
Microsoft.AspNetCore.Http.Extensions.Tests (52)
RequestDelegateFactoryTests.cs (26)
2599Assert.Contains(result.EndpointMetadata, m => m is ParameterNameMetadata { Name: "param1" }); 2600Assert.Contains(result.EndpointMetadata, m => m is ParameterNameMetadata { Name: "param2" }); 2613Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }); 2626Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 2639Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 2652Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 2665Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 2685Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 2687Assert.Contains(result.EndpointMetadata, m => m is MetadataCountMetadata { Count: 1 }); 2707Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 2708Assert.Contains(result.EndpointMetadata, m => m is ProducesResponseTypeMetadata { Type: { } type } && type == typeof(CountsDefaultEndpointMetadataResult)); 2710Assert.Contains(result.EndpointMetadata, m => m is MetadataCountMetadata { Count: 2 }); 2730Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 2731Assert.Contains(result.EndpointMetadata, m => m is ProducesResponseTypeMetadata { Type: { } type } && type == typeof(CountsDefaultEndpointMetadataResult)); 2733Assert.Contains(result.EndpointMetadata, m => m is MetadataCountMetadata { Count: 2 }); 2753Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 2754Assert.Contains(result.EndpointMetadata, m => m is IProducesResponseTypeMetadata { Type: { } type } && type == typeof(CountsDefaultEndpointMetadataResult)); 2756Assert.Contains(result.EndpointMetadata, m => m is MetadataCountMetadata { Count: 2 }); 2776Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 2777Assert.Contains(result.EndpointMetadata, m => m is ParameterNameMetadata { Name: "param1" }); 2797Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 2798Assert.Contains(result.EndpointMetadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }); 2852Assert.Contains(result.EndpointMetadata, m => m is RoutePatternMetadata { RoutePattern: "/test/pattern" }); 2887Assert.Contains(result.EndpointMetadata, m => m is IParameterBindingMetadata { Name: "param1" }); 3025Assert.Contains(result.EndpointMetadata, m => m is MetadataService); 3040Assert.Contains(result.EndpointMetadata, m => m is MetadataService);
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (1)
365Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "Value" });
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (25)
211Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "param1" }); 212Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "param2" }); 227Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }); 242Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 257Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 272Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 368Assert.Contains(endpoint.Metadata, m => m is MetadataService); 388Assert.Contains(endpoint.Metadata, m => m is MetadataService); 402Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 404Assert.Contains(endpoint.Metadata, m => m is MetadataCountMetadata { Count: > 1 }); 419Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 421Assert.Contains(endpoint.Metadata, m => m is MetadataCountMetadata { Count: > 1 }); 436Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 438Assert.Contains(endpoint.Metadata, m => m is MetadataCountMetadata { Count: > 1 }); 453Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 454Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "param1" }); 469Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 470Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }); 485Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Caller }); 486Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }); 501Assert.Contains(endpoint.Metadata, m => m is RoutePatternMetadata { RoutePattern: "/test/pattern" }); 560Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }); 561Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "param1" }); 562Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Property }); 563Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: nameof(AddsCustomParameterMetadata.Data) });
Microsoft.AspNetCore.Http.Results.Tests (20)
ResultsOfTTests.Generated.cs (20)
215Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult1) }); 216Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult2) }); 494Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult1) }); 495Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult2) }); 496Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult3) }); 850Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult1) }); 851Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult2) }); 852Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult3) }); 853Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult4) }); 1291Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult1) }); 1292Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult2) }); 1293Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult3) }); 1294Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult4) }); 1295Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult5) }); 1825Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult1) }); 1826Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult2) }); 1827Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult3) }); 1828Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult4) }); 1829Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult5) }); 1830Assert.Contains(builder.Metadata, m => m is ResultTypeProvidedMetadata { SourceTypeName: nameof(ProvidesMetadataResult6) });
Microsoft.AspNetCore.HttpLogging.Tests (140)
HttpLoggingMiddlewareTests.cs (140)
135Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 136Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 137Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 138Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 139Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 140Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 167Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 168Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 169Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 170Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 171Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 172Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 173Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 199Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 200Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 201Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 202Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 203Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 237Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 263Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: [Redacted]")); 283Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: bar")); 285Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: [Redacted]")); 303Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: [Not consumed by app]")); 334Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 362Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 390Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 427Assert.Contains(TestSink.Writes, w => w.Message.Equals("RequestBody: " + expected)); 463Assert.Contains(TestSink.Writes, w => w.Message.Equals("RequestBody: " + expected)); 488Assert.Contains(TestSink.Writes, w => w.Message.Equals("RequestBody: " + expected)); 514Assert.Contains(TestSink.Writes, w => w.Message.Equals("RequestBody: " + expected)); 552Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 593Assert.Contains(TestSink.Writes, w => w.Message.Contains("Unrecognized Content-Type for request body.")); 631Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 669Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody:")); 670Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 744Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 745Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 746Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 747Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 748Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 749Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 750Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 751Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 752Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 753Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 771Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 772Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 773Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 774Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 775Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 776Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 777Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 778Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 779Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 780Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 781Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: bar")); 800Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 801Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 802Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 805Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 806Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 807Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 808Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 809Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 810Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: ReplacedPath")); 828Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 829Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 852Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 853Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 854Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 876Assert.Contains(TestSink.Writes, w => w.Message.StartsWith("Duration: ", StringComparison.Ordinal)); 899Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 900Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 924Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 925Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 926Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 948Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 973Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 994Assert.Contains(TestSink.Writes, w => w.Message.Contains("Test: [Redacted]")); 1017Assert.Contains(TestSink.Writes, w => w.Message.Contains("Test: Kestrel")); 1018Assert.Contains(TestSink.Writes, w => w.Message.Contains("Server: [Redacted]")); 1039Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 1081Assert.Contains(TestSink.Writes, w => w.Message.Contains(expected)); 1111Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 1112Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 1119Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: test")); 1149Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 1150Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 1176Assert.Contains(TestSink.Writes, w => w.Message.Contains("Unrecognized Content-Type for response body.")); 1191Assert.Contains(TestSink.Writes, w => w.Message.Contains("No Content-Type header for request body.")); 1230Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 101")); 1334Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: Upgrade")); 1411Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 200")); 1412Assert.Contains(TestSink.Writes, w => w.Message.Contains("Transfer-Encoding: test")); 1413Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1624Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 1625Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 1626Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 1627Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 1628Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 1629Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 1630Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 1660Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 1661Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1662Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 1680Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 1681Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 1682Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 1683Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 1684Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 1685Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 1686Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 1687Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 418")); 1688Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1689Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 1690Assert.Contains(TestSink.Writes, w => w.Message.Contains("foo: bar")); 1709Assert.Contains(TestSink.Writes, w => w.Message.Contains("Protocol: HTTP/1.0")); 1710Assert.Contains(TestSink.Writes, w => w.Message.Contains("Method: GET")); 1711Assert.Contains(TestSink.Writes, w => w.Message.Contains("Scheme: http")); 1712Assert.Contains(TestSink.Writes, w => w.Message.Contains("Path: /foo")); 1713Assert.Contains(TestSink.Writes, w => w.Message.Contains("PathBase: /foo")); 1714Assert.Contains(TestSink.Writes, w => w.Message.Contains("Connection: keep-alive")); 1715Assert.Contains(TestSink.Writes, w => w.Message.Contains("RequestBody: test")); 1718Assert.Contains(TestSink.Writes, w => w.Message.Contains("Content-Type: text/plain")); 1719Assert.Contains(TestSink.Writes, w => w.Message.Contains("Body: Hello World")); 1720Assert.Contains(TestSink.Writes, w => w.Message.Contains("StatusCode: 412")); 1735Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1749Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 1750Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1781Assert.Contains(filteredLogs, w => w.Message.Equals("RequestBody: fro[Truncated by RequestBodyLogLimit]")); 1782Assert.Contains(filteredLogs, w => w.Message.Equals("ResponseBody: testin")); 1807Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 1809Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1825Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1839Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 1840Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200")); 1871Assert.Contains(filteredLogs, w => w.Message.Equals("RequestBody: fro[Truncated by RequestBodyLogLimit]")); 1872Assert.Contains(filteredLogs, w => w.Message.Equals("ResponseBody: testin")); 1897Assert.Contains(filteredLogs, w => w.Message.Contains("Request")); 1899Assert.Contains(filteredLogs, w => w.Message.Contains("StatusCode: 200"));
Microsoft.AspNetCore.HttpsPolicy.Tests (1)
HstsMiddlewareTests.cs (1)
411Assert.Contains(response.Headers, x => x.Key == HeaderNames.StrictTransportSecurity);
Microsoft.AspNetCore.Identity.Specification.Tests (1)
IdentitySpecificationTestBase.cs (1)
413Assert.Contains(rs, role => role == expectedRoleName);
Microsoft.AspNetCore.Identity.Test (3)
PasswordValidatorTest.cs (1)
178Assert.Contains(result.Errors, e => e.Description == error);
UserClaimsPrincipalFactoryTest.cs (2)
96Assert.Contains( 98Assert.Contains(claims, c => c.Type == manager.Options.ClaimsIdentity.UserIdClaimType && c.Value == user.Id);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
EndpointMetadataApiDescriptionProviderTest.cs (2)
850Assert.Contains(apiDescription.SupportedResponseTypes, m => m is { StatusCode: 400, Type: { } type } && type == typeof(ProblemDetails)); 851Assert.Contains(apiDescription.SupportedResponseTypes, m => m is { StatusCode: 200, Type: { } type } && type == typeof(string));
Microsoft.AspNetCore.Mvc.Core.Test (20)
ApiConventionMethodAttributeTest.cs (1)
67Assert.Contains(attributes, (a) =>
ApplicationModels\EndpointMetadataProviderTest.cs (11)
38Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }); 49endpoint => Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType }), 50endpoint => Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.ReturnType })); 60Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "param1" }); 71endpoint => Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "param1" }), 72endpoint => Assert.Contains(endpoint.Metadata, m => m is ParameterNameMetadata { Name: "param1" })); 82Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }); 93endpoint => Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter }), 94endpoint => Assert.Contains(endpoint.Metadata, m => m is CustomEndpointMetadata { Source: MetadataSource.Parameter })); 211endpoint => Assert.Contains(endpoint.Metadata, m => m is RoutePatternMetadata { RoutePattern: "selector1" }), 212endpoint => Assert.Contains(endpoint.Metadata, m => m is RoutePatternMetadata { RoutePattern: "selector2" }));
Authorization\AuthorizeFilterTest.cs (1)
27Assert.Contains(authorizationContext.HttpContext.User.Identities, i => i.IsAuthenticated);
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (6)
123Assert.Contains(manager.FeatureProviders, provider => provider is ControllerFeatureProvider); 143Assert.Contains(manager.FeatureProviders, provider => provider is ControllerFeatureProvider); 161Assert.Contains(builder.PartManager.FeatureProviders, provider => provider is ControllerFeatureProvider); 185Assert.Contains(builder.PartManager.FeatureProviders, provider => provider is ControllerFeatureProvider); 206Assert.Contains( 209Assert.Contains(builder.PartManager.FeatureProviders, provider => provider is ControllerFeatureProvider);
Infrastructure\ControllerActionInvokerTest.cs (1)
67Assert.Contains(routeValues, kvp => kvp.Key == "tag" && string.Equals(kvp.Value, "value"));
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (6)
DataAnnotationsMetadataProviderTest.cs (6)
1240Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1259Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1319Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1338Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1357Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute); 1418Assert.Contains(context.ValidationMetadata.ValidatorMetadata, m => m is RequiredAttribute);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (4)
XmlDataContractSerializerInputFormatterTest.cs (2)
129Assert.Contains(formatter.SupportedEncodings, i => i.WebName == "utf-8"); 130Assert.Contains(formatter.SupportedEncodings, i => i.WebName == "utf-16");
XmlSerializerInputFormatterTest.cs (2)
326Assert.Contains(formatter.SupportedEncodings, i => i.WebName == "utf-8"); 327Assert.Contains(formatter.SupportedEncodings, i => i.WebName == "utf-16");
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
ApiExplorerTest.cs (4)
1562Assert.Contains(TestSink.Writes, w => w.EventId.Name?.Equals("ApiDescriptionProviderExecuting", StringComparison.Ordinal) == true); 1563Assert.Contains(TestSink.Writes, w => w.LoggerName.Equals("Microsoft.AspNetCore.Mvc.ApiExplorer.ApiDescriptionGroupCollectionProvider", StringComparison.Ordinal)); 1564Assert.Contains(TestSink.Writes, w => w.Message.Equals("Executing API description provider 'DefaultApiDescriptionProvider' from assembly Microsoft.AspNetCore.Mvc.ApiExplorer v10.0.0.0.", StringComparison.Ordinal)); 1565Assert.Contains(TestSink.Writes, w => w.Message.Equals("Executing API description provider 'JsonPatchOperationsArrayProvider' from assembly Microsoft.AspNetCore.Mvc.NewtonsoftJson v42.42.42.42.", StringComparison.Ordinal));
XmlDataContractSerializerInputFormatterTest.cs (1)
108Assert.Contains(
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (1)
583Assert.Contains(
Infrastructure\PageActionInvokerTest.cs (1)
55Assert.Contains(routeValues, kvp => kvp.Key == "tag" && string.Equals(kvp.Value, "value"));
Microsoft.AspNetCore.Mvc.Test (6)
MvcServiceCollectionExtensionsTest.cs (6)
242Assert.Contains(services, s => s.ServiceType == typeof(IApiDescriptionGroupCollectionProvider)); 244Assert.Contains(services, s => s.ServiceType == typeof(CorsAuthorizationFilter)); 248Assert.Contains(services, s => s.ServiceType == typeof(FormatFilter)); 250Assert.Contains(services, s => s.ServiceType == typeof(IHtmlHelper)); 252Assert.Contains(services, s => s.ServiceType == typeof(IRazorViewEngine)); 254Assert.Contains(services, s => s.ServiceType == typeof(CacheTagHelperMemoryCacheFactory));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
47Assert.Contains(responseCookies, (cookie) => cookie.Key == expectedCookieName);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
MessageBodyTests.cs (1)
837Assert.Contains(TestSink.Writes,
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
WebHostBuilderKestrelExtensionsTests.cs (1)
98Assert.Contains(enumerable, f => f is TExpected);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (8)
QuicConnectionListenerTests.cs (4)
187Assert.Contains(LogMessages, m => m.EventId.Name == "ConnectionListenerCertificateNotSpecified"); 188Assert.Contains(LogMessages, m => m.EventId.Name == "ConnectionListenerApplicationProtocolsNotSpecified"); 206Assert.Contains(LogMessages, m => m.EventId.Name == "ConnectionListenerAborted"); 224Assert.Contains(LogMessages, m => m.EventId.Name == "ConnectionListenerAborted");
QuicStreamContextTests.cs (4)
45Assert.Contains(LogMessages, m => m.Message.Contains("send loop completed gracefully")); 51Assert.Contains(TestSink.Writes, m => m.Message.Contains(@"shutting down writes because: ""The QUIC transport's send loop completed gracefully."".")); 435Assert.Contains(TestSink.Writes, m => m.Message.Contains(@"shutting down writes because: ""The QUIC transport's send loop completed gracefully."".")); 479Assert.Contains(TestSink.Writes, m => m.Message.Contains(@"shutting down writes because: ""Test message""."));
Microsoft.AspNetCore.Shared.Tests (6)
CommandLineApplicationTests.cs (6)
881Assert.Contains(app.GetOptions(), o => o.LongName == "global"); 884Assert.Contains(subcmd1.GetOptions(), o => o.LongName == "nest1"); 885Assert.Contains(subcmd1.GetOptions(), o => o.LongName == "global"); 887Assert.Contains(subcmd2.GetOptions(), o => o.LongName == "nest2"); 888Assert.Contains(subcmd2.GetOptions(), o => o.LongName == "nest1"); 889Assert.Contains(subcmd2.GetOptions(), o => o.LongName == "global");
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (16)
HubConnectionTests.cs (16)
1793Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST")); 1794Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 CONNECT")); 1795Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 CONNECT")); 1852Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/1.1 POST")); 1853Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/1.1 GET")); 1854Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/1.1 GET")); 1962Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST")); 1963Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 CONNECT")); 1964Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 CONNECT")); 2404Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("/negotiate?")); 2407Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("?id=")); 2408Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 GET") && context.Message.Contains("?id=")); 2411Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 DELETE") && context.Message.Contains("?id=")); 2500Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("/negotiate?")); 2503Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request starting HTTP/2 POST") && context.Message.Contains("?id=")); 2504Assert.Contains(TestSink.Writes, context => context.Message.Contains("Request finished HTTP/2 GET") && context.Message.Contains("?id="));
Microsoft.AspNetCore.SignalR.Tests (9)
HubConnectionHandlerTests.ClientResult.cs (2)
395Assert.Contains(TestSink.Writes, c => c.EventId.Name == "UnexpectedCompletion"); 440Assert.Contains(TestSink.Writes, c => c.EventId.Name == "UnexpectedCompletion");
HubReflectionHelperTests.cs (7)
27Assert.Contains(hubMethods, m => m == hubType.GetMethod("VoidMethod")); 28Assert.Contains(hubMethods, m => m == hubType.GetMethod("IntMethod")); 29Assert.Contains(hubMethods, m => m == hubType.GetMethod("ArgMethod")); 39Assert.Contains(hubMethods, m => m == hubType.GetMethod("ExtraMethod")); 40Assert.Contains(hubMethods, m => m == hubType.GetMethod("VoidMethod")); 41Assert.Contains(hubMethods, m => m == hubType.GetMethod("IntMethod")); 42Assert.Contains(hubMethods, m => m == hubType.GetMethod("ArgMethod"));
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFileMiddlewareTests.cs (1)
43Assert.Contains(TestSink.Writes, w => w.Message.Contains("The WebRootPath was not found")
Microsoft.AspNetCore.TestHost.Tests (1)
TestServerTests.cs (1)
269Assert.Contains(serverAddressesFeature.Addresses, s => string.Equals(s, url, StringComparison.Ordinal));
Microsoft.AspNetCore.Tests (11)
WebApplicationTests.cs (10)
705Assert.Contains(config.Sources, source => source is JsonConfigurationSource jsonSource && jsonSource.Path == "appsettings.json"); 709Assert.Contains(config.Sources, source => source is JsonConfigurationSource jsonSource && jsonSource.Path == "appsettings.Development.json"); 763Assert.Contains(config.Sources, source => source is JsonConfigurationSource jsonSource && jsonSource.Path == "secrets.json"); 1635Assert.Contains(events, args => 2421Assert.Contains(builder.Services, service => service.ServiceType == typeof(HostBuilderContext)); 2422Assert.Contains(builder.Services, service => service.ServiceType == typeof(IHostApplicationLifetime)); 2423Assert.Contains(builder.Services, service => service.ServiceType == typeof(IHostLifetime)); 2424Assert.Contains(builder.Services, service => service.ServiceType == typeof(IOptions<>)); 2425Assert.Contains(builder.Services, service => service.ServiceType == typeof(ILoggerFactory)); 2426Assert.Contains(builder.Services, service => service.ServiceType == typeof(ILogger<>));
WebHostTests.cs (1)
109Assert.Contains(events, args =>
Microsoft.Build.Engine.UnitTests (2)
EvaluationProfiler_Tests.cs (2)
109Assert.Contains(profiledElements, location => location.ElementName == elementName); 141Assert.Contains(profiledElements, location => location.ElementName == elementName);
Microsoft.Build.Tasks.UnitTests (2)
Copy_Tests.cs (2)
2456Assert.Contains(copyFunctor.FilesCopiedSuccessfully, f => f.Name == FileUtilities.FixFilePath("c:\\source")); 2457Assert.Contains(copyFunctor.FilesCopiedSuccessfully, f => f.Name == FileUtilities.FixFilePath("c:\\source2"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
SourceGeneration\GeneratorDriverTests.cs (2)
3124Assert.Contains(result.Results[0].HostOutputs, o => o.Key == "Host"); 3128Assert.Contains(result.Results[0].GeneratedSources, isTextForKind);
SourceGeneration\SyntaxAwareGeneratorTests.cs (1)
476Assert.Contains(receiver2.VisitedNodes, n => n is MethodDeclarationSyntax);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (2)
5179Assert.Contains(symbols, s => s.Name == "Local"); 5208Assert.Contains(symbols, s => s.Name == "local1");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
FunctionPointerUtilities.cs (1)
202Assert.Contains(semanticInfo.MemberGroup, actual => actual.ToTestDisplayString(includeNonNullable: false) == expectedSymbol);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Completion\AbstractCompletionProviderTests.cs (1)
739Assert.Contains(items, i => i.DisplayText + i.DisplayTextSuffix == itemToCommit);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (2)
TelemetryReporterTests.cs (2)
43Assert.Contains(AssemblyLoadContext.Default.Assemblies, a => a == assembly); 44Assert.Contains(AssemblyLoadContext.Default.Assemblies, a => a.GetName().Name == "Microsoft.VisualStudio.Telemetry");
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (15)
NetCoreTests.cs (2)
444Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net6)"); 445Assert.Contains(workspace.CurrentSolution.Projects, p => p.Name == "Library(net5)");
VisualStudioMSBuildWorkspaceTests.cs (13)
767Assert.Contains(documents, d => d.Name == "App.xaml.cs"); 768Assert.Contains(documents, d => d.Name == "MainWindow.xaml.cs"); 774Assert.Contains(documents, d => d.Name == "App.g.cs"); 775Assert.Contains(documents, d => d.Name == "MainWindow.g.cs"); 1329Assert.Contains(metaRefs, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 1351Assert.Contains(project.MetadataReferences, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 1397Assert.Contains(metaRefs, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 1439Assert.Contains(vbProject.MetadataReferences, r => r is PortableExecutableReference reference && reference.Display.Contains("CSharpProject.dll")); 1907Assert.Contains(attrs, ad => ad.AttributeClass.Name == "MyAttribute"); 1954Assert.Contains(attrs, ad => ad.AttributeClass.Name == "MyAttr"); 3108Assert.Contains(proj.Documents, d => d.Name == "AssemblyInfo.cs"); 3196Assert.Contains(project.AdditionalDocuments, doc => doc.Name == "COM1"); 3197Assert.Contains(project.AdditionalDocuments, doc => doc.Name == "TEST::");
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
PublishToSymbolServerTest.cs (6)
122Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("No assets to publish")); 141Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("No target symbol servers")); 164Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("Publishing Symbols to Symbol server")); 169Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.Contains("Creating symbol request")); 177Assert.Contains(buildEngine.BuildMessageEvents , x => x.Message.Contains("Skipping lib/net8.0/aztoken.dll")); 178Assert.Contains(buildEngine.BuildMessageEvents, x => x.Message.StartsWith("Finished publishing symbols to temporary azdo org"));
Microsoft.DotNet.XUnitAssert.Tests (4)
CollectionAssertsTests.cs (4)
393 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(default(IEnumerable<int>)!, item => true)); 394 Assert.Throws<ArgumentNullException>("filter", () => Assert.Contains(new int[0], (Predicate<int>)null!)); 402 Assert.Contains(list, item => item.StartsWith("w")); 410 var ex = Record.Exception(() => Assert.Contains(list, item => item.StartsWith("q")));
Microsoft.Extensions.Hosting.Testing.Tests (3)
FakeHostTests.cs (1)
22Assert.Contains(host.Services.GetServices<ILoggerProvider>(), x => x is FakeLoggerProvider);
HostingFakesExtensionsTests.cs (2)
324Assert.Contains(firstCallbackTarget, record => record.Contains(message)); 325Assert.Contains(secondCallbackTarget, record => record.Contains(message));
Microsoft.Gen.Logging.Generated.Tests (2)
LoggerMessageAttributeTests.cs (1)
163Assert.Contains(collector.LatestRecord.StructuredState, x => x.Key == key && x.Value == value);
LogMethodTests.cs (1)
741Assert.Contains(record.StructuredState, x => x.Key == "event");
Sockets.FunctionalTests (6)
src\Servers\Kestrel\test\FunctionalTests\Http2\ShutdownTests.cs (6)
158Assert.Contains(LogMessages, m => m.Message.Contains("Request finished ")); 159Assert.Contains(LogMessages, m => m.Message.Contains("is closing.")); 160Assert.Contains(LogMessages, m => m.Message.Contains("is closed. The last processed stream ID was 1.")); 217Assert.Contains(LogMessages, m => m.Message.Contains("is closing.")); 218Assert.Contains(LogMessages, m => m.Message.Contains("is closed. The last processed stream ID was 1.")); 219Assert.Contains(LogMessages, m => m.Message.Contains("Some connections failed to close gracefully during server shutdown."));
System.Windows.Forms.Design.Tests (1)
EnsureEditorsTests.cs (1)
174Assert.Contains(attributes, editor => editor.EditorTypeName.StartsWith($"{expectedEditorType.FullName}, ", StringComparison.Ordinal));
System.Windows.Forms.Tests (1)
System\Windows\Forms\ScreenTests.cs (1)
23Assert.Contains(screens, s => s.Primary);
xunit.assert (1)
AsyncCollectionAsserts.cs (1)
141 Contains(AssertHelper.ToEnumerable(collection), filter);