1652 references to Contains
AuthSamples.FunctionalTests (25)
DynamicSchemeTests.cs (12)
40Assert.Contains("New1", content);
41Assert.Contains("NewOne", content);
46Assert.Contains("New1", content);
47Assert.Contains("NewOne", content);
48Assert.Contains("New2", content);
49Assert.Contains("NewTwo", content);
54Assert.Contains("New1", content);
55Assert.Contains("NewOne", content);
56Assert.Contains("New2", content);
58Assert.Contains("UpdateTwo", content);
66Assert.Contains("New2", content);
68Assert.Contains("UpdateTwo", content);
 
 
Client.ClientBase.IntegrationTests (1)
Contract.XmlSerializer.IntegrationTests (1)
Diagnostics.EFCore.FunctionalTests (25)
DatabaseErrorPageMiddlewareTest.cs (25)
143Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_NoDbOrMigrationsTitle"), content);
144Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_NoDbOrMigrationsInfo"), content);
145Assert.Contains(typeof(BloggingContext).Name, content);
146Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandPMC").Replace(">", ">"), content);
147Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", ">"), content);
205Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_PendingMigrationsTitle"), content);
206Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_PendingMigrationsInfo"), content);
207Assert.Contains(typeof(BloggingContextWithMigrations).Name, content);
208Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", ">"), content);
209Assert.Contains("<li>111111111111111_MigrationOne</li>", content);
210Assert.Contains("<li>222222222222222_MigrationTwo</li>", content);
244Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_PendingChangesTitle"), content);
245Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_PendingChangesInfo"), content);
246Assert.Contains(typeof(BloggingContextWithPendingModelChanges).Name, content);
247Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandCLI").Replace(">", ">"), content);
248Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandPMC").Replace(">", ">"), content);
249Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandCLI").Replace(">", ">"), content);
250Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", ">"), content);
291Assert.Contains("req.open(\"POST\", \"" + JavaScriptEncode(expectedMigrationsEndpoint) + "\", true);", content);
292Assert.Contains("data-assemblyname=\"" + JavaScriptEncode(expectedContextType) + "\"", content);
367Assert.Contains("req.open(\"POST\", \"" + JavaScriptEncode(migrationsEndpoint) + "\", true);", content);
489Assert.Contains("I wrapped your exception", content);
490Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_NoDbOrMigrationsTitle"), content);
491Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_NoDbOrMigrationsInfo"), content);
492Assert.Contains(typeof(BloggingContext).Name, content);
 
 
Diagnostics.FunctionalTests (9)
dotnet.Tests (7)
dotnet-new.IntegrationTests (7)
PostActionTests.cs (5)
778Assert.Contains("MyProject.csproj", File.ReadAllText(Path.Combine(workingDirectory, "MySolution.slnx")));
814Assert.Contains("MyProject.csproj", File.ReadAllText(Path.Combine(outputDirectory, "MySolution.slnx")));
850Assert.Contains("MyProject.csproj", File.ReadAllText(Path.Combine(outputDirectory, "MySolution.slnx")));
886Assert.Contains("MyProject.csproj", File.ReadAllText(Path.Combine(workingDirectory, outputDirectory, "MySolution.slnx")));
924Assert.Contains("Server.csproj", solutionFileContents);
 
 
dotnet-svcutil.xmlserializer.IntegrationTests (1)
dotnet-watch.Tests (4)
IIS.FunctionalTests (17)
IIS.LongTests (27)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
76Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
80Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
430Assert.Contains("500.31", responseContent);
431Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent);
491Assert.Contains("500.37", responseContent);
523Assert.Contains("500.37", responseContent);
776Assert.Contains("InvalidOperationException", content);
777Assert.Contains("TestSite.Program.Main", content);
800Assert.Contains("InvalidOperationException", content);
801Assert.Contains("TestSite.Program.Main", content);
823Assert.Contains("InvalidOperationException", content);
824Assert.Contains("TestSite.Program.Main", content);
825Assert.Contains("From Configure", content);
1032Assert.Contains(expectedLogString, contents);
1065Assert.Contains("500.30", responseText);
1080Assert.Contains("500.0", responseString);
1099Assert.Contains("HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure", responseString);
1122Assert.Contains("500.0", responseString);
1145Assert.Contains("500.30", responseString);
1488Assert.Contains("<a href=\"http://example\"> <cite> http://example </cite></a> and ", await response.Content.ReadAsStringAsync());
1583Assert.Contains(error, await response.Content.ReadAsStringAsync());
1601Assert.Contains(error, responseText);
 
 
IIS.NewHandler.FunctionalTests (27)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
76Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
80Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
430Assert.Contains("500.31", responseContent);
431Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent);
491Assert.Contains("500.37", responseContent);
523Assert.Contains("500.37", responseContent);
776Assert.Contains("InvalidOperationException", content);
777Assert.Contains("TestSite.Program.Main", content);
800Assert.Contains("InvalidOperationException", content);
801Assert.Contains("TestSite.Program.Main", content);
823Assert.Contains("InvalidOperationException", content);
824Assert.Contains("TestSite.Program.Main", content);
825Assert.Contains("From Configure", content);
1032Assert.Contains(expectedLogString, contents);
1065Assert.Contains("500.30", responseText);
1080Assert.Contains("500.0", responseString);
1099Assert.Contains("HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure", responseString);
1122Assert.Contains("500.0", responseString);
1145Assert.Contains("500.30", responseString);
1488Assert.Contains("<a href=\"http://example\"> <cite> http://example </cite></a> and ", await response.Content.ReadAsStringAsync());
1583Assert.Contains(error, await response.Content.ReadAsStringAsync());
1601Assert.Contains(error, responseText);
 
 
IIS.NewShim.FunctionalTests (27)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
76Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
80Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
430Assert.Contains("500.31", responseContent);
431Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent);
491Assert.Contains("500.37", responseContent);
523Assert.Contains("500.37", responseContent);
776Assert.Contains("InvalidOperationException", content);
777Assert.Contains("TestSite.Program.Main", content);
800Assert.Contains("InvalidOperationException", content);
801Assert.Contains("TestSite.Program.Main", content);
823Assert.Contains("InvalidOperationException", content);
824Assert.Contains("TestSite.Program.Main", content);
825Assert.Contains("From Configure", content);
1032Assert.Contains(expectedLogString, contents);
1065Assert.Contains("500.30", responseText);
1080Assert.Contains("500.0", responseString);
1099Assert.Contains("HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure", responseString);
1122Assert.Contains("500.0", responseString);
1145Assert.Contains("500.30", responseString);
1488Assert.Contains("<a href=\"http://example\"> <cite> http://example </cite></a> and ", await response.Content.ReadAsStringAsync());
1583Assert.Contains(error, await response.Content.ReadAsStringAsync());
1601Assert.Contains(error, responseText);
 
 
IISExpress.FunctionalTests (48)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
76Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
80Assert.Contains("500.0", await response.Content.ReadAsStringAsync());
215Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger));
430Assert.Contains("500.31", responseContent);
431Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent);
491Assert.Contains("500.37", responseContent);
523Assert.Contains("500.37", responseContent);
776Assert.Contains("InvalidOperationException", content);
777Assert.Contains("TestSite.Program.Main", content);
800Assert.Contains("InvalidOperationException", content);
801Assert.Contains("TestSite.Program.Main", content);
823Assert.Contains("InvalidOperationException", content);
824Assert.Contains("TestSite.Program.Main", content);
825Assert.Contains("From Configure", content);
1032Assert.Contains(expectedLogString, contents);
1065Assert.Contains("500.30", responseText);
1080Assert.Contains("500.0", responseString);
1099Assert.Contains("HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure", responseString);
1122Assert.Contains("500.0", responseString);
1145Assert.Contains("500.30", responseString);
1488Assert.Contains("<a href=\"http://example\"> <cite> http://example </cite></a> and ", await response.Content.ReadAsStringAsync());
1583Assert.Contains(error, await response.Content.ReadAsStringAsync());
1601Assert.Contains(error, responseText);
 
 
InMemory.FunctionalTests (2)
Interop.FunctionalTests (3)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.Authentication.Core.Test (13)
AuthenticationServiceTests.cs (12)
24Assert.Contains("base", ex.Message);
63Assert.Contains("base", ex.Message);
78Assert.Contains("base", ex.Message);
125Assert.Contains("uber", ex.Message);
126Assert.Contains("signin", ex.Message);
129Assert.Contains("uber", ex.Message);
130Assert.Contains("signin", ex.Message);
148Assert.Contains("uber", ex.Message);
149Assert.Contains("signout", ex.Message);
169Assert.Contains("cannot be used for SignOutAsync", ex.Message);
171Assert.Contains("cannot be used for SignInAsync", ex.Message);
226Assert.Contains("cannot be used for SignInAsync", ex.Message);
 
 
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (67)
Microsoft.AspNetCore.Authentication.Test (131)
CookieTests.cs (23)
197Assert.Contains("; path=/", setCookie);
198Assert.Contains("; httponly", setCookie);
199Assert.Contains("; samesite=", setCookie);
330Assert.Contains("; path=/", setCookie);
331Assert.Contains("; httponly", setCookie);
332Assert.Contains("; samesite=", setCookie);
404Assert.Contains("; secure", setCookie);
432Assert.Contains("TestCookie=", setCookie1);
433Assert.Contains(" path=/foo", setCookie1);
434Assert.Contains(" domain=another.com", setCookie1);
435Assert.Contains(" secure", setCookie1);
436Assert.Contains(" samesite=none", setCookie1);
437Assert.Contains(" httponly", setCookie1);
438Assert.Contains(" extension0", setCookie1);
439Assert.Contains(" extension1=value1", setCookie1);
454Assert.Contains("SecondCookie=", setCookie2);
455Assert.Contains(" path=/base", setCookie2);
456Assert.Contains(" samesite=strict", setCookie2);
612Assert.Contains(".AspNetCore.Cookies=; expires=", transaction2.SetCookie);
650Assert.Contains(".AspNetCore.Cookies=; expires=", transaction4.SetCookie[0]);
1223Assert.Contains("path=/base", transaction1.SetCookie);
1471Assert.Contains(".AspNetCore.Cookies=; expires=", transaction.SetCookie[0]);
1494Assert.Contains(".AspNetCore.Cookies=; expires=", transaction.SetCookie[0]);
 
FacebookTests.cs (27)
119Assert.Contains("custom=test", query);
149Assert.Contains("scope=foo,bar", res.Headers.Location.Query);
181Assert.Contains("scope=baz,qux", res.Headers.Location.Query);
213Assert.Contains("scope=baz,qux", res.Headers.Location.Query);
240Assert.Contains("https://www.facebook.com/v22.0/dialog/oauth", location);
241Assert.Contains("response_type=code", location);
242Assert.Contains("client_id=", location);
243Assert.Contains("redirect_uri=" + UrlEncoder.Default.Encode("http://example.com/base/signin-facebook"), location);
244Assert.Contains("scope=", location);
245Assert.Contains("state=", location);
273Assert.Contains("https://www.facebook.com/v22.0/dialog/oauth", location);
274Assert.Contains("response_type=code", location);
275Assert.Contains("client_id=", location);
276Assert.Contains("redirect_uri=" + UrlEncoder.Default.Encode("http://example.com/signin-facebook"), location);
277Assert.Contains("scope=", location);
278Assert.Contains("state=", location);
308Assert.Contains("https://www.facebook.com/v22.0/dialog/oauth", location);
309Assert.Contains("response_type=code", location);
310Assert.Contains("client_id=", location);
311Assert.Contains("redirect_uri=", location);
312Assert.Contains("scope=", location);
313Assert.Contains("state=", location);
314Assert.Contains("code_challenge=", location);
315Assert.Contains("code_challenge_method=S256", location);
376Assert.Contains("fields=email,timezone,picture", finalUserInfoEndpoint);
377Assert.Contains("&access_token=", finalUserInfoEndpoint);
378Assert.Contains("&appsecret_proof=b7fb6d5a4510926b4af6fe080497827d791dc45fe6541d88ba77bdf6e8e208c6&", finalUserInfoEndpoint);
 
GoogleTests.cs (16)
160Assert.Contains("&scope=" + UrlEncoder.Default.Encode("openid profile email"), query);
343Assert.Contains("custom=test", query);
568Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]);
569Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
731Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]);
732Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
771Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]);
772Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
892Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete
893Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
936Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete
937Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
980Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete
981Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
1017Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete
1018Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
 
MicrosoftAccountTests.cs (14)
74Assert.Contains("custom=test", query);
128Assert.Contains("https://login.microsoftonline.com/common/oauth2/v2.0/authorize", location);
129Assert.Contains("response_type=code", location);
130Assert.Contains("client_id=", location);
131Assert.Contains("redirect_uri=", location);
132Assert.Contains("scope=", location);
133Assert.Contains("state=", location);
134Assert.Contains("code_challenge=", location);
135Assert.Contains("code_challenge_method=S256", location);
153Assert.Contains("scope=foo%20bar", res.Headers.Location.Query);
171Assert.Contains("scope=baz%20qux", res.Headers.Location.Query);
189Assert.Contains("scope=baz%20qux", res.Headers.Location.Query);
253Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]);
254Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
 
OpenIdConnect\OpenIdConnectChallengeTests.cs (18)
74Assert.Contains("code_challenge=", res.Headers.Location.Query);
75Assert.Contains("code_challenge_method=S256", res.Headers.Location.Query);
438Assert.Contains("samesite=none", transaction.SetCookie.First());
534Assert.Contains("prompt=consent", res.Headers.Location.Query);
558Assert.Contains("prompt=login", res.Headers.Location.Query);
580Assert.Contains("prompt=login", res.Headers.Location.Query);
604Assert.Contains("scope=baz%20qux", res.Headers.Location.Query);
628Assert.Contains("scope=baz%20qux", res.Headers.Location.Query);
652Assert.Contains("max_age=1234", res.Headers.Location.Query);
674Assert.Contains("max_age=1234", res.Headers.Location.Query);
695Assert.Contains("prompt=login&audience=https%3A%2F%2Fapi.example.com", res.Headers.Location.Query);
723Assert.Contains("request_uri=my_reference_value", res.Headers.Location.Query);
724Assert.Contains("client_id=Test%20Id", res.Headers.Location.Query);
817Assert.Contains("redirect_uri", res.Headers.Location.Query);
818Assert.Contains("scope", res.Headers.Location.Query);
851Assert.Contains("request_uri=request_uri_from_event", res.Headers.Location.Query);
917Assert.Contains("request_uri=my_reference_value", res.Headers.Location.Query);
918Assert.Contains("client_id=Test%20Id", res.Headers.Location.Query);
 
TwitterTests.cs (13)
80Assert.Contains("custom=test", query);
190Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location);
218Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location);
268Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location);
375Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location);
521Assert.Contains("include_email=true", finalVerifyCredentialsEndpoint);
523Assert.Contains("oauth_consumer_key=", finalAuthorizationParameter);
524Assert.Contains("oauth_nonce=", finalAuthorizationParameter);
525Assert.Contains("oauth_signature=", finalAuthorizationParameter);
526Assert.Contains("oauth_signature_method=", finalAuthorizationParameter);
527Assert.Contains("oauth_timestamp=", finalAuthorizationParameter);
528Assert.Contains("oauth_token=", finalAuthorizationParameter);
529Assert.Contains("oauth_version=", finalAuthorizationParameter);
 
 
Microsoft.AspNetCore.Components.Authorization.Tests (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (24)
Microsoft.AspNetCore.Components.QuickGrid.Tests (3)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Tests (14)
Microsoft.AspNetCore.Components.Web.Tests (7)
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
Microsoft.AspNetCore.DataProtection.Tests (2)
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (5)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Microsoft.AspNetCore.Diagnostics.Tests (7)
Microsoft.AspNetCore.FunctionalTests (1)
Microsoft.AspNetCore.Hosting.Tests (6)
Microsoft.AspNetCore.Http.Results.Tests (14)
ServerSentEventsResultTests.cs (14)
52Assert.Contains("data: event1\"with\"quotes\n\n", responseBody);
53Assert.Contains("data: event2\n\n", responseBody);
73Assert.Contains("event: test-event\ndata: event1\n\n", responseBody);
74Assert.Contains("event: test-event\ndata: event2\n\n", responseBody);
90Assert.Contains("event: custom-event\n", responseBody);
91Assert.Contains("data: event1\n\n", responseBody);
119Assert.Contains("data: \n\n", responseBody);
154Assert.Contains(@"data: {""name"":""Test"",""value"":42}", responseBody);
171Assert.Contains(@"data: {""name"":""Test"",""value"":42}", responseBody);
199Assert.Contains(@"data: {""Name"":""Test"",""Value"":42}", responseBody);
216Assert.Contains(@"data: {""extra"":""Additional"",""name"":""Test"",""value"":42}", responseBody);
245Assert.Contains("data: event1\n\n", responseBody);
300Assert.Contains("data: event1\n\n", responseBody);
319Assert.Contains("data: \n\n", responseBody);
 
 
Microsoft.AspNetCore.Http.Tests (20)
ResponseCookiesTest.cs (20)
49Assert.Contains("path=/", cookieHeaderValues[0]);
50Assert.Contains("samesite=none", cookieHeaderValues[0]);
73Assert.Contains("path=/", cookieHeaderValues[0]);
74Assert.Contains("simple;", cookieHeaderValues[0]);
94Assert.Contains("path=/", cookieHeaderValues[0]);
95Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookieHeaderValues[0]);
96Assert.Contains("simple;", cookieHeaderValues[0]);
113Assert.Contains("path=/", cookieHeaderValues[0]);
114Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookieHeaderValues[0]);
144Assert.All(deletedCookies, cookie => Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookie));
172Assert.All(deletedCookies, cookie => Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookie));
199Assert.Contains("path=/", cookieHeaderValues[0]);
200Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookieHeaderValues[0]);
201Assert.Contains("secure", cookieHeaderValues[0]);
202Assert.Contains("httponly", cookieHeaderValues[0]);
203Assert.Contains("samesite", cookieHeaderValues[0]);
204Assert.Contains("extension", cookieHeaderValues[0]);
221Assert.Contains("path=/", cookieHeaderValues[0]);
222Assert.Contains("expires=Thu, 01 Jan 1970 00:00:00 GMT", cookieHeaderValues[0]);
240Assert.Contains($"max-age={maxAgeTime.TotalSeconds}", cookieHeaderValues[0]);
 
 
Microsoft.AspNetCore.HttpLogging.Tests (9)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
Microsoft.AspNetCore.Identity.FunctionalTests (4)
Microsoft.AspNetCore.Identity.InMemory.Test (5)
Microsoft.AspNetCore.Identity.Test (35)
Passkeys\PasskeyHandlerAssertionTest.cs (15)
46Assert.Contains("was missing required properties including: 'id'", result.Failure.Message);
81Assert.Contains("base64url string", result.Failure.Message);
97Assert.Contains("was missing required properties including: 'type'", result.Failure.Message);
146Assert.Contains("was missing required properties including: 'response'", result.Failure.Message);
181Assert.Contains("was missing required properties including: 'challenge'", result.Failure.Message);
215Assert.Contains("was missing required properties including: 'clientDataJSON'", result.Failure.Message);
265Assert.Contains("was missing required properties including: 'authenticatorData'", result.Failure.Message);
300Assert.Contains("base64url string", result.Failure.Message);
332Assert.Contains("was missing required properties including: 'signature'", result.Failure.Message);
367Assert.Contains("base64url string", result.Failure.Message);
466Assert.Contains("was missing required properties including: 'type'", result.Failure.Message);
518Assert.Contains("was missing required properties including: 'challenge'", result.Failure.Message);
568Assert.Contains("base64url string", result.Failure.Message);
601Assert.Contains("was missing required properties including: 'origin'", result.Failure.Message);
689Assert.Contains("was missing required properties including: 'status'", result.Failure.Message);
 
Passkeys\PasskeyHandlerAttestationTest.cs (16)
46Assert.Contains("was missing required properties including: 'id'", result.Failure.Message);
81Assert.Contains("base64url string", result.Failure.Message);
97Assert.Contains("was missing required properties including: 'type'", result.Failure.Message);
146Assert.Contains("was missing required properties including: 'response'", result.Failure.Message);
181Assert.Contains("was missing required properties including: 'id'", result.Failure.Message);
216Assert.Contains("was missing required properties including: 'name'", result.Failure.Message);
251Assert.Contains("was missing required properties including: 'displayName'", result.Failure.Message);
285Assert.Contains("was missing required properties including: 'userEntity'", result.Failure.Message);
302Assert.Contains("was missing required properties including: 'challenge'", result.Failure.Message);
336Assert.Contains("was missing required properties including: 'clientDataJSON'", result.Failure.Message);
386Assert.Contains("was missing required properties including: 'attestationObject'", result.Failure.Message);
435Assert.Contains("was missing required properties including: 'type'", result.Failure.Message);
487Assert.Contains("was missing required properties including: 'challenge'", result.Failure.Message);
537Assert.Contains("base64url string", result.Failure.Message);
570Assert.Contains("was missing required properties including: 'origin'", result.Failure.Message);
658Assert.Contains("was missing required properties including: 'status'", result.Failure.Message);
 
 
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.InternalTesting.Tests (4)
Microsoft.AspNetCore.Localization.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.Core.Test (20)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (15)
764Assert.Contains("The following errors occurred with attribute routing information:", ex.Message);
765Assert.Contains("Error 1:", ex.Message);
766Assert.Contains("Attribute routes with the same name 'Products' must have the same template:", ex.Message);
767Assert.Contains($"Action: '{sameNameType.FullName}.Get ({assemblyName})' - Template: 'Products'", ex.Message);
768Assert.Contains($"Action: '{sameNameType.FullName}.Get ({assemblyName})' - Template: 'Products/{{id}}'", ex.Message);
769Assert.Contains($"Action: '{sameNameType.FullName}.Put ({assemblyName})' - Template: 'Products/{{id}}'", ex.Message);
770Assert.Contains($"Action: '{sameNameType.FullName}.Post ({assemblyName})' - Template: 'Products'", ex.Message);
771Assert.Contains($"Action: '{sameNameType.FullName}.Delete ({assemblyName})' - Template: 'Products/{{id}}'", ex.Message);
772Assert.Contains("Error 2:", ex.Message);
773Assert.Contains("Attribute routes with the same name 'Items' must have the same template:", ex.Message);
774Assert.Contains($"Action: '{sameNameType.FullName}.GetItems ({assemblyName})' - Template: 'Items/{{id}}'", ex.Message);
775Assert.Contains($"Action: '{sameNameType.FullName}.PostItems ({assemblyName})' - Template: 'Items'", ex.Message);
776Assert.Contains($"Action: '{sameNameType.FullName}.PutItems ({assemblyName})' - Template: 'Items/{{id}}'", ex.Message);
777Assert.Contains($"Action: '{sameNameType.FullName}.DeleteItems ({assemblyName})' - Template: 'Items/{{id}}'", ex.Message);
778Assert.Contains($"Action: '{sameNameType.FullName}.PatchItems ({assemblyName})' - Template: 'Items'", ex.Message);
 
 
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (10)
Microsoft.AspNetCore.Mvc.FunctionalTests (76)
ErrorPageTests.cs (15)
71Assert.Contains($"{action}.cshtml", content);
72Assert.Contains(expected, content);
108Assert.Contains($"{action}.cshtml", content);
109Assert.Contains(expected, content);
129Assert.Contains("_ViewImports.cshtml", content);
130Assert.Contains(expectedMessage, content);
131Assert.Contains(PreserveCompilationContextMessage, content);
132Assert.Contains(expectedCompilationContent, content);
149Assert.Contains("RuntimeError.cshtml", content);
150Assert.Contains(expectedMessage, content);
167Assert.Contains("Loader Exceptions:", content);
168Assert.Contains(expectedMessage, content);
184Assert.Contains(aggregateException, content);
185Assert.Contains(nullReferenceException, content);
186Assert.Contains(indexOutOfRangeException, content);
 
InputValidationTests.cs (15)
54Assert.Contains("[OptionalProp:0]", responseText);
55Assert.Contains("[RequiredProp:1]", responseText);
56Assert.Contains("[BindRequiredProp:2]", responseText);
57Assert.Contains("[RequiredAndBindRequiredProp:3]", responseText);
58Assert.Contains("[OptionalStringLengthProp:]", responseText);
59Assert.Contains("[OptionalRangeDisplayNameProp:0]", responseText);
60Assert.Contains("[UnboundRequiredProp:0]", responseText);
61Assert.Contains("[UnboundBindRequiredProp:0]", responseText);
62Assert.Contains("[BindNeverRequiredProp:]", responseText);
63Assert.Contains("[optionalParam:0]", responseText);
64Assert.Contains("[requiredParam:4]", responseText);
65Assert.Contains("[bindRequiredParam:5]", responseText);
66Assert.Contains("[requiredAndBindRequiredParam:6]", responseText);
67Assert.Contains("[optionalStringLengthParam:]", responseText);
68Assert.Contains("[optionalRangeDisplayNameParam:0]", responseText);
 
RazorPageModelTest.cs (10)
56Assert.Contains("Updated: True", content);
57Assert.Contains("Name = Overriden", content);
82Assert.Contains("Validation: success", content.Trim());
107Assert.Contains("Validation: fail", content);
108Assert.Contains("The field Age must be between 0 and 99.", content);
132Assert.Contains("Updated: True", content);
133Assert.Contains("Name = Overriden", content);
158Assert.Contains("Validation: success", content.Trim());
183Assert.Contains("Validation: fail", content);
184Assert.Contains("The field Age must be between 0 and 99.", content);
 
RazorPagesWithBasePathTest.cs (11)
192Assert.Contains(expected, response.Trim());
421Assert.Contains("<h2>User</h2>", content);
450Assert.Contains("is required.", content);
507Assert.Contains(
519Assert.Contains("Name is required", response);
520Assert.Contains("18 ≤ Age ≤ 60", response);
530Assert.Contains("User name is required", response);
531Assert.Contains("Password and confirm password do not match.", response);
541Assert.Contains("Name is required", response);
551Assert.Contains("This page is served from RazorPagesClassLibrary", response);
561Assert.Contains("This page is overriden by RazorPagesWebSite", response);
 
 
Microsoft.AspNetCore.Mvc.IntegrationTests (3)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
Microsoft.AspNetCore.Routing.Tests (6)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (13)
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
Microsoft.AspNetCore.Session.Tests (19)
SessionTests.cs (19)
153Assert.Contains("; secure", values.First());
369Assert.Contains("started", sessionLogMessages[0].State.ToString());
371Assert.Contains("stored", sessionLogMessages[1].State.ToString());
435Assert.Contains("started", sessionLogMessages[0].State.ToString());
436Assert.Contains("stored", sessionLogMessages[1].State.ToString());
437Assert.Contains("expired", sessionLogMessages[2].State.ToString());
683Assert.Contains("Session cache read exception", message.State.ToString());
732Assert.Contains("Session cache read exception", message.State.ToString());
780Assert.Contains("Loading the session timed out.", message.State.ToString());
881Assert.Contains("Session started", sessionLogMessage.State.ToString());
886Assert.Contains("Error closing the session.", sessionMiddlewareLogMessage.State.ToString());
944Assert.Contains("Session started", sessionLogMessages[0].State.ToString());
947Assert.Contains("Committing the session timed out.", sessionLogMessages[1].State.ToString());
952Assert.Contains("Committing the session was canceled.", sessionMiddlewareLogs[0].State.ToString());
1011Assert.Contains("Session started", sessionLogMessages[0].State.ToString());
1014Assert.Contains("Session stored", sessionLogMessages[1].State.ToString());
1075Assert.Contains("Session started", sessionLogMessages[0].State.ToString());
1078Assert.Contains("Session stored", sessionLogMessages[1].State.ToString());
1126Assert.Contains("Error closing the session.", message.State.ToString());
 
 
Microsoft.AspNetCore.Shared.Tests (13)
CommandLineApplicationTests.cs (11)
72Assert.Contains("three", ex.Message);
113Assert.Contains("test2", ex.Message);
165Assert.Contains($"The last argument 'first' accepts multiple values. No more argument can be added.",
205Assert.Contains($"Missing value for option '{first.LongName}'", ex.Message);
816Assert.Contains("-a, --option-a", subcmd.GetHelpText());
1033Assert.Contains("ninja-app", help);
1049Assert.Contains("--ayuda-me", help);
1061Assert.Contains("Usage: proxy-command [options] [[--] <arg>...]", app.GetHelpText());
1079Assert.Contains(app.ExtendedHelpText, app.GetHelpText());
1099Assert.Contains(expectedOutData, outData);
1235Assert.Contains("-?, -h, --help <VALUE>", helpText);
 
 
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (10)
HubConnectionTests.cs (10)
1373Assert.Contains("Connection closed with an error.", exception.Message);
1376Assert.Contains("Connection closed with an error.", hubException.Message);
1377Assert.Contains(exceptionSubstring, hubException.Message);
1391Assert.Contains(exceptionSubstring, errorLog.Write.Exception.Message);
1427Assert.Contains("Connection closed with an error.", exception.Message);
1430Assert.Contains("Connection closed with an error.", hubException.Message);
1431Assert.Contains(exceptionSubstring, hubException.Message);
1445Assert.Contains(exceptionSubstring, errorLog.Write.Exception.Message);
1622Assert.Contains($"{majorVersion}.{minorVersion}", userAgent);
1897Assert.Contains("Negotiate Authentication doesn't work with HTTP/2 or higher.", ex.Message);
 
 
Microsoft.AspNetCore.SignalR.Client.Tests (11)
Microsoft.AspNetCore.SignalR.Tests (11)
Microsoft.AspNetCore.TestHost.Tests (4)
Microsoft.AspNetCore.Tests (8)
Microsoft.AspNetCore.Watch.BrowserRefresh.Tests (16)
ResponseStreamWrapperCompressionTest.cs (12)
40Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
72Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
165Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
197Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
227Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
257Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
292Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
328Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
378Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
379Assert.Contains("</body></html>", result); // Ensure full doc present
429Assert.Contains("<script src=\"/_framework/aspnetcore-browser-refresh.js\"></script>", result);
430Assert.Contains("</body></html>", result); // Ensure full doc present
 
 
Microsoft.Build.CommandLine.UnitTests (1)
Microsoft.Build.Engine.OM.UnitTests (12)
Microsoft.Build.Engine.UnitTests (66)
Construction\ElementLocation_Tests.cs (10)
45Assert.Contains("RegularElementLocation", location.GetType().FullName);
58Assert.Contains("RegularElementLocation", location.GetType().FullName);
71Assert.Contains("RegularElementLocation", location.GetType().FullName);
172Assert.Contains("RegularElementLocation", location.GetType().FullName);
190Assert.Contains("SmallElementLocation", deserializedLocation.GetType().FullName);
203Assert.Contains("SmallElementLocation", location.GetType().FullName);
248Assert.Contains("SmallElementLocation", location.GetType().FullName);
261Assert.Contains("SmallElementLocation", location.GetType().FullName);
274Assert.Contains("SmallElementLocation", location.GetType().FullName);
292Assert.Contains("SmallElementLocation", location.GetType().FullName);
 
Construction\SolutionProjectGenerator_Tests.cs (14)
366Assert.Contains(text, logger.FullLog); // "Log should contain the regular message"
1160Assert.Contains("{6185CC21-BE89-448A-B3C0-D1C27112E595}", solutionConfigurationContents);
1163Assert.Contains("CSConfig1|AnyCPU", solutionConfigurationContents);
1167Assert.Contains("{A6F99D27-47B9-4EA4-BFC9-25157CBDC281}", solutionConfigurationContents);
1169Assert.Contains("VCConfig1|Win32", solutionConfigurationContents);
1179Assert.Contains("{6185CC21-BE89-448A-B3C0-D1C27112E595}", solutionConfigurationContents);
1180Assert.Contains("CSConfig2|AnyCPU", solutionConfigurationContents);
1228Assert.Contains(@"BuildProjectInSolution=""" + bool.TrueString + @"""", solutionConfigurationContents);
1273Assert.Contains(@"BuildProjectInSolution=""" + bool.FalseString + @"""", solutionConfigurationContents);
1339Assert.Contains("<SolutionConfiguration>", item.GetMetadata("Content"));
1345Assert.Contains("<SolutionConfiguration>", item.GetMetadata("Content"));
1739Assert.Contains("'$(Configuration)' == 'Release'", msbuildProject.Targets["Build"].Condition);
1740Assert.Contains("'$(Configuration)' == 'Debug'", msbuildProject.Targets["Build"].Condition);
1972Assert.Contains("%abtest", instances[0].GetItems("ProjectReference").ElementAt(0).EvaluatedInclude);
 
 
Microsoft.Build.Tasks.CodeAnalysis.Sdk.UnitTests (8)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (26)
VbcTests.cs (10)
501Assert.Contains(@"C:\Test Path (123)\hellovb.vb(6,9): warning BC40008: 'Public Property x As Integer' is obsolete.", engine.Log);
502Assert.Contains(@"C:\Test Path (123)\hellovb.vb(6,13): error BC30512: Option Strict On disallows implicit conversions from 'Double' to 'Integer'.", engine.Log);
503Assert.Contains(@"C:\Test Path (123)\hellovb.vb(7,9): error BC30451: 'asdf' is not declared. It may be inaccessible due to its protection level.", engine.Log);
580Assert.Contains("/./Program.vb", responseFileContents);
595Assert.Contains("/./Program.vb", responseFileContents);
596Assert.Contains("/./App.vb", responseFileContents);
597Assert.Contains(" src/Test.vb", responseFileContents);
599Assert.Contains(" /dir/File.vb", responseFileContents);
613Assert.Contains(" test.vb", responseFileContents);
615Assert.Contains(" /test.vb", responseFileContents);
 
 
Microsoft.Build.Tasks.UnitTests (98)
AppConfig_Tests.cs (7)
42Assert.Contains("Dependent Assembly: Simple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a oldVersionLow=1.0.0.0 oldVersionHigh=1.0.0.0 newVersion=2.0.0.0", s);
68Assert.Contains("Dependent Assembly: Simple, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a oldVersionLow=1.0.0.0 oldVersionHigh=2.0.0.0 newVersion=2.0.0.0", s);
115Assert.Contains("Dependent Assembly: Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a oldVersionLow=7.0.3300.0 oldVersionHigh=7.0.3300.0 newVersion=8.0.1000.0", s);
116Assert.Contains("Dependent Assembly: Microsoft.VisualStudio.Designer.Interfaces, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a oldVersionLow=1.0.3300.0 oldVersionHigh=1.0.3300.0 newVersion=1.2.3400.0", s);
117Assert.Contains("Dependent Assembly: Microsoft.VisualStudio, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a oldVersionLow=1.0.3300.0 oldVersionHigh=1.0.3300.0 newVersion=1.2.3400.0", s);
180Assert.Contains("Dependent Assembly: Microsoft.VSDesigner, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a oldVersionLow=7.1.3300.0 oldVersionHigh=7.1.3300.0 newVersion=7.2.3300.0", s);
206Assert.Contains("Dependent Assembly", s);
 
AssemblyDependency\Miscellaneous.cs (13)
3487Assert.Contains(message, engine.Log);
4647Assert.Contains(
5670Assert.Contains(message, ((Exception)allowListErrors[0]).Message); // "Expected assertion to contain correct error code"
6153Assert.Contains("Client.xml", returnArray[0]); // "Expected first element to contain Client.xml"
6154Assert.Contains("Foo.xml", returnArray[1]); // "Expected first element to contain Foo.xml"
6268Assert.Contains("System.Xml", t.ResolvedFiles[0].ItemSpec); // "Expected System.Xml to resolve."
7125Assert.Contains("System.Xml", t.ResolvedFiles[0].ItemSpec); // "Expected System.Xml to resolve."
7215Assert.Contains("System.Xml", t.ResolvedFiles[0].ItemSpec); // "Expected System.Xml to resolve."
7291Assert.Contains("System.Xml", t.ResolvedFiles[1].ItemSpec); // "Expected System.Xml to resolve."
7292Assert.Contains("Microsoft.Build.Engine", t.ResolvedFiles[0].ItemSpec); // "Expected Microsoft.Build.Engine to resolve."
7468Assert.Contains("System.Xml", t.ResolvedFiles[0].ItemSpec); // "Expected System.Xml to resolve."
8256Assert.Contains("Microsoft.Build.Engine", t.ResolvedFiles[0].ItemSpec); // "Expected Engine to resolve."
8306Assert.Contains("Microsoft.Build.Engine", t.ResolvedFiles[0].ItemSpec); // "Expected Engine to resolve."
 
XslTransformation_Tests.cs (14)
196Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message at missing Xsl params test"
245Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message at missing Xml params test"
276Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message"
310Assert.Contains("MSB3701", engine.Log);
344Assert.Contains("MSB3701", engine.Log); // "The output should contain MSB3701 error message at no params test"
416Assert.Contains("param 1: 1param 2: 2", fileContents);
593Assert.Contains("The '$' character", e.Message);
654Assert.Contains("MSB3703", engine.Log);
683Assert.Contains("MSB3704", engine.Log);
712Assert.Contains("MSB3704", engine.Log);
744Assert.Contains("'<'", e.Message);
777Assert.Contains("MSB3701", e.Message);
842Assert.Contains("error?", e.Message);
929Assert.Contains("error?", e.Message);
 
 
Microsoft.Build.Utilities.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (33)
CommandLineTests.cs (24)
4804Assert.Contains("testhost", match.Groups["app"].Value);
6108Assert.Contains(((int)ErrorCode.ERR_StdInOptionProvidedButConsoleInputIsNotRedirected).ToString(), result.Output);
6136Assert.Contains(((int)ErrorCode.WRN_FileAlreadyIncluded).ToString(), result.Output);
6979Assert.Contains("error CS5001:", outWriter.ToString().Trim());
8935Assert.Contains($"error CS2012: Cannot open '{libDll.Path}' for writing", outWriter.ToString());
8954Assert.Contains($"error CS2012: Cannot open '{libDll.Path}' for writing", outWriter.ToString());
8991Assert.Contains($"error CS0016: Could not write to output file '{exePath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString());
9014Assert.Contains($"error CS0016: Could not write to output file '{pdbPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString());
9087Assert.Contains($"error CS2012: Cannot open '{exePath}' for writing", outWriter.ToString());
13439Assert.Contains($"{prefix} {diagnosticId}: {analyzer.Descriptor.MessageFormat}", outWriter.ToString());
13472Assert.Contains(expectedOutput, output);
13518Assert.Contains(expectedOutput, output);
13568Assert.Contains(expectedOutput, output);
13599Assert.Contains($"{expectedDiagnosticSeverity} {WarningDiagnosticAnalyzer.Warning01.Id}", output);
13675Assert.Contains($"{prefix} {descriptor.Id}: {descriptor.MessageFormat}", outWriter.ToString());
13799Assert.Contains($"{prefix} {diagnosticId}: {analyzer.Descriptor.MessageFormat}", output);
14281Assert.Contains("CS0016:", output);
14373Assert.Contains("error CS2006: Command-line syntax error: Missing '<text>' for '/generatedfilesout:' option", output);
14854Assert.Contains("CS8785: Generator 'CallbackGenerator' failed to generate source.", output);
15329Assert.Contains($"error {diagnosticId}", output);
15333Assert.Contains($"warning {diagnosticId}", output);
15365Assert.Contains("CS8850", output); // ref's net fx
15366Assert.Contains("CS8033", output); // no analyzers in assembly
15370Assert.Contains("CS8033", output);
 
 
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (13)
CodeGen\CodeGenTupleTest.cs (11)
5796Assert.Contains(CodeAnalysisResources.TupleElementNameCountMismatch, e.Message);
5801Assert.Contains(CodeAnalysisResources.TupleElementLocationCountMismatch, e.Message);
6284Assert.Contains(CodeAnalysisResources.TupleUnderlyingTypeMustBeTupleCompatible, e.Message);
6297Assert.Contains(CodeAnalysisResources.TupleElementNameEmpty, e.Message);
6298Assert.Contains("elementNames[1]", e.Message);
6315Assert.Contains(CSharpResources.NotACSharpSymbol, e.Message);
6332Assert.Contains(CSharpResources.NotACSharpSymbol, e.Message);
6803Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message);
6843Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message);
6872Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message);
6912Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message);
 
 
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Microsoft.CodeAnalysis.ExternalAccess.HotReload.UnitTests (1)
Microsoft.CodeAnalysis.Features.UnitTests (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (5)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (11)
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
Microsoft.Data.Analysis.Interactive.Tests (3)
Microsoft.DotNet.ApiCompat.IntegrationTests (6)
Microsoft.DotNet.ApiCompatibility.Tests (6)
Microsoft.DotNet.Build.Tasks.Feed.Tests (6)
Microsoft.DotNet.Build.Tasks.Workloads.Tests (70)
CreateVisualStudioWorkloadTests.cs (32)
98Assert.Contains("package name=microsoft.net.sdk.emscripten", componentSwr);
103Assert.Contains("package name=microsoft.net.sdk.emscripten.pre", previewComponentSwr);
106Assert.Contains("vs.package.type=component", componentSwr);
107Assert.Contains("vs.package.outOfSupport=yes", componentSwr);
108Assert.Contains("isUiGroup=yes", componentSwr);
109Assert.Contains("version=5.6.7.8", componentSwr);
111Assert.Contains("vs.package.type=component", previewComponentSwr);
112Assert.Contains("isUiGroup=yes", previewComponentSwr);
113Assert.Contains("version=5.6.7.8", previewComponentSwr);
118Assert.Contains("vs.dependency id=Microsoft.Emscripten.Node.6.0.4", componentSwr);
119Assert.Contains("vs.dependency id=Microsoft.Emscripten.Python.6.0.4", componentSwr);
120Assert.Contains("vs.dependency id=Microsoft.Emscripten.Sdk.6.0.4", componentSwr);
123Assert.Contains("vs.dependency id=Microsoft.Emscripten.Node.6.0.4", previewComponentSwr);
124Assert.Contains("vs.dependency id=Microsoft.Emscripten.Python.6.0.4", previewComponentSwr);
125Assert.Contains("vs.dependency id=Microsoft.Emscripten.Sdk.6.0.4", previewComponentSwr);
129Assert.Contains("package name=Emscripten.Manifest-6.0.200", manifestMsiSwr);
130Assert.Contains("vs.package.type=msi", manifestMsiSwr);
131Assert.Contains("vs.package.chip=x64", manifestMsiSwr);
145Assert.Contains("package name=Microsoft.Emscripten.Python.6.0.4", packMsiSwr);
146Assert.Contains("vs.package.chip=x64", packMsiSwr);
147Assert.Contains("vs.package.outOfSupport=yes", packMsiSwr);
233Assert.Contains("package name=microsoft.net.sdk.emscripten", componentSwr);
236Assert.Contains("vs.package.type=component", componentSwr);
237Assert.Contains("isUiGroup=yes", componentSwr);
238Assert.Contains("version=5.6.7.8", componentSwr);
240Assert.Contains("vs.package.outOfSupport=no", componentSwr);
245Assert.Contains("vs.dependency id=Microsoft.Emscripten.Node.6.0.4", componentSwr);
246Assert.Contains("vs.dependency id=Microsoft.Emscripten.Python.6.0.4", componentSwr);
247Assert.Contains("vs.dependency id=Microsoft.Emscripten.Sdk.6.0.4", componentSwr);
251Assert.Contains("package name=Emscripten.Manifest-6.0.200", manifestMsiSwr);
252Assert.Contains("vs.package.type=msi", manifestMsiSwr);
254Assert.Contains("vs.package.machineArch=arm64", manifestMsiSwr);
 
SwixComponentTests.cs (26)
32Assert.Contains("package name=microsoft.net.sdk.blazorwebassembly.aot", componentSwr);
33Assert.Contains("version=1.0.0", componentSwr);
36Assert.Contains(@"title=""Blazor WebAssembly AOT workload""", componentResSwr);
37Assert.Contains(@"description=""Blazor WebAssembly AOT workload""", componentResSwr);
38Assert.Contains(@"category="".NET""", componentResSwr);
61Assert.Contains("package name=microsoft.net.sdk.blazorwebassembly.aot", componentSwr);
62Assert.Contains("version=4.5.6", componentSwr);
63Assert.Contains("isAdvertisedPackage=yes", componentSwr);
66Assert.Contains(@"title=""Blazor WebAssembly AOT workload""", componentResSwr);
67Assert.Contains(@"description=""A long wordy description about Blazor.""", componentResSwr);
68Assert.Contains(@"category=""WebAssembly""", componentResSwr);
90Assert.Contains("package name=microsoft.net.sdk.blazorwebassembly.aot", componentSwr);
91Assert.Contains("version=4.5.6", componentSwr);
92Assert.Contains("isAdvertisedPackage=no", componentSwr);
95Assert.Contains(@"title=""Blazor WebAssembly AOT workload""", componentResSwr);
96Assert.Contains(@"description=""A long wordy description about Blazor.""", componentResSwr);
97Assert.Contains(@"category=""WebAssembly""", componentResSwr);
116Assert.Contains("vs.dependency id=MSFT.MonoAOTCompiler.Task.6.0.0-preview.4.21201.1", componentSwr);
130Assert.Contains(@"package name=microsoft.net.runtime.ios", componentSwr);
136Assert.Contains(@"vs.dependency id=runtimes.ios", componentSwr);
160Assert.Contains(@"title=""AOT""", componentResSwr);
161Assert.Contains(@"description=""A long wordy description.""", componentResSwr);
162Assert.Contains(@"category=""Compilers, build tools, and runtimes""", componentResSwr);
175Assert.Contains(@"vs.dependency id=maui.mobile", componentSwr);
176Assert.Contains(@"vs.dependency id=maui.desktop", componentSwr);
193Assert.Contains($"vs.dependency id={packGroupId}", componentSwr);
 
 
Microsoft.DotNet.Open.Api.Tools.Tests (52)
Microsoft.DotNet.XUnitAssert.Tests (5)
Microsoft.Extensions.AI.Abstractions.Tests (8)
Microsoft.Extensions.AI.Evaluation.NLP.Tests (2)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
Microsoft.Extensions.AI.Integration.Tests (32)
ChatClientIntegrationTests.cs (26)
85Assert.Contains("America", response.Text);
86Assert.Contains("Asia", response.Text);
102Assert.Contains("3", response.Text);
249Assert.Contains(secretNumber.ToString(), response.Text);
265Assert.Contains("3528", response.Text);
286Assert.Contains("3528", sb.ToString());
317Assert.Contains(secretNumber.ToString(), response.Text);
349Assert.Contains((secretNumber + 19).ToString(), response.Text);
744Assert.Contains("101", response.Text);
783Assert.Contains("58", response.Text);
825Assert.Contains("81", response.Text);
834Assert.Contains("82", secondResponse.Text);
854entry => Assert.Contains("What's the biggest animal?", entry.Message),
855entry => Assert.Contains("whale", entry.Message));
900entry => Assert.Contains("What is the current secret number?", entry.Message),
901entry => Assert.Contains("\"name\": \"GetSecretNumber\"", entry.Message),
902entry => Assert.Contains($"\"result\": {secretNumber}", entry.Message),
903entry => Assert.Contains(secretNumber.ToString(), entry.Message));
954Assert.Contains(".", (string)activity.GetTagItem("server.address")!);
976Assert.Contains("Cardiff", response.Result.HomeTown);
1110Assert.Contains("Cardiff", response.Result.HomeTown);
1165Assert.Contains("Alice", m.Text);
1171Assert.Contains("Alice", response.Text);
1305Assert.Contains("Bob", m.Text);
1311Assert.Contains("Bob", responseText);
1355Assert.Contains("5", response.Text);
 
 
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (5)
Microsoft.Extensions.AI.OpenAI.Tests (15)
Microsoft.Extensions.AI.Tests (60)
ChatReduction\SummarizingChatReducerTests.cs (8)
119m => Assert.Contains("Asked about time", m.Text),
127m => Assert.Contains("sunny", m.Text));
166Assert.Contains("Summary", resultList[0].Text);
170m => Assert.Contains("Second question", m.Text),
171m => Assert.Contains("Second answer", m.Text),
172m => Assert.Contains("Third question", m.Text),
173m => Assert.Contains("Third answer", m.Text));
218Assert.Contains("User asked about weather", resultList[0].Text);
 
Functions\AIFunctionFactoryTest.cs (36)
71Assert.Contains("\"text\"", schema);
73Assert.Contains("\"default\":null", schema);
85Assert.Contains("\"default\":\"default\"", schema);
94Assert.Contains("\"default\":42", schema);
103Assert.Contains("\"default\":100", schema); // DefaultValue should take precedence
122Assert.Contains("'theParam'", e.Message);
264Assert.Contains("Metadata_DerivedFromLambda", func.Name);
270Assert.Contains("Metadata_DerivedFromLambda", func.Name);
276Assert.Contains("Metadata_DerivedFromLambda", func.Name);
314Assert.Contains("Metadata_DisplayNameAttribute", func.Name); // Will contain the lambda method name
371Assert.Contains("secondParameter", func.JsonSchema.ToString());
381Assert.Contains("test42", result.ToString());
394Assert.Contains("firstParameter", func.JsonSchema.ToString());
395Assert.Contains("secondParameter", func.JsonSchema.ToString());
431Assert.Contains("myInteger", func.JsonSchema.ToString());
442Assert.Contains("42", result?.ToString());
461Assert.Contains("myInteger", func.JsonSchema.ToString());
466Assert.Contains("42", result?.ToString());
599Assert.Contains("myInteger", f.JsonSchema.ToString());
607Assert.Contains("43", result?.ToString());
622Assert.Contains("myInteger", f.JsonSchema.ToString());
630Assert.Contains("43", result?.ToString());
646Assert.Contains("myInteger", f.JsonSchema.ToString());
650Assert.Contains("null 1", result?.ToString());
653Assert.Contains("43", result?.ToString());
683Assert.Contains("myInteger", f.JsonSchema.ToString());
687Assert.Contains("Unable to resolve", e.Message);
694Assert.Contains("Unable to resolve", e.Message);
704Assert.Contains("43", result?.ToString());
721Assert.Contains("43", result?.ToString());
738Assert.Contains("43", result?.ToString());
991Assert.Contains("00000000-0000-0000-0000-000000000000,0", result?.ToString());
1023Assert.Contains("[1,1,1,1]", result?.ToString());
1056Assert.Contains("[1,1,1,1]", result?.ToString());
1261Assert.Contains("firstNumber", tool.JsonSchema.ToString());
1262Assert.Contains("secondNumber", tool.JsonSchema.ToString());
 
 
Microsoft.Extensions.ApiDescription.Client.Tests (27)
TargetTest.cs (27)
80Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "azureMonitorClient.cs")}", process.Output);
81Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
103Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
104Assert.Contains($"TypeScriptCompile: {Path.Combine("obj", "azureMonitorClient.ts")}", process.Output);
123Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "azureMonitorClient.cs")}", process.Output);
124Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "NSwagClient.cs")}", process.Output);
125Assert.Contains($"Compile: {Path.Combine(_temporaryDirectory.Root, "obj", "swashbuckleClient.cs")}", process.Output);
126Assert.Contains($"FileWrites: {Path.Combine("obj", "azureMonitorClient.cs")}", process.Output);
127Assert.Contains($"FileWrites: {Path.Combine("obj", "NSwagClient.cs")}", process.Output);
128Assert.Contains($"FileWrites: {Path.Combine("obj", "swashbuckleClient.cs")}", process.Output);
149Assert.Contains($"Compile: {Path.Combine("obj", "azureMonitorClient.cs", "Generated1.cs")}", process.Output);
150Assert.Contains($"Compile: {Path.Combine("obj", "azureMonitorClient.cs", "Generated2.cs")}", process.Output);
151Assert.Contains(
154Assert.Contains(
176Assert.Contains(
201Assert.Contains(
226Assert.Contains(
253Assert.Contains(
278Assert.Contains(
303Assert.Contains(
328Assert.Contains(
355Assert.Contains(
379Assert.Contains(
385Assert.Contains(
391Assert.Contains(
420Assert.Contains(
426Assert.Contains(
 
 
Microsoft.Extensions.ApiDescription.Tool.Tests (3)
Microsoft.Extensions.Compliance.Abstractions.Tests (2)
Microsoft.Extensions.Compliance.Testing.Tests (7)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (10)
Linux\LinuxUtilizationParserCgroupV1Tests.cs (10)
92Assert.Contains("/sys/fs/cgroup/memory/memory.stat", r.Message);
93Assert.Contains("total_inactive_file", r.Message);
119Assert.Contains("/sys/fs/cgroup/memory/memory.usage_in_bytes", r.Message);
138Assert.Contains("lesser than", r.Message);
164Assert.Contains("/proc/meminfo", r.Message);
238Assert.Contains("/sys/fs/cgroup/cpuset/cpuset.cpus", r.Message);
259Assert.Contains("/sys/fs/cgroup/cpuset/cpuset.cpus", r.Message);
287Assert.Contains("/sys/fs/cgroup/cpu/cpu.cfs_", r.Message);
337Assert.Contains("proc/stat", r.Message);
354Assert.Contains("/sys/fs/cgroup/cpu/cpu.shares", r.Message);
 
 
Microsoft.Extensions.Diagnostics.Testing.Tests (16)
Logging\FakeLogCollectorTests.cs (16)
125Assert.Contains("trace] Hello world!", output.Last);
128Assert.Contains("debug] Hello world!", output.Last);
131Assert.Contains("info] Hello world!", output.Last);
134Assert.Contains("warn] Hello world!", output.Last);
137Assert.Contains("error] Hello world!", output.Last);
140Assert.Contains("crit] Hello world!", output.Last);
143Assert.Contains("none] Hello world!", output.Last);
146Assert.Contains("invld] Hello world!", output.Last);
157Assert.Contains("trace] Hello world!", output.Last);
160Assert.Contains("debug] Hello world!", output.Last);
163Assert.Contains("info] Hello world!", output.Last);
166Assert.Contains("warn] Hello world!", output.Last);
169Assert.Contains("error] Hello world!", output.Last);
172Assert.Contains("crit] Hello world!", output.Last);
175Assert.Contains("none] Hello world!", output.Last);
178Assert.Contains("invld] Hello world!", output.Last);
 
 
Microsoft.Extensions.SecretManager.Tools.Tests (31)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Microsoft.Extensions.Telemetry.Tests (9)
Microsoft.Extensions.Validation.Tests (1)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.Gen.Metrics.Unit.Tests (4)
Microsoft.JSInterop.Tests (5)
Microsoft.ML.Core.Tests (2)
Microsoft.ML.Tests (24)
SvmLightTests.cs (11)
247Assert.Contains("Duplicate keys found in dataset", ex.InnerException.Message);
362Assert.Contains("Encountered 0 index while parsing a 1-based dataset", ex.InnerException.Message);
381Assert.Contains("Encountered non-parsable index '-1' while parsing dataset", ex.InnerException.Message);
400Assert.Contains("Encountered non-parsable index 'a' while parsing dataset", ex.InnerException.Message);
407Assert.Contains("No int parsable keys found during key transform inference", ex.Message);
444Assert.Contains("If the number of features is not specified, a dataset must be provided to infer it.", ex.Message);
446Assert.Contains("To use the text feature names option, a dataset must be provided", ex.Message);
513Assert.Contains("Column Label not found in data", ex.Message);
521Assert.Contains("Column Features not found in data", ex.Message);
529Assert.Contains("Column Group not found in data", ex.Message);
537Assert.Contains("Column Weight not found in data", ex.Message);
 
 
Microsoft.ML.Tokenizers.Data.Tests (1)
Microsoft.NET.Build.Containers.IntegrationTests (1)
Microsoft.NET.Build.Tests (2)
Microsoft.NET.Sdk.StaticWebAssets.Tests (6)
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (1)
Microsoft.TemplateEngine.Cli.UnitTests (6)
Roslyn.VisualStudio.Next.UnitTests (10)
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (10)
45Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
62Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
80Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
103Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
120Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
142Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
353Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
455Assert.Contains(ExtensionExceptionMessage, result.ExtensionException.Message);
503Assert.Contains(ExtensionExceptionMessage, result.ExtensionException.Message);
664Assert.Contains(nameof(InvalidOperationException), fatalRpcErrorMessage);
 
 
ServerComparison.FunctionalTests (4)
Shared.Tests (27)
Data.Validation\LengthAttributeTests.cs (12)
42Assert.Contains(nameof(options.Name), results[0].ErrorMessage);
56Assert.Contains(nameof(options.Address), results[0].ErrorMessage);
63Assert.Contains(nameof(options.Address), results[0].ErrorMessage);
98Assert.Contains(nameof(options.Name), results[0].ErrorMessage);
112Assert.Contains(nameof(options.Address), results[0].ErrorMessage);
120Assert.Contains(nameof(options.Address), results[0].ErrorMessage);
171Assert.Contains(nameof(options.Names), results[0].ErrorMessage);
189Assert.Contains(nameof(options.Addresses), results[0].ErrorMessage);
225Assert.Contains(nameof(options.Names), results[0].ErrorMessage);
237Assert.Contains(nameof(options.Addresses), results[0].ErrorMessage);
278Assert.Contains(nameof(options.Names), results[0].ErrorMessage);
296Assert.Contains(nameof(options.Addresses), results[0].ErrorMessage);
 
Data.Validation\TimeSpanAttributeTests.cs (10)
40Assert.Contains(nameof(options.Time), results[0].ErrorMessage);
47Assert.Contains(nameof(options.Time), results[0].ErrorMessage);
65Assert.Contains(nameof(options.Time2), results[0].ErrorMessage);
105Assert.Contains(nameof(options.Time), results[0].ErrorMessage);
112Assert.Contains(nameof(options.Time), results[0].ErrorMessage);
126Assert.Contains(nameof(options.Time2), results[0].ErrorMessage);
133Assert.Contains(nameof(options.Time2), results[0].ErrorMessage);
168Assert.Contains(nameof(options.Time), results[0].ErrorMessage);
175Assert.Contains(nameof(options.Time), results[0].ErrorMessage);
193Assert.Contains(nameof(options.Time2), results[0].ErrorMessage);
 
 
System.ServiceModel.Primitives.Tests (2)
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (7)
Templates.Tests (9)
VBCSCompiler.UnitTests (2)