1361 references to Contains
Aspire.Dashboard.Tests (6)
BrowserSecurityHeadersMiddlewareTests.cs (2)
44Assert.Contains("default-src", httpContext.Response.Headers.ContentSecurityPolicy.ToString()); 62Assert.Contains(expectedContent, httpContext.Response.Headers.ContentSecurityPolicy.ToString());
Integration\StartupTests.cs (4)
108s => Assert.Contains("ASPNETCORE_URLS", s), 109s => Assert.Contains("DOTNET_DASHBOARD_OTLP_ENDPOINT_URL", s)); 125s => Assert.Contains("Dashboard:Otlp:AllowedCertificates:0:Thumbprint", s)); 713s => Assert.Contains(DashboardConfigNames.DashboardOtlpHttpUrlName.ConfigKey, s));
Aspire.Hosting.Dapr.Tests (3)
DaprTests.cs (3)
166Assert.Contains($"--app-port {expectedPort}", commandline); 167Assert.Contains($"--app-channel-address {expectedChannelAddress}", commandline); 168Assert.Contains($"--app-protocol {expectedSchema}", commandline);
Aspire.Hosting.MongoDB.Tests (12)
MongoDbFunctionalTests.cs (12)
213item => Assert.Contains("The Shawshank Redemption", item.Name), 214item => Assert.Contains("The Godfather", item.Name), 215item => Assert.Contains("The Dark Knight", item.Name), 216item => Assert.Contains("Schindler's List", item.Name) 336item => Assert.Contains("The Shawshank Redemption", item.Name), 337item => Assert.Contains("The Godfather", item.Name), 338item => Assert.Contains("The Dark Knight", item.Name), 339item => Assert.Contains("Schindler's List", item.Name) 365item => Assert.Contains("The Shawshank Redemption", item.Name), 366item => Assert.Contains("The Godfather", item.Name), 367item => Assert.Contains("The Dark Knight", item.Name), 368item => Assert.Contains("Schindler's List", item.Name)
Aspire.Hosting.Testing.Tests (8)
TestingBuilderTests.cs (5)
60Assert.Contains("does not have an entry point", ioe.Message); 182Assert.Contains("TestingAppHost1", hostEnvironment.ContentRootPath); 250Assert.Contains(crashArg, exception.Message); 254Assert.Contains(crashArg, exception.Message); 267Assert.Contains(crashArg, exception.Message);
TestingFactoryCrashTests.cs (2)
28Assert.Contains(crashArg, exception.Message); 39Assert.Contains(crashArg, exception.Message);
TestingFactoryTests.cs (1)
62Assert.Contains("TestingAppHost1", appModel.ContentRootPath);
Aspire.Hosting.Tests (3)
AddParameterTests.cs (1)
89Assert.Contains("configuration key 'Parameters:pass' is missing", prop.Value?.ToString());
DistributedApplicationTests.cs (1)
762Assert.Contains(httpEndPoint.ToString().Trim('/'), urls);
MSBuildTests.cs (1)
125Assert.Contains("warning ASPIRE004", output.ToString());
Aspire.Microsoft.Data.SqlClient.Tests (3)
AspireSqlServerSqlClientExtensionsTests.cs (3)
129Assert.Contains("fake1", connection1.ConnectionString); 130Assert.Contains("fake2", connection2.ConnectionString); 131Assert.Contains("fake3", connection3.ConnectionString);
Aspire.MySqlConnector.Tests (3)
AspireMySqlConnectorExtensionsTests.cs (3)
137Assert.Contains("localhost1", connection1.ConnectionString); 138Assert.Contains("localhost2", connection2.ConnectionString); 139Assert.Contains("localhost3", connection3.ConnectionString);
Aspire.NATS.Net.Tests (3)
AspireNatsClientExtensionsTests.cs (3)
230Assert.Contains("aspire-host1", connection1.Opts.Url); 231Assert.Contains("aspire-host2", connection2.Opts.Url); 232Assert.Contains("aspire-host3", connection3.Opts.Url);
Aspire.Npgsql.Tests (3)
AspirePostgreSqlNpgsqlExtensionsTests.cs (3)
159Assert.Contains("localhost1", connection1.ConnectionString); 160Assert.Contains("localhost2", connection2.ConnectionString); 161Assert.Contains("localhost3", connection3.ConnectionString);
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
145Assert.Contains("AspireRabbitMQLoggingTests.TestException", errorEvent[3].Value?.ToString());
Aspire.StackExchange.Redis.Tests (4)
AspireRedisExtensionsTests.cs (4)
51Assert.Contains("aspire-test-user", connection.Configuration); 79Assert.Contains(ConnectionString, connection.Configuration); 108Assert.Contains(ConnectionString, connection.Configuration); 141Assert.Contains(ConnectionString, connection.Configuration);
Aspire.Workload.Tests (3)
BuildAndRunTemplateTests.cs (1)
147Assert.Contains("setting must be an https address unless the 'ASPIRE_ALLOW_UNSECURED_TRANSPORT'", res.Output);
NewUpAndBuildStandaloneTemplateTests.cs (1)
52Assert.Contains(error, tce.Result.Value.Output);
NewUpAndBuildSupportProjectTemplatesTests.cs (1)
62Assert.Contains(error, tce.Result.Value.Output);
AuthSamples.FunctionalTests (25)
CookiesTests.cs (3)
67Assert.Contains("Log in</button>", content); 75Assert.Contains("<h2>HttpContext.User.Claims</h2>", content); 76Assert.Contains($"<dd>{userName}</dd>", content); // Ensure user name shows up as a claim
CustomPolicyProviderTests.cs (6)
59Assert.Contains("Welcome, Dude", content); 60Assert.Contains("Welcome to a page restricted to users 10 or older", content); 75Assert.Contains("Access Denied: Dude is not authorized to view this page.", content); 90Assert.Contains("Welcome, Dude", content); 91Assert.Contains("Welcome to a page restricted to users 50 or older", content); 106Assert.Contains("Access Denied: Dude is not authorized to view this page.", content);
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);
PathSchemeSelectionTests.cs (4)
65Assert.Contains("Scheme: Api", content); // expected scheme 66Assert.Contains("Hao", content); // expected name claim 101Assert.Contains("<h2>HttpContext.User.Claims (Scheme: Cookies)</h2>", content); 102Assert.Contains($"<dd>{userName}</dd>", content); // Ensure user name shows up as a claim
Client.ClientBase.IntegrationTests (1)
DuplexClientBaseTests.4.1.0.cs (1)
41Assert.Contains("BasicHttpBinding", exception.Message);
Contract.XmlSerializer.IntegrationTests (1)
XmlSerializerFormatTest.cs (1)
48Assert.Contains("http://schemas.xmlsoap.org/soap/encoding/", str);
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(">", "&gt;"), content); 147Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", "&gt;"), 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(">", "&gt;"), 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(">", "&gt;"), content); 248Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_AddMigrationCommandPMC").Replace(">", "&gt;"), content); 249Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandCLI").Replace(">", "&gt;"), content); 250Assert.Contains(StringsHelpers.GetResourceString("DatabaseErrorPage_ApplyMigrationsCommandPMC").Replace(">", "&gt;"), 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)
DatabaseErrorPageSampleTest.cs (1)
33Assert.Contains("In Visual Studio, use the Package Manager Console to scaffold a new migration and apply it to the database:", body);
DeveloperExceptionPageSampleTest.cs (3)
34Assert.Contains("Exception: Demonstration exception.", body); 52Assert.Contains("Demonstration exception", body.Detail); 55Assert.Contains("System.Exception: Demonstration exception.", exceptionNode.GetProperty("details").GetString());
ExceptionHandlerSampleTest.cs (1)
30Assert.Contains("we encountered an un-expected issue with your application.", body);
StatusCodeSampleTest.cs (3)
35Assert.Contains("Status Code: 417", body); 72Assert.Contains(";", responseBody); 73Assert.Contains(statusCodeReasonPhrase, responseBody);
WelcomePageSampleTest.cs (1)
31Assert.Contains("Your ASP.NET Core application has been successfully started", body);
dotnet-svcutil.xmlserializer.IntegrationTests (1)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.cs (1)
48Assert.Contains("http://schemas.xmlsoap.org/soap/encoding/", str);
IIS.FunctionalTests (16)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
71Assert.Contains(username, responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
102Assert.Contains("500.0", responseString);
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (7)
78Assert.Contains("TEST MESSAGE", contents); 80Assert.Contains("\r\n", contents); 174Assert.Contains("Switching debug log files to", logContents); 218Assert.Contains("彡⾔", contents); 347Assert.Contains("[aspnetcorev2.dll]", logContents); 349Assert.Contains("Description: IIS ASP.NET Core Module V2. Commit:", logContents); 350Assert.Contains("Description: IIS ASP.NET Core Module V2 Request Handler. Commit:", logContents);
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (2)
67Assert.Contains("500.35", await result2.Content.ReadAsStringAsync()); 94Assert.Contains("500.34", await result2.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
59Assert.Contains(Environment.UserName, responseText);
src\Servers\IIS\IIS\test\IIS.Shared.FunctionalTests\StdOutRedirectionTests.cs (4)
80Assert.Contains(@"Framework: 'Microsoft.NETCore.App', version '2.9.9' (x64)", contents); 81Assert.Contains(missingFrameworkString, contents); 107Assert.Contains("Invoked hostfxr", contents); 161Assert.Contains("Invoked hostfxr", contents);
IIS.LongTests (27)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (4)
146Assert.Contains("500.0", await result.Content.ReadAsStringAsync()); 165Assert.Contains("502.5", await result.Content.ReadAsStringAsync()); 183Assert.Contains("500.30", await result.Content.ReadAsStringAsync()); 624Assert.Contains("0x80072efe", await response.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
77Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 81Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger)); 431Assert.Contains("500.31", responseContent); 432Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent); 492Assert.Contains("500.37", responseContent); 524Assert.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\ShutdownTests.cs (4)
146Assert.Contains("500.0", await result.Content.ReadAsStringAsync()); 165Assert.Contains("502.5", await result.Content.ReadAsStringAsync()); 183Assert.Contains("500.30", await result.Content.ReadAsStringAsync()); 624Assert.Contains("0x80072efe", await response.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
77Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 81Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger)); 431Assert.Contains("500.31", responseContent); 432Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent); 492Assert.Contains("500.37", responseContent); 524Assert.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\ShutdownTests.cs (4)
146Assert.Contains("500.0", await result.Content.ReadAsStringAsync()); 165Assert.Contains("502.5", await result.Content.ReadAsStringAsync()); 183Assert.Contains("500.30", await result.Content.ReadAsStringAsync()); 621Assert.Contains("0x80072f78", await response.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
77Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 81Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger)); 431Assert.Contains("500.31", responseContent); 432Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent); 492Assert.Contains("500.37", responseContent); 524Assert.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 (47)
InProcess\AuthenticationTests.cs (4)
40Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); 41Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); 46Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); 48Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString());
OutOfProcess\NtlmAuthentationTest.cs (4)
59Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); 60Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString()); 64Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); 66Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString());
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
71Assert.Contains(username, responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (1)
102Assert.Contains("500.0", responseString);
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (7)
78Assert.Contains("TEST MESSAGE", contents); 80Assert.Contains("\r\n", contents); 174Assert.Contains("Switching debug log files to", logContents); 218Assert.Contains("彡⾔", contents); 347Assert.Contains("[aspnetcorev2.dll]", logContents); 349Assert.Contains("Description: IIS ASP.NET Core Module V2. Commit:", logContents); 350Assert.Contains("Description: IIS ASP.NET Core Module V2 Request Handler. Commit:", logContents);
src\Servers\IIS\IIS\test\Common.FunctionalTests\MultiApplicationTests.cs (2)
67Assert.Contains("500.35", await result2.Content.ReadAsStringAsync()); 94Assert.Contains("500.34", await result2.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
59Assert.Contains(Environment.UserName, responseText);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (4)
146Assert.Contains("500.0", await result.Content.ReadAsStringAsync()); 165Assert.Contains("502.5", await result.Content.ReadAsStringAsync()); 183Assert.Contains("500.30", await result.Content.ReadAsStringAsync()); 624Assert.Contains("0x80072efe", await response.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (23)
77Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 81Assert.Contains("500.0", await response.Content.ReadAsStringAsync()); 216Assert.Contains("InProcessWebSite.exe", Helpers.ReadAllTextFromFile(Path.Combine(deploymentResult.ContentRoot, "web.config"), Logger)); 431Assert.Contains("500.31", responseContent); 432Assert.Contains("Framework: 'Microsoft.NETCore.App', version '2.9.9'", responseContent); 492Assert.Contains("500.37", responseContent); 524Assert.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)
BadHttpRequestTests.cs (1)
358Assert.Contains(expectedExceptionMessage, exceptionString);
ResponseTests.cs (1)
941Assert.Contains(
Interop.FunctionalTests (3)
Http3\Http3RequestTests.cs (1)
1825Assert.Contains("The client closed the connection.", connectionAbortLog.Message);
HttpClientHttp2InteropTests.cs (2)
742Assert.Contains("The HTTP/2 server reset the stream. HTTP/2 error code 'CANCEL' (0x8)", responseEx.ToString()); 801Assert.Contains("The HTTP/2 server reset the stream. HTTP/2 error code 'CANCEL' (0x8)", responseEx.ToString());
Microsoft.Analyzers.Local.Tests (1)
Json\JsonScannerTest.cs (1)
35Assert.Contains("'1'", ex.Message);
Microsoft.AspNetCore.Authentication.Core.Test (13)
AuthenticationSchemeProviderTests.cs (1)
155Assert.Contains("Scheme already exists: signin", error.Message);
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 (2)
UserJwtsTests.cs (2)
62Assert.Contains("dotnet-user-jwts", File.ReadAllText(appsettings)); 154Assert.Contains("Scheme2", appsettingsContent);
Microsoft.AspNetCore.Authentication.Test (131)
CookieTests.cs (23)
140Assert.Contains("; path=/", setCookie); 141Assert.Contains("; httponly", setCookie); 142Assert.Contains("; samesite=", setCookie); 273Assert.Contains("; path=/", setCookie); 274Assert.Contains("; httponly", setCookie); 275Assert.Contains("; samesite=", setCookie); 347Assert.Contains("; secure", setCookie); 375Assert.Contains("TestCookie=", setCookie1); 376Assert.Contains(" path=/foo", setCookie1); 377Assert.Contains(" domain=another.com", setCookie1); 378Assert.Contains(" secure", setCookie1); 379Assert.Contains(" samesite=none", setCookie1); 380Assert.Contains(" httponly", setCookie1); 381Assert.Contains(" extension0", setCookie1); 382Assert.Contains(" extension1=value1", setCookie1); 397Assert.Contains("SecondCookie=", setCookie2); 398Assert.Contains(" path=/base", setCookie2); 399Assert.Contains(" samesite=strict", setCookie2); 555Assert.Contains(".AspNetCore.Cookies=; expires=", transaction2.SetCookie); 593Assert.Contains(".AspNetCore.Cookies=; expires=", transaction4.SetCookie[0]); 1166Assert.Contains("path=/base", transaction1.SetCookie); 1414Assert.Contains(".AspNetCore.Cookies=; expires=", transaction.SetCookie[0]); 1437Assert.Contains(".AspNetCore.Cookies=; expires=", transaction.SetCookie[0]);
FacebookTests.cs (27)
112Assert.Contains("custom=test", query); 142Assert.Contains("scope=foo,bar", res.Headers.Location.Query); 174Assert.Contains("scope=baz,qux", res.Headers.Location.Query); 206Assert.Contains("scope=baz,qux", res.Headers.Location.Query); 233Assert.Contains("https://www.facebook.com/v14.0/dialog/oauth", location); 234Assert.Contains("response_type=code", location); 235Assert.Contains("client_id=", location); 236Assert.Contains("redirect_uri=" + UrlEncoder.Default.Encode("http://example.com/base/signin-facebook"), location); 237Assert.Contains("scope=", location); 238Assert.Contains("state=", location); 266Assert.Contains("https://www.facebook.com/v14.0/dialog/oauth", location); 267Assert.Contains("response_type=code", location); 268Assert.Contains("client_id=", location); 269Assert.Contains("redirect_uri=" + UrlEncoder.Default.Encode("http://example.com/signin-facebook"), location); 270Assert.Contains("scope=", location); 271Assert.Contains("state=", location); 301Assert.Contains("https://www.facebook.com/v14.0/dialog/oauth", location); 302Assert.Contains("response_type=code", location); 303Assert.Contains("client_id=", location); 304Assert.Contains("redirect_uri=", location); 305Assert.Contains("scope=", location); 306Assert.Contains("state=", location); 307Assert.Contains("code_challenge=", location); 308Assert.Contains("code_challenge_method=S256", location); 369Assert.Contains("fields=email,timezone,picture", finalUserInfoEndpoint); 370Assert.Contains("&access_token=", finalUserInfoEndpoint); 371Assert.Contains("&appsecret_proof=b7fb6d5a4510926b4af6fe080497827d791dc45fe6541d88ba77bdf6e8e208c6&", finalUserInfoEndpoint);
GoogleTests.cs (16)
153Assert.Contains("&scope=" + UrlEncoder.Default.Encode("openid profile email"), query); 336Assert.Contains("custom=test", query); 561Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); 562Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]); 724Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); 725Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]); 764Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); 765Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]); 885Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete 886Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]); 929Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete 930Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]); 973Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete 974Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]); 1010Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); // Delete 1011Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
MicrosoftAccountTests.cs (14)
67Assert.Contains("custom=test", query); 121Assert.Contains("https://login.microsoftonline.com/common/oauth2/v2.0/authorize", location); 122Assert.Contains("response_type=code", location); 123Assert.Contains("client_id=", location); 124Assert.Contains("redirect_uri=", location); 125Assert.Contains("scope=", location); 126Assert.Contains("state=", location); 127Assert.Contains("code_challenge=", location); 128Assert.Contains("code_challenge_method=S256", location); 146Assert.Contains("scope=foo%20bar", res.Headers.Location.Query); 164Assert.Contains("scope=baz%20qux", res.Headers.Location.Query); 182Assert.Contains("scope=baz%20qux", res.Headers.Location.Query); 246Assert.Contains($".AspNetCore.Correlation.{correlationValue}", transaction.SetCookie[0]); 247Assert.Contains(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
OAuthTests.cs (7)
138Assert.Contains("path=/oauth-callback", correlation); 166Assert.Contains("path=/", correlation); 193Assert.Contains("scope=foo%20bar", res.Headers.Location.Query); 219Assert.Contains("prompt=login&audience=https%3A%2F%2Fapi.example.com", res.Headers.Location.Query); 248Assert.Contains("scope=baz%20qux", res.Headers.Location.Query); 277Assert.Contains("scope=baz%20qux", res.Headers.Location.Query); 407Assert.Contains("custom_error", context.Failure.Message);
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);
OpenIdConnect\OpenIdConnectConfigurationTests.cs (1)
480ex => Assert.Contains("cannot be set to itself", ex.Message));
OpenIdConnect\OpenIdConnectTests.cs (5)
81Assert.Contains("path=/signin-oidc", nonce); 108Assert.Contains("path=/", nonce); 109Assert.Contains("ExtN", nonce); 134Assert.Contains("path=/signin-oidc", correlation); 161Assert.Contains("path=/", correlation);
RemoteAuthenticationTests.cs (3)
70Assert.Contains("cannot be set to itself", error.Message); 83Assert.Contains("cannot be set to itself", error.Message); 98Assert.Contains("cannot be set to itself", error.Message);
TwitterTests.cs (13)
73Assert.Contains("custom=test", query); 183Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location); 211Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location); 261Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location); 368Assert.Contains("https://api.twitter.com/oauth/authenticate?oauth_token=", location); 514Assert.Contains("include_email=true", finalVerifyCredentialsEndpoint); 516Assert.Contains("oauth_consumer_key=", finalAuthorizationParameter); 517Assert.Contains("oauth_nonce=", finalAuthorizationParameter); 518Assert.Contains("oauth_signature=", finalAuthorizationParameter); 519Assert.Contains("oauth_signature_method=", finalAuthorizationParameter); 520Assert.Contains("oauth_timestamp=", finalAuthorizationParameter); 521Assert.Contains("oauth_token=", finalAuthorizationParameter); 522Assert.Contains("oauth_version=", finalAuthorizationParameter);
WsFederation\WsFederationTest.cs (2)
147Assert.Contains("Unsolicited logins are not allowed.", exception.InnerException.Message); 234Assert.Contains("CustomKey=CustomValue", result.Headers.Location.Query);
WsFederation\WsFederationTest_Handler.cs (2)
145Assert.Contains("Unsolicited logins are not allowed.", exception.InnerException.Message); 232Assert.Contains("CustomKey=CustomValue", result.Headers.Location.Query);
Microsoft.AspNetCore.Components.Authorization.Tests (1)
CascadingAuthenticationStateTest.cs (1)
29Assert.Contains($"There is no registered service of type '{typeof(AuthenticationStateProvider).FullName}'.", ex.Message);
Microsoft.AspNetCore.Components.Endpoints.Tests (15)
RazorComponentResultTest.cs (7)
255Assert.Contains("A navigation command was attempted during prerendering after the server already started sending the response", ex.Message); 329Assert.Contains( 354Assert.Contains("[Within streaming region: <!--bl:X-->Loading...<!--/bl:X-->]", html); 355Assert.Contains("[Within nested nonstreaming region: Loaded]", html); 386Assert.Contains("[Within streaming region: <!--bl:X-->Loading...<!--/bl:X-->]", html); 390Assert.Contains("[Top level component: Loaded]", html); 391Assert.Contains("[Within nested nonstreaming region: Loaded]", html);
SSRRenderModeBoundaryTest.cs (8)
38Assert.Contains($"A component of type '{typeof(TestComponent)}' has render mode '{nameof(ServerRenderModeSubclass)}'", ex.Message); 39Assert.Contains($"add a call to 'AddInteractiveServerRenderMode'", ex.Message); 52Assert.Contains($"A component of type '{typeof(TestComponent)}' has render mode '{nameof(WebAssemblyRenderModeSubclass)}'", ex.Message); 53Assert.Contains($"add a call to 'AddInteractiveWebAssemblyRenderMode'", ex.Message); 66Assert.Contains($"A component of type '{typeof(TestComponent)}' has render mode '{nameof(AutoRenderModeSubclass)}'", ex.Message); 67Assert.Contains($"add a call to 'AddInteractiveServerRenderMode'", ex.Message); 80Assert.Contains($"A component of type '{typeof(TestComponent)}' has render mode '{nameof(AutoRenderModeSubclass)}'", ex.Message); 81Assert.Contains($"add a call to 'AddInteractiveWebAssemblyRenderMode'", ex.Message);
Microsoft.AspNetCore.Components.Server.Tests (1)
ProtectedBrowserStorageTest.cs (1)
234Assert.Contains("The value is not protected with the expected purpose", innerException.Message);
Microsoft.AspNetCore.Components.Tests (7)
CascadingParameterTest.cs (1)
567Assert.Contains("The current thread is not associated with the Dispatcher", ex.Message);
RendererTest.cs (6)
664Assert.Contains("declares more than one parameter", ex.Message); 687Assert.Contains($"must inherit from {typeof(EventArgs).FullName}", ex.Message); 3538Assert.Contains($"There is no event handler associated with this event. EventId: '{eventHandlerId}'.", ex.Message); 4432Assert.Contains("Cannot start a batch when one is already in progress.", ex.Message); 5044Assert.Contains($"Cannot supply a component of type '{typeof(ComponentWithUnknownRenderMode)}' because the current platform does not support the render mode '{typeof(ComponentWithUnknownRenderMode.UnknownRenderMode)}'.", ex.Message); 5062Assert.Contains($"Cannot supply a component of type '{typeof(TestComponent)}' because the current platform does not support the render mode '{typeof(ComponentWithUnknownRenderMode.UnknownRenderMode)}'.", ex.Message);
Microsoft.AspNetCore.Components.Web.Tests (7)
Forms\InputBaseTest.cs (1)
34Assert.Contains($"{typeof(TestInputComponent<string>)} requires a value for the 'ValueExpression' parameter. Normally this is provided automatically when using 'bind-Value'.", ex.Message);
Forms\InputRadioTest.cs (1)
24Assert.Contains($"must have an ancestor", ex.Message);
HtmlRendering\HtmlRendererTest.cs (2)
30Assert.Contains("The current thread is not associated with the Dispatcher", ex.Message); 43Assert.Contains("The current thread is not associated with the Dispatcher", ex.Message);
Virtualization\VirtualizeTest.cs (3)
31Assert.Contains("requires a positive value for parameter", ex.Message); 50Assert.Contains("can only accept one item source from its parameters", ex.Message); 69Assert.Contains("parameters to be specified and non-null", ex.Message);
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
WebViewManagerE2ETests.cs (1)
47Assert.Contains($"Test passed? {true}", testProgramOutput);
Microsoft.AspNetCore.DataProtection.Tests (2)
Repositories\FileSystemXmlRepositoryTests.cs (1)
290Assert.Contains(Resources.FormatFileSystem_EphemeralKeysLocationInContainer(dirInfo.FullName), loggerFactory.ToString());
TypeForwardingActivatorTests.cs (1)
40Assert.Contains("Microsoft.AspNet.DataProtection.Test", exception.Message);
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (5)
HealthCheckMiddlewareTests.cs (5)
939Assert.Contains($"{nameof(HealthStatus)}.{nameof(HealthStatus.Healthy)}", exception.Message); 940Assert.Contains($"{nameof(HealthStatus)}.{nameof(HealthStatus.Degraded)}", exception.Message); 941Assert.Contains($"{nameof(HealthStatus)}.{nameof(HealthStatus.Unhealthy)}", exception.Message); 957Assert.Contains($"{nameof(HealthStatus)}.{nameof(HealthStatus.Degraded)}", exception.Message); 958Assert.Contains($"{nameof(HealthStatus)}.{nameof(HealthStatus.Unhealthy)}", exception.Message);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (1)
Latency\ChecpointAcceptanceTests.cs (1)
116Assert.Contains(alreadySetServerTimingHeader!, h);
Microsoft.AspNetCore.Diagnostics.Tests (7)
DeveloperExceptionPageMiddlewareTest.cs (7)
128Assert.Contains("/test/{id}", endpointDisplayName); 187Assert.Contains("/test/{id}", endpointDisplayName); 262Assert.Contains("<html", responseText); 263Assert.Contains("Test exception", responseText); 298Assert.Contains("Test exception", responseText); 334Assert.Contains("my metadata", responseText); 369Assert.Contains("Not found!", responseText);
Microsoft.AspNetCore.FunctionalTests (1)
WebHostFunctionalTests.cs (1)
96Assert.Contains(expected, responseText);
Microsoft.AspNetCore.Hosting.Tests (5)
ConfigureBuilderTests.cs (1)
35Assert.Contains(nameof(CrasherService), ex.InnerException.StackTrace);
WebHostBuilderTests.cs (3)
720Assert.Contains("No application configured.", ex.Message); 1313Assert.Contains("No application configured.", exception.Message); 1523Assert.Contains(expectedText, bodyText);
WebHostTests.cs (1)
991Assert.Contains("ConfigureServices", ex.Message);
Microsoft.AspNetCore.Http.Extensions.Tests (11)
ParameterBindingMethodCacheTests.cs (6)
559Assert.Contains($"bool TryParse(string, IFormatProvider, out {TypeNameHelper.GetTypeDisplayName(type, fullName: false)})", ex.Message); 560Assert.Contains($"bool TryParse(string, out {TypeNameHelper.GetTypeDisplayName(type, fullName: false)})", ex.Message); 621Assert.Contains($"ValueTask<{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}> BindAsync(HttpContext context, ParameterInfo parameter)", ex.Message); 622Assert.Contains($"ValueTask<{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}> BindAsync(HttpContext context)", ex.Message); 623Assert.Contains($"ValueTask<{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}?> BindAsync(HttpContext context, ParameterInfo parameter)", ex.Message); 624Assert.Contains($"ValueTask<{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}?> BindAsync(HttpContext context)", ex.Message);
RequestDelegateFactoryTests.cs (5)
1521Assert.Contains(message, exception.Message); 2114Assert.Contains($"The nullable type '{TypeNameHelper.GetTypeDisplayName(parameter.ParameterType, fullName: false)}' is not supported, mark the parameter as non-nullable.", exception.Message); 2127Assert.Contains("An item with the same key has already been added. Key: Foo", exception.Message); 3233Assert.Contains("Microsoft.AspNetCore.Routing.Internal.RequestDelegateFactoryTests+Todo", exception.Message); 3234Assert.Contains("JsonSerializableAttribute", exception.Message);
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)
FileLoggerProcessorTests.cs (1)
317Assert.Contains(GetLogFileName(options.FileName, _today, i), actualFiles1[i]);
HttpLoggingMiddlewareTests.cs (4)
1945Assert.Contains("i0request: v0", requestLog.Message); 1946Assert.Contains("i1request: v1", requestLog.Message); 1949Assert.Contains("i0response: v0", responseLog.Message); 1950Assert.Contains("i1response: v1", responseLog.Message);
W3CLoggerOptionsTests.cs (2)
22Assert.Contains("FileSizeLimit must be positive", ex.Message); 44Assert.Contains("FlushInterval must be positive", ex.Message);
W3CLoggingMiddlewareTests.cs (2)
267Assert.Contains("Snickerdoodle", lines[3]); 268Assert.Contains("- - 1.3.3.7,+2001:db8:85a3:8d3:1319:8a2e:370:7348", lines[3]);
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (2)
UserStoreWithGenericsTest.cs (2)
84Assert.Contains("AddEntityFrameworkStores", e.Message); 93Assert.Contains("AddEntityFrameworkStores", e.Message);
Microsoft.AspNetCore.Identity.FunctionalTests (4)
ManagementTests.cs (1)
233Assert.Contains("Contoso", externalLogins.ExternalLoginDisplayName.TextContent);
Pages\Account\Login.cs (1)
82Assert.Contains("Invalid login attempt.", content);
Pages\Account\Manage\TwoFactorAuthentication.cs (1)
30Assert.Contains("You must accept the policy before you can enable two factor authentication.", twoFactor.DocumentElement.TextContent);
UserStories.cs (1)
200Assert.Contains("Verification email sent.", await response.Content.ReadAsStringAsync());
Microsoft.AspNetCore.Identity.InMemory.Test (5)
FunctionalTest.cs (5)
134Assert.Contains("; expires=", transaction2.SetCookie); 232Assert.Contains(IdentityConstants.TwoFactorRememberMeScheme + "=", setCookie); 233Assert.Contains("; expires=", setCookie); 261Assert.Contains(IdentityConstants.TwoFactorRememberMeScheme + "=", setCookie); 262Assert.Contains("; expires=", setCookie);
Microsoft.AspNetCore.Identity.Test (2)
UserManagerTest.cs (2)
812Assert.Contains("Store does not implement IProtectedUserStore", e.Message); 823Assert.Contains("No IPersonalDataProtector service was registered", e.Message);
Microsoft.AspNetCore.InternalTesting (1)
ExceptionAssertions.cs (1)
264Assert.Contains(expectedMessage, exception.Message);
Microsoft.AspNetCore.InternalTesting.Tests (4)
LogValuesAssertTest.cs (4)
122Assert.Contains(GetString(expectedValues), equalException.Message); 123Assert.Contains(GetString(actualValues), equalException.Message); 210Assert.Contains(GetString(expectedValues), equalException.Message); 211Assert.Contains(GetString(actualValues), equalException.Message);
Microsoft.AspNetCore.Localization.FunctionalTests (1)
LocalizationSampleTest.cs (1)
41Assert.Contains("<h1>Bonjour</h1>", await response.Content.ReadAsStringAsync());
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);
Filters\MiddlewareFilterBuilderTest.cs (4)
219Assert.Contains(typeof(MiddlewareFilterBuilder).FullName, stack); 287Assert.Contains(typeof(MiddlewareFilterBuilder).FullName, stack); 288Assert.Contains(typeof(MiddlewareFilterBuilderTest).FullName, stack); 289Assert.Contains(nameof(EndMiddleware_PropagatesFullExceptionInfo_ToEarlierMiddleware), stack);
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (1)
183Assert.Contains("'Age'", exception.Message);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (10)
XmlAssertTest.cs (4)
21Assert.Contains(input1, equalException.Message); 22Assert.Contains(input2, equalException.Message); 114Assert.Contains(exceptionMessageForExpected, equalException.Message); 115Assert.Contains(exceptionMessageForActual, equalException.Message);
XmlDataContractSerializerInputFormatterTest.cs (4)
495Assert.Contains("utf-8", ex.Message); 496Assert.Contains("utf-16LE", ex.Message); 524Assert.Contains("utf-16LE", ex.Message); 525Assert.Contains("utf-8", ex.Message);
XmlDataContractSerializerOutputFormatterTest.cs (1)
778Assert.Contains("<int>1</int><int>2</int>", Encoding.UTF8.GetString(body.ToArray()));
XmlSerializerOutputFormatterTest.cs (1)
560Assert.Contains("<int>1</int><int>2</int>", Encoding.UTF8.GetString(body.ToArray()));
Microsoft.AspNetCore.Mvc.FunctionalTests (69)
ApplicationModelTest.cs (2)
190Assert.Contains(expectedContent, content); 205Assert.Contains(expectedContent, body);
AsyncEnumerableTestBase.cs (1)
68Assert.Contains(nameof(InvalidTimeZoneException), content);
ComponentRenderingFunctionalTests.cs (1)
108Assert.Contains("InvalidTimeZoneException: test", content);
DataAnnotationTests.cs (1)
48Assert.Contains("FirstOptionDisplay from singletype", content);
ErrorPageTests.cs (15)
69Assert.Contains($"{action}.cshtml", content); 70Assert.Contains(expected, content); 104Assert.Contains($"{action}.cshtml", content); 105Assert.Contains(expected, content); 125Assert.Contains("_ViewImports.cshtml", content); 126Assert.Contains(expectedMessage, content); 127Assert.Contains(PreserveCompilationContextMessage, content); 128Assert.Contains(expectedCompilationContent, content); 145Assert.Contains("RuntimeError.cshtml", content); 146Assert.Contains(expectedMessage, content); 163Assert.Contains("Loader Exceptions:", content); 164Assert.Contains(expectedMessage, content); 180Assert.Contains(aggregateException, content); 181Assert.Contains(nullReferenceException, content); 182Assert.Contains(indexOutOfRangeException, content);
HtmlGenerationTest.cs (3)
697Assert.Contains("Hello, Field World!", response); 698Assert.Contains("Hello, Static World!", response); 699Assert.Contains("Hello, Private World!", response);
InputObjectValidationTests.cs (1)
279Assert.Contains(expected, 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);
RazorPagesTest.cs (2)
717Assert.Contains(item, content); 775Assert.Contains(item, 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 &#x2264; Age &#x2264; 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);
RazorViewLocationSpecificationTest.cs (1)
118Assert.Contains(
RequestFormLimitsTest.cs (1)
125Assert.Contains(
RequestSizeLimitTest.cs (1)
53Assert.Contains(
TempDataTestBase.cs (2)
235Assert.Contains("Exception from action UnhandledExceptionAndSettingTempData", responseBody); 253Assert.Contains("Exception was handled in TestExceptionFilter", responseBody);
XmlDataContractSerializerInputFormatterTest.cs (1)
48Assert.Contains("An error occurred while deserializing input data.", data);
XmlSerializerInputFormatterTests.cs (1)
66Assert.Contains("An error occurred while deserializing input data.", data);
Microsoft.AspNetCore.Mvc.IntegrationTests (3)
ActionParametersIntegrationTest.cs (1)
799Assert.Contains(displayName ?? parameter.Name, message);
BindPropertyIntegrationTest.cs (1)
296Assert.Contains(displayName ?? parameter.Name, message);
ServicesModelBinderIntegrationTest.cs (1)
181Assert.Contains(typeof(IActionResult).FullName, exception.Message);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
NewtonsoftJsonInputFormatterTest.cs (1)
173Assert.Contains("Required property 'Password' not found in JSON", message);
NewtonsoftJsonPatchInputFormatterTest.cs (1)
219Assert.Contains(exceptionMessage, formatterContext.ModelState[""].Errors[0].ErrorMessage);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
Rendering\HtmlHelperCheckboxTest.cs (1)
83Assert.Contains("Boolean", ex.Message);
Rendering\HtmlHelperTest.cs (2)
325Assert.Contains(expectedMessage, exception.Message); 346Assert.Contains(expectedMessage, exception.Message);
Microsoft.AspNetCore.Routing.Tests (6)
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (6)
217Assert.Contains("Body was inferred but the method does not allow inferred body parameters.", ex.Message); 218Assert.Contains("Did you mean to register the \"Body (Inferred)\" parameter(s) as a Service or apply the [FromServices] or [FromBody] attribute?", ex.Message); 228Assert.Contains("Body was inferred but the method does not allow inferred body parameters.", ex.Message); 229Assert.Contains("Did you mean to register the \"Body (Inferred)\" parameter(s) as a Service or apply the [FromServices] or [FromBody] attribute?", ex.Message); 256Assert.Contains("Body was inferred but the method does not allow inferred body parameters.", ex.Message); 257Assert.Contains("Did you mean to register the \"Body (Inferred)\" parameter(s) as a Service or apply the [FromServices] or [FromBody] attribute?", ex.Message);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (3)
Listener\ServerTests.cs (1)
140Assert.Contains($"The prefix '{address1}' is already registered.", exception.Message);
ServerTests.cs (2)
73Assert.Contains(queueName, netshOutput); 110Assert.Contains(queueName, netshOutput);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (13)
DiagnosticMemoryPoolTests.cs (3)
211Assert.Contains("Block is backed by disposed slab", exception.Message); 212Assert.Contains("ExceptionsContainStackTraceWhenEnabled", exception.Message); 218Assert.Contains("Memory pool with active blocks is being disposed, 0 of 1 returned", exception.Message);
HttpResponsePipeWriterTests.cs (6)
20Assert.Contains(CoreStrings.WritingToResponseBodyAfterResponseCompleted, ex.Message); 30Assert.Contains(CoreStrings.WritingToResponseBodyAfterResponseCompleted, ex.Message); 40Assert.Contains(CoreStrings.WritingToResponseBodyAfterResponseCompleted, ex.Message); 50Assert.Contains(CoreStrings.WritingToResponseBodyAfterResponseCompleted, ex.Message); 60Assert.Contains(CoreStrings.WritingToResponseBodyAfterResponseCompleted, ex.Message); 70Assert.Contains(CoreStrings.WritingToResponseBodyAfterResponseCompleted, ex.Message);
HttpResponseStreamTests.cs (1)
104Assert.Contains(CoreStrings.WritingToResponseBodyAfterResponseCompleted, ex.Message);
KestrelServerLimitsTests.cs (1)
323Assert.Contains("A value between", ex.Message);
KestrelServerTests.cs (2)
57Assert.Contains("Invalid url", exception.Message); 153Assert.Contains("Overriding", warning.Message);
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
ConfigurationReaderTests.cs (1)
104Assert.Contains(CoreStrings.KeyAlreadyExists, exception.Message);
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 (12)
CommandLineApplicationTests.cs (10)
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);
StackTraceHelperTest.cs (2)
42Assert.Contains("Thrower.cs", frame.FilePath); 47Assert.Contains("StackTraceHelperTest.cs", frame.FilePath);
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 (5)
HttpConnectionTests.Transport.cs (2)
129Assert.Contains(assemblyVersion.InformationalVersion, userAgentHeader); 218Assert.Contains("This is a test", Encoding.UTF8.GetString(await connection.Transport.Input.ReadAllAsync()));
HubConnectionTests.Reconnect.cs (3)
358Assert.Contains($"after {reconnectingCount} failed attempts", closeError.Message); 363Assert.Contains($"after {reconnectingCount} failed attempts", attemptsLog.Write.Message); 368Assert.Contains($"Reconnect attempt number 1 will start in ", waitingLog.Write.Message);
Microsoft.AspNetCore.SignalR.Tests (8)
EndToEndTests.cs (1)
391Assert.Contains("401", exception.Message);
HubConnectionHandlerTests.cs (4)
2401Assert.Contains("Message", customItem); 2402Assert.Contains("paramName", customItem); 2431Assert.Contains("message", customItem); 2432Assert.Contains("paramName", customItem);
NativeAotTests.cs (3)
39Assert.Contains("TaskMethod called", loggerFactory.ToString()); 42Assert.Contains("ValueTaskMethod called", loggerFactory.ToString()); 45Assert.Contains("CustomTaskMethod called", loggerFactory.ToString());
Microsoft.AspNetCore.TestHost.Tests (2)
ResponseBodyTests.cs (2)
62Assert.Contains("Synchronous operations are disallowed.", ex.Message); 100Assert.Contains("Synchronous operations are disallowed.", ex.Message);
Microsoft.AspNetCore.Tests (8)
WebApplicationTests.cs (8)
1621Assert.Contains("UseRouting", ex.Message); 2041Assert.Contains("BOOM", await response.Content.ReadAsStringAsync()); 2042Assert.Contains("text/plain", response.Content.Headers.ContentType.MediaType); 2147Assert.Contains("text/plain", response.Content.Headers.ContentType.MediaType); 2150Assert.Contains("parameterName", responseBody); 2151Assert.Contains("notAnInt", responseBody); 2315Assert.Contains("foo=bar (MemoryConfigurationProvider)", ((IConfigurationRoot)app.Configuration).GetDebugView()); 2703Assert.Contains(nameof(DebugView_UseMiddleware_HasMiddleware), m);
Microsoft.Build.CommandLine.UnitTests (1)
CommandLineSwitches_Tests.cs (1)
1617Assert.Contains(expectedMessage, e.Message);
Microsoft.Build.Engine.OM.UnitTests (11)
Construction\ProjectFormatting_Tests.cs (2)
700Assert.Contains("<Compile Include=\"Program.cs\" />", actualContents); 703Assert.Contains(declaration, actualContents);
Construction\ProjectItemElement_Tests.cs (2)
240Assert.Contains("Items that are outside Target elements must have one of the following operations: Include, Update, or Remove.", exception.Message); 263Assert.Contains("The attribute \"Exclude\" in element <i> is unrecognized.", exception.Message);
Construction\ProjectRootElement_Tests.cs (5)
1647Assert.Contains(@"The project file could not be loaded. The 'm' start tag on line", exception.Message); 1664Assert.Contains(@"Value not set:", exception.Message); 1683Assert.Contains(@"File to reload from does not exist:", exception.Message); 1814Assert.Contains(@"The attribute ""Foo"" in element <PropertyGroup> is unrecognized", exception.Message); 1833Assert.Contains(@"ProjectRootElement can't reload if it contains unsaved changes.", exception.Message);
Construction\ProjectUsingTaskElement_Tests.cs (1)
528Assert.Contains("TaskFactory", usingTask.ContainingProject.RawXml);
Construction\UsingTaskBodyElement_Tests.cs (1)
119Assert.Contains("Evaluate", body.ContainingProject.RawXml);
Microsoft.Build.Engine.UnitTests (64)
AssemblyNameEx_Tests.cs (7)
358Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 364Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 370Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 376Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 394Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 395Assert.Contains("MSIL", extension.FullName); 402Assert.Contains("b03f5f7f11d50a3a", extension.FullName);
BackEnd\BuildManager_Tests.cs (1)
1996Assert.Contains(skippedMessage, _logger.FullLog);
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1265Assert.Contains("eventName is null", exception.Message); 1411Assert.Contains("ContextID " + s_buildEventContext.ProjectContextId, ex.Message);
BackEnd\MSBuild_Tests.cs (7)
211Assert.Contains(error, logger.FullLog); 235Assert.Contains(error, logger.FullLog); 271Assert.Contains(message, logger.FullLog); // for the missing project 309Assert.Contains(message, logger.FullLog); // for the missing project 358Assert.Contains(message, logger.FullLog); // for the missing project 359Assert.Contains(error2, logger.FullLog); 402Assert.Contains(error, logger.FullLog);
BackEnd\TaskHost_Tests.cs (7)
343Assert.Contains("SubCategory", _customLogger.LastError.Message); // "Expected line number to be 0" 357Assert.Contains("SubCategory", _customLogger.LastWarning.Message); // "Expected line number to be 0" 371Assert.Contains("message", _customLogger.LastMessage.Message); // "Expected Message importance to be high" 461Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not" 480Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not" 500Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not" 520Assert.Contains(message, _customLogger.LastWarning.Message); // "Expected line to contain NotSerializable message but it did not"
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)
337Assert.Contains(text, logger.FullLog); // "Log should contain the regular message" 1115Assert.Contains("{6185CC21-BE89-448A-B3C0-D1C27112E595}", solutionConfigurationContents); 1118Assert.Contains("CSConfig1|AnyCPU", solutionConfigurationContents); 1122Assert.Contains("{A6F99D27-47B9-4EA4-BFC9-25157CBDC281}", solutionConfigurationContents); 1124Assert.Contains("VCConfig1|Win32", solutionConfigurationContents); 1134Assert.Contains("{6185CC21-BE89-448A-B3C0-D1C27112E595}", solutionConfigurationContents); 1135Assert.Contains("CSConfig2|AnyCPU", solutionConfigurationContents); 1183Assert.Contains(@"BuildProjectInSolution=""" + bool.TrueString + @"""", solutionConfigurationContents); 1228Assert.Contains(@"BuildProjectInSolution=""" + bool.FalseString + @"""", solutionConfigurationContents); 1291Assert.Contains("<SolutionConfiguration>", item.GetMetadata("Content")); 1297Assert.Contains("<SolutionConfiguration>", item.GetMetadata("Content")); 1676Assert.Contains("'$(Configuration)' == 'Release'", msbuildProject.Targets["Build"].Condition); 1677Assert.Contains("'$(Configuration)' == 'Debug'", msbuildProject.Targets["Build"].Condition); 1906Assert.Contains("%abtest", instances[0].GetItems("ProjectReference").ElementAt(0).EvaluatedInclude);
ErrorUtilities_Tests.cs (1)
25Assert.Contains("msbuild rules", e.Message); // "exception message"
Evaluation\Evaluator_Tests.cs (2)
960Assert.Contains("MSB4278", ex.ErrorCode); 4541Assert.Contains("<AnInvalidTopLevelElement>", ex.Message);
Evaluation\Expander_Tests.cs (3)
2289Assert.Contains(expected, result); 3351Assert.Contains(expectedMessage, ex.Message); 3477Assert.Contains(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidGetPathOfFileAboveParameter", fileWithPath), exception.Message);
Evaluation\ItemEvaluation_Tests.cs (4)
612Assert.Contains("a.cs", fullPathItems); 613Assert.Contains("b.cs", fullPathItems); 616Assert.Contains("a.cs", identityItems); 617Assert.Contains("b.cs", identityItems);
FileLogger_Tests.cs (2)
44Assert.Contains("Hello world from the FileLogger", log); // "Log should have contained message" 419Assert.Contains(message, log);
FileMatcher_Tests.cs (1)
1249Assert.Contains("MyFile.txt", result);
Parser_Tests.cs (3)
453Assert.Contains("MSB4130:", ml.FullLog); // "Need to warn for this expression - (a) == 1 and $(b) == 2 or $(c) == 3." 464Assert.Contains("MSB4130:", ml.FullLog); // "Need to warn for this expression - (a) == 1 or $(b) == 2 and $(c) == 3." 475Assert.Contains("MSB4130:", ml.FullLog); // "Need to warn for this expression - ($(a) == 1 or $(b) == 2 and $(c) == 3) or $(d) == 4."
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (4)
IntegrationTests.cs (1)
612Assert.Contains("/reportanalyzer", result.Output);
VbcTests.cs (3)
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);
Microsoft.Build.Tasks.UnitTests (69)
AssemblyDependency\SuggestedRedirects.cs (2)
112Assert.Contains( 476Assert.Contains("Culture=neutral", dependency.ToString());
AssemblyNameEx_Tests.cs (7)
358Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 364Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 370Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 376Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 394Assert.Contains("b03f5f7f11d50a3a", extension.FullName); 395Assert.Contains("MSIL", extension.FullName); 402Assert.Contains("b03f5f7f11d50a3a", extension.FullName);
CodeTaskFactoryTests.cs (1)
1229Assert.Contains("CodeTaskFactory", error.Message);
CreateCSharpManifestResourceName_Tests.cs (1)
765Assert.Contains(
ErrorUtilities_Tests.cs (1)
25Assert.Contains("msbuild rules", e.Message); // "exception message"
Exec_Tests.cs (4)
841Assert.Contains("US-ASCII", exec.StdErrEncoding); 842Assert.Contains("US-ASCII", exec.StdErrorEncoding.EncodingName); 845Assert.Contains("US-ASCII", exec.StdOutEncoding); 846Assert.Contains("US-ASCII", exec.StdOutputEncoding.EncodingName);
MakeDir_Tests.cs (6)
45Assert.Contains( 107Assert.Contains( 148Assert.Contains( 194Assert.Contains( 255Assert.Contains("MSB3191", engine.Log); 256Assert.Contains(file, engine.Log);
MSBuild_Tests.cs (7)
193Assert.Contains("MSB3202", logger.FullLog); // project file not found 216Assert.Contains("MSB3202", logger.FullLog); // project file not found 250Assert.Contains("this_project_does_not_exist.csproj", logger.FullLog); // for the missing project 286Assert.Contains("this_project_does_not_exist.csproj", logger.FullLog); // for the missing project 334Assert.Contains(message, logger.FullLog); // for the missing project 335Assert.Contains(error2, logger.FullLog); 377Assert.Contains("MSB3204", logger.FullLog); // upgrade to vcxproj needed
ResourceHandling\GenerateResource_Tests.cs (8)
2434Assert.Contains("public class " + t.StronglyTypedClassName, File.ReadAllText(t.StronglyTypedFileName)); 2481Assert.Contains("internal class " + t.StronglyTypedClassName, File.ReadAllText(t.StronglyTypedFileName)); 3757Assert.Contains( 3792Assert.Contains(unformattedMessage, ((MockEngine)t.BuildEngine).Log); 3801Assert.Contains(message, ((MockEngine)t.BuildEngine).Log); 4265Assert.Contains("ResourceManager(\"" + resourcesNamespace + "." + t.StronglyTypedClassName, Utilities.ReadFileContent(STRFile)); 4267Assert.Contains("class " + Path.GetFileNameWithoutExtension(textFile).ToLower(), Utilities.ReadFileContent(STRFile).ToLower()); 4273Assert.Contains("namespace " + classNamespace.ToLower(), Utilities.ReadFileContent(STRFile).ToLower());
TelemetryTaskTests.cs (5)
28Assert.Contains(telemetryTask.EventName, engine.Log); 50Assert.Contains(propertyName, engine.Log); 52Assert.Contains(propertyValue, engine.Log); 70Assert.Contains($"The property \"Property2\" in the telemetry event data property list \"{telemetryTask.EventData}\" is malformed.", engine.Log); 98Assert.Contains("4ADE3D2622CA400B8B95A039DF540037", engine.Log);
Touch_Tests.cs (11)
202Assert.Contains( 224Assert.Contains( 247Assert.Contains( 272Assert.Contains("MSB3376", engine.Log); 293Assert.Contains("MSB3374", engine.Log); 294Assert.Contains(myreadonly_txt, engine.Log); 332Assert.Contains("MSB3371", engine.Log); 333Assert.Contains(nonexisting_txt, engine.Log); 357Assert.Contains( 382Assert.Contains( 406Assert.Contains(
XmlPeek_Tests.cs (4)
205Assert.Contains("MSB3741", engine.Log); // "Error message MSB3741 should fire" 222Assert.Contains("MSB3741", engine.Log); // "Error message MSB3741 should fire" 239Assert.Contains("MSB3743", engine.Log); // "Engine log should contain error code MSB3743" 257Assert.Contains("MSB3733", engine.Log); // "Engine log should contain error code MSB3733"
XslTransformation_Tests.cs (12)
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); 744Assert.Contains("'<'", e.Message); 777Assert.Contains("MSB3701", e.Message); 842Assert.Contains("error?", e.Message);
Microsoft.Build.Utilities.UnitTests (2)
ErrorUtilities_Tests.cs (1)
25Assert.Contains("msbuild rules", e.Message); // "exception message"
TrackedDependencies\MockEngine.cs (1)
125Assert.Contains(contains.ToUpperInvariant(), _upperLog);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (32)
CommandLineTests.cs (23)
6078Assert.Contains(((int)ErrorCode.ERR_StdInOptionProvidedButConsoleInputIsNotRedirected).ToString(), result.Output); 6106Assert.Contains(((int)ErrorCode.WRN_FileAlreadyIncluded).ToString(), result.Output); 6949Assert.Contains("error CS5001:", outWriter.ToString().Trim()); 8920Assert.Contains($"error CS2012: Cannot open '{libDll.Path}' for writing", outWriter.ToString()); 8939Assert.Contains($"error CS2012: Cannot open '{libDll.Path}' for writing", outWriter.ToString()); 8976Assert.Contains($"error CS0016: Could not write to output file '{exePath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 8999Assert.Contains($"error CS0016: Could not write to output file '{pdbPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9072Assert.Contains($"error CS2012: Cannot open '{exePath}' for writing", outWriter.ToString()); 13423Assert.Contains($"{prefix} {diagnosticId}: {analyzer.Descriptor.MessageFormat}", outWriter.ToString()); 13456Assert.Contains(expectedOutput, output); 13502Assert.Contains(expectedOutput, output); 13552Assert.Contains(expectedOutput, output); 13583Assert.Contains($"{expectedDiagnosticSeverity} {WarningDiagnosticAnalyzer.Warning01.Id}", output); 13659Assert.Contains($"{prefix} {descriptor.Id}: {descriptor.MessageFormat}", outWriter.ToString()); 13783Assert.Contains($"{prefix} {diagnosticId}: {analyzer.Descriptor.MessageFormat}", output); 14265Assert.Contains("CS0016:", output); 14357Assert.Contains("error CS2006: Command-line syntax error: Missing '<text>' for '/generatedfilesout:' option", output); 14814Assert.Contains("CS8785: Generator 'CallbackGenerator' failed to generate source.", output); 15289Assert.Contains($"error {diagnosticId}", output); 15293Assert.Contains($"warning {diagnosticId}", output); 15325Assert.Contains("CS8850", output); // ref's net fx 15326Assert.Contains("CS8033", output); // no analyzers in assembly 15330Assert.Contains("CS8033", output);
SarifErrorLoggerTests.cs (7)
84Assert.Contains("CS0169", actualConsoleOutput); 85Assert.Contains("CS5001", actualConsoleOutput); 120Assert.Contains("CS5001", actualConsoleOutput); 153Assert.Contains(AnalyzerForErrorLogTest.Descriptor1.Id, actualConsoleOutput); 154Assert.Contains(AnalyzerForErrorLogTest.Descriptor2.Id, actualConsoleOutput); 326Assert.Contains("error ID1", actualConsoleOutput); 327Assert.Contains("error ID2", actualConsoleOutput);
SarifV2ErrorLoggerTests.cs (2)
689Assert.Contains("CS0169", actualConsoleOutput); 690Assert.Contains("CS5001", actualConsoleOutput);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
ChangeSignature\RemoveParametersTests.cs (4)
266Assert.Contains("void Ext(this C5 c, string s)", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 270Assert.Contains(@"c.Ext(""two"");", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 351Assert.Contains("void Ext(this C5 c, string s, int newIntegerParameter)", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 355Assert.Contains(@"c.Ext(""two"", 123);", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString());
Formatting\Indentation\SmartIndenterTests.cs (1)
3226Assert.Contains("\t\tif (session == null)", code);
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
56Assert.Contains("\t", expectedOutputMarkup);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (13)
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (2)
2570Assert.Contains($".pack {expectedAlignment}", il); 2620Assert.Contains("__StaticArrayInitTypeSize=", il);
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)
SourceGeneration\AdditionalSourcesCollectionTests.cs (4)
112Assert.Contains(hintName.Replace('\\', '/'), exception.Message); 169Assert.Contains(hintName2, exception.Message); 184Assert.Contains("hintName1", exception.Message); 237Assert.Contains("file5.cs", exception.Message);
SourceGeneration\GeneratorDriverTests.cs (1)
418Assert.Contains(exception.ToString(), generatorDiagnostics.Single().ToString());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Syntax\SyntaxFactoryTests.cs (3)
156Assert.Contains(typeof(SyntaxFactory).ToString(), e.Message); // Make sure the class/namespace aren't updated without also updating the exception message 167Assert.Contains(typeof(SyntaxFactory).ToString(), e.Message); // Make sure the class/namespace aren't updated without also updating the exception message 178Assert.Contains(typeof(SyntaxFactory).ToString(), e.Message); // Make sure the class/namespace aren't updated without also updating the exception message
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\AnalyzerLoadFailureTests.cs (1)
39Assert.Contains(analyzerTypeName, diagnostic.Message);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
84Assert.Contains("class A", miscWorkspaceText.ToString());
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticExtensions.cs (1)
131Assert.Contains(id.GetDisplayName(), diagnosticMessage);
Microsoft.CodeAnalysis.UnitTests (2)
Collections\ImmutableSegmentedDictionaryTest.cs (2)
210Assert.Contains("firstKey", exception.Message); 300Assert.Contains(missingKey, exception.Message);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (31)
CommandLineTests.vb (26)
367Assert.Contains("\Test Path (123)\hellovb.vb(6) : warning BC40008: 'Public Property x As Integer' is obsolete.", output.ToString()) 368Assert.Contains("\Test Path (123)\hellovb.vb(6) : error BC30512: Option Strict On disallows implicit conversions from 'Double' to 'Integer'.", output.ToString()) 369Assert.Contains("\Test Path (123)\hellovb.vb(7) : error BC30451: 'asdf' is not declared. It may be inaccessible due to its protection level.", output.ToString()) 3619Assert.Contains("vbc : error BC2017: could not find library 'Microsoft.VisualBasic.dll'", output) 7689Assert.Contains("warning BC40000: 'Program.C1' is obsolete: 'Do not use C1'. (https://example.org/BC40000)", output) 7690Assert.Contains("error BC30668: 'Program.C2' is obsolete: 'Do not use C2'. (https://example.org/2/BC30668)", output) 7691Assert.Contains("error OBSOLETEC3: 'Program.C3' is obsolete: 'Do not use C3'. (https://example.org/3/OBSOLETEC3)", output) 7692Assert.Contains("warning OBSOLETEC4: 'Program.C4' is obsolete: 'Do not use C4'. (https://example.org/4)", output) 7711Assert.Contains("warning Warning04: Throwing a diagnostic for types declared (https://example.org/analyzer)", output) 9125Assert.Contains("error BC30420:", output.ToString()) 9980Assert.Contains(expectedOutput, output) 10032Assert.Contains(expectedOutput, output) 10089Assert.Contains(expectedOutput, output) 10125Assert.Contains($"{expectedODiagnosticSeverity} {WarningDiagnosticAnalyzer.Warning01.Id}", output) 10126Assert.Contains($"{expectedODiagnosticSeverity} {WarningDiagnosticAnalyzer.Warning03.Id}", output) 10204Assert.Contains($"{prefix} {diagnosticId}: {analyzer.Descriptor.MessageFormat}", output) 10485Assert.Contains($"error {diagnosticId}", output) 10487Assert.Contains($"warning {diagnosticId}", output) 10515Assert.Contains("CS8850", output) 10516Assert.Contains("CS8033", output) 10520Assert.Contains("CS8033", output) 10563Assert.Contains("BC2012:", output) 10606Assert.Contains("vbc : error BC2006: option 'generatedfilesout' requires ':<dir>'", output) 10730Assert.Contains("error BC37328: The diagnosticId argument to the 'Experimental' attribute must be a valid identifier", outWriter.ToString()) 10773Assert.Contains("warning DiagID: 'C' is for evaluation purposes only and is subject to change or removal in future updates.", outWriter.ToString()) 10819Assert.Contains("warning DiagID: 'C' is for evaluation purposes only and is subject to change or removal in future updates.", outWriter.ToString())
SarifErrorLoggerTests.vb (5)
99Assert.Contains("BC42024", actualConsoleOutput) 100Assert.Contains("BC30420", actualConsoleOutput) 142Assert.Contains("BC30420", actualConsoleOutput) 183Assert.Contains(AnalyzerForErrorLogTest.Descriptor1.Id, actualConsoleOutput) 184Assert.Contains(AnalyzerForErrorLogTest.Descriptor2.Id, actualConsoleOutput)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (15)
BuildHostProcessManagerTests.cs (4)
29Assert.Contains("--roll-forward LatestMajor", processStartInfo.Arguments); 76Assert.Contains($"--binlog {BinaryLogPath}", processStartInfo.Arguments); 97Assert.Contains($"--locale {Locale}", processStartInfo.Arguments); 129Assert.Contains($"--property {propertyArgument}", processStartInfo.Arguments);
MSBuildWorkspaceTestBase.cs (1)
196Assert.Contains("Invalid", exception.Message);
NetCoreTests.cs (3)
357Assert.Contains("net5", referencedProject.OutputFilePath); 361Assert.Contains("net5", referencedProject.OutputFilePath); 479Assert.Contains(expected, diagnostic.Message);
VisualStudioMSBuildWorkspaceTests.cs (7)
1998Assert.Contains("OtherStuff", fooDoc.FilePath); 2033Assert.Contains(@"NewFolder\Bar.cs", projectFileText); 2618Assert.Contains("The process cannot access the file", diagnostic.Message); 2943Assert.Contains(@"<Analyzer Include=""..\Analyzers\MyAnalyzer.dll", projFileText); 2978Assert.Contains(@"<ProjectReference Include=""..\CSharpProject\CSharpProject.csproj"">", projFileText); 3077Assert.Contains("[MSBuild]::VersionEquals('', 6.0)", diagnostic.Message); 3094Assert.Contains("'$(Configuration)|$(Platform)' == 'Debug|AnyCPU", diagnostic.Message);
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
SolutionTests\SolutionTests.cs (2)
4377Assert.Contains("Changed", tree.ToString()); 4869Assert.Contains("CS8669", diagnostic.Id);
UtilityTest\TaskExtensionsTests.cs (1)
25Assert.Contains($"{nameof(TaskExtensionsTests)}.{nameof(ThrowTestException)}()", ex.StackTrace);
Microsoft.Data.Analysis.Interactive.Tests (3)
DataFrameInteractiveTests.cs (3)
42Assert.Contains(TableHtmlPart, html); 53Assert.Contains(TableHtmlPart, html); 64Assert.Contains(TableHtmlPart, html);
Microsoft.DotNet.Build.Tasks.Feed.Tests (9)
PublishToSymbolServerTest.cs (9)
166Assert.Contains("Symbol package count: 1", message.Message); 167Assert.Contains("Loose symbol file count: 1", message.Message); 181Assert.Contains("project dotnettest", registerLog.Message); 182Assert.Contains("environment PPE", registerLog.Message); 183Assert.Contains("visibility Public", registerLog.Message); 184Assert.Contains("to last 3650 days", registerLog.Message); 299Assert.Contains($"Failed to download local file '{path}' after {publishTask.RetryHandler.MaxAttempts} attempts. See inner exception for details.", actualError.Message); 342Assert.Contains($"Failed to download local file '{path}' after {publishTask.RetryHandler.MaxAttempts} attempts. See inner exception for details.", actualError.Message); 447Assert.Contains($"Failed to get container id after {publishTask.RetryHandler.MaxAttempts} attempts. See inner exception for details,", actualError.Message);
Microsoft.DotNet.Build.Tasks.Workloads.Tests (70)
CreateVisualStudioWorkloadSetTests.cs (7)
65Assert.Contains("|9.0.0.100-baseline.1.23464.1", versionDir.DefaultDir); 72Assert.Contains("package name=Microsoft.NET.Workloads.9.0.100.9.0.100-baseline.1.23464.1", msiSwr); 73Assert.Contains("version=12.8.45", msiSwr); 75Assert.Contains("vs.package.machineArch=x64", msiSwr); 76Assert.Contains("vs.package.type=msi", msiSwr); 83Assert.Contains("package name=PackageGroup.NET.Workloads-9.0.100", packageGroupSwr); 84Assert.Contains("vs.dependency id=Microsoft.NET.Workloads.9.0.100.9.0.100-baseline.1.23464.1", packageGroupSwr);
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);
MsiTests.cs (1)
138Assert.Contains("microsoft.ios.templates.15.2.302-preview.14.122.nupk", fileRow.FileName);
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);
SwixPackageGroupTests.cs (2)
38Assert.Contains(expectedManifestDependency, packageGroupSwr); 39Assert.Contains("vs.package.type=group", packageGroupSwr);
SwixPackageTests.cs (2)
65Assert.Contains("vs.package.chip=x64", msiSwr); 66Assert.Contains("vs.package.machineArch=x64", msiSwr);
Microsoft.DotNet.Open.Api.Tools.Tests (52)
OpenApiAddFileTests.cs (13)
23Assert.Contains("Usage: openapi ", _output.ToString()); 33Assert.Contains("No project files were found in the current directory", _error.ToString()); 45Assert.Contains($"The project '{Path.Combine(_tempDir.Root, csproj)}' does not exist.", _error.ToString()); 57Assert.Contains("Usage: openapi add", _output.ToString()); 68Assert.Contains("Usage: openapi ", _output.ToString()); 90Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 91Assert.Contains($"<OpenApiReference Include=\"{project.NSwagJsonFile}\"", content); 141Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 142Assert.Contains($"<OpenApiReference Include=\"{nswagJsonFile}\" CodeGenerator=\"NSwagTypeScript\" />", content); 161Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 162Assert.Contains($"<OpenApiReference Include=\"{nswagJsonFile}\"", content); 181Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 182Assert.Contains($"<OpenApiReference Include=\"{nswagJsonFIle}\"", content);
OpenApiAddProjectTests.cs (5)
47Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 48Assert.Contains($"<OpenApiProjectReference Include=\"{project1.Path}\"", content); 49Assert.Contains($"<OpenApiProjectReference Include=\"{project2.Path}\"", content); 105Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 106Assert.Contains($"<OpenApiProjectReference Include=\"{refProjFile}\"", content);
OpenApiAddURLTests.cs (25)
31Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 32Assert.Contains( 64Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 65Assert.Contains( 97Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 98Assert.Contains( 130Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 131Assert.Contains( 162Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 163Assert.Contains( 194Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 195Assert.Contains( 220Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 221Assert.Contains( 223Assert.Contains( 254Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 255Assert.Contains( 286Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 287Assert.Contains( 318Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 319Assert.Contains( 351Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 352Assert.Contains( 376Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 377Assert.Contains(
OpenApiRemoveTests.cs (9)
37Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 38Assert.Contains($"<OpenApiReference Include=\"{nswagJsonFile}\"", content); 53Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 81Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 95Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", removedContent); 128Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 129Assert.Contains($"<OpenApiProjectReference Include=\"{refProjFile}\"", content); 142Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content); 183Assert.Contains("<PackageReference Include=\"NSwag.ApiDescription.Client\" Version=\"", content);
Microsoft.DotNet.XUnitAssert.Tests (5)
StringAssertsTests.cs (5)
13 Assert.Contains("wor", "Hello, world!"); 42 verify(() => Assert.Contains("WORLD", "Hello, world!")); 71 verify(() => Assert.Contains("hey", "Hello, world!")); 87 var ex = Record.Exception(() => Assert.Contains("foo", default(string))); 117 verify(() => Assert.Contains(expected, actual));
Microsoft.Extensions.AI.Abstractions.Tests (4)
Contents\FunctionCallContentTests..cs (4)
144Assert.Contains("JsonTypeInfo metadata", ex.Message); 145Assert.Contains(nameof(CustomType), ex.Message); 148Assert.Contains("JsonTypeInfo metadata", ex.Message); 149Assert.Contains(nameof(CustomType), ex.Message);
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
209Assert.Contains("3528", sb.ToString());
Microsoft.Extensions.AI.Tests (14)
ChatCompletion\ChatClientBuilderTest.cs (1)
72Assert.Contains("entry at index 0", ex.Message);
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (9)
44Assert.Contains("Respond with a JSON value", message.Text); 45Assert.Contains("https://json-schema.org/draft/2020-12/schema", message.Text); 48Assert.Contains(v.ToString(), message.Text); // All enum values are described as strings 123Assert.Contains("invalid", ex.Message); 180Assert.Contains("https://json-schema.org/draft/2020-12/schema", responseFormat.Schema); 183Assert.Contains(v.ToString(), responseFormat.Schema); // All enum values are described as strings 290Assert.Contains("Respond with a JSON value", message.Text); 291Assert.Contains("https://json-schema.org/draft/2020-12/schema", message.Text); 293Assert.Contains("full_name", message.Text); // The JSO uses snake_case
Embeddings\EmbeddingGeneratorBuilderTests.cs (1)
72Assert.Contains("entry at index 0", ex.Message);
Functions\AIFunctionFactoryTest.cs (3)
136Assert.Contains("Metadata_DerivedFromLambda", func.Metadata.Name); 142Assert.Contains("Metadata_DerivedFromLambda", func.Metadata.Name); 148Assert.Contains("Metadata_DerivedFromLambda", func.Metadata.Name);
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.Compliance.Abstractions.Tests (2)
Redaction\RedactionAbstractionsExtensionsTest.cs (2)
65Assert.Contains(data, redactedData); 66Assert.Contains(data2, redactedData);
Microsoft.Extensions.Compliance.Testing.Tests (7)
FakeRedactorOptionsValidatorTests.cs (2)
23Assert.Contains(nameof(FakeRedactorOptions.RedactionFormat), validationResult.FailureMessage); 43Assert.Contains(nameof(options.RedactionFormat), validationResult.FailureMessage);
RedactionFakesAcceptanceTests.cs (5)
31Assert.Contains(data, redacted); 50Assert.Contains(data, redacted); 70Assert.Contains(data, redacted); 89Assert.Contains(data, redacted); 109Assert.Contains(data, redacted);
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
KeyPerFileTests.cs (1)
36Assert.Contains("The path must be absolute.", e.Message);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (10)
Linux\LinuxUtilizationParserCgroupV1Tests.cs (10)
89Assert.Contains("/sys/fs/cgroup/memory/memory.stat", r.Message); 90Assert.Contains("total_inactive_file", r.Message); 116Assert.Contains("/sys/fs/cgroup/memory/memory.usage_in_bytes", r.Message); 135Assert.Contains("lesser than", r.Message); 161Assert.Contains("/proc/meminfo", r.Message); 235Assert.Contains("/sys/fs/cgroup/cpuset/cpuset.cpus", r.Message); 256Assert.Contains("/sys/fs/cgroup/cpuset/cpuset.cpus", r.Message); 284Assert.Contains("/sys/fs/cgroup/cpu/cpu.cfs_", r.Message); 334Assert.Contains("proc/stat", r.Message); 351Assert.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 (28)
SecretManagerTests.cs (28)
47Assert.Contains(Resources.FormatError_ProjectMissingId(project), _console.GetOutput()); 57Assert.Contains(Resources.FormatError_ProjectFailedToLoad(project), _console.GetOutput()); 67Assert.Contains(Resources.FormatError_ProjectPath_NotFound(projectPath), _console.GetOutput()); 80Assert.Contains(Resources.FormatMessage_Project_File_Path(Path.Combine(cwd, "..", "TestProject.csproj")), _console.GetOutput()); 114Assert.Contains( 126Assert.Contains( 147Assert.Contains(Resources.Error_No_Secrets_Found, _console.GetOutput()); 157Assert.Contains("Successfully saved secret1 to the secret store.", _console.GetOutput()); 159Assert.Contains("Successfully saved secret1 to the secret store.", _console.GetOutput()); 164Assert.Contains("secret1 = value2", _console.GetOutput()); 175Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Project file path {0}.", Path.Combine(projectPath, "TestProject.csproj")), _console.GetOutput()); 176Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Secrets file path {0}.", PathHelper.GetSecretsPathFromSecretsId(secretId)), _console.GetOutput()); 177Assert.Contains("Successfully saved secret1 to the secret store.", _console.GetOutput()); 182Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Project file path {0}.", Path.Combine(projectPath, "TestProject.csproj")), _console.GetOutput()); 183Assert.Contains(string.Format(CultureInfo.InvariantCulture, "Secrets file path {0}.", PathHelper.GetSecretsPathFromSecretsId(secretId)), _console.GetOutput()); 184Assert.Contains("secret1 = value1", _console.GetOutput()); 193Assert.Contains("Cannot find 'secret1' in the secret store.", _console.GetOutput()); 203Assert.Contains("SeCreT1 = value", _console.GetOutput()); 209Assert.Contains(Resources.Error_No_Secrets_Found, _console.GetOutput()); 222Assert.Contains("AzureAd:ClientSecret = abcd郩˙î", _console.GetOutput()); 236Assert.Contains("//BEGIN", stdout); 237Assert.Contains(@"""AzureAd:ClientSecret"": ""abcd郩˙î""", stdout); 238Assert.Contains("//END", stdout); 253Assert.Contains("AzureAd:ClientSecret = ¡™£¢∞", _console.GetOutput()); 267Assert.Contains(Resources.Error_No_Secrets_Found, _console.GetOutput()); 301Assert.Contains( 314Assert.Contains( 326Assert.Contains(Resources.Error_No_Secrets_Found, _console.GetOutput());
Microsoft.Extensions.ServiceDiscovery.Tests (1)
ServiceEndpointTests.cs (1)
40Assert.Contains(":8443", epString);
Microsoft.Extensions.Telemetry.Tests (9)
Logging\ExtendedLoggerFactoryTests.cs (1)
483Assert.Contains("LoggerExternalScopeProvider+Scope", scope!.GetType().FullName);
Logging\ExtendedLoggerTests.cs (8)
489Assert.Contains("AggregateException", stackTrace); 490Assert.Contains("ArgumentNullException", stackTrace); 491Assert.Contains("ArgumentOutOfRangeException", stackTrace); 492Assert.Contains("InvalidOperationException", stackTrace); 499Assert.Contains("EM1", stackTrace); 500Assert.Contains("EM2", stackTrace); 501Assert.Contains("EM3", stackTrace); 502Assert.Contains("EM4", stackTrace);
Microsoft.Gen.Logging.Generated.Tests (1)
LogMethodTests.cs (1)
728Assert.Contains("Hello from S", collector.LatestRecord.Message);
Microsoft.Gen.Metrics.Unit.Tests (3)
ParserTests.Diagnostics.cs (3)
35Assert.Contains("Test.TypeB ⇆ Test.TypeA", diag.GetMessage()); 65Assert.Contains("Test.TypeC ⇆ Test.TypeB", diag.GetMessage()); 96Assert.Contains("Test.Transitive ⇆ Test.Interim", diag.GetMessage());
Microsoft.JSInterop.Tests (5)
Infrastructure\DotNetDispatcherTest.cs (5)
507Assert.Contains($"The assembly '{thisAssemblyName}' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")].", ex.Message); 522Assert.Contains($"The type 'GenericType`1' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")].", ex.Message); 694Assert.Contains(nameof(ThrowingClass.ThrowingMethod), jsRuntime.LastCompletionResult.Exception.ToString()); 716Assert.Contains(nameof(ThrowingClass.AsyncThrowingMethod), jsRuntime.LastCompletionResult.Exception.ToString()); 734Assert.Contains("JsonReaderException: '<' is an invalid start of a value.", exception.ToString());
Microsoft.ML.Core.Tests (2)
UnitTests\TestEntryPoints.cs (2)
5595Assert.Contains("test instances with class values not seen in the training set.", warning.ToString()); 5599Assert.Contains("Detected columns of variable length: SortedScores, SortedClasses", warning.ToString());
Microsoft.ML.Tests (24)
AnomalyDetectionTests.cs (1)
288Assert.Contains("The learnt eigenvectors contained NaN values", ex.Message);
DatabaseLoaderTests.cs (1)
47Assert.Contains("Timeout", ex.InnerException.Message);
OnnxConversionTest.cs (4)
2041Assert.Contains("Requested OpSet version 9 is lower than HashTransform's minimum OpSet version requirement: 11", ex.Message); 2054Assert.Contains("Requested OpSet version 13 is higher than the current most updated OpSet version 12", ex.Message); 2065Assert.Contains("Requested OpSet version 9 is lower than HashTransform's minimum OpSet version requirement: 11", ex.Message); 2076Assert.Contains("Requested OpSet version 13 is higher than the current most updated OpSet version 12", ex.Message);
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);
TextLoaderTests.cs (2)
108Assert.Contains("Could not parse value -9223372036854775809 in line 1, column DvInt8", ex.Message); 132Assert.Contains("Could not parse value 9223372036854775808 in line 1, column DvInt8", ex.Message);
Transformers\ConcatTests.cs (1)
32Assert.Contains("Input columns not specified", ex.Message);
Transformers\FeatureSelectionTests.cs (3)
242Assert.Contains("Variable length column 'Features' is not allowed", ex.Message); 250Assert.Contains("Label column 'BadLabel' does not have compatible type. Expected types are float, double, int, bool and key.", ex.Message); 258Assert.Contains("Column 'Features' does not have compatible type. Expected types are float, double, int, bool and key.", ex.Message);
Transformers\KeyToVectorEstimatorTests.cs (1)
268Assert.Contains("Arithmetic operation resulted in an overflow. Related column: ProblematicColumn", ex.Message);
Microsoft.ML.Tokenizers.Data.Tests (1)
TokenizerDataTests.cs (1)
32Assert.Contains(packageName, exception.Message);
ServerComparison.FunctionalTests (4)
HelloWorldTest.cs (2)
162Assert.Contains("System.ApplicationException: Application exception", output); 163Assert.Contains("/throwexception - 500", output);
NtlmAuthenticationTest.cs (2)
76Assert.Contains("NTLM", response.Headers.WwwAuthenticate.ToString()); 78Assert.Contains("Negotiate", response.Headers.WwwAuthenticate.ToString());
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);
JsonSchemaExporter\JsonSchemaExporterTests.cs (2)
125Assert.Contains("The depth of the generated JSON schema exceeds the JsonSerializerOptions.MaxDepth setting.", ex.Message); 135Assert.Contains("ReferenceHandler.Preserve", ex.Message);
Throw\ThrowTest.cs (3)
382Assert.Contains(nameof(listButActuallyNull), exceptionImplicitArgumentName.Message); 405Assert.Contains("is an invalid value for enum type", exception.Message); 409Assert.Contains("is an invalid value for enum type", exception.Message);
System.Drawing.Common.Tests (3)
System\Drawing\Imaging\ImageCodecInfoTests.cs (3)
97Assert.Contains(CodecName, codecInfo.CodecName); 101Assert.Contains(FormatDescription, codecInfo.FormatDescription); 102Assert.Contains(MimeType, codecInfo.MimeType);
System.ServiceModel.Primitives.Tests (2)
Description\OperationContractAttributeTest.cs (2)
34Assert.Contains("INonInitiatingNonTerminatingService", exception.Message); 47Assert.Contains("IInitiatingTerminatingService", exception.Message);
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\DesignSurfaceTests.cs (1)
471Assert.Contains("ExceptionText", error.Message);
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\AssertExtensions.cs (1)
36Assert.Contains(expectedMessageContent, Assert.Throws<T>(action).Message);
System.Windows.Forms.Tests (22)
System\Resources\ResXResourceReaderTests.cs (2)
193Assert.Contains($"ResX file Type {unknownType} in the data", exception.Message); 218Assert.Contains($"ResX file {testValue} is not a valid value for Int32", exception.Message);
System\Windows\Forms\ControlTests.Methods.cs (12)
3889Assert.Contains(nameof(FaultingMethod), exception.StackTrace); 3890Assert.Contains(" System.Windows.Forms.Control.Invoke(Action method) ", exception.StackTrace); 3925Assert.Contains(nameof(FaultingMethod), exception.StackTrace); 3926Assert.Contains(" System.Windows.Forms.Control.Invoke(Delegate method) ", exception.StackTrace); 3958Assert.Contains(nameof(FaultingMethod), exception.StackTrace); 3959Assert.Contains(" System.Windows.Forms.Control.Invoke(Delegate method) ", exception.StackTrace); 3991Assert.Contains(nameof(FaultingMethod), exception.StackTrace); 3992Assert.Contains(" System.Windows.Forms.Control.Invoke[T](Func`1 method) ", exception.StackTrace); 4079Assert.Contains(nameof(FaultingMethod), exception.StackTrace); 4080Assert.Contains(nameof(Control_InvokeDelegateObjectThrowsExceptionSameThread_VerifyStackTrace), exception.StackTrace); 4150Assert.Contains(nameof(FaultingMethod), exception.StackTrace); 4151Assert.Contains(nameof(Control_InvokeDelegateObjectThrowsExceptionDifferentThread_VerifyStackTrace), exception.StackTrace);
System\Windows\Forms\RichTextBoxTests.cs (8)
2632Assert.Contains("Text", rtf1); 2659Assert.Contains("Text", rtf1); 7061Assert.Contains(expected, control.Rtf); 7074Assert.Contains(expected, control.Rtf); 7294Assert.Contains(expected, control.Rtf); 7310Assert.Contains(expected, control.Rtf); 9535Assert.Contains("Hello World", text); 9666Assert.Contains("Hello World", text);
Templates.Blazor.Tests (2)
src\ProjectTemplates\Shared\Project.cs (2)
289Assert.Contains(RemoveNewLines(emptyMigration), RemoveNewLines(contents)); 360Assert.Contains($"<{propertyName}>{expectedValue}</{propertyName}>", projectFileContents);
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\ProjectTemplates\Shared\Project.cs (2)
289Assert.Contains(RemoveNewLines(emptyMigration), RemoveNewLines(contents)); 360Assert.Contains($"<{propertyName}>{expectedValue}</{propertyName}>", projectFileContents);
src\Shared\E2ETesting\WaitAssert.cs (1)
42=> WaitAssertCore(driver, () => Assert.Contains(expectedSubstring, actualString()));
Templates.Blazor.WebAssembly.Tests (3)
src\ProjectTemplates\Shared\Project.cs (2)
289Assert.Contains(RemoveNewLines(emptyMigration), RemoveNewLines(contents)); 360Assert.Contains($"<{propertyName}>{expectedValue}</{propertyName}>", projectFileContents);
src\Shared\E2ETesting\WaitAssert.cs (1)
42=> WaitAssertCore(driver, () => Assert.Contains(expectedSubstring, actualString()));
Templates.Mvc.Tests (7)
BlazorTemplateTest.cs (2)
76Assert.Contains("Microsoft.EntityFrameworkCore.Tools", projectFileContents); 84Assert.Contains("app.db", projectFileContents);
MvcTemplateTest.cs (1)
169Assert.Contains("app.db", projectFileContents);
RazorPagesTemplateTest.cs (1)
158Assert.Contains("app.db", projectFileContents);
src\ProjectTemplates\Shared\Project.cs (2)
289Assert.Contains(RemoveNewLines(emptyMigration), RemoveNewLines(contents)); 360Assert.Contains($"<{propertyName}>{expectedValue}</{propertyName}>", projectFileContents);
src\Shared\E2ETesting\WaitAssert.cs (1)
42=> WaitAssertCore(driver, () => Assert.Contains(expectedSubstring, actualString()));
Templates.Tests (9)
GrpcTemplateTest.cs (2)
107Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on Windows 7 due to missing ALPN support.", 125Assert.Contains("System.NotSupportedException: HTTP/2 over TLS is not supported on Windows 7 due to missing ALPN support.",
IdentityUIPackageTest.cs (3)
111Assert.Contains(".db", projectFileContents); 133Assert.Contains(versionValidator, await response.Content.ReadAsStringAsync()); 145Assert.Contains(versionValidator, await response.Content.ReadAsStringAsync());
ItemTemplateTests\BlazorServerTests.cs (1)
35Assert.Contains("<h3>Different</h3>", Project.ReadFile("Different.razor"));
src\ProjectTemplates\Shared\Project.cs (2)
289Assert.Contains(RemoveNewLines(emptyMigration), RemoveNewLines(contents)); 360Assert.Contains($"<{propertyName}>{expectedValue}</{propertyName}>", projectFileContents);
src\Shared\E2ETesting\WaitAssert.cs (1)
42=> WaitAssertCore(driver, () => Assert.Contains(expectedSubstring, actualString()));
VBCSCompiler.UnitTests (2)
AnalyzerConsistencyCheckerTests.cs (2)
165Assert.Contains(mvidAlpha1.Path, errorMessage); 166Assert.Contains(mvidAlpha2.Path, errorMessage);