332 references to StartsWith
Aspire.Dashboard.Tests (1)
Integration\MockOpenIdAuthority.cs (1)
124Assert.StartsWith("http://localhost", authorityUrl);
Aspire.Hosting.Azure.Tests (9)
AzureFunctionsTests.cs (2)
108Assert.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName, storageResources.Name); 161Assert.StartsWith(AzureFunctionsProjectResourceExtensions.DefaultAzureFunctionsHostStorageName, resource.Name);
AzurePostgresExtensionsTests.cs (3)
281Assert.StartsWith("Host=localhost;Port=12455;Username=postgres;Password=", await postgres.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 284Assert.StartsWith("Host=localhost;Port=12455;Username=postgres;Password=", db1ConnectionString); 288Assert.StartsWith("Host=localhost;Port=12455;Username=postgres;Password=", db2ConnectionString);
AzureSqlExtensionsTests.cs (3)
163Assert.StartsWith("Server=127.0.0.1,12455;User ID=sa;Password=", serverConnectionString); 167Assert.StartsWith("Server=127.0.0.1,12455;User ID=sa;Password=", db1ConnectionString); 171Assert.StartsWith("Server=127.0.0.1,12455;User ID=sa;Password=", db2ConnectionString);
AzureWebPubSubExtensionsTests.cs (1)
22Assert.StartsWith("Resource name 'a_b_c' is invalid.", ex.Message);
Aspire.Hosting.Garnet.Tests (1)
AddGarnetTests.cs (1)
84Assert.StartsWith("localhost:2000", connectionString);
Aspire.Hosting.MySql.Tests (1)
AddMySqlTests.cs (1)
128Assert.StartsWith("Server=localhost;Port=2000;User ID=root;Password=", connectionString);
Aspire.Hosting.Oracle.Tests (1)
AddOracleTests.cs (1)
127Assert.StartsWith("user id=system;password=", connectionString);
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
93Assert.StartsWith("localhost:2000", connectionString);
Aspire.Hosting.Valkey.Tests (1)
AddValkeyTests.cs (1)
84Assert.StartsWith("localhost:2000", connectionString);
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
AspireRedisOutputCacheExtensionsTests.cs (1)
24Assert.StartsWith("Redis", cacheStore.GetType().Name);
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
230Assert.StartsWith("Redis", cacheStore.GetType().Name);
Diagnostics.EFCore.FunctionalTests (4)
MigrationsEndPointMiddlewareTest.cs (4)
165Assert.StartsWith(StringsHelpers.GetResourceString("MigrationsEndPointMiddleware_NoContextType"), content); 197Assert.StartsWith(StringsHelpers.GetResourceString("FormatMigrationsEndPointMiddleware_ContextNotRegistered", typeName), content); 226Assert.StartsWith(StringsHelpers.GetResourceString("FormatMigrationsEndPointMiddleware_ContextNotRegistered", typeof(BloggingContext).AssemblyQualifiedName), content); 264Assert.StartsWith(StringsHelpers.GetResourceString("FormatMigrationsEndPointMiddleware_Exception", typeof(BloggingContextWithSnapshotThatThrows)), ex.Message);
IIS.Common.TestLib (1)
TestConnections.cs (1)
187Assert.StartsWith(prefix, actualLine);
IIS.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
70Assert.StartsWith("Windows", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
438Assert.StartsWith("Response Begin", text);
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
58Assert.StartsWith("Windows:", responseText);
IISExpress.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
70Assert.StartsWith("Windows", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
438Assert.StartsWith("Response Begin", text);
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
58Assert.StartsWith("Windows:", responseText);
InMemory.FunctionalTests (1)
HttpsConnectionMiddlewareTests.cs (1)
1104Assert.StartsWith("Date: ", await reader.ReadLineAsync().DefaultTimeout());
Microsoft.AspNetCore.Antiforgery.Test (2)
DefaultAntiforgeryTokenGeneratorTest.cs (2)
282Assert.StartsWith(@"The required antiforgery cookie token must be provided.", ex.Message); 303Assert.StartsWith("The required antiforgery request token must be provided.", ex.Message);
Microsoft.AspNetCore.App.Analyzers.Test (3)
Components\DisallowNonLiteralSequenceNumbersTest.cs (3)
48Assert.StartsWith("'i' should not be used as a sequence number.", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 69Assert.StartsWith("'i' should not be used as a sequence number.", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 90Assert.StartsWith("'ComputeSequenceNumber(0)' should not be used as a sequence number.", diagnostic.GetMessage(CultureInfo.InvariantCulture));
Microsoft.AspNetCore.Authentication.Test (23)
CookieTests.cs (8)
53Assert.StartsWith("http://example.com/login", responded.Single()); 65Assert.StartsWith("http://example.com/denied", responded.Single()); 77Assert.StartsWith("/", responded.Single()); 89Assert.StartsWith("http://example.com/Account/Login", responded.Single()); 139Assert.StartsWith("TestCookie=", setCookie); 272Assert.StartsWith(".AspNetCore.With%20spaces%20and%20%E7%95%8C=", setCookie); 1315Assert.StartsWith("One=", transaction.SetCookie[0]); 1343Assert.StartsWith("One=", transaction.SetCookie[0]);
FacebookTests.cs (3)
436Assert.StartsWith("https://www.facebook.com/v14.0/dialog/oauth", locationUri.AbsoluteUri); 451Assert.StartsWith(".AspNetCore.Correlation.", transaction.SetCookie[0]); 452Assert.StartsWith(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
GoogleTests.cs (6)
58Assert.StartsWith("https://accounts.google.com/o/oauth2/v2/auth?", location.AbsoluteUri); 481Assert.StartsWith("/error?FailureMessage=", transaction.Response.Headers.GetValues("Location").First()); 1016Assert.StartsWith("https://www.facebook.com/", transaction.Response.Headers.Location.OriginalString); 1069Assert.StartsWith("https://accounts.google.com/o/oauth2/v2/auth", locationUri.AbsoluteUri); 1084Assert.StartsWith(".AspNetCore.Correlation.", transaction.SetCookie[0]); 1085Assert.StartsWith(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
MicrosoftAccountTests.cs (3)
336Assert.StartsWith("https://login.microsoftonline.com/common/oauth2/v2.0/authorize", locationUri.AbsoluteUri); 351Assert.StartsWith(".AspNetCore.Correlation.", transaction.SetCookie[0]); 352Assert.StartsWith(".AspNetCore." + TestExtensions.CookieAuthenticationScheme, transaction.SetCookie[1]);
OAuthTests.cs (1)
500Assert.StartsWith("OAuth token endpoint failure:", context.Failure.Message);
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (1)
100Assert.StartsWith("/error?FailureMessage=", transaction.Response.Headers.GetValues("Location").First());
OpenIdConnect\OpenIdConnectConfigurationTests.cs (1)
550ex => Assert.StartsWith("The value must not be a negative TimeSpan.", ex.Message)
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
EndpointHtmlRendererTest.cs (3)
903Assert.StartsWith("The POST request does not specify which form is being submitted.", 932Assert.StartsWith("Cannot submit the form 'other' because", 1044Assert.StartsWith("Cannot submit the form 'my-name-1' because",
RazorComponentResultTest.cs (2)
271Assert.StartsWith( 353Assert.StartsWith("[Top level component: Loaded]", html);
Microsoft.AspNetCore.Components.Forms.Tests (1)
FieldIdentifierTest.cs (1)
24Assert.StartsWith("The model must be a reference-typed object.", ex.Message);
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\CircuitIdFactoryTest.cs (1)
21Assert.StartsWith("CfDJ", secret.Secret);
Microsoft.AspNetCore.Components.Tests (13)
CascadingParameterStateTest.cs (1)
400Assert.StartsWith($"'{typeof(SupplyParameterWithSingleDeliveryAttribute)}' is flagged with SingleDelivery", ex.Message);
ComponentFactoryTest.cs (1)
39Assert.StartsWith($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", ex.Message);
DynamicComponentTest.cs (2)
23Assert.StartsWith( 38Assert.StartsWith(
NavigationManagerTest.cs (5)
141Assert.StartsWith("Cannot have empty query parameter names.", exception.Message); 194Assert.StartsWith("Cannot format query parameters with values of type", exception.Message); 210Assert.StartsWith("Cannot have empty query parameter names.", exception.Message); 785Assert.StartsWith("To support navigation locks", ex.Message); 807Assert.StartsWith("To support navigation locks", ex.Message);
RendererTest.cs (1)
4538Assert.StartsWith($"Render output is invalid for component of type '{typeof(TestComponent).FullName}'. A frame of type 'Element' was left unclosed.", ex.Message);
Rendering\RenderTreeBuilderTest.cs (3)
2050Assert.StartsWith($"Render output is invalid for component of type '{typeof(TestComponent).FullName}'. A frame of type 'Element' was left unclosed.", ex.Message); 2065Assert.StartsWith($"Render output is invalid for component of type '{typeof(TestComponent).FullName}'. A frame of type 'Component' was left unclosed.", ex.Message); 2080Assert.StartsWith($"Render output is invalid for component of type '{typeof(TestComponent).FullName}'. A frame of type 'Region' was left unclosed.", ex.Message);
Microsoft.AspNetCore.Components.Web.Tests (5)
Forms\EditFormTest.cs (2)
44Assert.StartsWith($"{nameof(EditForm)} requires a {nameof(EditForm.Model)} parameter, or an {nameof(EditContext)} parameter, but not both.", ex.Message); 58Assert.StartsWith($"{nameof(EditForm)} requires either a {nameof(EditForm.Model)} parameter, or an {nameof(EditContext)} parameter, please provide one of these.", ex.Message);
Forms\InputBaseTest.cs (1)
22Assert.StartsWith($"{typeof(TestInputComponent<string>)} does not support changing the EditContext dynamically", ex.Message);
Forms\InputFileChangeEventArgsTest.cs (2)
31Assert.StartsWith("No file was supplied", ex.Message); 39Assert.StartsWith("More than one file was supplied", ex.Message);
Microsoft.AspNetCore.Http.Extensions.Tests (7)
ParameterBindingMethodCacheTests.cs (2)
558Assert.StartsWith($"TryParse method found on {TypeNameHelper.GetTypeDisplayName(type, fullName: false)} with incorrect format. Must be a static method with format", ex.Message); 620Assert.StartsWith($"BindAsync method found on {TypeNameHelper.GetTypeDisplayName(type, fullName: false)} with incorrect format. Must be a static method with format", ex.Message);
RequestDelegateFactoryTests.cs (3)
418Assert.StartsWith("myBindAsyncRecord", parameter.Name); 476Assert.StartsWith("myAwaitedBindAsyncRecord", parameter.Name); 1145Assert.StartsWith("Implicit body inferred for parameter", message);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (1)
203Assert.StartsWith("Implicit body inferred for parameter", ex.Message);
RequestDelegateGenerator\RuntimeCreationTests.cs (1)
27Assert.StartsWith($"BindAsync method found on {bindAsyncType} with incorrect format.", ex.Message);
Microsoft.AspNetCore.Http.Tests (7)
ResponseCookiesTest.cs (7)
48Assert.StartsWith(testCookie, cookieHeaderValues[0]); 72Assert.StartsWith(testCookie, cookieHeaderValues[0]); 93Assert.StartsWith(testCookie, cookieHeaderValues[0]); 112Assert.StartsWith(testCookie, cookieHeaderValues[0]); 198Assert.StartsWith(testCookie, cookieHeaderValues[0]); 220Assert.StartsWith(testCookie, cookieHeaderValues[0]); 258Assert.StartsWith(expected, cookieHeaderValues[0]);
Microsoft.AspNetCore.HttpLogging.Tests (11)
HttpLoggingMiddlewareTests.cs (3)
1292Assert.StartsWith("Duration: ", lines[i++]); 1564Assert.StartsWith("Duration: ", lines[i++]); 1605Assert.StartsWith("Duration: ", lines[i++]);
W3CLoggerTests.cs (3)
38Assert.StartsWith("#Start-Date: ", lines[1]); 47Assert.StartsWith("2021-01-02 03:04:05", lines[3]); 82Assert.StartsWith("#Start-Date: ", lines[1]);
W3CLoggingMiddlewareTests.cs (5)
93Assert.StartsWith("#Start-Date: ", lines[1]); 138Assert.StartsWith("#Start-Date: ", lines[1]); 211Assert.StartsWith("#Start-Date: ", lines[1]); 258Assert.StartsWith("#Start-Date: ", lines[1]); 296Assert.StartsWith("#Start-Date: ", lines[1]);
Microsoft.AspNetCore.HttpOverrides.Tests (2)
IPNetworkTest.cs (2)
75Assert.StartsWith("The prefix length was out of range.", ex.Message); 106Assert.StartsWith("The prefix length was out of range.", ex.Message);
Microsoft.AspNetCore.Identity.FunctionalTests (3)
AuthorizationTests.cs (1)
51Assert.StartsWith("/Identity/Account/Login?", location.PathAndQuery);
MapIdentityApiTests.cs (1)
1366Assert.StartsWith(BaseAddress.ToString(), url);
Pages\Account\Login.cs (1)
111Assert.StartsWith(LoginWith2fa.Path, loggedInLocation.ToString());
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
1132Assert.StartsWith("text/", responseFormat.MediaType);
Microsoft.AspNetCore.Mvc.Core.Test (4)
Formatters\SystemTextJsonInputFormatterTest.cs (1)
85Assert.StartsWith("''' is an invalid start of a value", error.ErrorMessage);
Infrastructure\ControllerActionInvokerTest.cs (2)
1591m => Assert.StartsWith($"Executed action method {actionName}, returned result {actionResultName} in ", m), 1594m => Assert.StartsWith($"Executed action {actionName} in ", m));
Infrastructure\JsonResultExecutorTestBase.cs (1)
306Assert.StartsWith("Property 'JsonResult.SerializerSettings' must be an instance of type", ex.Message);
Microsoft.AspNetCore.Mvc.FunctionalTests (28)
BasicTests.cs (1)
490Assert.StartsWith("Microsoft.", assemblyParts[i]);
FlushPointTest.cs (2)
59Assert.StartsWith(expected, largeContent.TextContent); 72Assert.StartsWith(expected, largeContent.TextContent);
RazorPagesTest.cs (24)
69Assert.StartsWith("Method: OnGetCustomer", content.Trim()); 79Assert.StartsWith("Method: OnGetCustomer", content.Trim()); 89Assert.StartsWith("Method: OnGetCustomer", content.Trim()); 111Assert.StartsWith("Method: OnPostAsync", content.Trim()); 121Assert.StartsWith("Method: OnGetViewCustomerAsync", content.Trim()); 202Assert.StartsWith("Method: OnGetCustomer", content.Trim()); 224Assert.StartsWith("Method: OnPostAsync", content.Trim()); 234Assert.StartsWith("Method: OnGetViewCustomerAsync", content.Trim()); 326Assert.StartsWith("<a href=\"/Show?id=2\">Post title</a>", content.Trim()); 427Assert.StartsWith("Hello, You posted!", content.Trim()); 446Assert.StartsWith("Hello, pagemodel!", content.Trim()); 565Assert.StartsWith("Message: Secret Message", content.Trim()); 590Assert.StartsWith("Message: Secret post", content.Trim()); 603Assert.StartsWith("Message: Secret post", content.Trim()); 687Assert.StartsWith(expected, content.Trim()); 742Assert.StartsWith(expected, content.Trim()); 858Assert.StartsWith(expected, content.Trim()); 882Assert.StartsWith(expected, content.Trim()); 931Assert.StartsWith(expected, content.Trim()); 1177Assert.StartsWith(expected, response.Trim()); 1190Assert.StartsWith(expected, response.Trim()); 1203Assert.StartsWith(expected, response.Trim()); 1303Assert.StartsWith(expected, responseContent.Trim()); 1344Assert.StartsWith(expected, responseContent.Trim());
RoutingDynamicTest.cs (1)
173Assert.StartsWith("Hello from dynamic controller", content);
Microsoft.AspNetCore.Mvc.Localization.Test (1)
HtmlLocalizerTest.cs (1)
153Assert.StartsWith("Input string was not in a correct format.", exception.Message);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
NewtonsoftJsonInputFormatterTest.cs (2)
277Assert.StartsWith("Could not convert string to integer:", error.ErrorMessage); 283Assert.StartsWith("Could not convert string to integer:", error.ErrorMessage);
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
306Assert.StartsWith("Property 'JsonResult.SerializerSettings' must be an instance of type", ex.Message);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
CompilerFailedExceptionFactoryTest.cs (2)
37message => Assert.StartsWith( 40message => Assert.StartsWith(
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageActionInvokerTest.cs (1)
1432m => Assert.StartsWith($"Executed page {pagePath} in ", m));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Listener\RequestHeaderTests.cs (1)
151Assert.StartsWith("400", response.Substring(9));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
Http1\Http1ConnectionTests.cs (1)
949Assert.StartsWith(CoreStrings.NonNegativeNumberOrNullRequired, ex.Message);
KestrelServerLimitsTests.cs (8)
109Assert.StartsWith(CoreStrings.PositiveNumberRequired, ex.Message); 176Assert.StartsWith(CoreStrings.PositiveTimeSpanRequired, exception.Message); 205Assert.StartsWith(CoreStrings.PositiveTimeSpanRequired, exception.Message); 236Assert.StartsWith(CoreStrings.PositiveNumberOrNullRequired, ex.Message); 260Assert.StartsWith(CoreStrings.NonNegativeNumberOrNullRequired, ex.Message); 291Assert.StartsWith(CoreStrings.NonNegativeNumberOrNullRequired, ex.Message); 338Assert.StartsWith(CoreStrings.GreaterThanOrEqualToZeroRequired, ex.Message); 354Assert.StartsWith(CoreStrings.GreaterThanZeroRequired, ex.Message);
MinDataRateTests.cs (2)
29Assert.StartsWith(CoreStrings.PositiveNumberOrNullMinDataRateRequired, exception.Message); 46Assert.StartsWith(CoreStrings.FormatMinimumGracePeriodRequired(Heartbeat.Interval.TotalSeconds), exception.Message);
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
HttpsConnectionAdapterOptionsTest.cs (1)
40Assert.StartsWith(CoreStrings.PositiveTimeSpanRequired, exception.Message);
KestrelConfigurationLoaderTests.cs (1)
655Assert.StartsWith("Error getting private key from", ex.Message);
Microsoft.AspNetCore.Shared.Tests (1)
StackTraceHelperTest.cs (1)
246Assert.StartsWith("lambda_method", frame.MethodDisplayInfo.ToString());
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
HubConnectionTests.cs (2)
1163Assert.StartsWith("Failed to invoke 'Echo' due to an error on the server.", ex.Message); 1617Assert.StartsWith("Microsoft SignalR/", userAgent);
Microsoft.AspNetCore.SignalR.Client.Tests (3)
HttpConnectionTests.Transport.cs (1)
122Assert.StartsWith("Microsoft SignalR/", userAgentHeader);
HubConnectionTests.cs (1)
597Assert.StartsWith("Stream errored by client: 'System.Exception: error from client", ((string)complete["error"]));
ServerSentEventsTransportTests.cs (1)
108Assert.StartsWith("3:abc", Encoding.ASCII.GetString(message));
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Internal\Protocol\JsonHubProtocolTestsBase.cs (1)
494Assert.StartsWith("Error trying to deserialize result to Int32.", completion.Error);
Internal\Protocol\MessagePackHubProtocolTests.cs (1)
269Assert.StartsWith("Error trying to deserialize result to Int32.", completion.Error);
Microsoft.AspNetCore.SignalR.Specification.Tests (1)
ScaleoutHubLifetimeManagerTests.cs (1)
657Assert.StartsWith("Error trying to deserialize result to Int32.", ex.Message);
Microsoft.AspNetCore.SignalR.Tests (1)
WebSocketsTransportTests.cs (1)
129Assert.StartsWith($"Microsoft SignalR/{majorVersion}.{minorVersion} ({assemblyVersion.InformationalVersion}; ", userAgent);
Microsoft.AspNetCore.Testing.Tests (1)
FakesExtensionsTests.cs (1)
229Assert.StartsWith("https://localhost", hostMock.Object.GetListenUris().Single().AbsoluteUri);
Microsoft.Build.CommandLine.UnitTests (4)
CommandLineSwitches_Tests.cs (4)
1564Assert.StartsWith(switchLeadingSpaces, helpMessageLines[i]); 1580Assert.StartsWith(examplesLeadingSpaces, helpMessageLines[i]); 1585Assert.StartsWith(switchLeadingSpaces, helpMessageLines[i]); 1590Assert.StartsWith(otherLineLeadingSpaces, helpMessageLines[i]);
Microsoft.Build.Engine.UnitTests (7)
BackEnd\BuildRequestConfiguration_Tests.cs (1)
481Assert.StartsWith(problematicTmpPath, cacheFilePath);
Evaluation\Expander_Tests.cs (1)
3456Assert.StartsWith("The expression \"[MSBuild]::GetPathOfFileAbove(foo, \'\')\" cannot be evaluated.", exception.Message);
FileUtilities_Tests.cs (4)
776Assert.StartsWith(Path.GetTempPath(), path); 798Assert.StartsWith(Path.GetTempPath(), path); 821Assert.StartsWith(directory, path); 844Assert.StartsWith(Path.GetTempPath(), path);
Globbing\MSBuildGlob_Tests.cs (1)
123Assert.StartsWith(glob.TestOnlyGlobRoot, glob.FixedDirectoryPart);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (3)
CscTests.cs (2)
492Assert.StartsWith(Path.Combine("path", "to", "custom_csc", "csc."), csc.GeneratePathToTool()); 498Assert.StartsWith(Path.Combine("path", "to", "custom_csc", "csc."), csc.GeneratePathToTool());
TargetTests.cs (1)
912Assert.StartsWith("roslyn", compilerApiVersionString);
Microsoft.Build.Tasks.UnitTests (3)
Exec_Tests.cs (3)
65Assert.StartsWith(newTempPath, tempPath); 123Assert.StartsWith(newTempPath, tempPath); 997Assert.StartsWith(newTempPath, tempPath);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (6)
CommandLineTests.cs (6)
177Assert.StartsWith($"error CS0016: Could not write to output file '{xmlPath}' -- ", outWriter.ToString()); 14737Assert.StartsWith($"error CS8785: Generator 'FailsExecuteGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'Exception' with message 'THROW'", 14782Assert.StartsWith($"error CS8784: Generator 'FailsInitializeGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'Exception' with message 'THROW'", 15647Assert.StartsWith("test.cs(3,47): error CS9211: The diagnosticId argument to the 'Experimental' attribute must be a valid identifier", 15686Assert.StartsWith("test.cs(1,1): warning DiagID: 'C' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.", 15726Assert.StartsWith("test.cs(1,1): error DiagID: 'C' is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.",
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
1853Assert.StartsWith("0024000004", ((SourceAssemblySymbol)comp.Assembly.Modules[1].ContainingAssembly).SignatureKey);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests.cs (1)
4141Assert.StartsWith(expectedDetails, diagnostic.Arguments[3] as string);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\GetSemanticInfoTests.cs (2)
5936Assert.StartsWith(expectedStartString: $"Unexpected SpecialType: '{(int)specialType}'.", actualString: e.Message); 5959Assert.StartsWith(expectedStartString: $"Unexpected SpecialType: '{(int)specialType}'.", actualString: e.Message);
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
270Assert.StartsWith($"vbc : error BC2012: can't open '{xmlPath}' for writing:", outWriter.ToString())
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (6)
BuildHostProcessManagerTests.cs (1)
39Assert.StartsWith("dotnet", processStartInfo.FileName);
NetCoreTests.cs (1)
390Assert.StartsWith("csharplib", project.Name);
VisualStudioMSBuildWorkspaceTests.cs (4)
3008Assert.StartsWith("Msbuild failed", diagnostic.Message); 3025Assert.StartsWith("Msbuild failed", diagnostic.Message); 3042Assert.StartsWith("Msbuild failed", diagnostic.Message); 3060Assert.StartsWith("Msbuild failed", diagnostic.Message);
Microsoft.DotNet.Helix.JobSender.Tests (2)
Payloads\AdHocPayloadTests.cs (2)
17Assert.StartsWith("Names of files to upload have to be distinct. The following name repeats at least once: b.txt", exception.Message); 25Assert.StartsWith("Names of files to upload have to be distinct. The following name repeats at least once: b.txt", exception.Message);
Microsoft.DotNet.XUnitAssert.Tests (15)
AsyncCollectionAssertsTests.cs (2)
178 Assert.StartsWith( 265 Assert.StartsWith(
CollectionAssertsTests.cs (2)
177 Assert.StartsWith( 265 Assert.StartsWith(
EqualityAssertsTests.cs (4)
2064 Assert.StartsWith("Tolerance must be greater than or equal to zero", ex.Message); 2224 Assert.StartsWith("Tolerance must be greater than or equal to zero", ex.Message); 4038 Assert.StartsWith("Tolerance must be greater than or equal to zero", ex.Message); 4186 Assert.StartsWith("Tolerance must be greater than or equal to zero", ex.Message);
EquivalenceAssertsTests.cs (2)
1555 Assert.StartsWith("Assert.Equivalent() Failure: Mismatched value on member 'FullName'" + Environment.NewLine, ex.Message); 1577 Assert.StartsWith("Assert.Equivalent() Failure: Mismatched value on member 'FullName'" + Environment.NewLine, ex.Message);
StringAssertsTests.cs (5)
833 Assert.StartsWith("Hello", "Hello, world!"); 862 verify(() => Assert.StartsWith("hey", "Hello, world!")); 891 verify(() => Assert.StartsWith("WORLD!", "world!")); 923 var ex = Record.Exception(() => Assert.StartsWith(default(string), default(string))); 953 verify(() => Assert.StartsWith(expected, actual));
Microsoft.Extensions.AI.Integration.Tests (4)
ChatClientIntegrationTests.cs (2)
583Assert.StartsWith("chat", activity.DisplayName); 584Assert.StartsWith("http", (string)activity.GetTagItem("server.address")!);
EmbeddingGeneratorIntegrationTests.cs (2)
121Assert.StartsWith("embed", activity.DisplayName); 122Assert.StartsWith("http", (string)activity.GetTagItem("server.address")!);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
TimeExpirationAsyncTests.cs (1)
29Assert.StartsWith(message, ex.Message); // can have "\r\nParameter name:" etc
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
DefaultHealthCheckServiceTest.cs (1)
50Assert.StartsWith($"Duplicate health checks were registered with the name(s): Foo, Baz", exception.Message);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Windows\WindowsSnapshotProviderTests.cs (1)
69Assert.StartsWith("System resources information", logRecords[1].Message);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\AcceptanceTests.cs (1)
79Assert.StartsWith($"An error occurred in enricher '{typeof(TestEnricher).FullName}'", firstLogRecord.Message);
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
36Assert.StartsWith(
Microsoft.Extensions.Telemetry.Tests (1)
Logging\ExtendedLoggerFactoryTests.cs (1)
471Assert.StartsWith(loggerProvider.ScopeProvider!.GetType().FullName, scope!.GetType().FullName);
Microsoft.JSInterop.Tests (4)
Infrastructure\DotNetDispatcherTest.cs (3)
240Assert.StartsWith("There is no tracked object with id '1'.", ex.Message); 259Assert.StartsWith("There is no tracked object with id '1'.", ex.Message); 750Assert.StartsWith("System.ArgumentException: There is no tracked object with id '1'. Perhaps the DotNetObjectReference instance was already disposed.", exception.ToString());
Infrastructure\DotNetStreamReferenceJsonConverterTest.cs (1)
27Assert.StartsWith("DotNetStreamReference cannot be supplied from JavaScript to .NET because the stream contents have already been transferred.", ex.Message);
Microsoft.ML.AutoML.Tests (11)
UserInputValidationTests.cs (11)
30Assert.StartsWith("Training data cannot be null", ex.Message); 120Assert.StartsWith("Training data and validation data schemas do not match. Train data has '2' columns,and validation data has '1' columns.", ex.Message); 143Assert.StartsWith("Training data and validation data schemas do not match. Column '1' exists in train data, but not in validation data.", ex.Message); 166Assert.StartsWith("Training data and validation data schemas do not match. Column '1' is of type String in train data, and type Single in validation data.", ex.Message); 174Assert.StartsWith("Provided path cannot be null", ex.Message); 181Assert.StartsWith("File 'idontexist' does not exist", ex.Message); 190Assert.StartsWith("File at path 'empty' cannot be empty", ex.Message); 209Assert.StartsWith("Features column must be of data type Single", ex.Message); 304Assert.StartsWith("Only supported feature column types are Boolean, Single, and String. Please change the feature column UInt64 of type UInt64 to one of the supported types.", ex.Message); 317Assert.StartsWith("Training data has 0 rows", ex.Message); 340Assert.StartsWith("Validation data has 0 rows", ex.Message);
Microsoft.ML.Tests (3)
TextLoaderTests.cs (3)
585Assert.StartsWith("File or directory does not exist at path: fakefile.txt", ex.Message); 1203Assert.StartsWith("Should define at least one public, readable field or property in TInput.", ex.Message); 1214Assert.StartsWith("Should define at least one public, readable field or property in TInput.", ex.Message);
Roslyn.VisualStudio.Next.UnitTests (2)
Options\VisualStudioOptionStorageTests.cs (2)
118Assert.StartsWith(OptionDefinition.CSharpConfigNamePrefix, configName); 122Assert.StartsWith(OptionDefinition.VisualBasicConfigNamePrefix, configName);
ServerComparison.FunctionalTests (2)
HelloWorldTest.cs (2)
91Assert.StartsWith("nginx/", serverHeader); 104Assert.StartsWith("Microsoft-IIS/", serverHeader);
Shared.Tests (48)
Throw\DoubleTests.cs (12)
20Assert.StartsWith("Argument less than minimum value 1", exception.Message); 24Assert.StartsWith("Argument less than minimum value 1", exception.Message); 39Assert.StartsWith("Argument greater than maximum value 0", exception.Message); 43Assert.StartsWith("Argument greater than maximum value 0", exception.Message); 58Assert.StartsWith("Argument less or equal than minimum value 1.2", exception.Message); 62Assert.StartsWith("Argument less or equal than minimum value 1.2", exception.Message); 77Assert.StartsWith("Argument greater or equal than maximum value 1.22", exception.Message); 81Assert.StartsWith("Argument greater or equal than maximum value 1.22", exception.Message); 98Assert.StartsWith("Argument is zero", exception.Message); 117Assert.StartsWith("Argument not in the range", exception.Message); 121Assert.StartsWith("Argument not in the range", exception.Message); 128Assert.StartsWith("Argument not in the range", exception.Message);
Throw\IntegerTests.cs (14)
20Assert.StartsWith("Argument less than minimum value 1", exception.Message); 35Assert.StartsWith("Argument greater than maximum value 0", exception.Message); 50Assert.StartsWith("Argument less or equal than minimum value 1", exception.Message); 65Assert.StartsWith("Argument greater or equal than maximum value 1", exception.Message); 80Assert.StartsWith("Argument is zero", exception.Message); 95Assert.StartsWith("Argument not in the range", exception.Message); 99Assert.StartsWith("Argument not in the range", exception.Message); 180Assert.StartsWith("Argument less than minimum value 1", exception.Message); 195Assert.StartsWith("Argument greater than maximum value 0", exception.Message); 210Assert.StartsWith("Argument less or equal than minimum value 1", exception.Message); 225Assert.StartsWith("Argument greater or equal than maximum value 1", exception.Message); 240Assert.StartsWith("Argument is zero", exception.Message); 255Assert.StartsWith("Argument not in the range", exception.Message); 259Assert.StartsWith("Argument not in the range", exception.Message);
Throw\LongTests.cs (14)
20Assert.StartsWith("Argument less than minimum value 1", exception.Message); 35Assert.StartsWith("Argument greater than maximum value 0", exception.Message); 50Assert.StartsWith("Argument less or equal than minimum value 1", exception.Message); 65Assert.StartsWith("Argument greater or equal than maximum value 1", exception.Message); 80Assert.StartsWith("Argument is zero", exception.Message); 95Assert.StartsWith("Argument not in the range", exception.Message); 99Assert.StartsWith("Argument not in the range", exception.Message); 180Assert.StartsWith("Argument less than minimum value 1", exception.Message); 195Assert.StartsWith("Argument greater than maximum value 0", exception.Message); 210Assert.StartsWith("Argument less or equal than minimum value 1", exception.Message); 225Assert.StartsWith("Argument greater or equal than maximum value 1", exception.Message); 240Assert.StartsWith("Argument is zero", exception.Message); 255Assert.StartsWith("Argument not in the range", exception.Message); 259Assert.StartsWith("Argument not in the range", exception.Message);
Throw\ThrowTest.cs (8)
233Assert.StartsWith("Argument is whitespace", exception.Message); 255Assert.StartsWith("Argument is an empty string", exception.Message); 296Assert.StartsWith("Buffer", exception.Message); 341Assert.StartsWith("Collection is empty", exception.Message); 345Assert.StartsWith("Collection is empty", exception.Message); 349Assert.StartsWith("Collection is empty", exception.Message); 355Assert.StartsWith("Collection is empty", exception.Message); 361Assert.StartsWith("Collection is empty", exception.Message);
System.Windows.Forms.Primitives.Tests (6)
System\Windows\Forms\Internals\ArgumentValidationTests.cs (6)
39Assert.StartsWith(message, exception.Message); 50Assert.StartsWith(message, exception.Message); 170Assert.StartsWith(message, exception.Message); 180Assert.StartsWith(message, exception.Message); 197Assert.StartsWith(message, exception.Message); 207Assert.StartsWith(message, exception.Message);
System.Windows.Forms.Tests (13)
System\Windows\Forms\RichTextBoxTests.cs (13)
2611Assert.StartsWith("{\\rtf", rtf1); 2633Assert.StartsWith("{\\rtf", rtf1); 2660Assert.StartsWith("{\\rtf", rtf1); 2711Assert.StartsWith("{\\rtf", rtf); 2718Assert.StartsWith("{\\rtf", rtf); 2734Assert.StartsWith("{\\rtf", readRtf); 2755Assert.StartsWith("{\\rtf", rtf); 2765Assert.StartsWith("{\\rtf", rtf); 9476Assert.StartsWith("{\\rtf", text); 9509Assert.StartsWith("{\\rtf", text); 9534Assert.StartsWith("{\\rtf", text); 9640Assert.StartsWith("{\\rtf", text); 9665Assert.StartsWith("{\\rtf", text);
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
343Assert.StartsWith("https://", applicationUrl.GetString());
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
343Assert.StartsWith("https://", applicationUrl.GetString());
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
343Assert.StartsWith("https://", applicationUrl.GetString());
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
343Assert.StartsWith("https://", applicationUrl.GetString());
Templates.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
343Assert.StartsWith("https://", applicationUrl.GetString());