828 references to Contains
Aspire.Components.Common.Tests (1)
Aspire.Dashboard.Tests (4)
Aspire.Hosting.Azure.Tests (1)
IIS.Common.TestLib (1)
IIS.FunctionalTests (1)
IISExpress.FunctionalTests (1)
InMemory.FunctionalTests (21)
EventSourceTests.cs (20)
85Assert.All(new[] { "connectionId", "remoteEndPoint", "localEndPoint" }, p => Assert.Contains(p, connectionStart.PayloadNames));
93Assert.All(new[] { "connectionId", "requestId" }, p => Assert.Contains(p, firstRequestStart.PayloadNames));
102Assert.All(new[] { "connectionId", "requestId" }, p => Assert.Contains(p, firstRequestStop.PayloadNames));
111Assert.All(new[] { "connectionId", "requestId" }, p => Assert.Contains(p, secondRequestStart.PayloadNames));
120Assert.All(new[] { "connectionId", "requestId" }, p => Assert.Contains(p, secondRequestStop.PayloadNames));
129Assert.All(new[] { "connectionId" }, p => Assert.Contains(p, connectionStop.PayloadNames));
210Assert.All(new[] { "connectionId", "remoteEndPoint", "localEndPoint" }, p => Assert.Contains(p, connectionStart.PayloadNames));
218Assert.All(new[] { "connectionId", "sslProtocols" }, p => Assert.Contains(p, tlsHandshakeStart.PayloadNames));
226Assert.All(new[] { "connectionId", "sslProtocols", "applicationProtocol", "hostName" }, p => Assert.Contains(p, tlsHandshakeStop.PayloadNames));
237Assert.All(new[] { "connectionId", "requestId" }, p => Assert.Contains(p, requestStart.PayloadNames));
246Assert.All(new[] { "connectionId", "requestId" }, p => Assert.Contains(p, requestStop.PayloadNames));
256Assert.All(new[] { "connectionId" }, p => Assert.Contains(p, connectionStop.PayloadNames));
314Assert.All(new[] { "connectionId", "remoteEndPoint", "localEndPoint" }, p => Assert.Contains(p, connectionStart.PayloadNames));
322Assert.All(new[] { "connectionId", "sslProtocols" }, p => Assert.Contains(p, tlsHandshakeStart.PayloadNames));
330Assert.All(new[] { "connectionId" }, p => Assert.Contains(p, tlsHandshakeFailed.PayloadNames));
338Assert.All(new[] { "connectionId", "sslProtocols", "applicationProtocol", "hostName" }, p => Assert.Contains(p, tlsHandshakeStop.PayloadNames));
346Assert.All(new[] { "connectionId" }, p => Assert.Contains(p, connectionStop.PayloadNames));
395Assert.All(new[] { "connectionId", "remoteEndPoint", "localEndPoint" }, p => Assert.Contains(p, connectionStart.PayloadNames));
403Assert.All(new[] { "connectionId" }, p => Assert.Contains(p, connectionRejected.PayloadNames));
411Assert.All(new[] { "connectionId" }, p => Assert.Contains(p, connectionStop.PayloadNames));
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.Authentication.Test (2)
Microsoft.AspNetCore.Authorization.Test (4)
Microsoft.AspNetCore.Components.Server.Tests (4)
Microsoft.AspNetCore.Components.Tests (9)
Microsoft.AspNetCore.Components.Web.Tests (3)
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (7)
Microsoft.AspNetCore.CookiePolicy.Test (5)
Microsoft.AspNetCore.HeaderPropagation.Tests (6)
Microsoft.AspNetCore.Http.Abstractions.Tests (4)
Microsoft.AspNetCore.Http.Tests (1)
Microsoft.AspNetCore.Identity.Specification.Tests (1)
Microsoft.AspNetCore.Identity.Test (5)
Microsoft.AspNetCore.Mvc.Core.Test (27)
ModelBinding\Validation\ClientValidatorCacheTest.cs (10)
25Assert.Contains(attribute1, metadata.ValidatorMetadata); // Copied by provider
26Assert.Contains(attribute2, metadata.ValidatorMetadata); // Copied by provider
34Assert.Contains(validators1[0], validators2); // Cached
35Assert.Contains(validators1[1], validators2); // Cached
52Assert.Contains(validator1.Attribute, metadata.ValidatorMetadata); // Copied by provider
53Assert.Contains(validator2.Attribute, metadata.ValidatorMetadata); // Copied by provider
82Assert.Contains(validator1.Attribute, parameter.ValidatorMetadata); // Copied by provider
83Assert.Contains(validator2.Attribute, parameter.ValidatorMetadata); // Copied by provider
102Assert.Contains(validator1.Attribute, property.ValidatorMetadata); // Copied by provider
103Assert.Contains(validator2.Attribute, property.ValidatorMetadata); // Copied by provider
ModelBinding\Validation\DefaultObjectValidatorTests.cs (4)
317Assert.Contains(ValidationAttributeUtil.GetStringLengthErrorMessage(null, 5, "Street"), errorMessages);
318Assert.Contains(ValidationAttributeUtil.GetRegExErrorMessage("hehehe", "Street"), errorMessages);
349Assert.Contains(ValidationAttributeUtil.GetStringLengthErrorMessage(null, 5, "Street"), errorMessages);
350Assert.Contains(ValidationAttributeUtil.GetRegExErrorMessage("hehehe", "Street"), errorMessages);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (4)
Microsoft.AspNetCore.Mvc.FunctionalTests (39)
RoutingTestsBase.cs (31)
269Assert.Contains("/Home/Index", result.ExpectedUrls);
293Assert.Contains("/", result.ExpectedUrls);
327Assert.Contains("/Travel/Flight/Index", result.ExpectedUrls);
379Assert.Contains("/Store/Shop/Products", result.ExpectedUrls);
383Assert.Contains(
387Assert.Contains(
412Assert.Contains(url, result.ExpectedUrls);
416Assert.Contains(
420Assert.Contains(
426Assert.Contains(
640Assert.Contains("/Home/About", result.ExpectedUrls);
657Assert.Contains("/Blog/Edit/5", result.ExpectedUrls);
661Assert.Contains(
665Assert.Contains(
669Assert.Contains(
687Assert.Contains("/api/Employee", result.ExpectedUrls);
714Assert.Contains("/Store/Shop/Orders", result.ExpectedUrls);
739Assert.Contains("/api/Employee/5/Salary", result.ExpectedUrls);
759Assert.Contains("/Store/Shop/Orders", result.ExpectedUrls);
782Assert.Contains("/api/Employee", result.ExpectedUrls);
804Assert.Contains("/api/Employee/Manager", result.ExpectedUrls);
849Assert.Contains("/api/Employee/5", result.ExpectedUrls);
872Assert.Contains("/api/Employee/5/Administrator", result.ExpectedUrls);
876Assert.Contains(
893Assert.Contains("/Manager/5", result.ExpectedUrls);
897Assert.Contains(
914Assert.Contains("/Team/5", result.ExpectedUrls);
918Assert.Contains(
935Assert.Contains("/Teams", result.ExpectedUrls);
1497Assert.Contains(path, result.ExpectedUrls);
1549Assert.Contains(path, result.ExpectedUrls);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
Microsoft.AspNetCore.Mvc.Razor.Test (1)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
Microsoft.AspNetCore.OpenApi.Tests (24)
Services\OpenApiSchemaService\OpenApiSchemaService.PolymorphicSchemas.cs (11)
40Assert.Contains(schema.Discriminator.PropertyName, triangleSchema.Properties.Keys);
79Assert.Contains(schema.Discriminator.PropertyName, citySchema.Properties.Keys);
83Assert.Contains(schema.Discriminator.PropertyName, timeSeriesSchema.Properties.Keys);
87Assert.Contains(schema.Discriminator.PropertyName, newsSchema.Properties.Keys);
122Assert.Contains(schema.Discriminator.PropertyName, citySchema.Properties.Keys);
126Assert.Contains(schema.Discriminator.PropertyName, timeSeriesSchema.Properties.Keys);
158Assert.Contains("$type", paintSchema.Properties.Keys);
162Assert.Contains("$type", fabricSchema.Properties.Keys);
210Assert.Contains(schema.Discriminator.PropertyName, dogSchema.Properties.Keys);
214Assert.Contains(schema.Discriminator.PropertyName, catSchema.Properties.Keys);
218Assert.Contains(schema.Discriminator.PropertyName, petSchema.Properties.Keys);
Microsoft.AspNetCore.OutputCaching.Tests (19)
OutputCachePolicyBuilderTests.cs (10)
115Assert.Contains("HeaderA", (IEnumerable<string>)context.CacheVaryByRules.HeaderNames);
116Assert.Contains("HeaderC", (IEnumerable<string>)context.CacheVaryByRules.HeaderNames);
131Assert.Contains("QueryA", (IEnumerable<string>)context.CacheVaryByRules.QueryKeys);
132Assert.Contains("QueryC", (IEnumerable<string>)context.CacheVaryByRules.QueryKeys);
151Assert.Contains("RouteA", (IEnumerable<string>)context.CacheVaryByRules.RouteValueNames);
152Assert.Contains("RouteC", (IEnumerable<string>)context.CacheVaryByRules.RouteValueNames);
171Assert.Contains("RouteA", (IEnumerable<string>)context.CacheVaryByRules.RouteValueNames);
172Assert.Contains("RouteC", (IEnumerable<string>)context.CacheVaryByRules.RouteValueNames);
191Assert.Contains("RouteA", (IEnumerable<string>)context.CacheVaryByRules.RouteValueNames);
192Assert.Contains("RouteC", (IEnumerable<string>)context.CacheVaryByRules.RouteValueNames);
Microsoft.AspNetCore.Routing.Tests (10)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
Microsoft.AspNetCore.Server.HttpSys.Tests (22)
RequestHeaderTests.cs (22)
35Assert.Contains(HeaderNames.Host, requestHeaders.Keys);
36Assert.Contains(HeaderNames.ContentType, requestHeaders.Keys);
56Assert.Contains(HeaderNames.Host, requestHeaders.Keys);
57Assert.Contains(HeaderNames.ContentType, requestHeaders.Keys);
76Assert.Contains(CustomHeader1, requestHeaders.Keys);
77Assert.Contains(CustomHeader2, requestHeaders.Keys);
97Assert.Contains(CustomHeader1, requestHeaders.Keys);
98Assert.Contains(CustomHeader2, requestHeaders.Keys);
156Assert.Contains(HeaderNames.Host, requestHeaders.Keys);
157Assert.Contains(HeaderNames.ContentType, requestHeaders.Keys);
158Assert.Contains(CustomHeader1, requestHeaders.Keys);
159Assert.Contains(CustomHeader2, requestHeaders.Keys);
180Assert.Contains(HeaderNames.Host, requestHeaders.Keys);
181Assert.Contains(HeaderNames.ContentType, requestHeaders.Keys);
182Assert.Contains(CustomHeader1, requestHeaders.Keys);
183Assert.Contains(CustomHeader2, requestHeaders.Keys);
243Assert.Contains(CustomHeader1, requestHeaders.Keys);
244Assert.Contains(CustomHeader2, requestHeaders.Keys);
268Assert.Contains(CustomHeader2, requestHeaders.Keys);
328Assert.Contains(HeaderNames.Host, requestHeaders.Keys);
329Assert.Contains(HeaderNames.ContentType, requestHeaders.Keys);
353Assert.Contains(HeaderNames.From, requestHeaders.Keys);
Microsoft.AspNetCore.Tests (9)
Microsoft.Build.Engine.OM.UnitTests (21)
Construction\SolutionFile_Tests.cs (14)
370Assert.Contains(classLibrary3.ProjectGuid, classLibrary2.Dependencies);
371Assert.Contains(classLibrary1.ProjectGuid, classLibrary2.Dependencies);
445Assert.Contains("Debug|Any CPU", configurationNames);
446Assert.Contains("Debug|Mixed Platforms", configurationNames);
447Assert.Contains("Debug|Win32", configurationNames);
448Assert.Contains("Release|Any CPU", configurationNames);
449Assert.Contains("Release|Mixed Platforms", configurationNames);
450Assert.Contains("Release|Win32", configurationNames);
507Assert.Contains("Debug|Any CPU", configurationNames);
508Assert.Contains("Debug|ARM", configurationNames);
509Assert.Contains("Debug|x86", configurationNames);
510Assert.Contains("Release|Any CPU", configurationNames);
511Assert.Contains("Release|ARM", configurationNames);
512Assert.Contains("Release|x86", configurationNames);
Microsoft.Build.Engine.UnitTests (22)
BackEnd\LoggingService_Tests.cs (18)
277Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger", _initializedService.RegisteredLoggerTypeNames);
278Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames);
279Assert.Contains("Microsoft.Build.Logging.ConsoleLogger", _initializedService.RegisteredLoggerTypeNames);
301Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger", _initializedService.RegisteredLoggerTypeNames);
302Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames);
303Assert.Contains("Microsoft.Build.Logging.ConsoleLogger", _initializedService.RegisteredLoggerTypeNames);
367Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames);
368Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames);
369Assert.Contains("Microsoft.Build.Logging.DistributedFileLogger", _initializedService.RegisteredLoggerTypeNames);
370Assert.Contains("Microsoft.Build.BackEnd.Logging.NullCentralLogger", _initializedService.RegisteredLoggerTypeNames);
446Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames);
447Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames);
484Assert.Contains("Microsoft.Build.BackEnd.Logging.NullCentralLogger", _initializedService.RegisteredLoggerTypeNames);
485Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames);
570Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames);
571Assert.Contains("Microsoft.Build.BackEnd.Logging.CentralForwardingLogger", _initializedService.RegisteredLoggerTypeNames);
624Assert.Contains("Microsoft.Build.Logging.ConfigurableForwardingLogger", _initializedService.RegisteredLoggerTypeNames);
625Assert.Contains("Microsoft.Build.UnitTests.Logging.LoggingService_Tests+RegularILogger", _initializedService.RegisteredLoggerTypeNames);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (67)
Semantics\PrimaryConstructorTests.cs (29)
1014Assert.Contains("X", model.LookupNames(x.SpanStart));
1081Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
1082Assert.Contains("X", model.LookupNames(x.SpanStart));
1308Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
1309Assert.Contains("X", model.LookupNames(x.SpanStart));
1321Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "y"));
1322Assert.Contains("y", model.LookupNames(x.SpanStart));
1331Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "Test"));
1332Assert.Contains("Test", model.LookupNames(x.SpanStart));
1537Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
1538Assert.Contains("X", model.LookupNames(x.SpanStart));
1626Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
1627Assert.Contains("X", model.LookupNames(x.SpanStart));
1904Assert.Contains("X", model.LookupNames(x.SpanStart));
1975Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
1976Assert.Contains("X", model.LookupNames(x.SpanStart));
2649Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2650Assert.Contains("X", model.LookupNames(x.SpanStart));
2687Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2688Assert.Contains("X", model.LookupNames(x.SpanStart));
2724Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2725Assert.Contains("X", model.LookupNames(x.SpanStart));
2760Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2761Assert.Contains("X", model.LookupNames(x.SpanStart));
7834Assert.Contains("p1", model.LookupNames(p1.SpanStart));
8764Assert.Contains("p1", model.LookupNames(p1.SpanStart));
8765Assert.Contains(symbol, model.LookupSymbols(p1.SpanStart, name: "p1"));
9170Assert.Contains("p1", model.LookupNames(p1.SpanStart));
9171Assert.Contains(symbol, model.LookupSymbols(p1.SpanStart, name: "p1"));
Semantics\RecordTests.cs (23)
21198Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
21199Assert.Contains("X", model.LookupNames(x.SpanStart));
21427Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
21428Assert.Contains("X", model.LookupNames(x.SpanStart));
21440Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "y"));
21441Assert.Contains("y", model.LookupNames(x.SpanStart));
21450Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "Test"));
21451Assert.Contains("Test", model.LookupNames(x.SpanStart));
21656Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
21657Assert.Contains("X", model.LookupNames(x.SpanStart));
21745Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
21746Assert.Contains("X", model.LookupNames(x.SpanStart));
22017Assert.Contains("X", model.LookupNames(x.SpanStart));
22132Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
22133Assert.Contains("X", model.LookupNames(x.SpanStart));
24696Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
24697Assert.Contains("X", model.LookupNames(x.SpanStart));
24731Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
24732Assert.Contains("X", model.LookupNames(x.SpanStart));
24765Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
24766Assert.Contains("X", model.LookupNames(x.SpanStart));
24800Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
24801Assert.Contains("X", model.LookupNames(x.SpanStart));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (159)
Semantics\LambdaTests.cs (10)
8231Assert.Contains("C", names);
8232Assert.Contains("x", names);
8233Assert.Contains("y", names);
8234Assert.Contains("N1", names);
8235Assert.Contains("N2", names);
8236Assert.Contains("T1", names);
8237Assert.Contains("T2", names);
8238Assert.Contains("M1", names);
8239Assert.Contains("M2", names);
8240Assert.Contains("lam", names);
Semantics\LookupTests.cs (46)
222Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
223Assert.Contains(expected_in_lookupSymbols[0], actual_lookupSymbols_as_string);
224Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
225Assert.Contains(expected_in_lookupSymbols[1], actual_lookupSymbols_as_string);
325Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
326Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
328Assert.Contains(expected_in_lookupSymbols[0], actual_lookupSymbols_as_string);
329Assert.Contains(expected_in_lookupSymbols[1], actual_lookupSymbols_as_string);
379Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
380Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
381Assert.Contains(expected_in_lookupNames[2], actual_lookupNames);
457Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
458Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
459Assert.Contains(expected_in_lookupNames[2], actual_lookupNames);
460Assert.Contains(expected_in_lookupNames[3], actual_lookupNames);
461Assert.Contains(expected_in_lookupNames[4], actual_lookupNames);
462Assert.Contains(expected_in_lookupNames[5], actual_lookupNames);
527Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
596Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
735Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
736Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
737Assert.Contains(expected_in_lookupNames[2], actual_lookupNames);
786Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
787Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
835Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
836Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
837Assert.Contains(expected_in_lookupNames[2], actual_lookupNames);
952Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
953Assert.Contains(expected_in_lookupNames[1], actual_lookupNames);
995Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
1032Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
1061Assert.Contains("w", lookupNames);
1062Assert.Contains("y", lookupNames);
1091Assert.Contains("w", lookupNames);
1092Assert.Contains("y", lookupNames);
1120Assert.Contains("w", lookupNames);
1121Assert.Contains("y", lookupNames);
1158Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
1196Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
1231Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
1232Assert.Contains(expected_in_lookupSymbols[0], actual_lookupSymbols_as_string);
1355Assert.Contains(expected_in_lookupNames[0], actual_lookupNames);
1356Assert.Contains(expected_in_lookupSymbols[0], actual_lookupSymbols_as_string);
1539Assert.Contains(aliasY, actual_lookupSymbols);
2138Assert.Contains("C", names);
2139Assert.Contains("Attr1", names);
Semantics\RecordStructTests.cs (8)
2602Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2603Assert.Contains("X", model.LookupNames(x.SpanStart));
2637Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2638Assert.Contains("X", model.LookupNames(x.SpanStart));
2671Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2672Assert.Contains("X", model.LookupNames(x.SpanStart));
2706Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
2707Assert.Contains("X", model.LookupNames(x.SpanStart));
Semantics\TopLevelStatementsTests.cs (78)
197Assert.Contains(refSymbol.Name, model1.LookupNames(localRef.SpanStart));
198Assert.Contains(refSymbol, model1.LookupSymbols(localRef.SpanStart));
240Assert.Contains(declSymbol.Name, model1.LookupNames(localDecl.SpanStart));
241Assert.Contains(declSymbol, model1.LookupSymbols(localDecl.SpanStart));
363Assert.Contains(declSymbol.Name, model2.LookupNames(localDecl.SpanStart));
364Assert.Contains(declSymbol, model2.LookupSymbols(localDecl.SpanStart));
484Assert.Contains(declSymbol.Name, model1.LookupNames(localDecl.SpanStart));
485Assert.Contains(declSymbol, model1.LookupSymbols(localDecl.SpanStart));
493Assert.Contains(declSymbol.Name, model1.LookupNames(localFuncRef.SpanStart));
494Assert.Contains(declSymbol, model1.LookupSymbols(localFuncRef.SpanStart));
536Assert.Contains(declSymbol.Name, model1.LookupNames(localDecl.SpanStart));
537Assert.Contains(declSymbol, model1.LookupSymbols(localDecl.SpanStart));
547Assert.Contains(declSymbol.Name, model1.LookupNames(localRef.SpanStart));
548Assert.Contains(declSymbol, model1.LookupSymbols(localRef.SpanStart));
576Assert.Contains(declSymbol.Name, model1.LookupNames(localDecl.SpanStart));
577Assert.Contains(declSymbol, model1.LookupSymbols(localDecl.SpanStart));
585Assert.Contains(declSymbol.Name, model1.LookupNames(localFuncRef.SpanStart));
586Assert.Contains(declSymbol, model1.LookupSymbols(localFuncRef.SpanStart));
589Assert.Contains(declSymbol, model1.AnalyzeDataFlow(localDecl.Ancestors().OfType<StatementSyntax>().First()).DataFlowsOut);
594Assert.Contains(refSymbol.Name, model1.LookupNames(localRef.SpanStart));
595Assert.Contains(refSymbol, model1.LookupSymbols(localRef.SpanStart));
1694Assert.Contains("Test", names);
1696Assert.Contains(declSymbol, symbols);
1700Assert.Contains(testType, symbols);
1722Assert.Contains("Test", names);
1728Assert.Contains(testType, symbols);
1762Assert.Contains("Test", names);
1766Assert.Contains(declSymbol, symbols);
1770Assert.Contains(testType, symbols);
1867Assert.Contains("Test", names);
1869Assert.Contains(declSymbol, symbols);
1873Assert.Contains(testType, symbols);
1890Assert.Contains("Test", names);
1896Assert.Contains(testType, symbols);
1930Assert.Contains("Test", names);
1934Assert.Contains(declSymbol, symbols);
1938Assert.Contains(testType, symbols);
2090Assert.Contains("Test", names);
2092Assert.Contains(declSymbol, symbols);
2096Assert.Contains(testType, symbols);
2107Assert.Contains("Test", names);
2111Assert.Contains(testType, symbols);
2143Assert.Contains("Test", names);
2147Assert.Contains(declSymbol, symbols);
2151Assert.Contains(testType, symbols);
2254Assert.Contains("Test", names);
2256Assert.Contains(declSymbol, symbols);
2260Assert.Contains(testType, symbols);
2273Assert.Contains("Test", names);
2277Assert.Contains(testType, symbols);
2309Assert.Contains("Test", names);
2313Assert.Contains(declSymbol, symbols);
2317Assert.Contains(testType, symbols);
2433Assert.Contains("Test", names);
2434Assert.Contains(testType, symbols);
2439Assert.Contains(testType, symbols);
2453Assert.Contains("Test", names);
2457Assert.Contains(testType, symbols);
2468Assert.Contains("Test", names);
2472Assert.Contains(testType, symbols);
2506Assert.Contains("Test", names);
2509Assert.Contains(testType, symbols);
2514Assert.Contains(testType, symbols);
3948Assert.Contains("args", names);
3951Assert.Contains(testType, symbols);
3962Assert.Contains("args", names);
3966Assert.Contains(parameter, symbols);
3970Assert.Contains(testType, symbols);
4002Assert.Contains("args", names);
4005Assert.Contains(testType, symbols);
4010Assert.Contains(testType, symbols);
4097Assert.Contains("args", names);
4100Assert.Contains(testType, symbols);
4132Assert.Contains("args", names);
4135Assert.Contains(testType, symbols);
4140Assert.Contains(testType, symbols);
6041Assert.Contains(declSymbol.Name, model1.LookupNames(localRef.SpanStart));
6042Assert.Contains(declSymbol, model1.LookupSymbols(localRef.SpanStart));
SourceGeneration\GeneratorDriverTests.cs (11)
3164Assert.Contains(WellKnownGeneratorInputs.Compilation, runResult.TrackedSteps.Keys);
3165Assert.Contains(WellKnownGeneratorInputs.AnalyzerConfigOptions, runResult.TrackedSteps.Keys);
3166Assert.Contains(WellKnownGeneratorInputs.ParseOptions, runResult.TrackedSteps.Keys);
3167Assert.Contains(WellKnownGeneratorInputs.AdditionalTexts, runResult.TrackedSteps.Keys);
3168Assert.Contains(WellKnownGeneratorInputs.MetadataReferences, runResult.TrackedSteps.Keys);
3171Assert.Contains("Syntax", runResult.TrackedSteps.Keys);
3174Assert.Contains(WellKnownGeneratorOutputs.SourceOutput, runResult.TrackedSteps.Keys);
3175Assert.Contains(WellKnownGeneratorOutputs.ImplementationSourceOutput, runResult.TrackedSteps.Keys);
3177Assert.Contains(WellKnownGeneratorOutputs.SourceOutput, runResult.TrackedOutputSteps.Keys);
3178Assert.Contains(WellKnownGeneratorOutputs.ImplementationSourceOutput, runResult.TrackedOutputSteps.Keys);
3210result => Assert.Contains(WellKnownGeneratorInputs.AdditionalTexts, result.TrackedSteps.Keys));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (45)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (28)
1217Assert.Contains("A", namesInC);
1218Assert.Contains("B", namesInC);
1219Assert.Contains("C", namesInC);
1220Assert.Contains("System", namesInC);
1221Assert.Contains("Microsoft", namesInC);
1252Assert.Contains("X", namesInA);
1253Assert.Contains("Y", namesInA);
1254Assert.Contains("ToString", namesInA);
1286Assert.Contains("A", namesInC);
1287Assert.Contains("B", namesInC);
1288Assert.Contains("C", namesInC);
1289Assert.Contains("AM", namesInC);
1290Assert.Contains("BX", namesInC);
1291Assert.Contains("CM", namesInC);
1292Assert.Contains("System", namesInC);
1293Assert.Contains("Microsoft", namesInC);
1337Assert.Contains("M", names);
1338Assert.Contains("ToString", names);
1339Assert.Contains("ReferenceEquals", names);
1340Assert.Contains("GetHashCode", names);
1341Assert.Contains("GetType", names);
1342Assert.Contains("Equals", names);
1343Assert.Contains("MB", names);
1349Assert.Contains("ToString", names);
1350Assert.Contains("ReferenceEquals", names);
1351Assert.Contains("GetHashCode", names);
1352Assert.Contains("GetType", names);
1353Assert.Contains("Equals", names);
Symbols\StaticAbstractMembersInInterfacesTests.cs (5)
8476Assert.Contains("M01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()));
13202Assert.Contains("P01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()));
13288Assert.Contains("P01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()));
13410Assert.Contains("P01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()));
14120Assert.Contains("E01", model.LookupNames(node.SpanStart, m02.TypeParameters[0].GetPublicSymbol()));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.UnitTests (43)
Analyzers\AnalyzerFileReferenceTests.cs (10)
128Assert.Contains("TestAnalyzer", analyzerNames);
129Assert.Contains("TestAnalyzerCS", analyzerNames);
130Assert.Contains("TestAnalyzerCSVB", analyzerNames);
131Assert.Contains("NestedAnalyzer", analyzerNames);
136Assert.Contains("TestAnalyzerVB", analyzerNames);
137Assert.Contains("TestAnalyzerCSVB", analyzerNames);
138Assert.Contains("TestAnalyzer", analyzerNames);
139Assert.Contains("NestedAnalyzer", analyzerNames);
157Assert.Contains("Microsoft.CodeAnalysis.UnitTests.AbstractAnalyzer", failedTypes);
158Assert.Contains("Microsoft.CodeAnalysis.UnitTests.OpenGenericAnalyzer`1", failedTypes);
CommonCommandLineParserTests.cs (30)
410Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
412Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
414Assert.Contains("CA1014", ruleSet.SpecificDiagnosticOptions.Keys);
416Assert.Contains("CA1015", ruleSet.SpecificDiagnosticOptions.Keys);
418Assert.Contains("CA1016", ruleSet.SpecificDiagnosticOptions.Keys);
477Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
502Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
504Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
530Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
532Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
558Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
560Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
587Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
589Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
625Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
627Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
663Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
665Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
667Assert.Contains("CA1014", ruleSet.SpecificDiagnosticOptions.Keys);
693Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
729Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
763Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
766Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
790Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
814Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
816Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
886Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
888Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
911Assert.Contains("CA1012", ruleSet.SpecificDiagnosticOptions.Keys);
913Assert.Contains("CA1013", ruleSet.SpecificDiagnosticOptions.Keys);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.PackageTesting.Tests (2)
Microsoft.DotNet.XUnitAssert.Tests (7)
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (14)
HealthCheckPublisherHostedServiceTest.cs (14)
225entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckEventIds.HealthCheckBegin, DefaultHealthCheckEventIds.HealthCheckEnd }); },
226entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckEventIds.HealthCheckBegin, DefaultHealthCheckEventIds.HealthCheckEnd }); },
387Assert.Contains("CheckDefault", entries);
388Assert.Contains("CheckDelay1Period18", entries);
389Assert.Contains("CheckDelay1Period9", entries);
390Assert.Contains("CheckDelay1Period9_1", entries);
490entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckEventIds.HealthCheckBegin, DefaultHealthCheckEventIds.HealthCheckEnd }); },
491entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckEventIds.HealthCheckBegin, DefaultHealthCheckEventIds.HealthCheckEnd }); },
643Assert.Contains("CheckDelay1Period9", entries);
644Assert.Contains("CheckDelay1Period9_1", entries);
659Assert.Contains("CheckDelay1Period9", entries);
660Assert.Contains("CheckDelay1Period9_1", entries);
696entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckEventIds.HealthCheckBegin, DefaultHealthCheckEventIds.HealthCheckEnd }); },
697entry => { Assert.Contains(entry.EventId, new[] { DefaultHealthCheckEventIds.HealthCheckBegin, DefaultHealthCheckEventIds.HealthCheckEnd }); },
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
Microsoft.Gen.ContextualOptions.Generated.Tests (2)
Microsoft.Gen.ContextualOptions.Unit.Tests (4)
Microsoft.ML.AutoML.Tests (8)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.Tests (19)
Scenarios\Api\TestApi.cs (14)
458Assert.Contains(1, ids);
459Assert.Contains(5, ids);
462Assert.Contains(4, ids);
463Assert.Contains(5, ids);
466Assert.Contains(0, ids);
467Assert.Contains(4, ids);
470Assert.Contains(5, ids);
471Assert.Contains(6, ids);
474Assert.Contains(4, ids);
475Assert.Contains(7, ids);
478Assert.Contains(1, ids);
479Assert.Contains(2, ids);
484Assert.Contains(1, ids);
485Assert.Contains(5, ids);
Microsoft.VisualBasic.Tests (7)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (7)
279Assert.Contains(Path.Combine(TestDirectory, $"GetDirectories_DirectoryNewSubDirectory{i}"), DirectoryList);
301Assert.Contains(Path.Combine(TestDirectory, $"GetDirectories_Directory_SearchOptionNewSubDirectory{i}"), DirectoryList);
327Assert.Contains(DirectoryName, DirectoryList);
403Assert.Contains(Path.Combine(TestDirectory, $"NewFile{i}"), FileList);
430Assert.Contains(Path.Combine(TestDirectory, $"NewFile{i}"), FileList);
456Assert.Contains(FileList[i], TestFileList);
463Assert.Contains(TestFileList[^1], FileList);
Roslyn.VisualStudio.Next.UnitTests (1)
Shared.Tests (22)
Data.Validation\LengthAttributeTests.cs (12)
41Assert.Contains(nameof(options.Name), results[0].MemberNames);
55Assert.Contains(nameof(options.Address), results[0].MemberNames);
62Assert.Contains(nameof(options.Address), results[0].MemberNames);
97Assert.Contains(nameof(options.Name), results[0].MemberNames);
111Assert.Contains(nameof(options.Address), results[0].MemberNames);
119Assert.Contains(nameof(options.Address), results[0].MemberNames);
170Assert.Contains(nameof(options.Names), results[0].MemberNames);
188Assert.Contains(nameof(options.Addresses), results[0].MemberNames);
224Assert.Contains(nameof(options.Names), results[0].MemberNames);
236Assert.Contains(nameof(options.Addresses), results[0].MemberNames);
277Assert.Contains(nameof(options.Names), results[0].MemberNames);
295Assert.Contains(nameof(options.Addresses), results[0].MemberNames);
Data.Validation\TimeSpanAttributeTests.cs (10)
39Assert.Contains(nameof(options.Time), results[0].MemberNames);
46Assert.Contains(nameof(options.Time), results[0].MemberNames);
64Assert.Contains(nameof(options.Time2), results[0].MemberNames);
104Assert.Contains(nameof(options.Time), results[0].MemberNames);
111Assert.Contains(nameof(options.Time), results[0].MemberNames);
125Assert.Contains(nameof(options.Time2), results[0].MemberNames);
132Assert.Contains(nameof(options.Time2), results[0].MemberNames);
167Assert.Contains(nameof(options.Time), results[0].MemberNames);
174Assert.Contains(nameof(options.Time), results[0].MemberNames);
192Assert.Contains(nameof(options.Time2), results[0].MemberNames);
System.Windows.Forms.Interop.Tests (1)
System.Windows.Forms.Tests (101)
Templates.Tests (1)
xunit.assert (1)