38800 references to Equal
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureAIOpenAIExtensionsTests.cs (1)
194Assert.Equal(applicationId, options.ApplicationId);
Aspire.Azure.Data.Tables.Tests (6)
AspireTablesExtensionsTests.cs (6)
40Assert.Equal("aspirestoragetests", client.AccountName); 67Assert.Equal("aspirestoragetests", client.AccountName); 97Assert.Equal("aspirestoragetests", client.AccountName); 125Assert.Equal("aspirestoragetests", client.AccountName); 154Assert.Equal("account2", client2.AccountName); 155Assert.Equal("account3", client3.AccountName);
Aspire.Azure.Messaging.EventHubs.Tests (4)
AspireEventHubsExtensionsTests.cs (4)
176Assert.Equal("customidentifier", assignedIdentifier); 238Assert.Equal("customidentifier", assignedIdentifier); 304Assert.Equal("customidentifier", assignedIdentifier); 473Assert.Equal(expectedNamespace, client switch
Aspire.Azure.Messaging.ServiceBus.Tests (7)
AspireServiceBusExtensionsTests.cs (7)
40Assert.Equal(ConformanceTests.FullyQualifiedNamespace, client.FullyQualifiedNamespace); 67Assert.Equal(ConformanceTests.FullyQualifiedNamespace, client.FullyQualifiedNamespace); 97Assert.Equal(ConformanceTests.FullyQualifiedNamespace, client.FullyQualifiedNamespace); 125Assert.Equal(ConformanceTests.FullyQualifiedNamespace, client.FullyQualifiedNamespace); 154Assert.Equal("aspireservicebustests2.servicebus.windows.net", client2.FullyQualifiedNamespace); 155Assert.Equal("aspireservicebustests3.servicebus.windows.net", client3.FullyQualifiedNamespace); 174Assert.Equal("local-identifier", client.Identifier);
Aspire.Azure.Messaging.WebPubSub.Tests (15)
AspireWebPubSubExtensionsTests.cs (15)
41Assert.Equal(ConformanceTests.Endpoint, client.Endpoint.AbsoluteUri); 42Assert.Equal("hub1", client.Hub); 76Assert.Equal(ConformanceTests.Endpoint, client.Endpoint.AbsoluteUri); 77Assert.Equal("hub1", client.Hub); 107Assert.Equal(ConformanceTests.Endpoint, client.Endpoint.AbsoluteUri); 108Assert.Equal("hub1", client.Hub); 136Assert.Equal(ConformanceTests.Endpoint, client.Endpoint.AbsoluteUri); 137Assert.Equal("hub1", client.Hub); 152Assert.Equal("A WebPubSubServiceClient could not be configured. Ensure a valid HubName was configured or provided in the 'Aspire:Azure:Messaging:WebPubSub' configuration section.", ex.Message); 177Assert.Equal(ConformanceTests.Endpoint, client.Endpoint.AbsoluteUri); 178Assert.Equal("key", client.Hub); 196Assert.Equal("hub1", client1.Hub); 197Assert.Equal(ConformanceTests.Endpoint, client1.Endpoint.AbsoluteUri); 199Assert.Equal("hub2", client2.Hub); 200Assert.Equal(ConformanceTests.Endpoint, client2.Endpoint.AbsoluteUri);
Aspire.Azure.Security.KeyVault.Tests (2)
AspireKeyVaultExtensionsTests.cs (2)
142Assert.Equal("Secret 1 Value", builder.Configuration["super-secret-1"]); 143Assert.Equal("Secret 2 Value", builder.Configuration["super-secret-2"]);
Aspire.Azure.Storage.Blobs.Tests (6)
AspireBlobStorageExtensionsTests.cs (6)
40Assert.Equal("aspirestoragetests", client.AccountName); 67Assert.Equal("aspirestoragetests", client.AccountName); 97Assert.Equal("aspirestoragetests", client.AccountName); 125Assert.Equal("aspirestoragetests", client.AccountName); 154Assert.Equal("aspirestoragetests2", client2.AccountName); 155Assert.Equal("aspirestoragetests3", client3.AccountName);
Aspire.Azure.Storage.Queues.Tests (6)
AspireQueueStorageExtensionsTests.cs (6)
40Assert.Equal("aspirestoragetests", client.AccountName); 67Assert.Equal("aspirestoragetests", client.AccountName); 97Assert.Equal("aspirestoragetests", client.AccountName); 125Assert.Equal("aspirestoragetests", client.AccountName); 154Assert.Equal("aspirestoragetests2", client2.AccountName); 155Assert.Equal("aspirestoragetests3", client3.AccountName);
Aspire.Components.Common.Tests (1)
ConformanceTests.cs (1)
345Assert.Equal(error, detail.Errors!.First().Value);
Aspire.Confluent.Kafka.Tests (13)
ConsumerConfigurationTests.cs (7)
44Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 77Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 110Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 199Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 258Assert.Equal("consumer-group", config.GroupId); 259Assert.Equal("user", config.SaslUsername); 260Assert.Equal("password", config.SaslPassword);
ProducerConfigurationTests.cs (6)
41Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 71Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 103Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 189Assert.Equal(CommonHelpers.TestingEndpoint, config.BootstrapServers); 247Assert.Equal("user", config.SaslUsername); 248Assert.Equal("password", config.SaslPassword);
Aspire.Dashboard.Components.Tests (45)
Controls\PlotlyChartTests.cs (5)
43Assert.Equal("import", i.Identifier); 96Assert.Equal("import", i.Identifier); 101Assert.Equal("initializeChart", i.Identifier); 105Assert.Equal("Unit-&lt;b&gt;Bold&lt;/b&gt;", trace.Name); 106Assert.Equal("<b>Name-&lt;b&gt;Bold&lt;/b&gt;</b><br />Unit-&lt;b&gt;Bold&lt;/b&gt;: 1<br />Time: 12:59:57 AM", trace.Tooltips[0]);
Controls\TextVisualizerDialogTests.cs (10)
47Assert.Equal(expectedJson, instance.FormattedText); 48Assert.Equal(TextVisualizerDialog.JsonFormat, instance.FormatKind); 69Assert.Equal(TextVisualizerDialog.XmlFormat, instance.FormatKind); 70Assert.Equal(expectedXml, instance.FormattedText); 76Assert.Equal(TextVisualizerDialog.PlaintextFormat, instance.FormatKind); 77Assert.Equal(rawXml, instance.FormattedText); 95Assert.Equal(TextVisualizerDialog.XmlFormat, instance.FormatKind); 96Assert.Equal(expectedXml, instance.FormattedText); 110Assert.Equal(TextVisualizerDialog.PlaintextFormat, instance.FormatKind); 111Assert.Equal(rawText, instance.FormattedText);
GridColumnManagerTests.cs (5)
36Assert.Equal("1fr 1fr 3fr", manager.GetGridTemplateColumns()); 39Assert.Equal("1fr 0.5fr 2fr 4fr", manager.GetGridTemplateColumns()); 101Assert.Equal("1fr 1fr 3fr", manager.GetGridTemplateColumns()); 105Assert.Equal("1fr 0.5fr 2fr 4fr", manager.GetGridTemplateColumns()); 109Assert.Equal("1fr 1fr 3fr", manager.GetGridTemplateColumns());
Pages\ConsoleLogsTests.cs (2)
87Assert.Equal("test-resource", Assert.Single(subscribedResourceNames)); 131Assert.Equal("test-resource", subscribedResource);
Pages\MetricsTests.cs (10)
111Assert.Equal("/metrics/resource/TestApp", loadRedirect.AbsolutePath); 114Assert.Equal("test-meter", query["meter"]); 115Assert.Equal("test-instrument", query["instrument"]); 116Assert.Equal("720", query["duration"]); 117Assert.Equal(MetricViewKind.Table.ToString(), query["view"]); 173Assert.Equal("test-meter", viewModel.SelectedMeter!.MeterName); 174Assert.Equal(app1InstrumentName, viewModel.SelectedInstrument!.Name); 181cut.WaitForAssertion(() => Assert.Equal("TestApp2", viewModel.SelectedApplication.Name), TestConstants.WaitTimeout); 183Assert.Equal(expectedInstrumentNameAfterChange, viewModel.SelectedInstrument?.Name); 187Assert.Equal("test-meter", viewModel.SelectedMeter!.MeterName);
Pages\StructuredLogsTests.cs (12)
55Assert.Equal(KnownStructuredLogFields.TraceIdField, f.Field); 56Assert.Equal("123", f.Value); 60Assert.Equal(KnownStructuredLogFields.SpanIdField, f.Field); 61Assert.Equal("456", f.Value); 95Assert.Equal(filter.Field, f.Field); 97Assert.Equal(filter.Value, f.Value); 133Assert.Equal(filter1.Field, f.Field); 135Assert.Equal(filter1.Value, f.Value); 139Assert.Equal(filter2.Field, f.Field); 141Assert.Equal(filter2.Value, f.Value); 145Assert.Equal(filter3.Field, f.Field); 147Assert.Equal(filter3.Value, f.Value);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
28Assert.Equal(expected, resolvedActual);
Aspire.Dashboard.Tests (480)
BrowserLinkOutgoingPeerResolverTests.cs (1)
111Assert.Equal("Browser Link", name);
ConsoleLogsTests\AnsiParserTests.cs (25)
21Assert.Equal(expectedOutput, result.ConvertedText); 42Assert.Equal(expectedOutput, result.ConvertedText); 56Assert.Equal(expectedOutput, result.ConvertedText); 68Assert.Equal(expectedOutput, result.ConvertedText); 79Assert.Equal(expectedOutput, result.ConvertedText); 90Assert.Equal(expectedOutput, result.ConvertedText); 101Assert.Equal(expectedOutput, result.ConvertedText); 112Assert.Equal(expectedOutput, result.ConvertedText); 123Assert.Equal(expectedOutput, result.ConvertedText); 134Assert.Equal(expectedOutput, result.ConvertedText); 148Assert.Equal(expectedOutput1, result1.ConvertedText); 150Assert.Equal(expectedOutput2, result2.ConvertedText); 164Assert.Equal(expectedOutput1, result1.ConvertedText); 166Assert.Equal(expectedOutput2, result2.ConvertedText); 191Assert.Equal(expectedOutput, result.ConvertedText); 208Assert.Equal(expectedOutput, result.ConvertedText); 220Assert.Equal(expectedOutput, result.ConvertedText); 232Assert.Equal(expectedOutput, result.ConvertedText); 244Assert.Equal(expectedOutput, result.ConvertedText); 255Assert.Equal(expectedOutput, result.ConvertedText); 269Assert.Equal(expectedOutput, result.ConvertedText); 283Assert.Equal(expectedOutput, result.ConvertedText); 293Assert.Equal(expectedOutput, result.ConvertedText); 304Assert.Equal(expectedOutput, result.ConvertedText); 314Assert.Equal(expectedOutput, result.ConvertedText);
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (14)
55Assert.Equal("App1", entry.Id.ReplicaSetName); 57Assert.Equal("App1", entry.Name); 63Assert.Equal("App1-r1", entry.Id.InstanceId); 64Assert.Equal("App1", entry.Id.ReplicaSetName); 66Assert.Equal("App1-r1", entry.Name); 72Assert.Equal("App1-r2", entry.Id.InstanceId); 73Assert.Equal("App1", entry.Id.ReplicaSetName); 75Assert.Equal($"App1-r2 ({unknownStateText})", entry.Name); 81Assert.Equal("App2", entry.Id.InstanceId); 83Assert.Equal("App2 (Starting)", entry.Name); 89Assert.Equal("App3", entry.Id.InstanceId); 91Assert.Equal("App3 (Finished)", entry.Name); 97Assert.Equal("App4", entry.Id.InstanceId); 99Assert.Equal("App4", entry.Name);
ConsoleLogsTests\LogEntriesTests.cs (24)
37Assert.Equal("Hello world", entry.Content); 54l => Assert.Equal("Hello world", l.Content), 55l => Assert.Equal("Hello world 2", l.Content), 56l => Assert.Equal("Hello world 3", l.Content)); 77Assert.Equal("Hello world", l.Content); 82Assert.Equal("Hello world 2", l.Content); 87Assert.Equal("Hello world 3", l.Content); 92Assert.Equal("Hello world 4", l.Content); 97Assert.Equal("Hello world 5", l.Content); 121Assert.Equal("Hello world", l.Content); 126Assert.Equal("Hello world 6", l.Content); 131Assert.Equal("Hello world 3", l.Content); 136Assert.Equal("Hello world 2", l.Content); 141Assert.Equal("Hello world 4", l.Content); 146Assert.Equal("Hello world 5", l.Content); 166Assert.Equal("Hello world 1", l.Content); 171Assert.Equal("Hello world 2", l.Content); 192l => Assert.Equal("1", l.Content), 193l => Assert.Equal("2", l.Content), 194l => Assert.Equal("3", l.Content)); 213l => Assert.Equal("2", l.Content), 214l => Assert.Equal("3", l.Content)); 233l => Assert.Equal("2", l.Content), 234l => Assert.Equal("3", l.Content));
ConsoleLogsTests\UrlParserTests.cs (2)
32Assert.Equal(expectedOutput, modifiedText); 48Assert.Equal(expectedOutput, modifiedText);
DashboardOptionsTests.cs (17)
50Assert.Equal("One or more frontend endpoint URLs are not configured. Specify an ASPNETCORE_URLS value.", result.FailureMessage); 62Assert.Equal("Failed to parse frontend endpoint URLs 'invalid'.", result.FailureMessage); 74Assert.Equal("Failed to parse frontend endpoint URLs 'http://localhost:5000;invalid'.", result.FailureMessage); 88Assert.Equal($"{DashboardConfigNames.DashboardFrontendMaxConsoleLogCountName.ConfigKey} must be greater than zero.", result.FailureMessage); 104Assert.Equal("Failed to parse resource service client endpoint URL 'invalid'.", result.FailureMessage); 118Assert.Equal($"{DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey} is \"{nameof(ResourceClientAuthMode.ApiKey)}\", but no {DashboardConfigNames.ResourceServiceClientApiKeyName.ConfigKey} is configured.", result.FailureMessage); 133Assert.Equal($"{DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey} is \"File\", but no {DashboardConfigNames.ResourceServiceClientCertificateFilePathName.ConfigKey} is configured.", result.FailureMessage); 148Assert.Equal($"{DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey} is \"KeyStore\", but no {DashboardConfigNames.ResourceServiceClientCertificateSubjectName.ConfigKey} is configured.", result.FailureMessage); 162Assert.Equal($"The resource service client is configured to use certificates, but no certificate source is specified. Specify {DashboardConfigNames.ResourceServiceClientCertificateSourceName.ConfigKey}. Possible values: {string.Join(", ", typeof(DashboardClientCertificateSource).GetEnumNames())}", result.FailureMessage); 176Assert.Equal($"Unexpected resource service client certificate source: {options.ResourceServiceClient.ClientCertificate.Source}", result.FailureMessage); 189Assert.Equal($"Resource service client authentication is not configured. Specify {DashboardConfigNames.ResourceServiceClientAuthModeName.ConfigKey}. Possible values: {string.Join(", ", typeof(ResourceClientAuthMode).GetEnumNames())}", result.FailureMessage); 202Assert.Equal($"Unexpected resource service client authentication mode: {int.MaxValue}", result.FailureMessage); 219Assert.Equal( 233Assert.Equal("Failed to parse OTLP gRPC endpoint URL 'invalid'.", result.FailureMessage); 245Assert.Equal("Failed to parse OTLP HTTP endpoint URL 'invalid'.", result.FailureMessage); 262Assert.Equal("OpenID Connect claim type for name not configured. Specify a Dashboard:Frontend:OpenIdConnect:NameClaimType value.", result.FailureMessage); 275Assert.Equal("OpenID Connect claim type for username not configured. Specify a Dashboard:Frontend:OpenIdConnect:UsernameClaimType value.", result.FailureMessage);
DashboardUrlsTests.cs (6)
25Assert.Equal($"/consolelogs/resource/resource{PlaceholderAllCharactersEncoded}", DashboardUrls.ConsoleLogsUrl(resource: $"resource{PlaceholderInput}")); 40Assert.Equal($"/structuredlogs/resource/resource{PlaceholderAllCharactersEncoded}?logLevel=error&filters=test%3Acontains%3Avalue&traceId={PlaceholderAllButExclamationMarkEncoded}&spanId={PlaceholderAllButExclamationMarkEncoded}", singleFilterUrl); 52Assert.Equal($"/structuredlogs/resource/resource{PlaceholderAllCharactersEncoded}?logLevel=error&filters=test%3Acontains%3Avalue%20fieldWithSpacedValue%3Agt%3A!!%2Bmultiple%2Bwords%2Bhere%2B!!%20name%3A!equals%3AnameValue&traceId={PlaceholderAllButExclamationMarkEncoded}&spanId={PlaceholderAllButExclamationMarkEncoded}", multipleFiltersIncludingSpacesUrl); 58Assert.Equal($"/traces/resource/resource{PlaceholderAllCharactersEncoded}", DashboardUrls.TracesUrl(resource: $"resource{PlaceholderInput}")); 64Assert.Equal($"/traces/detail/traceId{PlaceholderAllCharactersEncoded}", DashboardUrls.TraceDetailUrl(traceId: $"traceId{PlaceholderInput}")); 77Assert.Equal($"/metrics/resource/resource{PlaceholderAllCharactersEncoded}?meter=meter{PlaceholderAllButExclamationMarkEncoded}&instrument=meter{PlaceholderAllButExclamationMarkEncoded}&duration=10&view=table", url);
DurationFormatterTests.cs (10)
23Assert.Equal(unit, DurationFormatter.GetUnit(TimeSpan.FromTicks(ticks))); 29Assert.Equal("1μs", DurationFormatter.FormatDuration(TimeSpan.FromTicks(1 * TimeSpan.TicksPerMicrosecond))); 36Assert.Equal("10d 14h", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 43Assert.Equal("2d", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 50Assert.Equal(2.36m.ToString("0.##ms", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 57Assert.Equal(2.36m.ToString("0.##s", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 64Assert.Equal("2m 31s", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 71Assert.Equal("2h 31m", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input))); 78Assert.Equal(0.1m.ToString("0.##μs", CultureInfo.CurrentCulture), DurationFormatter.FormatDuration(TimeSpan.FromTicks((long)input))); 85Assert.Equal("0μs", DurationFormatter.FormatDuration(TimeSpan.FromTicks(input)));
FormatHelpersTests.cs (6)
22Assert.Equal(expected, FormatHelpers.FormatNumberWithOptionalDecimalPlaces(value, maxDecimalPlaces: 6, CultureInfo.InvariantCulture)); 33Assert.Equal(expected, FormatHelpers.FormatNumberWithOptionalDecimalPlaces(value, maxDecimalPlaces: 6, CultureInfo.GetCultureInfo("de-DE"))); 45Assert.Equal(expected, FormatHelpers.FormatDateTime(CreateTimeProvider(), date, includeMilliseconds, cultureInfo: CultureInfo.InvariantCulture)); 57Assert.Equal(expected, FormatHelpers.FormatDateTime(CreateTimeProvider(), date, includeMilliseconds, cultureInfo: CultureInfo.GetCultureInfo("de-DE"))); 69Assert.Equal(expected, FormatHelpers.FormatDateTime(CreateTimeProvider(), date, includeMilliseconds, cultureInfo: CultureInfo.GetCultureInfo("fi-FI"))); 81Assert.Equal(expected, FormatHelpers.FormatDateTime(CreateTimeProvider(), date, includeMilliseconds, cultureInfo: CultureInfo.GetCultureInfo("en-NZ")));
Integration\FrontendBrowserTokenAuthTests.cs (3)
46Assert.Equal(DashboardUrls.LoginUrl(returnUrl: DashboardUrls.StructuredLogsUrl()), response.RequestMessage!.RequestUri!.PathAndQuery); 101Assert.Equal("FrontendComposite was not authenticated. Failure message: Connection type Frontend is not enabled on this connection.", log.Message); 240Assert.Equal(linkHost, uri.Host);
Integration\FrontendOpenIdConnectAuthTests.cs (6)
48Assert.Equal("localhost", redirectedTo.Host); 49Assert.Equal("/authorize", redirectedTo.AbsolutePath); 52Assert.Equal("MyClientId", query.Get("client_id")); 53Assert.Equal("code", query.Get("response_type")); 54Assert.Equal("openid profile", query.Get("scope")); 90Assert.Equal("FrontendComposite was not authenticated. Failure message: Connection type Frontend is not enabled on this connection.", log.Message);
Integration\OtlpCorsHttpServiceTests.cs (9)
63Assert.Equal("http://localhost:8000", responseMessage1.Headers.GetValues("Access-Control-Allow-Origin").Single()); 64Assert.Equal("POST", responseMessage1.Headers.GetValues("Access-Control-Allow-Methods").Single()); 65Assert.Equal("X-Requested-With", responseMessage1.Headers.GetValues("Access-Control-Allow-Headers").Single()); 77Assert.Equal("http://localhost:8001", responseMessage2.Headers.GetValues("Access-Control-Allow-Origin").Single()); 78Assert.Equal("POST", responseMessage2.Headers.GetValues("Access-Control-Allow-Methods").Single()); 79Assert.Equal("X-Requested-With", responseMessage2.Headers.GetValues("Access-Control-Allow-Headers").Single()); 132Assert.Equal("*", responseMessage.Headers.GetValues("Access-Control-Allow-Origin").Single()); 133Assert.Equal("POST", responseMessage.Headers.GetValues("Access-Control-Allow-Methods").Single()); 134Assert.Equal("x-requested-with,x-custom,Content-Type", responseMessage.Headers.GetValues("Access-Control-Allow-Headers").Single());
Integration\OtlpGrpcServiceTests.cs (2)
224Assert.Equal("Different", options.Otlp.PrimaryApiKey); 262Assert.Equal(TestCertificateLoader.GetTestCertificate().Thumbprint, clientCallbackCert.Thumbprint);
Integration\OtlpHttpServiceTests.cs (6)
53Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 179Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 212Assert.Equal(TestCertificateLoader.GetTestCertificate().Thumbprint, clientCallbackCert.Thumbprint); 294Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 323Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 352Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single());
Integration\Playwright\BrowserTokenAuthenticationTests.cs (3)
40Assert.Equal("/login?returnUrl=%2F", uri.PathAndQuery); 65Assert.Equal("/login?returnUrl=%2F", uri.PathAndQuery); 109Assert.Equal("submit-token", name);
Integration\StartupTests.cs (6)
167Assert.Equal(frontendBrowserToken, localBuilder.Configuration[DashboardConfigNames.DashboardFrontendBrowserTokenName.ConfigKey]); 256Assert.Equal("TestKey123!", app.DashboardOptionsMonitor.CurrentValue.Otlp.PrimaryApiKey); 409Assert.Equal(OtlpHttpEndpointsBuilder.ProtobufContentType, responseMessage.Content.Headers.GetValues("content-type").Single()); 474Assert.Equal("MySubject", app.DashboardOptionsMonitor.CurrentValue.ResourceServiceClient.ClientCertificate.Subject); 580Assert.Equal("https", uri.Scheme); 581Assert.Equal("localhost", uri.Host);
LocalBrowserStorageTests.cs (4)
38Assert.Equal("localStorage.setItem", identifier); 65Assert.Equal("localStorage.getItem", identifier); 90Assert.Equal("localStorage.getItem", identifier); 115Assert.Equal("localStorage.getItem", identifier);
Middleware\ValidateTokenMiddlewareTests.cs (6)
22Assert.Equal("/", response.Headers.Location?.OriginalString); 30Assert.Equal("/test", response.Headers.Location?.OriginalString); 38Assert.Equal("/login", response.Headers.Location?.OriginalString); 46Assert.Equal("/login?returnUrl=%2ftest", response.Headers.Location?.OriginalString); 54Assert.Equal("/", response.Headers.Location?.OriginalString); 62Assert.Equal("/test", response.Headers.Location?.OriginalString);
Model\ApplicationsSelectHelpersTests.cs (26)
33Assert.Equal("app", app.Name); 39Assert.Equal("app-app", app.Name); 41Assert.Equal("app", app.Id!.InstanceId); 45Assert.Equal("app-app-abc", app.Name); 47Assert.Equal("app-abc", app.Id!.InstanceId); 51Assert.Equal("singleton", app.Name); 53Assert.Equal("singleton-abc", app.Id!.InstanceId); 60Assert.Equal("app-abc", app.Id!.InstanceId); 77Assert.Equal("app", app.Name); 83Assert.Equal("APP-app", app.Name); 85Assert.Equal("app", app.Id!.InstanceId); 89Assert.Equal("APP-app-abc", app.Name); 91Assert.Equal("app-abc", app.Id!.InstanceId); 101Assert.Equal("app", app.Id!.InstanceId); 125Assert.Equal("test-abc", app.Id!.InstanceId); 143Assert.Equal("app", app.Name); 149Assert.Equal("app-123", app.Name); 151Assert.Equal("123", app.Id!.InstanceId); 155Assert.Equal("app-456", app.Name); 157Assert.Equal("456", app.Id!.InstanceId); 180Assert.Equal("app", app.Name); 186Assert.Equal("app-123", app.Name); 188Assert.Equal("123", app.Id!.InstanceId); 192Assert.Equal("app-456", app.Name); 194Assert.Equal("456", app.Id!.InstanceId); 201Assert.Equal("app", app.Name);
Model\DefaultInstrumentUnitResolverTests.cs (1)
42Assert.Equal(expected, result);
Model\ResourceEndpointHelpersTests.cs (44)
33Assert.Equal("http://localhost:8080", e.Text); 34Assert.Equal("Test", e.Name); 35Assert.Equal("http://localhost:8080", e.Url); 36Assert.Equal("localhost", e.Address); 52Assert.Equal("http://localhost:8080", e.Text); 53Assert.Equal("Test", e.Name); 54Assert.Equal("http://localhost:8080", e.Url); 55Assert.Equal("localhost", e.Address); 60Assert.Equal("http://localhost:8081", e.Text); 61Assert.Equal("Test2", e.Name); 62Assert.Equal("http://localhost:8081", e.Url); 63Assert.Equal("localhost", e.Address); 79Assert.Equal("http://localhost:8080", e.Text); 80Assert.Equal("Test", e.Name); 81Assert.Equal("http://localhost:8080", e.Url); 82Assert.Equal("localhost", e.Address); 87Assert.Equal("tcp://localhost:8081", e.Text); 88Assert.Equal("Test2", e.Name); 90Assert.Equal("localhost", e.Address); 106Assert.Equal("https://localhost:8080/test", e.Text); 107Assert.Equal("First", e.Name); 108Assert.Equal("https://localhost:8080/test", e.Url); 109Assert.Equal("localhost", e.Address); 114Assert.Equal("https://localhost:8081/test2", e.Text); 115Assert.Equal("Test", e.Name); 116Assert.Equal("https://localhost:8081/test2", e.Url); 117Assert.Equal("localhost", e.Address); 133Assert.Equal("https://localhost:8081/test2", e.Text); 134Assert.Equal("Test", e.Name); 135Assert.Equal("https://localhost:8081/test2", e.Url); 136Assert.Equal("localhost", e.Address); 153Assert.Equal("https://localhost:8080/test", e.Text); 154Assert.Equal("First", e.Name); 155Assert.Equal("https://localhost:8080/test", e.Url); 156Assert.Equal("localhost", e.Address); 161Assert.Equal("https://localhost:8081/test2", e.Text); 162Assert.Equal("Test", e.Name); 163Assert.Equal("https://localhost:8081/test2", e.Url); 164Assert.Equal("localhost", e.Address); 181e => Assert.Equal("Z", e.Name), 182e => Assert.Equal("a", e.Name), 183e => Assert.Equal("C", e.Name), 184e => Assert.Equal("B", e.Name), 185e => Assert.Equal("D", e.Name));
Model\ResourceViewModelTests.cs (8)
40Assert.Equal("Value!", e.Value); 57Assert.Equal(@"Error converting resource ""TestName-abc"" to ResourceViewModel.", ex.Message); 87Assert.Equal("Property1", p.Key); 88Assert.Equal("Property1", p.Value.Name); 89Assert.Equal("Value1", p.Value.Value.StringValue); 97Assert.Equal("Property2", p.Key); 98Assert.Equal("Property2", p.Value.Name); 99Assert.Equal("Value2", p.Value.Value.StringValue);
Model\TargetLocationInterceptorTests.cs (4)
15Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation); 22Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation); 29Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation); 36Assert.Equal(TargetLocationInterceptor.StructuredLogsPath, newTargetLocation);
OtlpApiKeyAuthenticationHandlerTests.cs (2)
28Assert.Equal($"API key from '{OtlpApiKeyAuthenticationHandler.ApiKeyHeaderName}' header is missing.", result.Failure.Message); 42Assert.Equal($"Incoming API key from '{OtlpApiKeyAuthenticationHandler.ApiKeyHeaderName}' header doesn't match configured API key.", result.Failure.Message);
ResourceOutgoingPeerResolverTests.cs (7)
72Assert.Equal("test", value); 86Assert.Equal("test", value); 100Assert.Equal("test", value); 114Assert.Equal("test", value); 173Assert.Equal("test", value); 188Assert.Equal("test-abc", value1); 191Assert.Equal("test-def", value2);
StringExtensionsTests.cs (1)
36Assert.Equal(expectedResult, actual);
TelemetryFilterFormatterTests.cs (4)
28Assert.Equal("test:name", filter.Field); 29Assert.Equal("test:value", filter.Value); 48Assert.Equal("test+name", filter.Field); 49Assert.Equal("test+value", filter.Value);
TelemetryRepositoryTests\ApplicationTests.cs (20)
31Assert.Equal("app1", app.ApplicationName); 32Assert.Equal("TestId", app.InstanceId); 36Assert.Equal("app2", app.ApplicationName); 37Assert.Equal("TestId", app.InstanceId); 47Assert.Equal("app1", app1.ApplicationName); 51Assert.Equal("app2", app2.ApplicationName); 74Assert.Equal("app1", app.ApplicationName); 75Assert.Equal("123", app.InstanceId); 79Assert.Equal("app1", app.ApplicationName); 80Assert.Equal("456", app.InstanceId); 90Assert.Equal("app2", app.ApplicationName); 91Assert.Equal("TestId", app.InstanceId); 112Assert.Equal("app1", app.ApplicationName); 113Assert.Equal("abc", app.InstanceId); 117Assert.Equal("app1", app.ApplicationName); 118Assert.Equal("def", app.InstanceId); 122Assert.Equal("app2", app.ApplicationName); 123Assert.Equal("TestId", app.InstanceId); 145Assert.Equal("app1-19572b19", instance1Name); 146Assert.Equal("app1-f66e2b1e", instance2Name);
TelemetryRepositoryTests\LogTests.cs (66)
61Assert.Equal("TestService", app.ApplicationName); 62Assert.Equal("TestId", app.InstanceId); 75Assert.Equal("546573745370616e4964", app.SpanId); 76Assert.Equal("5465737454726163654964", app.TraceId); 77Assert.Equal("Test {Log}", app.OriginalFormat); 78Assert.Equal("Test Value!", app.Message); 79Assert.Equal("TestLogger", app.Scope.ScopeName); 83Assert.Equal("Log", p.Key); 84Assert.Equal("Value!", p.Value); 90s => Assert.Equal("Log", s)); 141Assert.Equal("1", l.Message); 142Assert.Equal("", l.Scope.ScopeName); 144l => Assert.Equal("2", l.Message), 145l => Assert.Equal("3", l.Message), 146l => Assert.Equal("4", l.Message), 147l => Assert.Equal("5", l.Message), 148l => Assert.Equal("6", l.Message), 149l => Assert.Equal("7", l.Message), 150l => Assert.Equal("8", l.Message), 151l => Assert.Equal("9", l.Message), 152l => Assert.Equal("10", l.Message)); 443Assert.Equal("TestService", app.ApplicationName); 444Assert.Equal("TestId", app.InstanceId); 570Assert.Equal("CustomValue", callbackValue); 615Assert.Equal("TestService", app.ApplicationName); 616Assert.Equal("TestId", app.InstanceId); 629Assert.Equal("Test {Log}", app.OriginalFormat); 630Assert.Equal("0123456789012345", app.Message); 634Assert.Equal("Key0", p.Key); 635Assert.Equal("01234", p.Value); 639Assert.Equal("Key1", p.Key); 640Assert.Equal("0123456789", p.Value); 644Assert.Equal("Key2", p.Key); 645Assert.Equal("012345678901234", p.Value); 649Assert.Equal("Key3", p.Key); 650Assert.Equal("0123456789012345", p.Value); 654Assert.Equal("Key4", p.Key); 655Assert.Equal("0123456789012345", p.Value); 827Assert.Equal("App1", app.ApplicationName); 828Assert.Equal("computer-name", app.InstanceId); 832Assert.Equal("App2", app.ApplicationName); 833Assert.Equal("computer-name", app.InstanceId); 846Assert.Equal("546573745370616e4964", app.SpanId); 847Assert.Equal("5465737454726163654964", app.TraceId); 848Assert.Equal("Test {Log}", app.OriginalFormat); 849Assert.Equal("Test Value!", app.Message); 850Assert.Equal("TestLogger", app.Scope.ScopeName); 854Assert.Equal("Log", p.Key); 855Assert.Equal("Value!", p.Value); 869Assert.Equal("546573745370616e4964", app.SpanId); 870Assert.Equal("5465737454726163654964", app.TraceId); 871Assert.Equal("Test {Log}", app.OriginalFormat); 872Assert.Equal("Test Value!", app.Message); 873Assert.Equal("TestLogger", app.Scope.ScopeName); 877Assert.Equal("Log", p.Key); 878Assert.Equal("Value!", p.Value); 945Assert.Equal("message-1", app.Message); 946Assert.Equal("TestLogger", app.Scope.ScopeName); 950Assert.Equal("key-1", p.Key); 951Assert.Equal("value-1", p.Value); 956Assert.Equal("message-2", app.Message); 957Assert.Equal("TestLogger", app.Scope.ScopeName); 961Assert.Equal("key-2", p.Key); 962Assert.Equal("value-2", p.Value); 968s => Assert.Equal("key-1", s), 969s => Assert.Equal("key-2", s));
TelemetryRepositoryTests\MetricsTests.cs (79)
66Assert.Equal("TestService", app.ApplicationName); 67Assert.Equal("TestId", app.InstanceId); 74Assert.Equal("test", instrument.Name); 75Assert.Equal("Test metric description", instrument.Description); 76Assert.Equal("widget", instrument.Unit); 77Assert.Equal("test-meter", instrument.Parent.MeterName); 81Assert.Equal("test2", instrument.Name); 82Assert.Equal("Test metric description", instrument.Description); 83Assert.Equal("widget", instrument.Unit); 84Assert.Equal("test-meter", instrument.Parent.MeterName); 88Assert.Equal("test", instrument.Name); 89Assert.Equal("Test metric description", instrument.Description); 90Assert.Equal("widget", instrument.Unit); 91Assert.Equal("test-meter2", instrument.Parent.MeterName); 139Assert.Equal("TestService", app.ApplicationName); 140Assert.Equal("TestId", app.InstanceId); 155Assert.Equal("Meter_Key0", p.Key); 156Assert.Equal("01234", p.Value); 160Assert.Equal("Meter_Key1", p.Key); 161Assert.Equal("0123456789", p.Value); 165Assert.Equal("Meter_Key2", p.Key); 166Assert.Equal("012345678901234", p.Value); 170Assert.Equal("Meter_Key3", p.Key); 171Assert.Equal("0123456789012345", p.Value); 175Assert.Equal("Meter_Key4", p.Key); 176Assert.Equal("0123456789012345", p.Value); 184Assert.Equal("Meter_Key0", p.Key); 185Assert.Equal("01234", p.Value); 189Assert.Equal("Meter_Key1", p.Key); 190Assert.Equal("0123456789", p.Value); 194Assert.Equal("Meter_Key2", p.Key); 195Assert.Equal("012345678901234", p.Value); 199Assert.Equal("Meter_Key3", p.Key); 200Assert.Equal("0123456789012345", p.Value); 204Assert.Equal("Meter_Key4", p.Key); 205Assert.Equal("0123456789012345", p.Value); 255Assert.Equal("TestService", app.ApplicationName); 256Assert.Equal("TestId", app.InstanceId); 271Assert.Equal("Meter_Key0", p.Key); 272Assert.Equal("01234", p.Value); 280Assert.Equal("Meter_Key0", p.Key); 281Assert.Equal("01234", p.Value); 285Assert.Equal("Metric_Key0", p.Key); 286Assert.Equal("01234", p.Value); 290Assert.Equal("Metric_Key1", p.Key); 291Assert.Equal("0123456789", p.Value); 295Assert.Equal("Metric_Key2", p.Key); 296Assert.Equal("012345678901234", p.Value); 300Assert.Equal("Metric_Key3", p.Key); 301Assert.Equal("0123456789012345", p.Value); 353Assert.Equal("TestService", app.ApplicationName); 354Assert.Equal("TestId", app.InstanceId); 367Assert.Equal("test", instrumentData.Summary.Name); 368Assert.Equal("Test metric description", instrumentData.Summary.Description); 369Assert.Equal("widget", instrumentData.Summary.Unit); 370Assert.Equal("test-meter", instrumentData.Summary.Parent.MeterName); 375Assert.Equal("key1", e.Key); 380Assert.Equal("key2", e.Key); 389Assert.Equal("key1", exemplar.Attributes[0].Key); 390Assert.Equal("value1", exemplar.Attributes[0].Value); 460Assert.Equal("TestService", app.ApplicationName); 461Assert.Equal("TestId", app.InstanceId); 473Assert.Equal("test", instrument.Summary.Name); 474Assert.Equal("Test metric description", instrument.Summary.Description); 475Assert.Equal("widget", instrument.Summary.Unit); 476Assert.Equal("test-meter", instrument.Summary.Parent.MeterName); 569Assert.Equal("test1", instrument.Name); 570Assert.Equal("Test metric description", instrument.Description); 571Assert.Equal("widget", instrument.Unit); 572Assert.Equal("test-meter", instrument.Parent.MeterName); 576Assert.Equal("test2", instrument.Name); 577Assert.Equal("Test metric description", instrument.Description); 578Assert.Equal("widget", instrument.Unit); 579Assert.Equal("test-meter", instrument.Parent.MeterName); 592Assert.Equal("test1", instrument.Summary.Name); 612Assert.Equal("key-1", knownValues.Key); 615v => Assert.Equal("value-1", v), 616v => Assert.Equal("value-2", v), 617v => Assert.Equal("value-3", v));
TelemetryRepositoryTests\OtlpHelpersTests.cs (5)
23Assert.Equal("string!", s); 39Assert.Equal("48656c6c6f20776f726c64", s); 52Assert.Equal("", s); 75Assert.Equal("[true,null]", s); 138Assert.Equal(@"{""prop1"":[""string!"",1.1,1],""prop2"":""48656c6c6f20776f726c64"",""prop3"":{""nestedProp1"":""nested!""}}", s);
TelemetryRepositoryTests\TraceTests.cs (62)
71Assert.Equal("TestService", app.ApplicationName); 72Assert.Equal("TestId", app.InstanceId); 145Assert.Equal("TestService", app.ApplicationName); 146Assert.Equal("TestId", app.InstanceId); 166span => Assert.Equal("scope1", span.Scope.ScopeName), 167span => Assert.Equal("scope2", span.Scope.ScopeName)); 222Assert.Equal("TestService", app.ApplicationName); 223Assert.Equal("TestId", app.InstanceId); 281Assert.Equal("", trace.FirstSpan.Scope.ScopeName); 288Assert.Equal("", trace.FirstSpan.Scope.ScopeName); 408Assert.Equal("Event 1", e.Name); 412Assert.Equal("key1", a.Key); 413Assert.Equal("Value!", a.Value); 418Assert.Equal("Event 2", e.Name); 490Assert.Equal("key2", a.Key); 491Assert.Equal("Value!", a.Value); 501Assert.Equal("key1", a.Key); 502Assert.Equal("Value!", a.Value); 515Assert.Equal("key2", a.Key); 516Assert.Equal("Value!", a.Value); 526Assert.Equal("key1", a.Key); 527Assert.Equal("Value!", a.Value); 639Assert.Equal("TestService", app.ApplicationName); 640Assert.Equal("TestId", app.InstanceId); 659Assert.Equal("Key0", p.Key); 660Assert.Equal("01234", p.Value); 664Assert.Equal("Key1", p.Key); 665Assert.Equal("0123456789", p.Value); 669Assert.Equal("Key2", p.Key); 670Assert.Equal("012345678901234", p.Value); 674Assert.Equal("Key3", p.Key); 675Assert.Equal("0123456789012345", p.Value); 679Assert.Equal("Key4", p.Key); 680Assert.Equal("0123456789012345", p.Value); 763Assert.Equal("TestService", app.ApplicationName); 764Assert.Equal("TestId", app.InstanceId); 779Assert.Equal("1988", first); 780Assert.Equal("2000", last); 964s => Assert.Equal("key-1", s), 965s => Assert.Equal("key-2", s)); 1170Assert.Equal("TestService: Test span. Id: 1-3", trace.FullName); 1195Assert.Equal("TestService: Test span. Id: 1-2", trace.FullName); 1220Assert.Equal("TestService: Test span. Id: 1-1", trace.FullName); 1245Assert.Equal("TestService: Test span. Id: 1-1", trace.FullName); 1310Assert.Equal("TestService", application.ApplicationName); 1311Assert.Equal("TestId", application.InstanceId); 1321Assert.Equal("prop1", p.Key); 1322Assert.Equal("value1", p.Value); 1330Assert.Equal("prop1", p.Key); 1331Assert.Equal("value2", p.Value); 1335Assert.Equal("prop2", p.Key); 1336Assert.Equal("value1", p.Value); 1357Assert.Equal("prop1", p.Key); 1358Assert.Equal("value1", p.Value); 1367Assert.Equal("prop1", p.Key); 1368Assert.Equal("value2", p.Value); 1372Assert.Equal("prop2", p.Key); 1373Assert.Equal("value1", p.Value); 1382Assert.Equal("prop1", p.Key); 1383Assert.Equal("value2", p.Value); 1387Assert.Equal("prop2", p.Key); 1388Assert.Equal("value1", p.Value);
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
28Assert.Equal(expected, resolvedActual);
Aspire.Elastic.Clients.Elasticsearch.Tests (7)
AspireElasticClientExtensionsTest.cs (1)
164Assert.Equal("ping", activity.OperationName);
ElasticsearchClientPublicApiTests.cs (6)
21Assert.Equal(nameof(builder), exception.ParamName); 34Assert.Equal(nameof(connectionName), exception.ParamName); 47Assert.Equal(nameof(connectionName), exception.ParamName); 60Assert.Equal(nameof(builder), exception.ParamName); 73Assert.Equal(nameof(name), exception.ParamName); 86Assert.Equal(nameof(name), exception.ParamName);
Aspire.Hosting.AWS.Tests (21)
AWSCDKResourceTests.cs (10)
30Assert.Equal("Stack", resource.Name); 33Assert.Equal("test-profile", resource.AWSSDKConfig.Profile); 54Assert.Equal("Other", resource.Name); 57Assert.Equal("test-profile", resource.AWSSDKConfig.Profile); 80Assert.Equal("Other", stackResource.Name); 83Assert.Equal("other-test-profile", stackResource.AWSSDKConfig.Profile); 86Assert.Equal("Stack", cdkResource.Name); 89Assert.Equal("test-profile", cdkResource.AWSSDKConfig.Profile); 102Assert.Equal("Construct", resource.Name); 136Assert.Equal(expectedManifest, manifest.ToString());
AWSCloudFormationResourceTests.cs (6)
26Assert.Equal("ExistingStack", resource.Name); 29Assert.Equal("test-profile", resource.AWSSDKConfig.Profile); 48Assert.Equal("NewStack", resource.Name); 49Assert.Equal("cf.template", resource.TemplatePath); 55Assert.Equal("value1", resource.CloudFormationParameters["key1"]); 56Assert.Equal("value2", resource.CloudFormationParameters["key2"]);
CloudFormationAWSConsoleUrlTests.cs (2)
22Assert.Equal( 38Assert.Equal(
StackOutputReferenceTests.cs (3)
31Assert.Equal("key1", reference.Name); 38Assert.Equal("value1", value); 57Assert.Equal("{NewStack.output.key1}", reference.ValueExpression);
Aspire.Hosting.Azure.Tests (207)
AzureBicepProvisionerTests.cs (9)
27Assert.Equal("david", parameters["name"]?["value"]?.ToString()); 63Assert.Equal("john", parameters["name"]?["value"]?.ToString()); 66Assert.Equal("connection string", parameters["conn"]?["value"]?.ToString()); 67Assert.Equal("value", parameters["jsonObj"]?["value"]?["key"]?.ToString()); 68Assert.Equal("paramValue", parameters["param"]?["value"]?.ToString()); 69Assert.Equal("paramValue/1", parameters["expr"]?["value"]?.ToString()); 70Assert.Equal("http://localhost:1023", parameters["endpoint"]?["value"]?.ToString()); 98Assert.Equal(checkSum0, checkSum1); 116Assert.Equal("Bicep parameter names must only contain alpha, numeric, and _ characters and must start with an alpha or _ characters. (Parameter 'bicepParameterName')", ex.Message);
AzureBicepResourceTests.cs (143)
36Assert.Equal("content", bicepResource.Resource.TemplateString); 119Assert.Equal("https://myendpoint", bicepResource.GetOutput("resourceEndpoint").Value); 131Assert.Equal("https://myendpoint;Key=43", bicepResource.GetSecretOutput("connectionString").Value); 212Assert.Equal(cs, cosmos.Resource.ConnectionStringExpression.ValueExpression); 213Assert.Equal(cs, await ((IResourceWithConnectionString)cosmos.Resource).GetConnectionStringAsync()); 242Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 295Assert.Equal(expectedBicep, manifest.BicepText); 300(database) => Assert.Equal("mydatabase", database.Name.Value) 305Assert.Equal("cosmos", cosmos.Resource.Name); 306Assert.Equal("mycosmosconnectionstring", await connectionStringResource.GetConnectionStringAsync()); 335Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 388Assert.Equal(expectedBicep, manifest.BicepText); 393(database) => Assert.Equal("mydatabase", database.Name.Value) 398Assert.Equal("cosmos", cosmos.Resource.Name); 399Assert.Equal("mycosmosconnectionstring", await connectionStringResource.GetConnectionStringAsync()); 409Assert.Equal("https://myendpoint", await appConfig.Resource.ConnectionStringExpression.GetValueAsync(default)); 415Assert.Equal("https://myendpoint", await connectionStringResource.GetConnectionStringAsync()); 428Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 465Assert.Equal(expectedBicep, manifest.BicepText); 479Assert.Equal("appInsights", appInsights.Resource.Name); 480Assert.Equal("myinstrumentationkey", await connectionStringResource.GetConnectionStringAsync()); 481Assert.Equal("{appInsights.outputs.appInsightsConnectionString}", appInsights.Resource.ConnectionStringExpression.ValueExpression); 494Assert.Equal(expectedManifest, appInsightsManifest.ManifestNode.ToString()); 522Assert.Equal(expectedBicep, appInsightsManifest.BicepText); 536Assert.Equal("appInsights", appInsights.Resource.Name); 537Assert.Equal("myinstrumentationkey", await connectionStringResource.GetConnectionStringAsync()); 538Assert.Equal("{appInsights.outputs.appInsightsConnectionString}", appInsights.Resource.ConnectionStringExpression.ValueExpression); 548Assert.Equal(expectedManifest, appInsightsManifest.ManifestNode.ToString()); 587Assert.Equal(expectedBicep, appInsightsManifest.BicepText); 602Assert.Equal("appInsights", appInsights.Resource.Name); 603Assert.Equal("myinstrumentationkey", await connectionStringResource.GetConnectionStringAsync()); 604Assert.Equal("{appInsights.outputs.appInsightsConnectionString}", appInsights.Resource.ConnectionStringExpression.ValueExpression); 617Assert.Equal(expectedManifest, appInsightsManifest.ManifestNode.ToString()); 645Assert.Equal(expectedBicep, appInsightsManifest.BicepText); 655Assert.Equal("logAnalyticsWorkspace", logAnalyticsWorkspace.Resource.Name); 656Assert.Equal("{logAnalyticsWorkspace.outputs.logAnalyticsWorkspaceId}", logAnalyticsWorkspace.Resource.WorkspaceId.ValueExpression); 665Assert.Equal(expectedManifest, appInsightsManifest.ManifestNode.ToString()); 687Assert.Equal(expectedBicep, appInsightsManifest.BicepText); 705Assert.Equal("myinstrumentationkey", config["APPLICATIONINSIGHTS_CONNECTION_STRING"]); 724Assert.Equal("azure.bicep.v0", manifest["type"]?.ToString()); 725Assert.Equal("construct1.module.bicep", manifest["path"]?.ToString()); 764Assert.Equal(expectedManifest, manifest.ToString()); 803Assert.Equal(expectedManifest, manifest.ToString()); 819Assert.Equal("localhost:12455", await redis.Resource.GetConnectionStringAsync()); 833Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 871Assert.Equal(expectedBicep, manifest.BicepText); 894Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 933Assert.Equal(expectedBicep, manifest.BicepText); 956Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 995Assert.Equal(expectedBicep, manifest.BicepText); 1018Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1067Assert.Equal(expectedBicep, manifest.BicepText); 1090Assert.Equal("Server=tcp:myserver,1433;Encrypt=True;Authentication=\"Active Directory Default\"", await sql.Resource.GetConnectionStringAsync(default)); 1091Assert.Equal("Server=tcp:{sql.outputs.sqlServerFqdn},1433;Encrypt=True;Authentication=\"Active Directory Default\"", sql.Resource.ConnectionStringExpression.ValueExpression); 1105Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1165Assert.Equal(expectedBicep, manifest.BicepText); 1188Assert.Equal("Server=tcp:myserver,1433;Encrypt=True;Authentication=\"Active Directory Default\"", await sql.Resource.GetConnectionStringAsync(default)); 1189Assert.Equal("Server=tcp:{sql.outputs.sqlServerFqdn},1433;Encrypt=True;Authentication=\"Active Directory Default\"", sql.Resource.ConnectionStringExpression.ValueExpression); 1202Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1250Assert.Equal(expectedBicep, manifest.BicepText); 1279Assert.Equal("myconnectionstring", await postgres.Resource.GetConnectionStringAsync(default)); 1293Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1370Assert.Equal(expectedBicep, manifest.BicepText); 1399Assert.Equal("myconnectionstring", await postgres.Resource.GetConnectionStringAsync(default)); 1413Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1481Assert.Equal(expectedBicep, manifest.BicepText); 1506Assert.Equal(expectedConnectionString, await postgres.Resource.GetConnectionStringAsync()); 1520Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1545Assert.Equal(expectedManifest, manifest.ToString()); 1565Assert.Equal(expectedManifest, manifest.ToString()); 1584Assert.Equal(expectedManifest, manifest.ToString()); 1604Assert.Equal("sb", serviceBus.Resource.Name); 1605Assert.Equal("mynamespaceEndpoint", await connectionStringResource.GetConnectionStringAsync()); 1606Assert.Equal("{sb.outputs.serviceBusEndpoint}", connectionStringResource.ConnectionStringExpression.ValueExpression); 1620Assert.Equal(expected, manifest.ManifestNode.ToString()); 1684Assert.Equal(expectedBicep, manifest.BicepText); 1709Assert.Equal("https://mywebpubsubendpoint", await connectionStringResource.GetConnectionStringAsync()); 1711Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1713Assert.Equal("wps1", wps.Resource.Name); 1751Assert.Equal(expectedBicep, manifest.BicepText); 1778Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 1780Assert.Equal("wps1", wps.Resource.Name); 1818Assert.Equal(expectedBicep, manifest.BicepText); 1843Assert.Equal(blobqs, blob.Resource.ConnectionStringExpression.ValueExpression); 1844Assert.Equal(queueqs, queue.Resource.ConnectionStringExpression.ValueExpression); 1845Assert.Equal(tableqs, table.Resource.ConnectionStringExpression.ValueExpression); 1847Assert.Equal(blobqs, await ((IResourceWithConnectionString)blob.Resource).GetConnectionStringAsync()); 1848Assert.Equal(queueqs, await ((IResourceWithConnectionString)queue.Resource).GetConnectionStringAsync()); 1849Assert.Equal(tableqs, await ((IResourceWithConnectionString)table.Resource).GetConnectionStringAsync()); 1871Assert.Equal("storage", storage.Resource.Name); 1886Assert.Equal(expectedStorageManifest, storageManifest.ManifestNode.ToString()); 1960Assert.Equal(expectedBicep, storageManifest.BicepText); 1967Assert.Equal("https://myblob", await connectionStringBlobResource.GetConnectionStringAsync()); 1975Assert.Equal(expectedBlobManifest, blobManifest.ToString()); 1982Assert.Equal("https://myqueue", await connectionStringQueueResource.GetConnectionStringAsync()); 1990Assert.Equal(expectedQueueManifest, queueManifest.ToString()); 1997Assert.Equal("https://mytable", await connectionStringTableResource.GetConnectionStringAsync()); 2005Assert.Equal(expectedTableManifest, tableManifest.ToString()); 2028Assert.Equal("storage", storage.Resource.Name); 2043Assert.Equal(expectedStorageManifest, storageManifest.ManifestNode.ToString()); 2117Assert.Equal(expectedBicep, storageManifest.BicepText); 2124Assert.Equal("https://myblob", await connectionStringBlobResource.GetConnectionStringAsync()); 2132Assert.Equal(expectedBlobManifest, blobManifest.ToString()); 2139Assert.Equal("https://myqueue", await connectionStringQueueResource.GetConnectionStringAsync()); 2147Assert.Equal(expectedQueueManifest, queueManifest.ToString()); 2154Assert.Equal("https://mytable", await connectionStringTableResource.GetConnectionStringAsync()); 2162Assert.Equal(expectedTableManifest, tableManifest.ToString()); 2184Assert.Equal("storage", storage.Resource.Name); 2199Assert.Equal(expectedStorageManifest, storageManifest.ManifestNode.ToString()); 2273Assert.Equal(expectedBicep, storageManifest.BicepText); 2280Assert.Equal("https://myblob", await connectionStringBlobResource.GetConnectionStringAsync()); 2288Assert.Equal(expectedBlobManifest, blobManifest.ToString()); 2295Assert.Equal("https://myqueue", await connectionStringQueueResource.GetConnectionStringAsync()); 2303Assert.Equal(expectedQueueManifest, queueManifest.ToString()); 2310Assert.Equal("https://mytable", await connectionStringTableResource.GetConnectionStringAsync()); 2318Assert.Equal(expectedTableManifest, tableManifest.ToString()); 2341Assert.Equal("storage", storage.Resource.Name); 2356Assert.Equal(expectedStorageManifest, storageManifest.ManifestNode.ToString()); 2430Assert.Equal(expectedBicep, storageManifest.BicepText); 2437Assert.Equal("https://myblob", await connectionStringBlobResource.GetConnectionStringAsync()); 2445Assert.Equal(expectedBlobManifest, blobManifest.ToString()); 2452Assert.Equal("https://myqueue", await connectionStringQueueResource.GetConnectionStringAsync()); 2460Assert.Equal(expectedQueueManifest, queueManifest.ToString()); 2467Assert.Equal("https://mytable", await connectionStringTableResource.GetConnectionStringAsync()); 2475Assert.Equal(expectedTableManifest, tableManifest.ToString()); 2495Assert.Equal("search", search.Resource.Name); 2496Assert.Equal("{search.outputs.connectionString}", connectionStringResource.ConnectionStringExpression.ValueExpression); 2497Assert.Equal(fakeConnectionString, await connectionStringResource.GetConnectionStringAsync()); 2515Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 2567Assert.Equal(expectedBicep, manifest.BicepText); 2583Assert.Equal("{ai.value}", aiManifest["connectionString"]?.ToString()); 2584Assert.Equal("parameter.v0", aiManifest["type"]?.ToString()); 2587Assert.Equal("{servicebus.value}", serviceBusManifest["connectionString"]?.ToString()); 2588Assert.Equal("parameter.v0", serviceBusManifest["type"]?.ToString()); 2591Assert.Equal("{ai.connectionString}", serviceManifest["env"]?["APPLICATIONINSIGHTS_CONNECTION_STRING"]?.ToString()); 2592Assert.Equal("{servicebus.connectionString}", serviceManifest["env"]?["ConnectionStrings__servicebus"]?.ToString()); 2620deployment => Assert.Equal("mymodel", deployment.Name.Value), 2621deployment => Assert.Equal("embedding-model", deployment.Name.Value)); 2634Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 2709Assert.Equal(expectedBicep, manifest.BicepText); 2723Assert.Equal("configure", ex.ParamName); 2814Assert.Equal(expectedManifest, manifest.ToString()); 2815Assert.Equal(expectedBicep, bicep);
AzureContainerAppsTests.cs (20)
55Assert.Equal(expectedManifest, m); 103Assert.Equal(expectedBicep, bicep); 150Assert.Equal(expectedManifest, m); 235Assert.Equal(expectedBicep, bicep); 326Assert.Equal(expectedManifest, m); 515Assert.Equal(expectedBicep, bicep); 564Assert.Equal(expectedManifest, m); 612Assert.Equal(expectedBicep, bicep); 663Assert.Equal(expectedManifest, m); 748Assert.Equal(expectedBicep, bicep); 814Assert.Equal(expectedManifest, m); 925Assert.Equal(expectedBicep, bicep); 970Assert.Equal(expectedManifest, m); 1023Assert.Equal(expectedBicep, bicep); 1068Assert.Equal(expectedManifest, m); 1127Assert.Equal(expectedBicep, bicep); 1173Assert.Equal(expectedManifest, m); 1226Assert.Equal(expectedBicep, bicep); 1274Assert.Equal(expectedManifest, m); 1363Assert.Equal(expectedBicep, bicep);
AzureEventHubsExtensionsTests.cs (11)
24Assert.Equal(Path.Combine(builder.AppHostDirectory, ".eventhubs", "eh"), volumeAnnotation.Source); 25Assert.Equal("/data", volumeAnnotation.Target); 41Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source); 42Assert.Equal("/data", volumeAnnotation.Target); 58Assert.Equal($"{builder.GetVolumePrefix()}-eh-data", volumeAnnotation.Source); 59Assert.Equal("/data", volumeAnnotation.Target); 75Assert.Equal("mydata", volumeAnnotation.Source); 76Assert.Equal("/data", volumeAnnotation.Target); 119Assert.Equal(imageTag ?? EventHubsEmulatorContainerImageTags.Tag, containerImageAnnotation.Tag); 120Assert.Equal(EventHubsEmulatorContainerImageTags.Registry, containerImageAnnotation.Registry); 121Assert.Equal(EventHubsEmulatorContainerImageTags.Image, containerImageAnnotation.Image);
AzurePostgresExtensionsTests.cs (5)
36Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 126Assert.Equal(expectedBicep, manifest.BicepText); 158Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 234Assert.Equal(expectedBicep, manifest.BicepText); 307Assert.Equal("Host=localhost;Port=12455;Username=user;Password=p@ssw0rd1", await postgres.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None));
AzureRedisExtensionsTests.cs (5)
33Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 77Assert.Equal(expectedBicep, manifest.BicepText); 100Assert.Equal(expectedManifest, manifest.ManifestNode.ToString()); 139Assert.Equal(expectedBicep, manifest.BicepText); 155Assert.Equal("localhost:12455", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None));
AzureResourceExtensionsTests.cs (10)
34Assert.Equal(Path.Combine(builder.AppHostDirectory, ".azurite", "storage"), volumeAnnotation.Source); 35Assert.Equal("/data", volumeAnnotation.Target); 60Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source); 61Assert.Equal("/data", volumeAnnotation.Target); 86Assert.Equal($"{builder.GetVolumePrefix()}-storage-data", volumeAnnotation.Source); 87Assert.Equal("/data", volumeAnnotation.Target); 112Assert.Equal("mydata", volumeAnnotation.Source); 113Assert.Equal("/data", volumeAnnotation.Target); 176Assert.Equal(imageTag ?? "latest", actualTag); 191Assert.Equal(partitionCount.ToString(CultureInfo.InvariantCulture), config["AZURE_COSMOS_EMULATOR_PARTITION_COUNT"]);
AzureResourceOptionsTests.cs (1)
77Assert.Equal(expectedBicep, actualBicep);
AzureServiceBusExtensionsTests.cs (1)
64Assert.Equal(expectedBicep, manifest.BicepText);
AzureStorageEmulatorFunctionalTests.cs (1)
92Assert.Equal("testValue", downloadResult.Content.ToString());
ResourceGroupNameHelpersTests.cs (1)
23Assert.Equal(expected, result);
Aspire.Hosting.Containers.Tests (39)
ContainerImageAnnotationTests.cs (2)
22Assert.Equal("latest", annotation.Tag); 37Assert.Equal("pretendthisisasha", annotation.SHA256);
ContainerResourceBuilderTests.cs (13)
17Assert.Equal("redis-stack", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image); 25Assert.Equal("redis-stack", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image); 26Assert.Equal("1.0.0", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); 37Assert.Equal("new-image", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Image); 38Assert.Equal("latest", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); 49Assert.Equal("new-image", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Image); 50Assert.Equal("latest", container.Resource.Annotations.OfType<ContainerImageAnnotation>().Last().Tag); 58Assert.Equal("7.1", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Tag); 66Assert.Equal("myregistry.azurecr.io", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().Registry); 74Assert.Equal("42b5c726e719639fcc1e9dbc13dd843f567dcd37911d0e1abb9f47f2cc1c95cd", redis.Resource.Annotations.OfType<ContainerImageAnnotation>().Single().SHA256); 84Assert.Equal("The resource 'testcontainer' does not have a container image specified. Use WithImage to specify the container image and tag.", exception.Message); 94Assert.Equal("The resource 'testcontainer' does not have a container image specified. Use WithImage to specify the container image and tag.", exception.Message); 104Assert.Equal("The resource 'testcontainer' does not have a container image specified. Use WithImage to specify the container image and tag.", exception.Message);
ContainerResourceTests.cs (16)
26Assert.Equal("container", containerResource.Name); 28Assert.Equal("latest", containerAnnotation.Tag); 29Assert.Equal("none", containerAnnotation.Image); 45Assert.Equal("container", containerResource.Name); 47Assert.Equal("nightly", containerAnnotation.Tag); 48Assert.Equal("none", containerAnnotation.Image); 79arg => Assert.Equal("arg1", arg), 80arg => Assert.Equal("http://localhost:1234", arg), 81arg => Assert.Equal("connectionString", arg)); 98Assert.Equal(expectedManifest, manifest.ToString()); 131Assert.Equal(expectedManifest, manifest.ToString()); 158Assert.Equal(expectedManifest, manifest.ToString()); 177Assert.Equal(Path.Combine(basePath, "source"), mountAnnotation.Source); 219Assert.Equal(expectedManifest, manifest.ToString()); 274Assert.Equal("containerwithbindmounts", containerResource.Name); 275Assert.Equal(expectedManifest, manifest.ToString());
WithDockerfileTests.cs (8)
44Assert.Equal("open sesame from env", envSecretMessage); 109Assert.Equal($"{DefaultMessage}\n", message); 141Assert.Equal($"{DefaultMessage}\n", message); 369Assert.Equal($"hello\n", message); 439Assert.Equal($"hello\n", message); 492Assert.Equal("contextPath", ex.ParamName); 506Assert.Equal("contextPath", ex.ParamName); 603Assert.Equal(
Aspire.Hosting.Dapr.Tests (6)
DaprTests.cs (6)
62Assert.Equal("3500", config["DAPR_HTTP_PORT"]); 63Assert.Equal("50001", config["DAPR_GRPC_PORT"]); 65Assert.Equal("http://localhost:3500", config["DAPR_HTTP_ENDPOINT"]); 66Assert.Equal("http://localhost:50001", config["DAPR_GRPC_ENDPOINT"]); 161Assert.Equal("http://localhost:3500", config["DAPR_HTTP_ENDPOINT"]); 162Assert.Equal("http://localhost:50001", config["DAPR_GRPC_ENDPOINT"]);
Aspire.Hosting.Elasticsearch.Tests (41)
AddElasticsearchTests.cs (35)
27Assert.Equal("elasticsearch", containerResource.Name); 35Assert.Equal("http", primaryEndpoint.Name); 38Assert.Equal("http", primaryEndpoint.Transport); 39Assert.Equal("http", primaryEndpoint.UriScheme); 44Assert.Equal("internal", internalEndpoint.Name); 47Assert.Equal("tcp", internalEndpoint.Transport); 48Assert.Equal("tcp", internalEndpoint.UriScheme); 51Assert.Equal(ElasticsearchContainerImageTags.Tag, containerAnnotation.Tag); 52Assert.Equal(ElasticsearchContainerImageTags.Image, containerAnnotation.Image); 53Assert.Equal(ElasticsearchContainerImageTags.Registry, containerAnnotation.Registry); 60Assert.Equal("discovery.type", env.Key); 61Assert.Equal("single-node", env.Value); 65Assert.Equal("xpack.security.enabled", env.Key); 66Assert.Equal("true", env.Value); 70Assert.Equal("ELASTIC_PASSWORD", env.Key); 89Assert.Equal("elasticsearch", containerResource.Name); 97Assert.Equal("http", primaryEndpoint.Name); 100Assert.Equal("http", primaryEndpoint.Transport); 101Assert.Equal("http", primaryEndpoint.UriScheme); 106Assert.Equal("internal", internalEndpoint.Name); 109Assert.Equal("tcp", internalEndpoint.Transport); 110Assert.Equal("tcp", internalEndpoint.UriScheme); 113Assert.Equal(ElasticsearchContainerImageTags.Tag, containerAnnotation.Tag); 114Assert.Equal(ElasticsearchContainerImageTags.Image, containerAnnotation.Image); 115Assert.Equal(ElasticsearchContainerImageTags.Registry, containerAnnotation.Registry); 122Assert.Equal("discovery.type", env.Key); 123Assert.Equal("single-node", env.Value); 127Assert.Equal("xpack.security.enabled", env.Key); 128Assert.Equal("true", env.Value); 132Assert.Equal("ELASTIC_PASSWORD", env.Key); 133Assert.Equal("pass", env.Value); 152Assert.Equal($"http://elastic:{elasticsearch.Resource.PasswordParameter.Value}@localhost:27020", connectionString); 153Assert.Equal("http://elastic:{elasticsearch-password.value}@{elasticsearch.bindings.http.host}:{elasticsearch.bindings.http.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 191Assert.Equal(expectedManifest, manifest.ToString()); 237Assert.Equal(expectedManifest, manifest.ToString());
ElasticsearchPublicApiTests.cs (6)
20Assert.Equal(nameof(builder), exception.ParamName); 32Assert.Equal(nameof(name), exception.ParamName); 56Assert.Equal(nameof(builder), exception.ParamName); 70Assert.Equal(nameof(source), exception.ParamName); 84Assert.Equal(nameof(name), exception.ParamName); 95Assert.Equal(nameof(password), exception.ParamName);
Aspire.Hosting.Garnet.Tests (30)
AddGarnetTests.cs (20)
25Assert.Equal("myGarnet", containerResource.Name); 30Assert.Equal("tcp", endpoint.Name); 33Assert.Equal("tcp", endpoint.Transport); 34Assert.Equal("tcp", endpoint.UriScheme); 37Assert.Equal(GarnetContainerImageTags.Tag, containerAnnotation.Tag); 38Assert.Equal(GarnetContainerImageTags.Image, containerAnnotation.Image); 39Assert.Equal(GarnetContainerImageTags.Registry, containerAnnotation.Registry); 53Assert.Equal("myGarnet", containerResource.Name); 58Assert.Equal("tcp", endpoint.Name); 61Assert.Equal("tcp", endpoint.Transport); 62Assert.Equal("tcp", endpoint.UriScheme); 65Assert.Equal(GarnetContainerImageTags.Tag, containerAnnotation.Tag); 66Assert.Equal(GarnetContainerImageTags.Image, containerAnnotation.Image); 67Assert.Equal(GarnetContainerImageTags.Registry, containerAnnotation.Registry); 83Assert.Equal("{myGarnet.bindings.tcp.host}:{myGarnet.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 110Assert.Equal(expectedManifest, manifest.ToString()); 132Assert.Equal($"{builder.GetVolumePrefix()}-myGarnet-data", volumeAnnotation.Source); 133Assert.Equal("/data", volumeAnnotation.Target); 157Assert.Equal(Path.Combine(builder.AppHostDirectory, "mygarnetdata"), volumeAnnotation.Source); 158Assert.Equal("/data", volumeAnnotation.Target);
GarnetFunctionalTests.cs (3)
96Assert.Equal("value", value); 178Assert.Equal("value", value); 224Assert.Equal("value", value);
GarnetPublicApiTests.cs (7)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 44Assert.Equal(nameof(name), exception.ParamName); 56Assert.Equal(nameof(builder), exception.ParamName); 69Assert.Equal(nameof(source), exception.ParamName); 80Assert.Equal(nameof(builder), exception.ParamName); 91Assert.Equal(nameof(builder), exception.ParamName);
Aspire.Hosting.Kafka.Tests (30)
AddKafkaTests.cs (17)
26Assert.Equal("kafka", containerResource.Name); 34Assert.Equal("tcp", primaryEndpoint.Name); 37Assert.Equal("tcp", primaryEndpoint.Transport); 38Assert.Equal("tcp", primaryEndpoint.UriScheme); 43Assert.Equal("internal", internalEndpoint.Name); 46Assert.Equal("tcp", internalEndpoint.Transport); 47Assert.Equal("tcp", internalEndpoint.UriScheme); 50Assert.Equal(KafkaContainerImageTags.Tag, containerAnnotation.Tag); 51Assert.Equal(KafkaContainerImageTags.Image, containerAnnotation.Image); 52Assert.Equal(KafkaContainerImageTags.Registry, containerAnnotation.Registry); 70Assert.Equal("localhost:27017", connectionString); 71Assert.Equal("{kafka.bindings.tcp.host}:{kafka.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 109Assert.Equal(expectedManifest, manifest.ToString()); 125Assert.Equal("kafka-data", volumeAnnotation.Source); 126Assert.Equal("/var/lib/kafka/data", volumeAnnotation.Target); 143Assert.Equal(Path.Combine(appBuilder.AppHostDirectory, "kafka-data"), volumeAnnotation.Source); 144Assert.Equal("/var/lib/kafka/data", volumeAnnotation.Target);
KafkaFunctionalTests.cs (4)
109Assert.Equal($"test-key", result.Message.Key); 110Assert.Equal($"test-value{i}", result.Message.Value); 244Assert.Equal($"test-key", result.Message.Key); 245Assert.Equal($"test-value{i}", result.Message.Value);
KafkaPublicApiTests.cs (9)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 44Assert.Equal(nameof(builder), exception.ParamName); 56Assert.Equal(nameof(builder), exception.ParamName); 69Assert.Equal(nameof(source), exception.ParamName); 80Assert.Equal(nameof(builder), exception.ParamName); 91Assert.Equal(nameof(builder), exception.ParamName); 102Assert.Equal(nameof(name), exception.ParamName); 113Assert.Equal(nameof(name), exception.ParamName);
Aspire.Hosting.Keycloak.Tests (24)
KeycloakPublicApiTests.cs (9)
22Assert.Equal(nameof(name), exception.ParamName); 34Assert.Equal(nameof(adminPassword), exception.ParamName); 46Assert.Equal(nameof(builder), exception.ParamName); 58Assert.Equal(nameof(name), exception.ParamName); 69Assert.Equal(nameof(builder), exception.ParamName); 81Assert.Equal(nameof(builder), exception.ParamName); 94Assert.Equal(nameof(source), exception.ParamName); 106Assert.Equal(nameof(builder), exception.ParamName); 119Assert.Equal(nameof(importDirectory), exception.ParamName);
KeycloakResourceBuilderTests.cs (15)
27Assert.Equal(resourceName, containerResource.Name); 32Assert.Equal("http", endpoint.Name); 35Assert.Equal("http", endpoint.Transport); 36Assert.Equal("http", endpoint.UriScheme); 39Assert.Equal(KeycloakContainerImageTags.Tag, containerAnnotation.Tag); 40Assert.Equal(KeycloakContainerImageTags.Image, containerAnnotation.Image); 41Assert.Equal(KeycloakContainerImageTags.Registry, containerAnnotation.Registry); 55Assert.Equal($"{builder.GetVolumePrefix()}-{resourceName}-data", volumeAnnotation.Source); 56Assert.Equal("/opt/keycloak/data", volumeAnnotation.Target); 70Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source); 71Assert.Equal("/opt/keycloak/data", volumeAnnotation.Target); 101Assert.Equal(tempDirectory, containerAnnotation.Source); 102Assert.Equal("/opt/keycloak/data/import", containerAnnotation.Target); 114Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.AdminPasswordParameter.Default?.GetType().FullName); 157Assert.Equal(expectedManifest, manifest.ToString());
Aspire.Hosting.Milvus.Tests (28)
AddMilvusTests.cs (16)
30Assert.Equal("my-milvus", containerResource.Name); 33Assert.Equal(MilvusContainerImageTags.Tag, containerAnnotation.Tag); 34Assert.Equal(MilvusContainerImageTags.Image, containerAnnotation.Image); 35Assert.Equal(MilvusContainerImageTags.Registry, containerAnnotation.Registry); 42Assert.Equal("grpc", endpoint.Name); 61Assert.Equal("my-milvus", containerResource.Name); 64Assert.Equal(MilvusContainerImageTags.Tag, containerAnnotation.Tag); 65Assert.Equal(MilvusContainerImageTags.Image, containerAnnotation.Image); 66Assert.Equal(MilvusContainerImageTags.Registry, containerAnnotation.Registry); 73Assert.Equal("grpc", endpoint.Name); 92Assert.Equal($"Endpoint=http://localhost:19530;Key=root:pass", connectionString); 168Assert.Equal(expectedManifest, serverManifest.ToString()); 176Assert.Equal(expectedManifest, dbManifest.ToString()); 194Assert.Equal("my-milvus", milvusResource.Name); 203Assert.Equal("http2", grpcEndpoint.Transport); 204Assert.Equal("http", grpcEndpoint.UriScheme);
MilvusPublicApiTests.cs (12)
21Assert.Equal(nameof(builder), exception.ParamName); 35Assert.Equal(nameof(name), exception.ParamName); 51Assert.Equal(nameof(name), exception.ParamName); 63Assert.Equal(nameof(builder), exception.ParamName); 74Assert.Equal(nameof(builder), exception.ParamName); 85Assert.Equal(nameof(builder), exception.ParamName); 97Assert.Equal(nameof(builder), exception.ParamName); 113Assert.Equal(nameof(source), exception.ParamName); 124Assert.Equal(nameof(builder), exception.ParamName); 139Assert.Equal(nameof(configurationFilePath), exception.ParamName); 152Assert.Equal(nameof(name), exception.ParamName); 164Assert.Equal(nameof(apiKey), exception.ParamName);
Aspire.Hosting.MongoDB.Tests (56)
AddMongoDBTests.cs (40)
27Assert.Equal("mongodb", containerResource.Name); 32Assert.Equal("tcp", endpoint.Name); 35Assert.Equal("tcp", endpoint.Transport); 36Assert.Equal("tcp", endpoint.UriScheme); 39Assert.Equal(MongoDBContainerImageTags.Tag, containerAnnotation.Tag); 40Assert.Equal(MongoDBContainerImageTags.Image, containerAnnotation.Image); 41Assert.Equal(MongoDBContainerImageTags.Registry, containerAnnotation.Registry); 55Assert.Equal("mongodb", containerResource.Name); 60Assert.Equal("tcp", endpoint.Name); 63Assert.Equal("tcp", endpoint.Transport); 64Assert.Equal("tcp", endpoint.UriScheme); 67Assert.Equal(MongoDBContainerImageTags.Tag, containerAnnotation.Tag); 68Assert.Equal(MongoDBContainerImageTags.Image, containerAnnotation.Image); 69Assert.Equal(MongoDBContainerImageTags.Registry, containerAnnotation.Registry); 91Assert.Equal($"mongodb://admin:{dbResource.Parent.PasswordParameter?.Value}@localhost:27017?authSource=admin&authMechanism=SCRAM-SHA-256", await serverResource.GetConnectionStringAsync()); 92Assert.Equal("mongodb://admin:{mongodb-password.value}@{mongodb.bindings.tcp.host}:{mongodb.bindings.tcp.port}?authSource=admin&authMechanism=SCRAM-SHA-256", serverResource.ConnectionStringExpression.ValueExpression); 93Assert.Equal($"mongodb://admin:{dbResource.Parent.PasswordParameter?.Value}@localhost:27017/mydatabase?authSource=admin&authMechanism=SCRAM-SHA-256", connectionString); 94Assert.Equal("mongodb://admin:{mongodb-password.value}@{mongodb.bindings.tcp.host}:{mongodb.bindings.tcp.port}/mydatabase?authSource=admin&authMechanism=SCRAM-SHA-256", connectionStringResource.ConnectionStringExpression.ValueExpression); 120Assert.Equal("example.mycompany.com", containerAnnotation.Registry); 121Assert.Equal("customongoexpresscontainer", containerAnnotation.Image); 122Assert.Equal("someothertag", containerAnnotation.Tag); 154Assert.Equal("ME_CONFIG_MONGODB_SERVER", e.Key); 155Assert.Equal("mongo", e.Value); 159Assert.Equal("ME_CONFIG_MONGODB_PORT", e.Key); 160Assert.Equal("27017", e.Value); 164Assert.Equal("ME_CONFIG_BASICAUTH", e.Key); 165Assert.Equal("false", e.Value); 169Assert.Equal("ME_CONFIG_MONGODB_ADMINUSERNAME", e.Key); 170Assert.Equal("admin", e.Value); 174Assert.Equal("ME_CONFIG_MONGODB_ADMINPASSWORD", e.Key); 218Assert.Equal(expectedManifest, mongoManifest.ToString()); 226Assert.Equal(expectedManifest, dbManifest.ToString()); 262Assert.Equal("customers1", db1.Resource.DatabaseName); 263Assert.Equal("customers2", db2.Resource.DatabaseName); 265Assert.Equal("mongodb://admin:{mongo1-password.value}@{mongo1.bindings.tcp.host}:{mongo1.bindings.tcp.port}/customers1?authSource=admin&authMechanism=SCRAM-SHA-256", db1.Resource.ConnectionStringExpression.ValueExpression); 266Assert.Equal("mongodb://admin:{mongo1-password.value}@{mongo1.bindings.tcp.host}:{mongo1.bindings.tcp.port}/customers2?authSource=admin&authMechanism=SCRAM-SHA-256", db2.Resource.ConnectionStringExpression.ValueExpression); 280Assert.Equal("imports", db1.Resource.DatabaseName); 281Assert.Equal("imports", db2.Resource.DatabaseName); 283Assert.Equal("mongodb://admin:{mongo1-password.value}@{mongo1.bindings.tcp.host}:{mongo1.bindings.tcp.port}/imports?authSource=admin&authMechanism=SCRAM-SHA-256", db1.Resource.ConnectionStringExpression.ValueExpression); 284Assert.Equal("mongodb://admin:{mongo2-password.value}@{mongo2.bindings.tcp.host}:{mongo2.bindings.tcp.port}/imports?authSource=admin&authMechanism=SCRAM-SHA-256", db2.Resource.ConnectionStringExpression.ValueExpression);
MongoDBPublicApiTests.cs (16)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 45Assert.Equal(nameof(builder), exception.ParamName); 58Assert.Equal(nameof(name), exception.ParamName); 69Assert.Equal(nameof(builder), exception.ParamName); 81Assert.Equal(nameof(builder), exception.ParamName); 94Assert.Equal(nameof(source), exception.ParamName); 105Assert.Equal(nameof(builder), exception.ParamName); 116Assert.Equal(nameof(builder), exception.ParamName); 129Assert.Equal(nameof(source), exception.ParamName); 140Assert.Equal(nameof(builder), exception.ParamName); 151Assert.Equal(nameof(name), exception.ParamName); 164Assert.Equal(nameof(name), exception.ParamName); 177Assert.Equal(nameof(databaseName), exception.ParamName); 190Assert.Equal(nameof(parent), exception.ParamName); 201Assert.Equal(nameof(name), exception.ParamName);
Aspire.Hosting.MySql.Tests (49)
AddMySqlTests.cs (34)
23Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", mysql.Resource.PasswordParameter.Default?.GetType().FullName); 47Assert.Equal("mysql", containerResource.Name); 50Assert.Equal(MySqlContainerImageTags.Tag, containerAnnotation.Tag); 51Assert.Equal(MySqlContainerImageTags.Image, containerAnnotation.Image); 52Assert.Equal(MySqlContainerImageTags.Registry, containerAnnotation.Registry); 57Assert.Equal("tcp", endpoint.Name); 60Assert.Equal("tcp", endpoint.Transport); 61Assert.Equal("tcp", endpoint.UriScheme); 68Assert.Equal("MYSQL_ROOT_PASSWORD", env.Key); 87Assert.Equal("mysql", containerResource.Name); 90Assert.Equal(MySqlContainerImageTags.Tag, containerAnnotation.Tag); 91Assert.Equal(MySqlContainerImageTags.Image, containerAnnotation.Image); 92Assert.Equal(MySqlContainerImageTags.Registry, containerAnnotation.Registry); 97Assert.Equal("tcp", endpoint.Name); 100Assert.Equal("tcp", endpoint.Transport); 101Assert.Equal("tcp", endpoint.UriScheme); 108Assert.Equal("MYSQL_ROOT_PASSWORD", env.Key); 109Assert.Equal("pass", env.Value); 127Assert.Equal("Server={mysql.bindings.tcp.host};Port={mysql.bindings.tcp.port};User ID=root;Password={mysql-password.value}", connectionStringResource.ConnectionStringExpression.ValueExpression); 150Assert.Equal(mySqlConnectionString + ";Database=db", dbConnectionString); 151Assert.Equal("{mysql.connectionString};Database=db", mySqlDatabaseResource.ConnectionStringExpression.ValueExpression); 182Assert.Equal(expectedManifest, mySqlManifest.ToString()); 190Assert.Equal(expectedManifest, dbManifest.ToString()); 220Assert.Equal(expectedManifest, serverManifest.ToString()); 249Assert.Equal($"{mysql.Resource.Name}:{mysql.Resource.PrimaryEndpoint.TargetPort}", config["PMA_HOST"]); 264Assert.Equal("/etc/phpmyadmin/config.user.inc.php", volume.Target); 334Assert.Equal("customers1", db1.Resource.DatabaseName); 335Assert.Equal("customers2", db2.Resource.DatabaseName); 337Assert.Equal("{mysql1.connectionString};Database=customers1", db1.Resource.ConnectionStringExpression.ValueExpression); 338Assert.Equal("{mysql1.connectionString};Database=customers2", db2.Resource.ConnectionStringExpression.ValueExpression); 352Assert.Equal("imports", db1.Resource.DatabaseName); 353Assert.Equal("imports", db2.Resource.DatabaseName); 355Assert.Equal("{mysql1.connectionString};Database=imports", db1.Resource.ConnectionStringExpression.ValueExpression); 356Assert.Equal("{mysql2.connectionString};Database=imports", db2.Resource.ConnectionStringExpression.ValueExpression);
MySqlFunctionalTests.cs (2)
369Assert.Equal("BatMobile", results.GetString("brand")); 449Assert.Equal("BatMobile", cars[0].Brand);
MySqlPublicApiTests.cs (13)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 44Assert.Equal(nameof(builder), exception.ParamName); 56Assert.Equal(nameof(builder), exception.ParamName); 69Assert.Equal(nameof(source), exception.ParamName); 81Assert.Equal(nameof(builder), exception.ParamName); 94Assert.Equal(nameof(source), exception.ParamName); 106Assert.Equal(nameof(builder), exception.ParamName); 119Assert.Equal(nameof(name), exception.ParamName); 130Assert.Equal(nameof(builder), exception.ParamName); 140Assert.Equal(nameof(builder), exception.ParamName); 154Assert.Equal(nameof(name), exception.ParamName); 166Assert.Equal(nameof(password), exception.ParamName);
Aspire.Hosting.Nats.Tests (26)
AddNatsTests.cs (17)
26Assert.Equal("nats", containerResource.Name); 31Assert.Equal("tcp", endpoint.Name); 34Assert.Equal("tcp", endpoint.Transport); 35Assert.Equal("tcp", endpoint.UriScheme); 38Assert.Equal(NatsContainerImageTags.Tag, containerAnnotation.Tag); 39Assert.Equal(NatsContainerImageTags.Image, containerAnnotation.Image); 40Assert.Equal(NatsContainerImageTags.Registry, containerAnnotation.Registry); 56Assert.Equal("nats", containerResource.Name); 59Assert.Equal(path, mountAnnotation.Source); 60Assert.Equal("/var/lib/nats", mountAnnotation.Target); 76Assert.Equal("tcp", endpoint.Name); 79Assert.Equal("tcp", endpoint.Transport); 80Assert.Equal("tcp", endpoint.UriScheme); 83Assert.Equal(NatsContainerImageTags.Tag, containerAnnotation.Tag); 84Assert.Equal(NatsContainerImageTags.Image, containerAnnotation.Image); 85Assert.Equal(NatsContainerImageTags.Registry, containerAnnotation.Registry); 121Assert.Equal(expectedManifest, manifest.ToString());
NatsFunctionalTests.cs (2)
224Assert.Equal($"test-event-{i}", @event.Name); 225Assert.Equal($"test-event-description-{i}", @event.Description);
NatsPublicApiTests.cs (7)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 44Assert.Equal(nameof(builder), exception.ParamName); 55Assert.Equal(nameof(builder), exception.ParamName); 67Assert.Equal(nameof(builder), exception.ParamName); 80Assert.Equal(nameof(source), exception.ParamName); 91Assert.Equal(nameof(name), exception.ParamName);
Aspire.Hosting.NodeJs.Tests (14)
AddNodeAppTests.cs (2)
44Assert.Equal(expectedManifest, manifest.ToString()); 74Assert.Equal(expectedManifest, manifest.ToString());
NodeFunctionalTests.cs (2)
28Assert.Equal("Hello from node!", response); 40Assert.Equal("Hello from npm!", response);
NodeJsPublicApiTests.cs (10)
20Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 46Assert.Equal(nameof(scriptPath), exception.ParamName); 59Assert.Equal(nameof(builder), exception.ParamName); 72Assert.Equal(nameof(workingDirectory), exception.ParamName); 85Assert.Equal(nameof(name), exception.ParamName); 99Assert.Equal(nameof(scriptName), exception.ParamName); 112Assert.Equal(nameof(name), exception.ParamName); 125Assert.Equal(nameof(command), exception.ParamName); 138Assert.Equal(nameof(workingDirectory), exception.ParamName);
Aspire.Hosting.Oracle.Tests (43)
AddOracleTests.cs (41)
22Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", orcl.Resource.PasswordParameter.Default?.GetType().FullName); 46Assert.Equal("orcl", containerResource.Name); 49Assert.Equal(OracleContainerImageTags.Tag, containerAnnotation.Tag); 50Assert.Equal(OracleContainerImageTags.Image, containerAnnotation.Image); 51Assert.Equal(OracleContainerImageTags.Registry, containerAnnotation.Registry); 56Assert.Equal("tcp", endpoint.Name); 59Assert.Equal("tcp", endpoint.Transport); 60Assert.Equal("tcp", endpoint.UriScheme); 67Assert.Equal("ORACLE_PWD", env.Key); 86Assert.Equal("orcl", containerResource.Name); 89Assert.Equal(OracleContainerImageTags.Tag, containerAnnotation.Tag); 90Assert.Equal(OracleContainerImageTags.Image, containerAnnotation.Image); 91Assert.Equal(OracleContainerImageTags.Registry, containerAnnotation.Registry); 96Assert.Equal("tcp", endpoint.Name); 99Assert.Equal("tcp", endpoint.Transport); 100Assert.Equal("tcp", endpoint.UriScheme); 107Assert.Equal("ORACLE_PWD", env.Key); 108Assert.Equal("pass", env.Value); 126Assert.Equal("user id=system;password={orcl-password.value};data source={orcl.bindings.tcp.host}:{orcl.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 150Assert.Equal("{orcl.connectionString}/db", oracleDatabaseConnectionStringResource.ConnectionStringExpression.ValueExpression); 151Assert.Equal(oracleConnectionString + "/db", dbConnectionString); 169Assert.Equal("oracle", containerResource.Name); 172Assert.Equal(OracleContainerImageTags.Tag, containerAnnotation.Tag); 173Assert.Equal(OracleContainerImageTags.Image, containerAnnotation.Image); 174Assert.Equal(OracleContainerImageTags.Registry, containerAnnotation.Registry); 179Assert.Equal("tcp", endpoint.Name); 182Assert.Equal("tcp", endpoint.Transport); 183Assert.Equal("tcp", endpoint.UriScheme); 190Assert.Equal("ORACLE_PWD", env.Key); 191Assert.Equal("pass", env.Value); 223Assert.Equal(expectedManifest, serverManifest.ToString()); 231Assert.Equal(expectedManifest, dbManifest.ToString()); 261Assert.Equal(expectedManifest, serverManifest.ToString()); 297Assert.Equal("customers1", db1.Resource.DatabaseName); 298Assert.Equal("customers2", db2.Resource.DatabaseName); 300Assert.Equal("{oracle1.connectionString}/customers1", db1.Resource.ConnectionStringExpression.ValueExpression); 301Assert.Equal("{oracle1.connectionString}/customers2", db2.Resource.ConnectionStringExpression.ValueExpression); 315Assert.Equal("imports", db1.Resource.DatabaseName); 316Assert.Equal("imports", db2.Resource.DatabaseName); 318Assert.Equal("{oracle1.connectionString}/imports", db1.Resource.ConnectionStringExpression.ValueExpression); 319Assert.Equal("{oracle2.connectionString}/imports", db2.Resource.ConnectionStringExpression.ValueExpression);
OracleFunctionalTests.cs (2)
68Assert.Equal("BatMobile", cars[0].Brand); 330Assert.Equal("BatMobile", brands[0].Brand);
Aspire.Hosting.PostgreSQL.Tests (95)
AddPostgresTests.cs (76)
32Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", pg.Resource.PasswordParameter.Default?.GetType().FullName); 56Assert.Equal("myPostgres", containerResource.Name); 66Assert.Equal("tcp", endpoint.Name); 69Assert.Equal("tcp", endpoint.Transport); 70Assert.Equal("tcp", endpoint.UriScheme); 77Assert.Equal("POSTGRES_HOST_AUTH_METHOD", env.Key); 78Assert.Equal("scram-sha-256", env.Value); 82Assert.Equal("POSTGRES_INITDB_ARGS", env.Key); 83Assert.Equal("--auth-host=scram-sha-256 --auth-local=scram-sha-256", env.Value); 87Assert.Equal("POSTGRES_USER", env.Key); 88Assert.Equal("postgres", env.Value); 92Assert.Equal("POSTGRES_PASSWORD", env.Key); 111Assert.Equal("myPostgres", containerResource.Name); 121Assert.Equal("tcp", endpoint.Name); 124Assert.Equal("tcp", endpoint.Transport); 125Assert.Equal("tcp", endpoint.UriScheme); 132Assert.Equal("POSTGRES_HOST_AUTH_METHOD", env.Key); 133Assert.Equal("scram-sha-256", env.Value); 137Assert.Equal("POSTGRES_INITDB_ARGS", env.Key); 138Assert.Equal("--auth-host=scram-sha-256 --auth-local=scram-sha-256", env.Value); 142Assert.Equal("POSTGRES_USER", env.Key); 143Assert.Equal("postgres", env.Value); 147Assert.Equal("POSTGRES_PASSWORD", env.Key); 148Assert.Equal("pass", env.Value); 162Assert.Equal("Host={postgres.bindings.tcp.host};Port={postgres.bindings.tcp.port};Username=postgres;Password={postgres-password.value}", connectionStringResource.ConnectionStringExpression.ValueExpression); 163Assert.Equal($"Host=localhost;Port=2000;Username=postgres;Password={postgres.Resource.PasswordParameter.Value}", connectionString); 184Assert.Equal("{postgres.connectionString};Database=db", postgresDatabaseResource.ConnectionStringExpression.ValueExpression); 185Assert.Equal(postgresConnectionString + ";Database=db", dbConnectionString); 203Assert.Equal("postgres", containerResource.Name); 213Assert.Equal("tcp", endpoint.Name); 216Assert.Equal("tcp", endpoint.Transport); 217Assert.Equal("tcp", endpoint.UriScheme); 224Assert.Equal("POSTGRES_HOST_AUTH_METHOD", env.Key); 225Assert.Equal("scram-sha-256", env.Value); 229Assert.Equal("POSTGRES_INITDB_ARGS", env.Key); 230Assert.Equal("--auth-host=scram-sha-256 --auth-local=scram-sha-256", env.Value); 234Assert.Equal("POSTGRES_USER", env.Key); 235Assert.Equal("postgres", env.Value); 239Assert.Equal("POSTGRES_PASSWORD", env.Key); 240Assert.Equal("pass", env.Value); 275Assert.Equal(expectedManifest, serverManifest.ToString()); 283Assert.Equal(expectedManifest, dbManifest.ToString()); 318Assert.Equal(expectedManifest, serverManifest.ToString()); 344Assert.Equal(expectedManifest, serverManifest.ToString()); 370Assert.Equal(expectedManifest, serverManifest.ToString()); 384Assert.Equal("/pgadmin4/servers.json", volume.Target); 410Assert.Equal("example.mycompany.com", containerAnnotation.Registry); 411Assert.Equal("customrediscommander", containerAnnotation.Image); 412Assert.Equal("someothertag", containerAnnotation.Tag); 438Assert.Equal("8.3", imageAnnotation.Tag); 475Assert.Equal(pg1.Resource.Name, servers.GetProperty("1").GetProperty("Name").GetString()); 476Assert.Equal("Servers", servers.GetProperty("1").GetProperty("Group").GetString()); 477Assert.Equal("mypostgres1", servers.GetProperty("1").GetProperty("Host").GetString()); 479Assert.Equal("postgres", servers.GetProperty("1").GetProperty("Username").GetString()); 480Assert.Equal("prefer", servers.GetProperty("1").GetProperty("SSLMode").GetString()); 481Assert.Equal("postgres", servers.GetProperty("1").GetProperty("MaintenanceDB").GetString()); 482Assert.Equal($"echo '{pg1.Resource.PasswordParameter.Value}'", servers.GetProperty("1").GetProperty("PasswordExecCommand").GetString()); 485Assert.Equal(pg2.Resource.Name, servers.GetProperty("2").GetProperty("Name").GetString()); 486Assert.Equal("Servers", servers.GetProperty("2").GetProperty("Group").GetString()); 487Assert.Equal("mypostgres2", servers.GetProperty("2").GetProperty("Host").GetString()); 489Assert.Equal("postgres", servers.GetProperty("2").GetProperty("Username").GetString()); 490Assert.Equal("prefer", servers.GetProperty("2").GetProperty("SSLMode").GetString()); 491Assert.Equal("postgres", servers.GetProperty("2").GetProperty("MaintenanceDB").GetString()); 492Assert.Equal($"echo '{pg2.Resource.PasswordParameter.Value}'", servers.GetProperty("2").GetProperty("PasswordExecCommand").GetString()); 522Assert.Equal(".toml", Path.GetExtension(filePath)); 526Assert.Equal(".toml", Path.GetExtension(filePath)); 540Assert.Equal(CreatePgWebBookmarkfileContent(db1.Resource), content); 544Assert.Equal(CreatePgWebBookmarkfileContent(db2.Resource), content); 581Assert.Equal("customers1", db1.Resource.DatabaseName); 582Assert.Equal("customers2", db2.Resource.DatabaseName); 584Assert.Equal("{postgres1.connectionString};Database=customers1", db1.Resource.ConnectionStringExpression.ValueExpression); 585Assert.Equal("{postgres1.connectionString};Database=customers2", db2.Resource.ConnectionStringExpression.ValueExpression); 599Assert.Equal("imports", db1.Resource.DatabaseName); 600Assert.Equal("imports", db2.Resource.DatabaseName); 602Assert.Equal("{postgres1.connectionString};Database=imports", db1.Resource.ConnectionStringExpression.ValueExpression); 603Assert.Equal("{postgres2.connectionString};Database=imports", db2.Resource.ConnectionStringExpression.ValueExpression);
PostgrePublicApiTests.cs (17)
22Assert.Equal(nameof(builder), exception.ParamName); 35Assert.Equal(nameof(name), exception.ParamName); 47Assert.Equal(nameof(builder), exception.ParamName); 59Assert.Equal(nameof(name), exception.ParamName); 70Assert.Equal(nameof(name), exception.ParamName); 85Assert.Equal(nameof(databaseName), exception.ParamName); 100Assert.Equal(nameof(name), exception.ParamName); 113Assert.Equal(nameof(postgresParentResource), exception.ParamName); 126Assert.Equal(nameof(name), exception.ParamName); 138Assert.Equal(nameof(password), exception.ParamName); 150Assert.Equal(nameof(builder), exception.ParamName); 163Assert.Equal(nameof(source), exception.ParamName); 174Assert.Equal(nameof(builder), exception.ParamName); 185Assert.Equal(nameof(builder), exception.ParamName); 197Assert.Equal(nameof(builder), exception.ParamName); 210Assert.Equal(nameof(source), exception.ParamName); 221Assert.Equal(nameof(builder), exception.ParamName);
PostgresFunctionalTests.cs (2)
319Assert.Equal("BatMobile", results.GetString("brand")); 419Assert.Equal("BatMobile", results.GetString("brand"));
Aspire.Hosting.Python.Tests (30)
AddPythonAppTests.cs (16)
123Assert.Equal("test", environmentVariables["ConnectionStrings__connectionString"]); 145Assert.Equal("pythonProject", pythonProjectResource.Name); 150Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command); 154Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command); 184Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "opentelemetry-instrument.exe"), pythonProjectResource.Command); 188Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "opentelemetry-instrument"), pythonProjectResource.Command); 191Assert.Equal("--traces_exporter", commandArguments[0]); 192Assert.Equal("otlp", commandArguments[1]); 193Assert.Equal("--logs_exporter", commandArguments[2]); 194Assert.Equal("console,otlp", commandArguments[3]); 195Assert.Equal("--metrics_exporter", commandArguments[4]); 196Assert.Equal("otlp", commandArguments[5]); 220Assert.Equal("pythonProject", pythonProjectResource.Name); 225Assert.Equal(Path.Join(projectDirectory, ".venv", "Scripts", "python.exe"), pythonProjectResource.Command); 229Assert.Equal(Path.Join(projectDirectory, ".venv", "bin", "python"), pythonProjectResource.Command); 235Assert.Equal("test", commandArguments[1]);
PythonPublicApiTests.cs (14)
21Assert.Equal(nameof(name), exception.ParamName); 34Assert.Equal(nameof(executablePath), exception.ParamName); 47Assert.Equal(nameof(projectDirectory), exception.ParamName); 66Assert.Equal(nameof(builder), exception.ParamName); 85Assert.Equal(nameof(name), exception.ParamName); 104Assert.Equal(nameof(projectDirectory), exception.ParamName); 123Assert.Equal(nameof(scriptPath), exception.ParamName); 142Assert.Equal(nameof(scriptArgs), exception.ParamName); 163Assert.Equal(nameof(builder), exception.ParamName); 184Assert.Equal(nameof(name), exception.ParamName); 205Assert.Equal(nameof(projectDirectory), exception.ParamName); 226Assert.Equal(nameof(scriptPath), exception.ParamName); 247Assert.Equal(nameof(virtualEnvironmentPath), exception.ParamName); 268Assert.Equal(nameof(scriptArgs), exception.ParamName);
Aspire.Hosting.Qdrant.Tests (42)
AddQdrantTests.cs (33)
25Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", qd.Resource.ApiKeyParameter.Default?.GetType().FullName); 49Assert.Equal("my-qdrant", containerResource.Name); 52Assert.Equal(QdrantContainerImageTags.Tag, containerAnnotation.Tag); 53Assert.Equal(QdrantContainerImageTags.Image, containerAnnotation.Image); 54Assert.Equal(QdrantContainerImageTags.Registry, containerAnnotation.Registry); 61Assert.Equal("grpc", endpoint.Name); 64Assert.Equal("http2", endpoint.Transport); 65Assert.Equal("http", endpoint.UriScheme); 72Assert.Equal("QDRANT__SERVICE__API_KEY", env.Key); 88Assert.Equal("my-qdrant", containerResource.Name); 91Assert.Equal(QdrantContainerImageTags.Tag, containerAnnotation.Tag); 92Assert.Equal(QdrantContainerImageTags.Image, containerAnnotation.Image); 93Assert.Equal(QdrantContainerImageTags.Registry, containerAnnotation.Registry); 101Assert.Equal("http", endpoint.Name); 104Assert.Equal("http", endpoint.Transport); 105Assert.Equal("http", endpoint.UriScheme); 122Assert.Equal("my-qdrant", containerResource.Name); 125Assert.Equal(QdrantContainerImageTags.Tag, containerAnnotation.Tag); 126Assert.Equal(QdrantContainerImageTags.Image, containerAnnotation.Image); 127Assert.Equal(QdrantContainerImageTags.Registry, containerAnnotation.Registry); 134Assert.Equal("grpc", endpoint.Name); 137Assert.Equal("http2", endpoint.Transport); 138Assert.Equal("http", endpoint.UriScheme); 145Assert.Equal("QDRANT__SERVICE__API_KEY", env.Key); 146Assert.Equal("pass", env.Value); 164Assert.Equal($"Endpoint=http://localhost:6334;Key=pass", connectionString); 237Assert.Equal(expectedManifest, serverManifest.ToString()); 275Assert.Equal(expectedManifest, serverManifest.ToString()); 290Assert.Equal("my-qdrant", qdrantResource.Name); 299Assert.Equal("http2", grpcEndpoint.Transport); 300Assert.Equal("http", grpcEndpoint.UriScheme); 307Assert.Equal("http", httpEndpoint.Transport); 308Assert.Equal("http", httpEndpoint.UriScheme);
QdrantPublicApiTests.cs (9)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 44Assert.Equal(nameof(builder), exception.ParamName); 56Assert.Equal(nameof(builder), exception.ParamName); 69Assert.Equal(nameof(source), exception.ParamName); 82Assert.Equal(nameof(builder), exception.ParamName); 95Assert.Equal(nameof(qdrantResource), exception.ParamName); 109Assert.Equal(nameof(name), exception.ParamName); 121Assert.Equal(nameof(apiKey), exception.ParamName);
Aspire.Hosting.RabbitMQ.Tests (29)
AddRabbitMQTests.cs (18)
21Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", rmq.Resource.PasswordParameter.Default?.GetType().FullName); 54Assert.Equal("rabbit", containerResource.Name); 59Assert.Equal("tcp", primaryEndpoint.Name); 62Assert.Equal("tcp", primaryEndpoint.Transport); 63Assert.Equal("tcp", primaryEndpoint.UriScheme); 70Assert.Equal("management", mangementEndpoint.Name); 72Assert.Equal("http", mangementEndpoint.Transport); 73Assert.Equal("http", mangementEndpoint.UriScheme); 86Assert.Equal(RabbitMQContainerImageTags.Image, containerAnnotation.Image); 87Assert.Equal(withManagementPlugin ? RabbitMQContainerImageTags.TagManagement : RabbitMQContainerImageTags.Tag, containerAnnotation.Tag); 88Assert.Equal(RabbitMQContainerImageTags.Registry, containerAnnotation.Registry); 110Assert.Equal("amqp://guest:p@ssw0rd1@localhost:27011", connectionString); 111Assert.Equal("amqp://guest:{pass.value}@{rabbit.bindings.tcp.host}:{rabbit.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 142Assert.Equal(expectedTag, containerAnnotation.Tag); 239Assert.Equal(expectedManifest, manifest.ToString()); 272Assert.Equal(expectedManifest, manifest.ToString()); 296Assert.Equal(expectedManifest, manifest.ToString()); 320Assert.Equal(expectedManifest, manifest.ToString());
RabbitMQFunctionalTests.cs (2)
93Assert.Equal(message, Encoding.UTF8.GetString(result.Body.Span)); 207Assert.Equal("Hello World!", Encoding.UTF8.GetString(result.Body.Span));
RabbitMQPublicApiTests.cs (9)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 44Assert.Equal(nameof(builder), exception.ParamName); 56Assert.Equal(nameof(builder), exception.ParamName); 69Assert.Equal(nameof(source), exception.ParamName); 80Assert.Equal(nameof(builder), exception.ParamName); 91Assert.Equal(nameof(builder), exception.ParamName); 104Assert.Equal(nameof(name), exception.ParamName); 117Assert.Equal(nameof(password), exception.ParamName);
Aspire.Hosting.Redis.Tests (43)
AddRedisTests.cs (22)
34Assert.Equal("myRedis", containerResource.Name); 39Assert.Equal("tcp", endpoint.Name); 42Assert.Equal("tcp", endpoint.Transport); 43Assert.Equal("tcp", endpoint.UriScheme); 62Assert.Equal("myRedis", containerResource.Name); 67Assert.Equal("tcp", endpoint.Name); 70Assert.Equal("tcp", endpoint.Transport); 71Assert.Equal("tcp", endpoint.UriScheme); 92Assert.Equal("{myRedis.bindings.tcp.host}:{myRedis.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 119Assert.Equal(expectedManifest, manifest.ToString()); 155Assert.Equal("example.mycompany.com", containerAnnotation.Registry); 156Assert.Equal("customrediscommander", containerAnnotation.Image); 157Assert.Equal("someothertag", containerAnnotation.Tag); 173Assert.Equal("example.mycompany.com", containerAnnotation.Registry); 174Assert.Equal("customrediscommander", containerAnnotation.Image); 175Assert.Equal("someothertag", containerAnnotation.Tag); 225Assert.Equal($"myredis1:{redis.Resource.Name}:6379:0", config["REDIS_HOSTS"]); 249Assert.Equal($"myredis1:{redis1.Resource.Name}:6379:0,myredis2:myredis2:6379:0", config["REDIS_HOSTS"]); 271Assert.Equal($"{builder.GetVolumePrefix()}-myRedis-data", volumeAnnotation.Source); 272Assert.Equal("/data", volumeAnnotation.Target); 296Assert.Equal(Path.Combine(builder.AppHostDirectory, "mydata"), volumeAnnotation.Source); 297Assert.Equal("/data", volumeAnnotation.Target);
RedisFunctionalTests.cs (9)
121Assert.Equal("value", value); 155Assert.Equal(redis1.Resource.Name, db.Name); 156Assert.Equal(redis1.Resource.Name, db.Host); 158Assert.Equal("STANDALONE", db.ConnectionType); 163Assert.Equal(redis2.Resource.Name, db.Name); 164Assert.Equal(redis2.Resource.Name, db.Host); 166Assert.Equal("STANDALONE", db.ConnectionType); 305Assert.Equal("value", value); 390Assert.Equal("value", value);
RedisPublicApiTests.cs (12)
23Assert.Equal(nameof(builder), exception.ParamName); 35Assert.Equal(nameof(name), exception.ParamName); 46Assert.Equal(nameof(builder), exception.ParamName); 57Assert.Equal(nameof(builder), exception.ParamName); 69Assert.Equal(nameof(builder), exception.ParamName); 81Assert.Equal(nameof(builder), exception.ParamName); 92Assert.Equal(nameof(builder), exception.ParamName); 104Assert.Equal(nameof(builder), exception.ParamName); 117Assert.Equal(nameof(source), exception.ParamName); 128Assert.Equal(nameof(builder), exception.ParamName); 143Assert.Equal(nameof(name), exception.ParamName); 158Assert.Equal(nameof(name), exception.ParamName);
Aspire.Hosting.Sdk.Tests (1)
NuGetUtils.Tests.cs (1)
34Assert.Equal(expectedRID, result);
Aspire.Hosting.SqlServer.Tests (42)
AddSqlServerTests.cs (26)
22Assert.Equal("Aspire.Hosting.ApplicationModel.UserSecretsParameterDefault", sql.Resource.PasswordParameter.Default?.GetType().FullName); 47Assert.Equal("sqlserver", containerResource.Name); 52Assert.Equal("tcp", endpoint.Name); 55Assert.Equal("tcp", endpoint.Transport); 56Assert.Equal("tcp", endpoint.UriScheme); 59Assert.Equal(SqlServerContainerImageTags.Tag, containerAnnotation.Tag); 60Assert.Equal(SqlServerContainerImageTags.Image, containerAnnotation.Image); 61Assert.Equal(SqlServerContainerImageTags.Registry, containerAnnotation.Registry); 68Assert.Equal("ACCEPT_EULA", env.Key); 69Assert.Equal("Y", env.Value); 73Assert.Equal("MSSQL_SA_PASSWORD", env.Key); 97Assert.Equal("Server=127.0.0.1,1433;User ID=sa;Password=p@ssw0rd1;TrustServerCertificate=true", connectionString); 98Assert.Equal("Server={sqlserver.bindings.tcp.host},{sqlserver.bindings.tcp.port};User ID=sa;Password={pass.value};TrustServerCertificate=true", connectionStringResource.ConnectionStringExpression.ValueExpression); 121Assert.Equal("Server=127.0.0.1,1433;User ID=sa;Password=p@ssw0rd1;TrustServerCertificate=true;Database=mydb", connectionString); 122Assert.Equal("{sqlserver.connectionString};Database=mydb", connectionStringResource.ConnectionStringExpression.ValueExpression); 154Assert.Equal(expectedManifest, serverManifest.ToString()); 162Assert.Equal(expectedManifest, dbManifest.ToString()); 194Assert.Equal(expectedManifest, serverManifest.ToString()); 230Assert.Equal("customers1", db1.Resource.DatabaseName); 231Assert.Equal("customers2", db2.Resource.DatabaseName); 233Assert.Equal("{sqlserver1.connectionString};Database=customers1", db1.Resource.ConnectionStringExpression.ValueExpression); 234Assert.Equal("{sqlserver1.connectionString};Database=customers2", db2.Resource.ConnectionStringExpression.ValueExpression); 248Assert.Equal("imports", db1.Resource.DatabaseName); 249Assert.Equal("imports", db2.Resource.DatabaseName); 251Assert.Equal("{sqlserver1.connectionString};Database=imports", db1.Resource.ConnectionStringExpression.ValueExpression); 252Assert.Equal("{sqlserver2.connectionString};Database=imports", db2.Resource.ConnectionStringExpression.ValueExpression);
SqlServerFunctionalTests.cs (2)
115Assert.Equal("BatMobile", cars[0].Brand); 292Assert.Equal("BatMobile", results.GetString(0));
SqlServerPublicApiTests.cs (14)
21Assert.Equal(nameof(builder), exception.ParamName); 33Assert.Equal(nameof(name), exception.ParamName); 45Assert.Equal(nameof(builder), exception.ParamName); 58Assert.Equal(nameof(name), exception.ParamName); 71Assert.Equal(nameof(name), exception.ParamName); 82Assert.Equal(nameof(builder), exception.ParamName); 94Assert.Equal(nameof(builder), exception.ParamName); 107Assert.Equal(nameof(source), exception.ParamName); 121Assert.Equal(nameof(name), exception.ParamName); 136Assert.Equal(nameof(name), exception.ParamName); 151Assert.Equal(nameof(name), exception.ParamName); 166Assert.Equal(nameof(databaseName), exception.ParamName); 181Assert.Equal(nameof(databaseName), exception.ParamName); 196Assert.Equal(nameof(parent), exception.ParamName);
Aspire.Hosting.Testing.Tests (18)
PublicApiTests.cs (3)
15Assert.Equal("entryPoint", ane.ParamName); 28Assert.Equal("args", ane.ParamName); 41Assert.Equal("configureBuilder", ane.ParamName);
ResourceLoggerForwarderServiceTests.cs (12)
119log => { Assert.Equal(LogLevel.Information, log.Level); Assert.Equal("1: 2000-12-29T20:59:59.0000000Z Test trace message", log.Message); Assert.Equal("TestApp.AppHost.Resources.myresource", log.Category); }, 120log => { Assert.Equal(LogLevel.Information, log.Level); Assert.Equal("2: 2000-12-29T20:59:59.0000000Z Test debug message", log.Message); Assert.Equal("TestApp.AppHost.Resources.myresource", log.Category); }, 121log => { Assert.Equal(LogLevel.Information, log.Level); Assert.Equal("3: 2000-12-29T20:59:59.0000000Z Test information message", log.Message); Assert.Equal("TestApp.AppHost.Resources.myresource", log.Category); }, 122log => { Assert.Equal(LogLevel.Information, log.Level); Assert.Equal("4: 2000-12-29T20:59:59.0000000Z Test warning message", log.Message); Assert.Equal("TestApp.AppHost.Resources.myresource", log.Category); }, 123log => { Assert.Equal(LogLevel.Error, log.Level); Assert.Equal("5: 2000-12-29T20:59:59.0000000Z Test error message", log.Message); Assert.Equal("TestApp.AppHost.Resources.myresource", log.Category); }, 124log => { Assert.Equal(LogLevel.Error, log.Level); Assert.Equal("6: 2000-12-29T20:59:59.0000000Z Test critical message", log.Message); Assert.Equal("TestApp.AppHost.Resources.myresource", log.Category); });
TestingBuilderTests.cs (2)
91Assert.Equal(nonExistantRegistry, containerImageAnnotation!.Registry); 198Assert.Equal("https", profileName);
TestingFactoryTests.cs (1)
72Assert.Equal("https", profileName);
Aspire.Hosting.Tests (311)
AddParameterTests.cs (18)
38Assert.Equal("parameter.secret", prop.Name); 43Assert.Equal(CustomResourceKnownProperties.Source, prop.Name); 48Assert.Equal("Value", prop.Name); 72Assert.Equal("Configuration missing", state.State.Text); 73Assert.Equal(KnownResourceStateStyles.Error, state.State.Style); 77Assert.Equal("parameter.secret", prop.Name); 82Assert.Equal(CustomResourceKnownProperties.Source, prop.Name); 87Assert.Equal("Value", prop.Name); 112Assert.Equal("ValueFromConfiguration", parameterResource.Value); 147Assert.Equal($"DefaultValue", parameterResource.Value); 162Assert.Equal(expectedManifest, paramManifest.ToString()); 197Assert.Equal($"DefaultValue", parameterResource.Value); 215Assert.Equal(expectedManifest, paramManifest.ToString()); 225Assert.Equal($"A parameter cannot be both secret and published as a default value. (Parameter 'secret')", ex1.Message); 227Assert.Equal($"A parameter cannot be both secret and published as a default value. (Parameter 'secret')", ex2.Message); 275Assert.Equal(expectedManifest, paramManifest.ToString()); 310Assert.Equal($"MyAccessToken", parameterResource.Value); 325Assert.Equal(expectedManifest, paramManifest.ToString());
Dashboard\DashboardLifecycleHookTests.cs (2)
69Assert.Equal(expectedCategory, logContext.LoggerName); 70Assert.Equal(expectedMessage, logContext.Message);
Dashboard\DashboardResourceTests.cs (25)
47Assert.Equal("aspire-dashboard", dashboard.Name); 48Assert.Equal(dashboardPath, dashboard.Command); 66r => Assert.Equal("aspire-dashboard", r.Name), 67r => Assert.Equal("my-container", r.Name) 103Assert.Equal("ASPNETCORE_ENVIRONMENT", e.Key); 104Assert.Equal("Production", e.Value); 108Assert.Equal("ASPNETCORE_URLS", e.Key); 109Assert.Equal("http://localhost", e.Value); 113Assert.Equal("DOTNET_RESOURCE_SERVICE_ENDPOINT_URL", e.Key); 114Assert.Equal("http://localhost:5000", e.Value); 118Assert.Equal("DOTNET_DASHBOARD_OTLP_ENDPOINT_URL", e.Key); 119Assert.Equal("http://localhost", e.Value); 123Assert.Equal("DASHBOARD__FRONTEND__AUTHMODE", e.Key); 124Assert.Equal("Unsecured", e.Value); 128Assert.Equal("DASHBOARD__RESOURCESERVICECLIENT__AUTHMODE", e.Key); 129Assert.Equal("Unsecured", e.Value); 133Assert.Equal("DASHBOARD__OTLP__AUTHMODE", e.Key); 134Assert.Equal("Unsecured", e.Value); 138Assert.Equal("LOGGING__CONSOLE__FORMATTERNAME", e.Key); 139Assert.Equal("json", e.Value); 167Assert.Equal("aspire-dashboard", dashboard.Name); 168Assert.Equal("dotnet", dashboard.Command); 427Assert.Equal("aspire-dashboard", dashboard.Name); 456Assert.Equal("Test dashboard message", log.Message); 482Assert.Equal("aspire-dashboard", dashboard.Name);
Dashboard\TransportOptionsValidatorTests.cs (10)
26Assert.Equal( 99Assert.Equal( 118Assert.Equal( 138Assert.Equal( 160Assert.Equal( 182Assert.Equal( 205Assert.Equal( 230Assert.Equal( 254Assert.Equal( 276Assert.Equal(
Dcp\ApplicationExecutorTests.cs (7)
432Assert.Equal("2024-08-19T06:10:33.4732759Z Hello world", logLine.Content); 443Assert.Equal("2024-08-19T06:10:32.6610000Z Next", logLine.Content); 449l => Assert.Equal("Next", l.Content), 450l => Assert.Equal("Hello world", l.Content)); 940a => Assert.Equal(CommandsConfigurationExtensions.StartType, a.Type), 941a => Assert.Equal(CommandsConfigurationExtensions.StopType, a.Type), 942a => Assert.Equal(CommandsConfigurationExtensions.RestartType, a.Type));
Dcp\DcpCliArgsTests.cs (3)
57Assert.Equal("not-a-valid-container-runtime", dcpOptions.ContainerRuntime); 59Assert.Equal("/not/a/valid/path", dcpOptions.CliPath); 60Assert.Equal("/not/a/valid/path", dcpOptions.DashboardPath);
DistributedApplicationBuilderTests.cs (9)
70Assert.Equal("manifest", publishOptions.Value.Publisher); 71Assert.Equal("/tmp/", publishOptions.Value.OutputPath); 83Assert.Equal("docker", publishOptions.Value.Publisher); 84Assert.Equal("/path/", publishOptions.Value.OutputPath); 95Assert.Equal(appHostDirectory, config["AppHost:Directory"]); 106Assert.Equal("Cannot add resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with name 'Test' because resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with that name already exists. Resource names are case-insensitive.", ex.Message); 117Assert.Equal("Cannot add resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with name 'TEST' because resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with that name already exists. Resource names are case-insensitive.", ex.Message); 129Assert.Equal("Multiple resources with the name 'Test'. Resource names are case-insensitive.", ex.Message); 141Assert.Equal("Multiple resources with the name 'Test'. Resource names are case-insensitive.", ex.Message);
DistributedApplicationTests.cs (16)
61Assert.Equal(exceptionMessage, ex.Message); 102Assert.Equal(exceptionMessage, ex.Message); 125Assert.Equal(exceptionMessage, ex.InnerExceptions.First().Message); 385Assert.Equal("6379", GetEnv(redisContainer.Spec.Env, "REDIS_PORT")); 386Assert.Equal("6379", GetEnv(redisContainer.Status!.EffectiveEnv, "REDIS_PORT")); 388Assert.Equal($"{{{{- portForServing \"servicea-http0-{suffix}\" -}}}}", GetEnv(serviceA.Spec.Env, "PORT0")); 393Assert.Equal($"{{{{- portForServing \"nodeapp-{suffix}\" -}}}}", GetEnv(nodeApp.Spec.Env, "PORT")); 434Assert.Equal("BrowserToken", GetEnv(aspireDashboard.Spec.Env, "DASHBOARD__FRONTEND__AUTHMODE")); 435Assert.Equal("ThisIsATestToken", GetEnv(aspireDashboard.Spec.Env, "DASHBOARD__FRONTEND__BROWSERTOKEN")); 437Assert.Equal("ApiKey", GetEnv(aspireDashboard.Spec.Env, "DASHBOARD__OTLP__AUTHMODE")); 476Assert.Equal("Unsecured", GetEnv(aspireDashboard.Spec.Env, "DASHBOARD__FRONTEND__AUTHMODE")); 477Assert.Equal("Unsecured", GetEnv(aspireDashboard.Spec.Env, "DASHBOARD__OTLP__AUTHMODE")); 699Assert.Equal($"Resource 'servicea-{suffix}' uses multiple replicas and a proxy-less endpoint 'http'. These features do not work together.", ex.Message); 718Assert.Equal($"Service 'servicea-{suffix}' needs to specify a port for endpoint 'http' since it isn't using a proxy.", ex.Message); 808Assert.Equal(urls, value); 887Assert.Equal($"The endpoint 'tcp' for container resource 'dummyRedis-{suffix}' must specify the TargetPort value", ex.Message);
ExecutableResourceTests.cs (8)
41arg => Assert.Equal("app.py", arg), 42arg => Assert.Equal("http://localhost:1234", arg), 43arg => Assert.Equal("arg1", arg), 44arg => Assert.Equal("connectionString", arg), 45arg => Assert.Equal("arg2", arg), 46arg => Assert.Equal("http://localhost:1234", arg), 47arg => Assert.Equal("anotherConnectionString", arg) 70Assert.Equal(expectedManifest, manifest.ToString());
HealthCheckTests.cs (1)
34Assert.Equal("A health check registration is missing. Check logs for more details.", ex.Message);
KestrelConfigTests.cs (29)
28Assert.Equal("http", a.Name); 29Assert.Equal("http", a.UriScheme); 34Assert.Equal("ExplicitHttp", a.Name); 46Assert.Equal("http://*:port_http", config["Kestrel__Endpoints__http__Url"]); 64Assert.Equal("http", a.Name); 65Assert.Equal("http", a.UriScheme); 70Assert.Equal("ExplicitHttp", a.Name); 71Assert.Equal("http", a.UriScheme); 81Assert.Equal("http://localhost:port_http;http://localhost:port_ExplicitHttp", config["ASPNETCORE_URLS"]); 97Assert.Equal("https", a.Name); 98Assert.Equal("https", a.UriScheme); 114Assert.Equal("FirstHttpEndpoint", a.Name); 115Assert.Equal("http", a.UriScheme); 118Assert.Equal("http", a.Transport); 122Assert.Equal("SecondHttpEndpoint", a.Name); 123Assert.Equal("http", a.UriScheme); 125Assert.Equal("http2", a.Transport); 149Assert.Equal("Kestrel__Endpoints__FirstHttpEndpoint__Url", envVar.Key); 150Assert.Equal("http://*:port_FirstHttpEndpoint", envVar.Value); 154Assert.Equal("Kestrel__Endpoints__SecondHttpEndpoint__Url", envVar.Key); 156Assert.Equal("http://localhost:port_SecondHttpEndpoint", envVar.Value); 160Assert.Equal("Kestrel__Endpoints__ExplicitProxiedHttp__Url", envVar.Key); 161Assert.Equal("http://*:port_ExplicitProxiedHttp", envVar.Value); 165Assert.Equal("Kestrel__Endpoints__ExplicitNoProxyHttp__Url", envVar.Key); 166Assert.Equal("http://*:5018", envVar.Value); 206Assert.Equal(expectedManifest, manifest.ToString()); 273Assert.Equal(expectedManifest, manifest.ToString()); 304Assert.Equal(expectedEnv, manifest["env"]!.ToString()); 344Assert.Equal(expectedBindings, manifest!["bindings"]!.ToString());
ManifestGenerationTests.cs (4)
106Assert.Equal(expectedManifest, redisManifest.ToString()); 197verify.Add(arg => Assert.Equal(addExecutableArg, arg.GetString())); 202verify.Add(arg => Assert.Equal(withArgsArg, arg.GetString())); 556Assert.Equal(expectedManifest, manifest.ToString());
ModelNameTests.cs (9)
17Assert.Equal("Value cannot be null. (Parameter 'name')", exception.Message); 27Assert.Equal($"Resource name '' is invalid. Name must be between 1 and 64 characters long. (Parameter 'name')", exception.Message); 38Assert.Equal($"Resource name '{name}' is invalid. Name must be between 1 and 64 characters long. (Parameter 'name')", exception.Message); 48Assert.Equal("Resource name ' ' is invalid. Name must contain only ASCII letters, digits, and hyphens. (Parameter 'name')", exception.Message); 58Assert.Equal("Resource name 'test_name' is invalid. Name must contain only ASCII letters, digits, and hyphens. (Parameter 'name')", exception.Message); 68Assert.Equal("Resource name '-abc' is invalid. Name must start with an ASCII letter. (Parameter 'name')", exception.Message); 78Assert.Equal("Resource name 'test--name' is invalid. Name cannot contain consecutive hyphens. (Parameter 'name')", exception.Message); 88Assert.Equal("Resource name '1abc' is invalid. Name must start with an ASCII letter. (Parameter 'name')", exception.Message); 98Assert.Equal("Resource name 'abc-' is invalid. Name cannot end with a hyphen. (Parameter 'name')", exception.Message);
ProjectResourceTests.cs (58)
29Assert.Equal(expectedMessage, ex.Message); 72Assert.Equal("projectName", resource.Name); 82Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES", env.Key); 83Assert.Equal("true", env.Value); 87Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES", env.Key); 88Assert.Equal("true", env.Value); 92Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY", env.Key); 93Assert.Equal("in_memory", env.Value); 97Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTION", env.Key); 98Assert.Equal("true", env.Value); 102Assert.Equal("OTEL_DOTNET_EXPERIMENTAL_HTTPCLIENT_DISABLE_URL_QUERY_REDACTION", env.Key); 103Assert.Equal("true", env.Value); 107Assert.Equal("OTEL_EXPORTER_OTLP_ENDPOINT", env.Key); 108Assert.Equal("http://localhost:18889", env.Value); 112Assert.Equal("OTEL_EXPORTER_OTLP_PROTOCOL", env.Key); 113Assert.Equal("grpc", env.Value); 117Assert.Equal("OTEL_RESOURCE_ATTRIBUTES", env.Key); 118Assert.Equal("service.instance.id={{- index .Annotations \"otel-service-instance-id\" -}}", env.Value); 122Assert.Equal("OTEL_SERVICE_NAME", env.Key); 123Assert.Equal("{{- index .Annotations \"otel-service-name\" -}}", env.Value); 127Assert.Equal("OTEL_EXPORTER_OTLP_HEADERS", env.Key); 129Assert.Equal("x-otlp-api-key", parts[0]); 134Assert.Equal("OTEL_BLRP_SCHEDULE_DELAY", env.Key); 135Assert.Equal("1000", env.Value); 139Assert.Equal("OTEL_BSP_SCHEDULE_DELAY", env.Key); 140Assert.Equal("1000", env.Value); 144Assert.Equal("OTEL_METRIC_EXPORT_INTERVAL", env.Key); 145Assert.Equal("1000", env.Value); 149Assert.Equal("OTEL_TRACES_SAMPLER", env.Key); 150Assert.Equal("always_on", env.Value); 154Assert.Equal("OTEL_METRICS_EXEMPLAR_FILTER", env.Key); 155Assert.Equal("trace_based", env.Value); 159Assert.Equal("DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION", env.Key); 160Assert.Equal("true", env.Value); 164Assert.Equal("LOGGING__CONSOLE__FORMATTERNAME", env.Key); 165Assert.Equal("simple", env.Value); 186Assert.Equal("projectName", resource.Name); 253Assert.Equal("https", a.Name); 254Assert.Equal("https", a.UriScheme); 259Assert.Equal("http", a.Name); 260Assert.Equal("http", a.UriScheme); 271Assert.Equal("Project file 'another-path' was not found.", ex.Message); 280Assert.Equal("Launch settings file does not contain 'not-exist' profile.", ex.Message); 362Assert.Equal("http://localhost:p0;https://localhost:p1", config["ASPNETCORE_URLS"]); 363Assert.Equal("5001", config["ASPNETCORE_HTTPS_PORT"]); 364Assert.Equal("p2", config["SOME_ENV"]); 409Assert.Equal("http://localhost:p0", config["ASPNETCORE_URLS"]); 436Assert.Equal("https://localhost:p2;http://localhost:p0;http://localhost:p1;https://localhost:p3;https://localhost:p4", config["ASPNETCORE_URLS"]); 439Assert.Equal("7144", config["ASPNETCORE_HTTPS_PORT"]); 511Assert.Equal(expectedManifest, manifest.ToString()); 562Assert.Equal(expectedManifest, manifest.ToString()); 589arg => Assert.Equal("arg1", arg), 590arg => Assert.Equal("http://localhost:1234", arg)); 603Assert.Equal("*", e.TargetHost); 609Assert.Equal("*", e.TargetHost); 629Assert.Equal($"http://{expectedHost}:p0;https://{expectedHost}:p1", config["ASPNETCORE_URLS"]); 633Assert.Equal($"http://{expectedHost}:{http.TargetPort};https://{expectedHost}:{https.TargetPort}", config["ASPNETCORE_URLS"]); 636Assert.Equal(https.Port.ToString(), config["ASPNETCORE_HTTPS_PORT"]);
ReferenceExpressionTests.cs (6)
21Assert.Equal(expectedFormat, refExpression.Format); 25Assert.Equal(expectedExpression, expr); 39Assert.Equal(expected, expr); 50Assert.Equal(expected, expr); 62Assert.Equal(expected, expr); 70Assert.Equal("Test", expr);
ResourceExtensionsTests.cs (19)
76Assert.Equal("grafana/grafana@sha256:1adbcc2df3866ff5ec1d836e9d2220c904c7f98901b918d3cc5e1118ab1af991", imageName); 86Assert.Equal("grafana/grafana:10.3.1", imageName); 106Assert.Equal("discovery.type", env.Key); 107Assert.Equal("single-node", env.Value); 111Assert.Equal("xpack.security.enabled", env.Key); 112Assert.Equal("true", env.Value); 116Assert.Equal("ELASTIC_PASSWORD", env.Key); 117Assert.Equal("p@ssw0rd1", env.Value); 139Assert.Equal("discovery.type", env.Key); 140Assert.Equal("single-node", env.Value); 144Assert.Equal("xpack.security.enabled", env.Key); 145Assert.Equal("true", env.Value); 149Assert.Equal("ELASTIC_PASSWORD", env.Key); 150Assert.Equal("p@ssw0rd1", env.Value); 172Assert.Equal("discovery.type", env.Key); 173Assert.Equal("single-node", env.Value); 177Assert.Equal("xpack.security.enabled", env.Key); 178Assert.Equal("true", env.Value); 182Assert.Equal("{ElasticPassword.value}", env.Value);
ResourceLoggerServiceTests.cs (21)
34Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, world!", allLogs[0].Content); 37Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, error!", allLogs[1].Content); 48Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, world!", allLogs[0].Content); 49Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, error!", allLogs[1].Content); 79l => Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, world!", l.Content), 80l => Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, error!", l.Content)); 90l => Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, world!", l.Content), 91l => Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, error!", l.Content)); 115Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, world!", allLogs[0].Content); 118Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, error!", allLogs[1].Content); 129Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, world!", allLogs[0].Content); 130Assert.Equal("2000-12-29T20:59:59.0000000Z Hello, error!", allLogs[1].Content); 144Assert.Equal("2000-12-29T20:59:59.0000000Z The third log", allLogs[0].Content); 167Assert.Equal("2000-12-29T20:59:59.0000000Z Before watching!", allLogs[0].Content); 176Assert.Equal("2000-12-29T20:59:59.0000000Z While watching!", allLogs[0].Content); 187Assert.Equal("2000-12-29T20:59:59.0000000Z Before watching!", allLogs[0].Content); 188Assert.Equal("2000-12-29T20:59:59.0000000Z While watching!", allLogs[1].Content); 206Assert.Equal("2000-12-29T20:59:59.0000000Z Before watching!", allLogs[0].Content); 207Assert.Equal("2000-12-29T20:59:59.0000000Z While watching!", allLogs[1].Content); 208Assert.Equal("2000-12-29T20:59:59.0000000Z After watching!", allLogs[2].Content); 209Assert.Equal("2000-12-29T20:59:59.0000000Z While watching again!", allLogs[3].Content);
ResourceNotificationTests.cs (12)
34Assert.Equal("MyResource", state.ResourceType); 38Assert.Equal("A", c.Name); 80Assert.Equal("myResource", c.ResourceId); 81Assert.Equal("CustomResource", c.Snapshot.ResourceType); 87Assert.Equal("myResource", c.ResourceId); 88Assert.Equal("CustomResource", c.Snapshot.ResourceType); 133Assert.Equal("myResource1", c.ResourceId); 134Assert.Equal("CustomResource", c.Snapshot.ResourceType); 140Assert.Equal("myResource2", c.ResourceId); 141Assert.Equal("CustomResource", c.Snapshot.ResourceType); 147Assert.Equal("replica1", c.ResourceId); 148Assert.Equal("CustomResource", c.Snapshot.ResourceType);
UserSecretsParameterDefaultTests.cs (1)
31Assert.Equal(initialValue, userSecrets["Parameters:param1"]);
WaitForTests.cs (4)
25Assert.Equal("The 'test' resource cannot wait for itself.", waitForEx.Message); 32Assert.Equal("The 'test' resource cannot wait for itself.", waitForCompletionEx.Message); 47Assert.Equal("The 'child' resource cannot wait for its parent 'parent'.", waitForEx.Message); 54Assert.Equal("The 'child' resource cannot wait for its parent 'parent'.", waitForCompletionEx.Message);
WithEndpointTests.cs (17)
167Assert.Equal("Endpoint with name 'mybinding' already exists. Endpoint name may not have been explicitly specified and was derived automatically from scheme argument (e.g. 'http', 'https', or 'tcp'). Multiple calls to WithEndpoint (and related methods) may result in a conflict if name argument is not specified. Each endpoint must have a unique name. For more information on networking in .NET Aspire see: https://aka.ms/dotnet/aspire/networking", ex.Message); 182Assert.Equal("Endpoint with name 'https' already exists. Endpoint name may not have been explicitly specified and was derived automatically from scheme argument (e.g. 'http', 'https', or 'tcp'). Multiple calls to WithEndpoint (and related methods) may result in a conflict if name argument is not specified. Each endpoint must have a unique name. For more information on networking in .NET Aspire see: https://aka.ms/dotnet/aspire/networking", ex.Message); 196Assert.Equal("Endpoint with name 'mybinding' already exists. Endpoint name may not have been explicitly specified and was derived automatically from scheme argument (e.g. 'http', 'https', or 'tcp'). Multiple calls to WithEndpoint (and related methods) may result in a conflict if name argument is not specified. Each endpoint must have a unique name. For more information on networking in .NET Aspire see: https://aka.ms/dotnet/aspire/networking", ex.Message); 216Assert.Equal("foo", resource.Name); 219Assert.Equal("mybinding", endpoints[0].Name); 221Assert.Equal("http", endpoints[0].UriScheme); 222Assert.Equal("3001", config["PORT"]); 240Assert.Equal("The endpoint \"ep\" has no associated container host name.", ex.Message); 289Assert.Equal(expectedManifest, manifest.ToString()); 316Assert.Equal(expectedManifest, manifest.ToString()); 343Assert.Equal(expectedManifest, manifest.ToString()); 370Assert.Equal(expectedManifest, manifest.ToString()); 397Assert.Equal(expectedManifest, manifest.ToString()); 424Assert.Equal(expectedManifest, manifest.ToString()); 451Assert.Equal(expectedManifest, manifest.ToString()); 513Assert.Equal(expectedManifest, manifest.ToString()); 549Assert.Equal(expectedEnv, manifest["env"]!.ToString());
WithEnvironmentTests.cs (19)
34Assert.Equal("true", config["SP_AVAILABLE"]); 54Assert.Equal("https://localhost:2000", config["myName"]); 67Assert.Equal("value", config["myName"]); 83Assert.Equal("value", config["myName"]); 99Assert.Equal("value2", config["myName"]); 116Assert.Equal("MY_PARAMETER_VALUE", config["MY_PARAMETER"]); 132Assert.Equal("{parameter.value}", config["MY_PARAMETER"]); 151Assert.Equal("Parameter resource could not be used because configuration key 'Parameters:parameter' is missing and the Parameter has no default value.", exception.Message); 171Assert.Equal("value2", config["myName"]); 200Assert.Equal($"http://localhost:90/foo", config["URL"]); 201Assert.Equal("90", config["PORT"]); 202Assert.Equal("10005", config["TARGET_PORT"]); 203Assert.Equal("connectionString;name=1", config["HOST"]); 206Assert.Equal("{container1.bindings.primary.url}/foo", manifestConfig["URL"]); 207Assert.Equal("{container1.bindings.primary.port}", manifestConfig["PORT"]); 208Assert.Equal("{container1.bindings.primary.targetPort}", manifestConfig["TARGET_PORT"]); 209Assert.Equal("{test.connectionString};name=1", manifestConfig["HOST"]); 232Assert.Equal("TARGET_PORT", pair.Key); 233Assert.Equal("""{{- portForServing "container1_primary" -}}""", pair.Value);
WithReferenceTests.cs (13)
30Assert.Equal("https://localhost:2000", config["services__projecta__mybinding__0"]); 53Assert.Equal("https://localhost:2000", config["services__projecta__mybinding__0"]); 54Assert.Equal("https://localhost:3000", config["services__projecta__myconflictingbinding__0"]); 78Assert.Equal("https://localhost:2000", config["services__projecta__mybinding__0"]); 79Assert.Equal("http://localhost:3000", config["services__projecta__mynonconflictingbinding__0"]); 101Assert.Equal("https://localhost:2000", config["services__projecta__mybinding__0"]); 102Assert.Equal("https://localhost:3000", config["services__projecta__mybinding2__0"]); 122Assert.Equal("https://localhost:2000", config["services__projecta__mybinding__0"]); 123Assert.Equal("http://localhost:3000", config["services__projecta__mybinding2__0"]); 174Assert.Equal("Connection string parameter resource could not be used because connection string 'missingresource' is missing.", exception.Message); 192Assert.Equal("test connection string", config["ConnectionStrings__resource"]); 208Assert.Equal("{resource.connectionString}", config["ConnectionStrings__resource"]); 224Assert.Equal("{resource.connectionString}", config["MY_ENV"]);
Aspire.Hosting.Valkey.Tests (22)
AddValkeyTests.cs (20)
25Assert.Equal("myValkey", containerResource.Name); 30Assert.Equal("tcp", endpoint.Name); 33Assert.Equal("tcp", endpoint.Transport); 34Assert.Equal("tcp", endpoint.UriScheme); 37Assert.Equal(ValkeyContainerImageTags.Tag, containerAnnotation.Tag); 38Assert.Equal(ValkeyContainerImageTags.Image, containerAnnotation.Image); 39Assert.Equal(ValkeyContainerImageTags.Registry, containerAnnotation.Registry); 53Assert.Equal("myValkey", containerResource.Name); 58Assert.Equal("tcp", endpoint.Name); 61Assert.Equal("tcp", endpoint.Transport); 62Assert.Equal("tcp", endpoint.UriScheme); 65Assert.Equal(ValkeyContainerImageTags.Tag, containerAnnotation.Tag); 66Assert.Equal(ValkeyContainerImageTags.Image, containerAnnotation.Image); 67Assert.Equal(ValkeyContainerImageTags.Registry, containerAnnotation.Registry); 83Assert.Equal("{myValkey.bindings.tcp.host}:{myValkey.bindings.tcp.port}", connectionStringResource.ConnectionStringExpression.ValueExpression); 110Assert.Equal(expectedManifest, manifest.ToString()); 132Assert.Equal($"{builder.GetVolumePrefix()}-myValkey-data", volumeAnnotation.Source); 133Assert.Equal("/data", volumeAnnotation.Target); 157Assert.Equal(Path.Combine(builder.AppHostDirectory, "myValkeydata"), volumeAnnotation.Source); 158Assert.Equal("/data", volumeAnnotation.Target);
ValkeyFunctionalTests.cs (2)
55Assert.Equal("value", value); 165Assert.Equal("value", value);
Aspire.Keycloak.Authentication.Tests (8)
AspireKeycloakExtensionTests.cs (8)
33Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message); 52Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message); 73Assert.Equal(options.Authority, $"https+http://{DefaultKeyName}/realms/{realm}"); 95Assert.Equal(options.Authority, $"https+http://{DefaultKeyName}/realms/{realm}"); 114Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message); 133Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message); 155Assert.Equal(options.Authority, $"https+http://{DefaultKeyName}/realms/{realm}"); 178Assert.Equal(options.Authority, $"https+http://{DefaultKeyName}/realms/{realm}");
Aspire.Microsoft.Azure.Cosmos.Tests (3)
ConformanceTests.cs (3)
100Assert.Equal("https://example1.documents.azure.com/", client1.Endpoint.ToString()); 101Assert.Equal("https://example2.documents.azure.com/", client2.Endpoint.ToString()); 102Assert.Equal("https://example3.documents.azure.com/", client3.Endpoint.ToString());
Aspire.Microsoft.Data.SqlClient.Tests (3)
AspireSqlServerSqlClientExtensionsTests.cs (3)
40Assert.Equal(ConnectionString, connection.ConnectionString); 68Assert.Equal(ConnectionString, connection.ConnectionString); 100Assert.Equal(ConnectionString, dataSource.ConnectionString);
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (7)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (4)
47Assert.Equal("westus", extension.Region); 148Assert.Equal("test", actualConnectionString); 151Assert.Equal("test2", actualConnectionString); 174Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddCosmosDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichCosmosDbTests.cs (3)
31Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichCosmosDbContext.", exception.Message); 77Assert.Equal("westus", extension.Region); 134Assert.Equal("Conflicting values for 'RequestTimeout' were found in EntityFrameworkCoreCosmosSettings and set in DbContextOptions<TestDbContext>.", exception.Message);
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (11)
AspireSqlServerEFCoreSqlClientExtensionsTests.cs (8)
33Assert.Equal(ConnectionString, context.Database.GetDbConnection().ConnectionString); 50Assert.Equal(ConnectionString, actualConnectionString); 70Assert.Equal(ConnectionString, actualConnectionString); 106Assert.Equal(ConnectionString, actualConnectionString); 150Assert.Equal(ConnectionString, actualConnectionString); 249Assert.Equal(ConnectionString, actualConnectionString); 252Assert.Equal(connectionString2, actualConnectionString); 275Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddSqlServerDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichSqlServerTests.cs (3)
37Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichSqlServerDbContext.", exception.Message); 110Assert.Equal("Conflicting values for 'CommandTimeout' were found in MicrosoftEntityFrameworkCoreSqlServerSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 305Assert.Equal("MicrosoftEntityFrameworkCoreSqlServerSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.Milvus.Client.Tests (8)
AspireMilvusExtensionTests.cs (2)
53Assert.Equal(NormalizedConnectionString, $"Endpoint=http://{dataSource.Address}/;Key={DefaultApiKey}"); 107Assert.Equal(ConnectionString, $"Endpoint=http://{connection.Address}/;Key={DefaultApiKey}");
MilvusClientPublicApiTests.cs (6)
21Assert.Equal(nameof(builder), exception.ParamName); 34Assert.Equal(nameof(connectionName), exception.ParamName); 47Assert.Equal(nameof(connectionName), exception.ParamName); 60Assert.Equal(nameof(builder), exception.ParamName); 73Assert.Equal(nameof(name), exception.ParamName); 86Assert.Equal(nameof(name), exception.ParamName);
Aspire.MongoDB.Driver.Tests (19)
AspireMongoDBDriverExtensionsTests.cs (13)
44Assert.Equal(uri.Server.Host, mongoClient.Settings.Server.Host); 50Assert.Equal(uri.AuthenticationSource, mongoClient.Settings.Credential.Source); 51Assert.Equal(uri.AuthenticationMechanism, mongoClient.Settings.Credential.Mechanism); 52Assert.Equal(uri.Username, mongoClient.Settings.Credential.Username); 63Assert.Equal(uri.DatabaseName, mongoDatabase.DatabaseNamespace.DatabaseName); 90Assert.Equal(uri.Server.Host, mongoClient.Settings.Server.Host); 96Assert.Equal(uri.AuthenticationSource, mongoClient.Settings.Credential.Source); 97Assert.Equal(uri.AuthenticationMechanism, mongoClient.Settings.Credential.Mechanism); 98Assert.Equal(uri.Username, mongoClient.Settings.Credential.Username); 110Assert.Equal(uri.DatabaseName, mongoDatabase.DatabaseNamespace.DatabaseName); 227Assert.Equal("mydatabase1", connection1.DatabaseNamespace.DatabaseName); 228Assert.Equal("mydatabase2", connection2.DatabaseNamespace.DatabaseName); 229Assert.Equal("mydatabase3", connection3.DatabaseNamespace.DatabaseName);
MongoDBDriverPublicApiTests.cs (6)
20Assert.Equal(nameof(builder), exception.ParamName); 32Assert.Equal(nameof(connectionName), exception.ParamName); 44Assert.Equal(nameof(connectionName), exception.ParamName); 56Assert.Equal(nameof(builder), exception.ParamName); 68Assert.Equal(nameof(name), exception.ParamName); 80Assert.Equal(nameof(name), exception.ParamName);
Aspire.MySqlConnector.Tests (5)
AspireMySqlConnectorExtensionsTests.cs (3)
48Assert.Equal(NormalizedConnectionString, dataSource.ConnectionString); 76Assert.Equal(NormalizedConnectionString, dataSource.ConnectionString); 108Assert.Equal(NormalizedConnectionString, dataSource.ConnectionString);
ConformanceTests.cs (2)
118Assert.Equal(dbConnection.ConnectionString, mySqlConnection.ConnectionString); 119Assert.Equal(mySqlDataSource.ConnectionString, mySqlConnection.ConnectionString);
Aspire.NATS.Net.Tests (11)
AspireNatsClientExtensionsTests.cs (4)
55Assert.Equal(_connectionString, connection.Opts.Url); 84Assert.Equal(_connectionString, connection.Opts.Url); 116Assert.Equal(_connectionString, connection.Opts.Url); 201Assert.Equal("test publish", activity.OperationName);
NatsClientPublicApiTests.cs (7)
21Assert.Equal(nameof(builder), exception.ParamName); 34Assert.Equal(nameof(connectionName), exception.ParamName); 47Assert.Equal(nameof(connectionName), exception.ParamName); 60Assert.Equal(nameof(builder), exception.ParamName); 73Assert.Equal(nameof(name), exception.ParamName); 86Assert.Equal(nameof(name), exception.ParamName); 97Assert.Equal(nameof(builder), exception.ParamName);
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (11)
AspireEFPostgreSqlExtensionsTests.cs (8)
41Assert.Equal(ConnectionString, context.Database.GetDbConnection().ConnectionString); 60Assert.Equal(ConnectionString, actualConnectionString); 80Assert.Equal(ConnectionString, actualConnectionString); 116Assert.Equal(ConnectionString, actualConnectionString); 158Assert.Equal(ConnectionString, actualConnectionString); 256Assert.Equal(ConnectionString, actualConnectionString); 259Assert.Equal(connectionString2, actualConnectionString); 282Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddNpgsqlDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichNpgsqlTests.cs (3)
37Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichNpgsqlDbContext.", exception.Message); 112Assert.Equal("Conflicting values for 'CommandTimeout' were found in NpgsqlEntityFrameworkCorePostgreSQLSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 315Assert.Equal("NpgsqlEntityFrameworkCorePostgreSQLSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.Npgsql.Tests (5)
AspirePostgreSqlNpgsqlExtensionsTests.cs (3)
40Assert.Equal(ConnectionString, dataSource.ConnectionString); 68Assert.Equal(ConnectionString, dataSource.ConnectionString); 100Assert.Equal(ConnectionString, dataSource.ConnectionString);
ConformanceTests.cs (2)
120Assert.Equal(dbConnection.ConnectionString, npgsqlConnection.ConnectionString); 121Assert.Equal(npgsqlDataSource.ConnectionString, npgsqlConnection.ConnectionString);
Aspire.OpenAI.Tests (3)
AspireOpenAIExtensionsTests.cs (3)
106Assert.Equal("An OpenAIClient could not be configured. Ensure valid connection information was provided in " + 177Assert.Equal("myproject", options.ProjectId); 178Assert.Equal("myapplication", options.ApplicationId);
Aspire.Oracle.EntityFrameworkCore.Tests (11)
AspireOracleEFCoreDatabaseExtensionsTests.cs (8)
34Assert.Equal(ConnectionString, context.Database.GetDbConnection().ConnectionString); 51Assert.Equal(ConnectionString, actualConnectionString); 71Assert.Equal(ConnectionString, actualConnectionString); 107Assert.Equal(ConnectionString, actualConnectionString); 151Assert.Equal(ConnectionString, actualConnectionString); 250Assert.Equal(ConnectionString, actualConnectionString); 253Assert.Equal(connectionString2, actualConnectionString); 276Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddOracleDatabaseDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichOracleDatabaseTests.cs (3)
37Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichOracleDatabaseDbContext.", exception.Message); 110Assert.Equal("Conflicting values for 'CommandTimeout' were found in OracleEntityFrameworkCoreSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 305Assert.Equal("OracleEntityFrameworkCoreSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (9)
AspireEFMySqlExtensionsTests.cs (6)
48Assert.Equal(expectedConnectionString, actualConnectionString); 67Assert.Equal(expectedConnectionString, actualConnectionString); 89Assert.Equal(expectedConnectionString, actualConnectionString); 126Assert.Equal(expectedConnectionString, actualConnectionString); 169Assert.Equal(expectedConnectionString, actualConnectionString); 270Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddMySqlDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichMySqlTests.cs (3)
50Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichMySqlDbContext.", exception.Message); 123Assert.Equal("Conflicting values for 'CommandTimeout' were found in PomeloEntityFrameworkCoreMySqlSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 318Assert.Equal("PomeloEntityFrameworkCoreMySqlSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.RabbitMQ.Client.Tests (7)
AspireRabbitMQExtensionsTests.cs (2)
159Assert.Equal("aspire-app", connectionFactory.ClientProvidedName); 198Assert.Equal(uri.Host, endpoint.HostName);
AspireRabbitMQLoggingTests.cs (5)
135Assert.Equal("message", errorEvent[0].Key); 138Assert.Equal("exception.type", errorEvent[1].Key); 141Assert.Equal("exception.message", errorEvent[2].Key); 144Assert.Equal("exception.stacktrace", errorEvent[3].Key); 147Assert.Equal("exception.innerexception", errorEvent[4].Key);
Aspire.Seq.Tests (2)
SeqEndpointCanBeConfigured.cs (2)
64Assert.Equal("speed=fast,quality=good,X-Seq-ApiKey=TestKey123!", settings.Logs.Headers); 65Assert.Equal("quality=good,speed=fast,X-Seq-ApiKey=TestKey123!", settings.Traces.Headers);
Aspire.StackExchange.Redis.DistributedCaching.Tests (3)
DistributedCacheConformanceTests.cs (3)
72Assert.Equal("CLIENT", activity.OperationName); 77Assert.Equal("CLIENT", activity.OperationName); 82Assert.Equal("HMGET", activity.OperationName);
Aspire.StackExchange.Redis.OutputCaching.Tests (3)
OutputCacheConformanceTests.cs (3)
72Assert.Equal("CLIENT", activity.OperationName); 77Assert.Equal("CLIENT", activity.OperationName); 82Assert.Equal("GET", activity.OperationName);
Aspire.StackExchange.Redis.Tests (6)
AspireRedisExtensionsTests.cs (6)
294Assert.Equal("GET", activity.OperationName); 328Assert.Equal(container2.GetConnectionString(), connection2.Configuration); 329Assert.Equal(container3.GetConnectionString(), connection3.Configuration); 366Assert.Equal(container1.GetConnectionString(), connection1.Configuration); 367Assert.Equal(container2.GetConnectionString(), connection2.Configuration); 368Assert.Equal(container3.GetConnectionString(), connection3.Configuration);
AuthSamples.FunctionalTests (10)
ClaimsTransformTests.cs (1)
41Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.Headers.Location.ToString());
CookiesTests.cs (1)
40Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.RequestMessage.RequestUri.ToString());
CustomAuthorizationFailureResponseTests.cs (2)
28Assert.Equal(CustomAuthorizationFailureResponse.Startup.CustomForbiddenMessage, content); 38Assert.Equal(CustomAuthorizationFailureResponse.Startup.CustomForbiddenMessage, content);
CustomPolicyProviderTests.cs (2)
44Assert.Equal("http://localhost/account/signin?ReturnUrl=%2FHome%2FMinimumAge10", response.RequestMessage.RequestUri.ToString()); 118Assert.Equal("http://localhost/account/signin?ReturnUrl=%2FHome%2FMinimumAge50", response.RequestMessage.RequestUri.ToString());
IdentityExternalClaimsTests.cs (1)
41Assert.Equal("http://localhost/Account/Login?ReturnUrl=%2FMyClaims", response.Headers.Location.ToString());
PathSchemeSelectionTests.cs (1)
53Assert.Equal("http://localhost/account/login?ReturnUrl=%2FHome%2FMyClaims", response.RequestMessage.RequestUri.ToString());
StaticFilesAuthTests.cs (1)
39Assert.Equal("http://localhost/Account/Login?ReturnUrl=%2F" + scenario, response.Headers.Location.ToString());
TestAssert.cs (1)
76Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType);
Binding.Custom.IntegrationTests (3)
CustomBindingTests.4.0.0.cs (1)
35Assert.Equal(testString, result);
CustomBindingTests.4.1.0.cs (2)
43Assert.Equal(testString, result); 81Assert.Equal(testString, result);
Binding.Http.IntegrationTests (3)
BasicHttpBindingTests.4.0.0.cs (1)
270Assert.Equal(userAgent, userAgentHeader);
NetHttpBindingTests.4.0.0.cs (1)
36Assert.Equal(testString, result);
NetHttpsBindingTests.4.1.0.cs (1)
105Assert.Equal(testString, result);
Binding.ReliableSession.IntegrationTests (5)
NetHttpBindingTests.cs (1)
43Assert.Equal(testString, result);
NetTcpBindingTests.cs (3)
38Assert.Equal(testString, result); 113Assert.Equal(testString, result); 114Assert.Equal(testString, callbackService.LastReceivedEcho);
WSHttpBindingTests.cs (1)
43Assert.Equal(testString, result);
Binding.Tcp.IntegrationTests (10)
NetTcpBindingTests.4.0.0.cs (8)
34Assert.Equal(testString, result); 65Assert.Equal(testString, result); 70Assert.Equal(testString, result); 72Assert.Equal(testString, result); 103Assert.Equal(testString, result); 111Assert.Equal(testString, result); 148Assert.Equal(testString, result); 186Assert.Equal(testString, result);
NetTcpBindingTests.4.1.0.cs (2)
36Assert.Equal(testString, result); 73Assert.Equal(testString, result);
Binding.UDS.IntegrationTests (4)
UDSBindingTests.cs (4)
49Assert.Equal(testString, result); 84Assert.Equal(testString, result); 131Assert.Equal(testString, result); 164Assert.Equal(testString, result);
Binding.WS.FederationHttp.IntegrationTests (3)
WSFederationHttpBindingTests.cs (3)
65Assert.Equal(testString, result); 116Assert.Equal(testString, result); 167Assert.Equal(testString, result);
Client.ChannelLayer.IntegrationTests (15)
DuplexChannelShapeTests.4.0.0.cs (4)
58Assert.Equal(requestMessage.Headers.MessageId.ToString(), replyMessage.Headers.RelatesTo.ToString()); 64Assert.Equal(expectedResponse, actualResponse); 115Assert.Equal(requestMessage.Headers.MessageId.ToString(), replyMessage.Headers.RelatesTo.ToString()); 121Assert.Equal(expectedResponse, actualResponse);
DuplexChannelShapeTests.4.1.0.cs (3)
63Assert.Equal(expectedResponse, actualResponse); 115Assert.Equal(requestMessage.Headers.MessageId.ToString(), replyMessage.Headers.RelatesTo.ToString()); 121Assert.Equal(expectedResponse, actualResponse);
DuplexChannelWithSynchronizationContext.cs (1)
242Assert.Equal(testString, result);
RequestReplyChannelShapeTests.4.0.0.cs (6)
59Assert.Equal(expectedResponse, actualResponse); 109Assert.Equal(action + "Response", replyMessageAction); 114Assert.Equal(expectedResponse, actualResponse); 167Assert.Equal(expectedResponse, actualResponse); 219Assert.Equal(action + "Response", replyMessageAction); 224Assert.Equal(expectedResponse, actualResponse);
RequestReplyChannelShapeTests.4.1.0.cs (1)
56Assert.Equal(expectedResponse, actualResponse);
Client.ClientBase.IntegrationTests (10)
ClientBaseTests.4.0.0.cs (10)
40Assert.Equal("POST", property.Method); 41Assert.Equal("My%20address", property.QueryString); 43Assert.Equal("my value", property.Headers["customer"]); 87Assert.Equal("POST", property.Method); 88Assert.Equal("My%20address", property.QueryString); 90Assert.Equal("my value", property.Headers["customer"]); 133Assert.Equal("Hello", result); 708Assert.Equal("Hello", result); 743Assert.Equal("Hello", result); 790Assert.Equal(customHeaderValue, result);
Client.ExpectedExceptions.IntegrationTests (1)
ExpectedExceptionTests.4.1.1.cs (1)
56Assert.Equal(MyCertificateValidator.exceptionMsg, exception.Message);
ConfigurationSchemaGenerator.Tests (8)
GeneratorTests.cs (8)
83Assert.Equal(expected, description); 100Assert.Equal(expected, description); 114Assert.Equal(expected, description); 132Assert.Equal(expected, description); 143Assert.Equal(expected, description); 154Assert.Equal(expected, description); 1585Assert.Equal(expectedText, actualText); 1604Assert.Equal(baseline, actual);
Contract.Fault.IntegrationTests (3)
FaultExceptionTests.4.0.0.cs (3)
154Assert.Equal(faultMsg, exception.Detail.Message); 191Assert.Equal(faultMsg, exception.Detail.Message); 228Assert.Equal(faultMsg, exception.Detail.Message);
Contract.Message.IntegrationTests (1)
MessageContractTests.4.1.0.cs (1)
106Assert.Equal(MessageContractConstants.customerElementValue, reader.Value);
Contract.Service.IntegrationTests (14)
ServiceContractTests.4.1.0.cs (12)
44Assert.Equal(testString, result); 80Assert.Equal(testString, result); 115Assert.Equal(testString, result); 152Assert.Equal(testString, result); 189Assert.Equal(testString, result); 374Assert.Equal(testString, result); 410Assert.Equal(testString, result); 445Assert.Equal(testString, result); 482Assert.Equal(testString, result); 519Assert.Equal(testString, result); 556Assert.Equal(testString, result); 593Assert.Equal(testString, result);
ServiceKnownTypeTests.4.0.0.cs (2)
117Assert.Equal(expectedId, ((Widget)response[0]).Id); 118Assert.Equal(expectedCatalog, ((Widget)response[0]).Catalog);
Contract.XmlSerializer.IntegrationTests (25)
XmlSerializerFormatSoapTest.cs (3)
26Assert.Equal(message1 + message2, response); 43Assert.Equal(value.StringValue, response.StringValue); 58Assert.Equal("MyNameFoo", response);
XmlSerializerFormatTest.4.0.0.cs (8)
26Assert.Equal("message", response); 39Assert.Equal("message", response); 59Assert.Equal(errorMessage, e.Message); 77Assert.Equal("message", response); 93Assert.Equal("message", response.Result); 111Assert.Equal("message", response.StringValue); 137Assert.Equal("123", response.@return); 206Assert.Equal("message", response);
XmlSerializerFormatTest.4.1.0.cs (3)
31Assert.Equal(input.Message, response.Message); 58Assert.Equal(input.Message, response.Message); 96Assert.Equal(customHeaderValue.Message, result);
XmlSerializerFormatTest.cs (11)
183Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 231Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 279Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 332Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 345Assert.Equal(testStr, serviceProxy2.GetAndRemoveString(guid2)); 389Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 402Assert.Equal(testStr, serviceProxy2.GetAndRemoveString(guid2)); 446Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 459Assert.Equal(testStr, serviceProxy2.GetAndRemoveString(guid2)); 496Assert.Equal(echoText, response.EchoResult); 497Assert.Equal(expectedHeaderText, response.StringHeader.HeaderValue);
Diagnostics.EFCore.FunctionalTests (9)
DatabaseErrorPageMiddlewareTest.cs (5)
45Assert.Equal("Request Handled", await response.Content.ReadAsStringAsync()); 83Assert.Equal("Exception requested from TestMiddleware", ex.Message); 109Assert.Equal("SQLite Error 1: 'no such table: Blogs'.", ex.InnerException.Message); 184Assert.Equal("DbUpdateException", e.GetType().Name); 308Assert.Equal("Saved a Blog", content);
MigrationsEndPointMiddlewareTest.cs (4)
42Assert.Equal("Request Handled", await response.Content.ReadAsStringAsync()); 135Assert.Equal("111111111111111_MigrationOne", appliedMigrations.ElementAt(0).MigrationId); 136Assert.Equal("222222222222222_MigrationTwo", appliedMigrations.ElementAt(1).MigrationId); 265Assert.Equal("Welcome to the invalid snapshot!", ex.InnerException.Message);
Diagnostics.FunctionalTests (6)
DeveloperExceptionPageSampleTest.cs (6)
56Assert.Equal("application/json", exceptionNode.GetProperty("headers").GetProperty("Accept")[0].GetString()); 57Assert.Equal("localhost", exceptionNode.GetProperty("headers").GetProperty("Host")[0].GetString()); 58Assert.Equal("/", exceptionNode.GetProperty("path").GetString()); 59Assert.Equal("Endpoint display name", exceptionNode.GetProperty("endpoint").GetString()); 60Assert.Equal("Value1", exceptionNode.GetProperty("routeValues").GetProperty("routeValue1").GetString()); 61Assert.Equal("Value2", exceptionNode.GetProperty("routeValues").GetProperty("routeValue2").GetString());
dotnet-svcutil.xmlserializer.IntegrationTests (25)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatSoapTest.cs (3)
26Assert.Equal(message1 + message2, response); 43Assert.Equal(value.StringValue, response.StringValue); 58Assert.Equal("MyNameFoo", response);
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.4.0.0.cs (8)
26Assert.Equal("message", response); 39Assert.Equal("message", response); 59Assert.Equal(errorMessage, e.Message); 77Assert.Equal("message", response); 93Assert.Equal("message", response.Result); 111Assert.Equal("message", response.StringValue); 137Assert.Equal("123", response.@return); 206Assert.Equal("message", response);
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.4.1.0.cs (3)
31Assert.Equal(input.Message, response.Message); 58Assert.Equal(input.Message, response.Message); 96Assert.Equal(customHeaderValue.Message, result);
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.cs (11)
183Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 231Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 279Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 332Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 345Assert.Equal(testStr, serviceProxy2.GetAndRemoveString(guid2)); 389Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 402Assert.Equal(testStr, serviceProxy2.GetAndRemoveString(guid2)); 446Assert.Equal(string.Format("{0}{1}", intParams.P1, intParams.P2), serviceProxy1.Concatenate(intParams)); 459Assert.Equal(testStr, serviceProxy2.GetAndRemoveString(guid2)); 496Assert.Equal(echoText, response.EchoResult); 497Assert.Equal(expectedHeaderText, response.StringHeader.HeaderValue);
Extensibility.MessageEncoder.IntegrationTests (1)
TextTests.4.1.0.cs (1)
46Assert.Equal(result, testString);
IIS.Common.TestLib (2)
TestConnections.cs (2)
112Assert.Equal(expected, Encoding.ASCII.GetString((await ReceiveChunk()).Span)); 120Assert.Equal(expected, Encoding.ASCII.GetString(actual.Span));
IIS.FunctionalTests (99)
Http2TrailersResetTests.cs (20)
76Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 87Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 89Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 102Assert.Equal(body, await response.Content.ReadAsStringAsync()); 104Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 119Assert.Equal((2 * body.Length).ToString(CultureInfo.InvariantCulture), contentLength.First()); 120Assert.Equal(body + body, await response.Content.ReadAsStringAsync()); 122Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 137Assert.Equal(body.Length.ToString(CultureInfo.InvariantCulture), contentLength.First()); 138Assert.Equal("TrailerName", response.Headers.Trailer.Single()); 139Assert.Equal(body, await response.Content.ReadAsStringAsync()); 141Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 167Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 182Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 184Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 206Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 266Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 327Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 440Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 470Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]);
Http3Tests.cs (9)
54Assert.Equal("HTTP/3", await response.Content.ReadAsStringAsync()); 72Assert.Equal("HTTP/1.1", await response1.Content.ReadAsStringAsync()); 73Assert.Equal(altsvc, response1.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 78Assert.Equal("HTTP/3", await response3.Content.ReadAsStringAsync()); 94Assert.Equal(altsvc, response2.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 95Assert.Equal("HTTP/2", await response2.Content.ReadAsStringAsync()); 99Assert.Equal("HTTP/3", response3); 112Assert.Equal("HTTP/3", result); 113Assert.Equal("value", response.TrailingHeaders.GetValues("custom").SingleOrDefault());
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
76Assert.Equal("Windows", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
143Assert.Equal(messages, await response.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (6)
54Assert.Equal(_helloWorldResponse, responseText); 78Assert.Equal(_helloWorldResponse, responseText); 124Assert.Equal(_helloWorldResponse, responseText); 149Assert.Equal(_helloWorldResponse, responseText); 170Assert.Equal(_helloWorldResponse, responseText); 186Assert.Equal(_helloWorldResponse, responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (11)
83Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 120Assert.Equal("411", decodedHeaders[InternalHeaderNames.Status]); 173Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 190Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 242Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 259Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 287Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 304Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 343Assert.Equal("500", decodedHeaders[InternalHeaderNames.Status]); 363Assert.Equal("Hello World", response); 377Assert.Equal("Hello World", response);
src\Servers\IIS\IIS\test\Common.FunctionalTests\HttpsTests.cs (2)
97Assert.Equal($"Enabled;{cert.GetCertHashString()}", responseText); 101Assert.Equal("Disabled", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
33Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
54Assert.Equal(expectedResponse, await response.Content.ReadAsStringAsync()); 70Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (2)
52Assert.Equal($"PathBase: {expectedPathBase}; Path: {expectedPath}", body); 82Assert.Equal($"PathBase: {expectedPathBase}; Path: {expectedPath}", body);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (44)
62Assert.Equal("/ !\"#$%&'()*,-.%2F0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", response.Body); 72Assert.Equal("//a/b//c", response.Body); 83Assert.Equal(expectedPath, response.Body); 94Assert.Equal(expectedPath, response.Body); 132Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 150Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 180Assert.Equal(body, responseText); 191Assert.Equal(body, responseText); 213Assert.Equal(body, response.Headers.GetValues("BodyAsString").Single()); 214Assert.Equal(body, responseText); 389Assert.Equal("SlowOnCompleted", await _fixture.Client.GetStringAsync($"/OnCompletedHttpContext")); 390Assert.Equal("", await _fixture.Client.GetStringAsync($"/OnCompletedHttpContext_Completed")); 410Assert.Equal("SERVER_PORT: " + port, await _fixture.Client.GetStringAsync("/ServerVariable?q=SERVER_PORT")); 411Assert.Equal("QUERY_STRING: q=QUERY_STRING", await _fixture.Client.GetStringAsync("/ServerVariable?q=QUERY_STRING")); 417Assert.Equal("THIS_VAR_IS_UNDEFINED: (null)", await _fixture.Client.GetStringAsync("/ServerVariable?q=THIS_VAR_IS_UNDEFINED")); 423Assert.Equal("ROUNDTRIP: 1", await _fixture.Client.GetStringAsync("/ServerVariable?v=1&q=ROUNDTRIP")); 447Assert.Equal("Success", result); 454Assert.Equal("Hello World", await result.Content.ReadAsStringAsync()); 466Assert.Equal("Success", result); 475Assert.Equal("Success", result); 484Assert.Equal("Success", await result.Content.ReadAsStringAsync()); 496Assert.Equal("Success", result); 503Assert.Equal("Success", result); 510Assert.Equal("Success", await result.Content.ReadAsStringAsync()); 528Assert.Equal("Request Complete", responseText); 531Assert.Equal("test123=foo", headerValues.First()); 534Assert.Equal("text/plain", headerValues.First()); 538Assert.Equal("1", headerValues.First()); 539Assert.Equal("2", headerValues.Last()); 547Assert.Equal("Internal Server Error", response.ReasonPhrase); 570Assert.Equal(expectedReason, response.ReasonPhrase); 573Assert.Equal(body ?? string.Empty, await response.Content.ReadAsStringAsync()); 592Assert.Equal("MyServer/7.8", response.Headers.Server.Single().Product.ToString()); 600Assert.Equal($"Started_{path}Threw_Finished", await _fixture.Client.GetStringAsync("/ResponseInvalidOrdering/" + path)); 607Assert.Equal(_fixture.DeploymentResult.ContentRoot, await _fixture.Client.GetStringAsync("/ContentRootPath")); 608Assert.Equal(_fixture.DeploymentResult.ContentRoot + "\\wwwroot", await _fixture.Client.GetStringAsync("/WebRootPath")); 609Assert.Equal(_fixture.DeploymentResult.ContentRoot, await _fixture.DeploymentResult.HttpClient.GetStringAsync("/CurrentDirectory")); 610Assert.Equal(_fixture.DeploymentResult.ContentRoot + "\\", await _fixture.Client.GetStringAsync("/BaseDirectory")); 611Assert.Equal(_fixture.DeploymentResult.ContentRoot + "\\", await _fixture.Client.GetStringAsync("/ASPNETCORE_IIS_PHYSICAL_PATH")); 633Assert.Equal(expected, await _fixture.Client.GetStringAsync($"/{endpoint}")); 643Assert.Equal(new string('a', query), await _fixture.Client.GetStringAsync($"/LargeResponseBody?length={query}")); 658Assert.Equal("Success", await _fixture.Client.GetStringAsync(path + "/path" + "?query")); 666Assert.Equal(_fixture.Client.BaseAddress.ToString(), await _fixture.Client.GetStringAsync("/ServerAddresses")); 693Assert.Equal("Hello World", responseText);
IIS.LongTests (25)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
33Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
54Assert.Equal(expectedResponse, await response.Content.ReadAsStringAsync()); 70Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
48Assert.Equal("Hello World", await deploymentResult.HttpClient.GetStringAsync("/HelloWorld"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (21)
604Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 675Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 713Assert.Equal(deploymentResult.ContentRoot, await deploymentResult.HttpClient.GetStringAsync("/ContentRootPath")); 714Assert.Equal(deploymentResult.ContentRoot + "\\wwwroot", await deploymentResult.HttpClient.GetStringAsync("/WebRootPath")); 715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory")); 716Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/BaseDirectory")); 717Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/ASPNETCORE_IIS_PHYSICAL_PATH")); 889Assert.Equal("True", content); 907Assert.Equal("True", content); 1164Assert.Equal( 1183Assert.Equal( 1218Assert.Equal("Production", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1237Assert.Equal("Asm1", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1241Assert.Equal("Asm1;Microsoft.AspNetCore.Server.IISIntegration", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1260Assert.Equal("Asm2", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1278Assert.Equal("World;Hello", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=OtherVariable")); 1295Assert.Equal(environment, await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1320Assert.Equal(deploymentParameters.ApplicationBaseUriHint + appName, await client.GetStringAsync($"/{appName}/ServerAddresses")); 1344Assert.Equal("123", await client.GetStringAsync("/ANCM_HTTPS_PORT")); 1345Assert.Equal("NOVALUE", await client.GetStringAsync("/HTTPS_PORT")); 1421Assert.Equal("NOVALUE", await client.GetStringAsync("/ANCM_HTTPS_PORT"));
IIS.NewHandler.FunctionalTests (26)
NewHandlerTests.cs (1)
38Assert.Equal("12.2.18316.0", handle.FileVersionInfo.FileVersion);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
33Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
54Assert.Equal(expectedResponse, await response.Content.ReadAsStringAsync()); 70Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
48Assert.Equal("Hello World", await deploymentResult.HttpClient.GetStringAsync("/HelloWorld"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (21)
604Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 675Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 713Assert.Equal(deploymentResult.ContentRoot, await deploymentResult.HttpClient.GetStringAsync("/ContentRootPath")); 714Assert.Equal(deploymentResult.ContentRoot + "\\wwwroot", await deploymentResult.HttpClient.GetStringAsync("/WebRootPath")); 715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory")); 716Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/BaseDirectory")); 717Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/ASPNETCORE_IIS_PHYSICAL_PATH")); 889Assert.Equal("True", content); 907Assert.Equal("True", content); 1164Assert.Equal( 1183Assert.Equal( 1218Assert.Equal("Production", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1237Assert.Equal("Asm1", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1241Assert.Equal("Asm1;Microsoft.AspNetCore.Server.IISIntegration", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1260Assert.Equal("Asm2", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1278Assert.Equal("World;Hello", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=OtherVariable")); 1295Assert.Equal(environment, await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1320Assert.Equal(deploymentParameters.ApplicationBaseUriHint + appName, await client.GetStringAsync($"/{appName}/ServerAddresses")); 1344Assert.Equal("123", await client.GetStringAsync("/ANCM_HTTPS_PORT")); 1345Assert.Equal("NOVALUE", await client.GetStringAsync("/HTTPS_PORT")); 1421Assert.Equal("NOVALUE", await client.GetStringAsync("/ANCM_HTTPS_PORT"));
IIS.NewShim.FunctionalTests (26)
NewShimTests.cs (1)
31Assert.Equal("12.2.19169.6", handle.FileVersionInfo.FileVersion);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
33Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
54Assert.Equal(expectedResponse, await response.Content.ReadAsStringAsync()); 70Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
48Assert.Equal("Hello World", await deploymentResult.HttpClient.GetStringAsync("/HelloWorld"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (21)
604Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 675Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 713Assert.Equal(deploymentResult.ContentRoot, await deploymentResult.HttpClient.GetStringAsync("/ContentRootPath")); 714Assert.Equal(deploymentResult.ContentRoot + "\\wwwroot", await deploymentResult.HttpClient.GetStringAsync("/WebRootPath")); 715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory")); 716Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/BaseDirectory")); 717Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/ASPNETCORE_IIS_PHYSICAL_PATH")); 889Assert.Equal("True", content); 907Assert.Equal("True", content); 1164Assert.Equal( 1183Assert.Equal( 1218Assert.Equal("Production", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1237Assert.Equal("Asm1", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1241Assert.Equal("Asm1;Microsoft.AspNetCore.Server.IISIntegration", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1260Assert.Equal("Asm2", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1278Assert.Equal("World;Hello", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=OtherVariable")); 1295Assert.Equal(environment, await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1320Assert.Equal(deploymentParameters.ApplicationBaseUriHint + appName, await client.GetStringAsync($"/{appName}/ServerAddresses")); 1344Assert.Equal("123", await client.GetStringAsync("/ANCM_HTTPS_PORT")); 1345Assert.Equal("NOVALUE", await client.GetStringAsync("/HTTPS_PORT")); 1421Assert.Equal("NOVALUE", await client.GetStringAsync("/ANCM_HTTPS_PORT"));
IIS.ShadowCopy.Tests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
33Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
54Assert.Equal(expectedResponse, await response.Content.ReadAsStringAsync()); 70Assert.Equal("Hello World", responseText);
IIS.Tests (10)
ClientDisconnectTests.cs (2)
135Assert.Equal("The client has disconnected", exception.Message); 276Assert.Equal("The client has disconnected", exception.Message);
MaxRequestBodySizeTests.cs (5)
57Assert.Equal(CoreStrings.BadRequest_RequestBodyTooLarge, exception.Message); 100Assert.Equal(CoreStrings.BadRequest_RequestBodyTooLarge, exception.Message); 310Assert.Equal(CoreStrings.BadRequest_RequestBodyTooLarge, exception.Message); 346Assert.Equal(CoreStrings.BadRequest_RequestBodyTooLarge, requestRejectedEx1.Message); 347Assert.Equal(CoreStrings.BadRequest_RequestBodyTooLarge, requestRejectedEx2.Message);
TestServerTest.cs (2)
31Assert.Equal(helloWorld, await result.Content.ReadAsStringAsync()); 32Assert.Equal(expectedPath, path);
TlsHandshakeFeatureTests.cs (1)
57Assert.Equal("localhost", hostName);
IISExpress.FunctionalTests (101)
InProcess\AuthenticationTests.cs (2)
35Assert.Equal("Anonymous?True", responseText); 60Assert.Equal("Anonymous?True", responseText);
InProcess\WebSocketTests.cs (1)
161Assert.Equal(expectedMessage, Encoding.ASCII.GetString(received));
OutOfProcess\MultipleAppTests.cs (1)
57Assert.Equal("Hello World", responseText);
OutOfProcess\NtlmAuthentationTest.cs (4)
49Assert.Equal("Hello World", responseText); 55Assert.Equal("Anonymous?True", responseText); 77Assert.Equal("Anonymous?True", responseText); 82Assert.Equal("Windows", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (1)
76Assert.Equal("Windows", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
143Assert.Equal(messages, await response.Content.ReadAsStringAsync());
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (6)
54Assert.Equal(_helloWorldResponse, responseText); 78Assert.Equal(_helloWorldResponse, responseText); 124Assert.Equal(_helloWorldResponse, responseText); 149Assert.Equal(_helloWorldResponse, responseText); 170Assert.Equal(_helloWorldResponse, responseText); 186Assert.Equal(_helloWorldResponse, responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (11)
83Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 120Assert.Equal("411", decodedHeaders[InternalHeaderNames.Status]); 173Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 190Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 242Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 259Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 287Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 304Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 343Assert.Equal("500", decodedHeaders[InternalHeaderNames.Status]); 363Assert.Equal("Hello World", response); 377Assert.Equal("Hello World", response);
src\Servers\IIS\IIS\test\Common.FunctionalTests\HttpsTests.cs (2)
97Assert.Equal($"Enabled;{cert.GetCertHashString()}", responseText); 101Assert.Equal("Disabled", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
33Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
54Assert.Equal(expectedResponse, await response.Content.ReadAsStringAsync()); 70Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (2)
52Assert.Equal($"PathBase: {expectedPathBase}; Path: {expectedPath}", body); 82Assert.Equal($"PathBase: {expectedPathBase}; Path: {expectedPath}", body);
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (44)
62Assert.Equal("/ !\"#$%&'()*,-.%2F0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", response.Body); 72Assert.Equal("//a/b//c", response.Body); 83Assert.Equal(expectedPath, response.Body); 94Assert.Equal(expectedPath, response.Body); 132Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 150Assert.Equal("gzip", response.Content.Headers.ContentEncoding.Single()); 180Assert.Equal(body, responseText); 191Assert.Equal(body, responseText); 213Assert.Equal(body, response.Headers.GetValues("BodyAsString").Single()); 214Assert.Equal(body, responseText); 389Assert.Equal("SlowOnCompleted", await _fixture.Client.GetStringAsync($"/OnCompletedHttpContext")); 390Assert.Equal("", await _fixture.Client.GetStringAsync($"/OnCompletedHttpContext_Completed")); 410Assert.Equal("SERVER_PORT: " + port, await _fixture.Client.GetStringAsync("/ServerVariable?q=SERVER_PORT")); 411Assert.Equal("QUERY_STRING: q=QUERY_STRING", await _fixture.Client.GetStringAsync("/ServerVariable?q=QUERY_STRING")); 417Assert.Equal("THIS_VAR_IS_UNDEFINED: (null)", await _fixture.Client.GetStringAsync("/ServerVariable?q=THIS_VAR_IS_UNDEFINED")); 423Assert.Equal("ROUNDTRIP: 1", await _fixture.Client.GetStringAsync("/ServerVariable?v=1&q=ROUNDTRIP")); 447Assert.Equal("Success", result); 454Assert.Equal("Hello World", await result.Content.ReadAsStringAsync()); 466Assert.Equal("Success", result); 475Assert.Equal("Success", result); 484Assert.Equal("Success", await result.Content.ReadAsStringAsync()); 496Assert.Equal("Success", result); 503Assert.Equal("Success", result); 510Assert.Equal("Success", await result.Content.ReadAsStringAsync()); 528Assert.Equal("Request Complete", responseText); 531Assert.Equal("test123=foo", headerValues.First()); 534Assert.Equal("text/plain", headerValues.First()); 538Assert.Equal("1", headerValues.First()); 539Assert.Equal("2", headerValues.Last()); 547Assert.Equal("Internal Server Error", response.ReasonPhrase); 570Assert.Equal(expectedReason, response.ReasonPhrase); 573Assert.Equal(body ?? string.Empty, await response.Content.ReadAsStringAsync()); 592Assert.Equal("MyServer/7.8", response.Headers.Server.Single().Product.ToString()); 600Assert.Equal($"Started_{path}Threw_Finished", await _fixture.Client.GetStringAsync("/ResponseInvalidOrdering/" + path)); 607Assert.Equal(_fixture.DeploymentResult.ContentRoot, await _fixture.Client.GetStringAsync("/ContentRootPath")); 608Assert.Equal(_fixture.DeploymentResult.ContentRoot + "\\wwwroot", await _fixture.Client.GetStringAsync("/WebRootPath")); 609Assert.Equal(_fixture.DeploymentResult.ContentRoot, await _fixture.DeploymentResult.HttpClient.GetStringAsync("/CurrentDirectory")); 610Assert.Equal(_fixture.DeploymentResult.ContentRoot + "\\", await _fixture.Client.GetStringAsync("/BaseDirectory")); 611Assert.Equal(_fixture.DeploymentResult.ContentRoot + "\\", await _fixture.Client.GetStringAsync("/ASPNETCORE_IIS_PHYSICAL_PATH")); 633Assert.Equal(expected, await _fixture.Client.GetStringAsync($"/{endpoint}")); 643Assert.Equal(new string('a', query), await _fixture.Client.GetStringAsync($"/LargeResponseBody?length={query}")); 658Assert.Equal("Success", await _fixture.Client.GetStringAsync(path + "/path" + "?query")); 666Assert.Equal(_fixture.Client.BaseAddress.ToString(), await _fixture.Client.GetStringAsync("/ServerAddresses")); 693Assert.Equal("Hello World", responseText);
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
48Assert.Equal("Hello World", await deploymentResult.HttpClient.GetStringAsync("/HelloWorld"));
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (21)
604Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 675Assert.Equal(expectedArguments, await result.HttpClient.GetStringAsync("/CommandLineArgs")); 713Assert.Equal(deploymentResult.ContentRoot, await deploymentResult.HttpClient.GetStringAsync("/ContentRootPath")); 714Assert.Equal(deploymentResult.ContentRoot + "\\wwwroot", await deploymentResult.HttpClient.GetStringAsync("/WebRootPath")); 715Assert.Equal(Path.GetDirectoryName(deploymentResult.HostProcess.MainModule.FileName), await deploymentResult.HttpClient.GetStringAsync("/CurrentDirectory")); 716Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/BaseDirectory")); 717Assert.Equal(deploymentResult.ContentRoot + "\\", await deploymentResult.HttpClient.GetStringAsync("/ASPNETCORE_IIS_PHYSICAL_PATH")); 889Assert.Equal("True", content); 907Assert.Equal("True", content); 1164Assert.Equal( 1183Assert.Equal( 1218Assert.Equal("Production", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1237Assert.Equal("Asm1", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1241Assert.Equal("Asm1;Microsoft.AspNetCore.Server.IISIntegration", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1260Assert.Equal("Asm2", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_HOSTINGSTARTUPASSEMBLIES")); 1278Assert.Equal("World;Hello", await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=OtherVariable")); 1295Assert.Equal(environment, await GetStringAsync(deploymentParameters, "/GetEnvironmentVariable?name=ASPNETCORE_ENVIRONMENT")); 1320Assert.Equal(deploymentParameters.ApplicationBaseUriHint + appName, await client.GetStringAsync($"/{appName}/ServerAddresses")); 1344Assert.Equal("123", await client.GetStringAsync("/ANCM_HTTPS_PORT")); 1345Assert.Equal("NOVALUE", await client.GetStringAsync("/HTTPS_PORT")); 1421Assert.Equal("NOVALUE", await client.GetStringAsync("/ANCM_HTTPS_PORT"));
UpgradeFeatureDetectionTests.cs (1)
76Assert.Equal(expected, responseText);
InMemory.FunctionalTests (596)
BadHttpRequestTests.cs (3)
184Assert.Equal("www.foo.com:80", receivedHost); 353Assert.Equal(expectedExceptionMessage, loggedException.Message); 357Assert.Equal("Microsoft.AspNetCore.Server.Kestrel.BadRequest", eventProviderName);
ChunkedRequestTests.cs (19)
180Assert.Equal("POST", request.Method); 251Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 273Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 274Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 281Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 282Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 289Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 290Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 377Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 404Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 405Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 412Assert.Equal("X-Trailer-Header", request.GetDeclaredTrailers().ToString()); 413Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 420Assert.Equal(string.Empty, request.GetDeclaredTrailers().ToString()); 421Assert.Equal(string.Empty, request.GetTrailer("X-Trailer-Header").ToString()); 596Assert.Equal(new string('a', requestsReceived), request.GetTrailer("X-Trailer-Header").ToString()); 916Assert.Equal("POST", request.Method); 972Assert.Equal("POST", request.Method); 1085Assert.Equal("POST", request.Method);
EventSourceTests.cs (31)
83Assert.Equal("ConnectionStart", connectionStart.EventName); 86Assert.Equal($"127.0.0.1:{port}", GetProperty(connectionStart, "localEndPoint")); 91Assert.Equal("RequestStart", firstRequestStart.EventName); 94Assert.Equal(requestIds[0], GetProperty(firstRequestStart, "requestId")); 100Assert.Equal("RequestStop", firstRequestStop.EventName); 104Assert.Equal(requestIds[0], GetProperty(firstRequestStop, "requestId")); 109Assert.Equal("RequestStart", secondRequestStart.EventName); 112Assert.Equal(requestIds[1], GetProperty(secondRequestStart, "requestId")); 118Assert.Equal("RequestStop", secondRequestStop.EventName); 122Assert.Equal(requestIds[1], GetProperty(secondRequestStop, "requestId")); 127Assert.Equal("ConnectionStop", connectionStop.EventName); 208Assert.Equal("ConnectionStart", connectionStart.EventName); 212Assert.Equal($"127.0.0.1:{port}", GetProperty(connectionStart, "localEndPoint")); 216Assert.Equal("TlsHandshakeStart", tlsHandshakeStart.EventName); 224Assert.Equal("TlsHandshakeStop", tlsHandshakeStop.EventName); 227Assert.Equal("h2", GetProperty(tlsHandshakeStop, "applicationProtocol")); 235Assert.Equal("RequestStart", requestStart.EventName); 238Assert.Equal(requestIds[i], GetProperty(requestStart, "requestId")); 244Assert.Equal("RequestStop", requestStop.EventName); 248Assert.Equal(requestIds[i], GetProperty(requestStop, "requestId")); 254Assert.Equal("ConnectionStop", connectionStop.EventName); 312Assert.Equal("ConnectionStart", connectionStart.EventName); 315Assert.Equal($"127.0.0.1:{port}", GetProperty(connectionStart, "localEndPoint")); 320Assert.Equal("TlsHandshakeStart", tlsHandshakeStart.EventName); 328Assert.Equal("TlsHandshakeFailed", tlsHandshakeFailed.EventName); 336Assert.Equal("TlsHandshakeStop", tlsHandshakeStop.EventName); 344Assert.Equal("ConnectionStop", connectionStop.EventName); 393Assert.Equal("ConnectionStart", connectionStart.EventName); 396Assert.Equal($"127.0.0.1:{port}", GetProperty(connectionStart, "localEndPoint")); 401Assert.Equal("ConnectionRejected", connectionRejected.EventName); 409Assert.Equal("ConnectionStop", connectionStop.EventName);
Http2\Http2ConnectionTests.cs (27)
277Assert.Equal("application/json", contentTypeValue1); 360Assert.Equal("true", _decodedHeaders["trailer-1"]); 388Assert.Equal("true", _decodedHeaders[$"trailer-{i + 1}"]); 2236Assert.Equal(header.Value, _receivedTrailers[header.Key]); 2390Assert.Equal("200", handler.Headers[":status"]); 2391Assert.Equal("SetCookie!", handler.Headers[HeaderNames.SetCookie]); 2392Assert.Equal("ContentDisposition!", handler.Headers[HeaderNames.ContentDisposition]); 2393Assert.Equal("0", handler.Headers[HeaderNames.ContentLength]); 2407Assert.Equal("200", handler.Headers[":status"]); 2408Assert.Equal("SetCookie!", handler.Headers[HeaderNames.SetCookie]); 2409Assert.Equal("ContentDisposition!", handler.Headers[HeaderNames.ContentDisposition]); 2410Assert.Equal("0", handler.Headers[HeaderNames.ContentLength]); 3094Assert.Equal("a=0; b=1; c=2", _receivedHeaders[HeaderNames.Cookie]); 4823Assert.Equal("1", _receivedTrailers["trailer-1"]); 4824Assert.Equal("2", _receivedTrailers["trailer-2"]); 4955Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4956Assert.Equal("0", _decodedHeaders["content-length"]); 4957Assert.Equal(_4kHeaderValue, _decodedHeaders["a"]); 4958Assert.Equal(_4kHeaderValue, _decodedHeaders["b"]); 4959Assert.Equal(_4kHeaderValue, _decodedHeaders["c"]); 4960Assert.Equal(_4kHeaderValue, _decodedHeaders["d"]); 4961Assert.Equal(_4kHeaderValue, _decodedHeaders["e"]); 4962Assert.Equal(_4kHeaderValue, _decodedHeaders["f"]); 4963Assert.Equal(_4kHeaderValue, _decodedHeaders["g"]); 4964Assert.Equal(_4kHeaderValue, _decodedHeaders["h"]); 5265Assert.Equal("Connection id \"TestConnectionId\" request processing ended abnormally.", logMessage.Message); 5284Assert.Equal(CoreStrings.RequestProcessingEndError, logMessage.Message);
Http2\Http2EndToEndTests.cs (1)
74Assert.Equal("hello, world", await responseMessage.Content.ReadAsStringAsync());
Http2\Http2StreamTests.cs (235)
112Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 113Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 114Assert.Equal(method, _decodedHeaders["Method"]); 131Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 132Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 133Assert.Equal(method, _decodedHeaders["Method"]); 162Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 163Assert.Equal("HEAD", _decodedHeaders["Method"]); 214Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 215Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 265Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 266Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 289Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 290Assert.Equal("CONNECT", _decodedHeaders["Method"]); 318Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 319Assert.Equal("", _decodedHeaders["path"]); 320Assert.Equal("*", _decodedHeaders["rawtarget"]); 321Assert.Equal("0", _decodedHeaders["content-length"]); 349Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 350Assert.Equal("/", _decodedHeaders["path"]); 351Assert.Equal("/", _decodedHeaders["rawtarget"]); 352Assert.Equal("0", _decodedHeaders["content-length"]); 386Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 387Assert.Equal("/a/path", _decodedHeaders["path"]); 388Assert.Equal("?a&que%35ry", _decodedHeaders["query"]); 389Assert.Equal("/a/path?a&que%35ry", _decodedHeaders["rawtarget"]); 390Assert.Equal("0", _decodedHeaders["content-length"]); 406Assert.Equal(expected, context.Request.Path.Value); 407Assert.Equal(input, context.Features.Get<IHttpRequestFeature>().RawTarget); 431Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 432Assert.Equal("0", _decodedHeaders["content-length"]); 479Assert.Equal(scheme, context.Request.Scheme); 503Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 504Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 554Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 555Assert.Equal("0", _decodedHeaders["content-length"]); 583Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 584Assert.Equal("0", _decodedHeaders["content-length"]); 612Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 613Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 614Assert.Equal("abc", _decodedHeaders[HeaderNames.Host]); 643Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 644Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 645Assert.Equal("abc", _decodedHeaders[HeaderNames.Host]); 674Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 675Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 676Assert.Equal("def", _decodedHeaders[HeaderNames.Host]); 705Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 706Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 707Assert.Equal("def", _decodedHeaders[HeaderNames.Host]); 827Assert.Equal("431", _decodedHeaders[InternalHeaderNames.Status]); 828Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 861Assert.Equal("431", _decodedHeaders[InternalHeaderNames.Status]); 862Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 898Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 899Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 939Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 940Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 982Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 983Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1025Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1026Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1078Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1079Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1165Assert.Equal(expectedError.Message, thrownEx.Message); 1200Assert.Equal(expectedError.Message, thrownEx.Message); 1236Assert.Equal(expectedError.Message, thrownEx.Message); 1272Assert.Equal(expectedError.Message, thrownEx.Message); 1320Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1321Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1358Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1359Assert.Equal("11", _decodedHeaders[HeaderNames.ContentLength]); 1397Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1398Assert.Equal("11", _decodedHeaders[HeaderNames.ContentLength]); 1431Assert.Equal("500", _decodedHeaders[InternalHeaderNames.Status]); 1432Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1466Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1501Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1502Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1541Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1576Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1624Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1664Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1700Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1701Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1742Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1778Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1779Assert.Equal("11", _decodedHeaders[HeaderNames.ContentLength]); 1812Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1849Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1850Assert.Equal("11", _decodedHeaders[HeaderNames.ContentLength]); 1887Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1888Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1934Assert.Equal("413", _decodedHeaders[InternalHeaderNames.Status]); 1935Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 1973Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 1974Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 2021Assert.Equal("413", _decodedHeaders[InternalHeaderNames.Status]); 2022Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 2084Assert.Equal("413", _decodedHeaders[InternalHeaderNames.Status]); 2085Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 2135Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2136Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 2174Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2215Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2216Assert.Equal("Custom 你好 Type", _decodedHeaders[HeaderNames.ContentType]); 2217Assert.Equal("Custom 你好 Value", _decodedHeaders["CustomName"]); 2266Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2267Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 2274Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 2299Assert.Equal("500", _decodedHeaders[InternalHeaderNames.Status]); 2300Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 2345Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 2352Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 2387Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2394Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 2442Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2449Assert.Equal(largeHeader, _decodedHeaders["CustomName0"]); 2450Assert.Equal(largeHeader, _decodedHeaders["CustomName1"]); 2451Assert.Equal(largeHeader, _decodedHeaders["CustomName2"]); 2452Assert.Equal(largeHeader, _decodedHeaders["CustomName3"]); 2453Assert.Equal(largeHeader, _decodedHeaders["CustomName4"]); 2460Assert.Equal(largeHeader, _decodedHeaders["CustomName5"]); 2500Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2543Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2550Assert.Equal("Custom 你好 Value", _decodedHeaders["CustomName"]); 2551Assert.Equal("Custom 你好 Tag", _decodedHeaders[HeaderNames.ETag]); 2552Assert.Equal("Custom 你好 Accept", _decodedHeaders[HeaderNames.Accept]); 2584Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 2629Assert.Equal(trailerValue, _decodedHeaders["too_long"]); 2673Assert.Equal("a-value", _decodedHeaders["a-key"]); 2674Assert.Equal("b-value", _decodedHeaders["b-key"]); 2681Assert.Equal(trailerValue, _decodedHeaders["too_long"]); 2712Assert.Equal("a-value", _decodedHeaders["a-key"]); 2713Assert.Equal("b-value", _decodedHeaders["b-key"]); 2720Assert.Equal(trailerValue, _decodedHeaders["too_long"]); 2762Assert.Equal(trailerValue, _decodedHeaders["too_long"]); 2779Assert.Equal(trailerValue, _decodedHeaders["too_long2"]); 2816Assert.Equal(shortValue, _decodedHeaders["short"]); 2833Assert.Equal(trailerValue, _decodedHeaders["long"]); 2834Assert.Equal(shortValue, _decodedHeaders["short2"]); 2861Assert.Equal("200", _decodedHeaders[":status"]); 2862Assert.Equal("Sat, 01 Jan 2000 00:00:00 GMT", _decodedHeaders["date"]); 2880Assert.Equal(value, _decodedHeaders["too_long_header"]); 2905Assert.Equal(value, _decodedHeaders["too_long_trailer"]); 2919Assert.Equal("200", _decodedHeaders[":status"]); 2920Assert.Equal("Sat, 01 Jan 2000 00:00:00 GMT", _decodedHeaders["date"]); 2938Assert.Equal(value, _decodedHeaders["too_long_header"]); 2963Assert.Equal(value, _decodedHeaders["too_long_trailer"]); 3029Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 3035Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 3081Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 3087Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 3119Assert.Equal("500", _decodedHeaders[InternalHeaderNames.Status]); 3120Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 3157Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 3443Assert.Equal(CoreStrings.ConnectionAbortedByApplication, thrownEx.Message); 3470Assert.Equal("The request was aborted", thrownEx.Message); 3472Assert.Equal(CoreStrings.ConnectionAbortedByApplication, thrownEx.InnerException.Message); 3744Assert.Equal(headerValue, _decodedHeaders[longHeaderName]); 3813Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 3814Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 3862Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 3906Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 3952Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4005Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4058Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4104Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4154Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4199Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4242Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4280Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4281Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 4423Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4473Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4474Assert.Equal("12", _decodedHeaders[HeaderNames.ContentLength]); 4519Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4520Assert.Equal("12", _decodedHeaders[HeaderNames.ContentLength]); 4559Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4560Assert.Equal("12", _decodedHeaders[HeaderNames.ContentLength]); 4623Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4624Assert.Equal("54", _decodedHeaders[HeaderNames.ContentLength]); 4655Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4688Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4721Assert.Equal("500", _decodedHeaders[InternalHeaderNames.Status]); 4776Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4777Assert.Equal("0", _decodedHeaders["content-length"]); 4836Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4837Assert.Equal("0", _decodedHeaders["content-length"]); 4844Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 4868Assert.Equal(CoreStrings.FormatTooFewBytesWritten(0, 25), ex.Message); 4897Assert.Equal("500", _decodedHeaders[InternalHeaderNames.Status]); 4898Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 4962Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 4964Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 4991Assert.Equal("Writing is not allowed after writer was completed.", ex.Message); 5019Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5020Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 5050Assert.Equal("Writing is not allowed after writer was completed.", ex.Message); 5086Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5088Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5131Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5132Assert.Equal("0", _decodedHeaders[HeaderNames.ContentLength]); 5204Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5206Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5213Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 5278Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5280Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5287Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 5316Assert.Equal(CoreStrings.FormatTooFewBytesWritten(11, 25), ex.Message); 5354Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5355Assert.Equal("25", _decodedHeaders[HeaderNames.ContentLength]); 5357Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5387Assert.Equal(CoreStrings.FormatTooFewBytesWritten(11, 25), ex.Message); 5425Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5426Assert.Equal("25", _decodedHeaders[HeaderNames.ContentLength]); 5428Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5499Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5501Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5508Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 5583Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5585Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5592Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 5665Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5667Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5674Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 5752Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5754Assert.Equal("Hello World", Encoding.UTF8.GetString(bodyFrame.Payload.Span)); 5761Assert.Equal("Custom Value", _decodedHeaders["CustomName"]); 5782Assert.Equal("£", context.Request.Headers["X-Test"]); 5799Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5800Assert.Equal("0", _decodedHeaders["content-length"]); 5827Assert.Equal("£", context.Request.Headers["X-Test"]); 5874Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 5926Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]);
Http2\Http2TestBase.cs (4)
1356Assert.Equal(header.Value, _receivedRequestFields.Method); 1361Assert.Equal(header.Value, host); 1365Assert.Equal(header.Value, _receivedRequestFields.Scheme); 1369Assert.Equal(header.Value, _receivedRequestFields.RawTarget);
Http2\Http2WebSocketTests.cs (42)
24Assert.Equal(HttpMethods.Connect, context.Request.Method); 25Assert.Equal("websocket", connectFeature.Protocol); 27Assert.Equal("http", context.Request.Scheme); 28Assert.Equal("/chat", context.Request.Path.Value); 29Assert.Equal("server.example.com", context.Request.Host.Value); 30Assert.Equal("chat, superchat", context.Request.Headers.WebSocketSubProtocols); 31Assert.Equal("permessage-deflate", context.Request.Headers.SecWebSocketExtensions); 32Assert.Equal("13", context.Request.Headers.SecWebSocketVersion); 33Assert.Equal("http://www.example.com", context.Request.Headers.Origin); 73Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 86Assert.Equal(HttpMethods.Connect, context.Request.Method); 87Assert.Equal("websocket", connectFeature.Protocol); 89Assert.Equal("http", context.Request.Scheme); 90Assert.Equal("/chat", context.Request.Path.Value); 91Assert.Equal("server.example.com", context.Request.Host.Value); 92Assert.Equal("chat, superchat", context.Request.Headers.WebSocketSubProtocols); 93Assert.Equal("permessage-deflate", context.Request.Headers.SecWebSocketExtensions); 94Assert.Equal("13", context.Request.Headers.SecWebSocketVersion); 95Assert.Equal("http://www.example.com", context.Request.Headers.Origin); 138Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 162Assert.Equal(HttpMethods.Connect, context.Request.Method); 163Assert.Equal("websocket", connectFeature.Protocol); 165Assert.Equal("http", context.Request.Scheme); 166Assert.Equal("/chat", context.Request.Path.Value); 167Assert.Equal("server.example.com", context.Request.Host.Value); 168Assert.Equal("chat, superchat", context.Request.Headers.WebSocketSubProtocols); 169Assert.Equal("permessage-deflate", context.Request.Headers.SecWebSocketExtensions); 170Assert.Equal("13", context.Request.Headers.SecWebSocketVersion); 171Assert.Equal("http://www.example.com", context.Request.Headers.Origin); 229Assert.Equal("201", _decodedHeaders[InternalHeaderNames.Status]); 265Assert.Equal("201", _decodedHeaders[InternalHeaderNames.Status]); 368Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 432Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 457Assert.Equal(CoreStrings.FormatConnectResponseCanNotHaveBody(200), ex.Message); 459Assert.Equal(CoreStrings.FormatConnectResponseCanNotHaveBody(200), ex.Message); 466Assert.Equal(CoreStrings.FormatConnectResponseCanNotHaveBody(200), ex.Message); 468Assert.Equal(CoreStrings.FormatConnectResponseCanNotHaveBody(200), ex.Message); 500Assert.Equal("200", _decodedHeaders[InternalHeaderNames.Status]); 555Assert.Equal("418", _decodedHeaders[InternalHeaderNames.Status]); 556Assert.Equal("2", _decodedHeaders[HeaderNames.ContentLength]); 592Assert.Equal(HttpMethods.Connect, context.Request.Method); 593Assert.Equal("websocket", connectFeature.Protocol);
Http3\Http3ConnectionTests.cs (7)
70Assert.Equal("Hello world", Encoding.ASCII.GetString(responseData.ToArray())); 113Assert.Equal("Hello world", Encoding.ASCII.GetString(responseData.ToArray())); 119Assert.Equal($"End", Encoding.ASCII.GetString(responseData.ToArray())); 161Assert.Equal("a=0; b=1; c=2", receivedHeaders); 485Assert.Equal("application/json", contentTypeValue1); 797Assert.Equal($"Hello world {index}", Encoding.ASCII.GetString(responseData.ToArray())); 803Assert.Equal($"End {index}", Encoding.ASCII.GetString(responseData.ToArray()));
Http3\Http3StreamTests.cs (128)
37Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 40Assert.Equal("Hello world", Encoding.ASCII.GetString(responseData.ToArray())); 61Assert.Equal("401", responseHeaders[InternalHeaderNames.Status]); 119Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 120Assert.Equal("Custom", responseHeaders["Method"]); 121Assert.Equal("0", responseHeaders["content-length"]); 156Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 157Assert.Equal("CONNECT", responseHeaders["Method"]); 173Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 174Assert.Equal("", responseHeaders["path"]); 175Assert.Equal("*", responseHeaders["rawtarget"]); 176Assert.Equal("0", responseHeaders["content-length"]); 192Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 193Assert.Equal("/", responseHeaders["path"]); 194Assert.Equal("/", responseHeaders["rawtarget"]); 195Assert.Equal("0", responseHeaders["content-length"]); 218Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 219Assert.Equal("/a/path", responseHeaders["path"]); 220Assert.Equal("?a&que%35ry", responseHeaders["query"]); 221Assert.Equal("/a/path?a&que%35ry", responseHeaders["rawtarget"]); 222Assert.Equal("0", responseHeaders["content-length"]); 243Assert.Equal(expected, context.Request.Path.Value); 244Assert.Equal(input, context.Features.Get<IHttpRequestFeature>().RawTarget); 252Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 253Assert.Equal("0", responseHeaders["content-length"]); 303Assert.Equal(scheme, context.Request.Scheme); 311Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 312Assert.Equal("0", responseHeaders["content-length"]); 350Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 351Assert.Equal("0", responseHeaders["content-length"]); 370Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 371Assert.Equal("0", responseHeaders["content-length"]); 391Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 392Assert.Equal("0", responseHeaders[HeaderNames.ContentLength]); 393Assert.Equal("abc", responseHeaders[HeaderNames.Host]); 414Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 415Assert.Equal("0", responseHeaders[HeaderNames.ContentLength]); 416Assert.Equal("abc", responseHeaders[HeaderNames.Host]); 437Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 438Assert.Equal("0", responseHeaders[HeaderNames.ContentLength]); 439Assert.Equal("def", responseHeaders[HeaderNames.Host]); 460Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 461Assert.Equal("0", responseHeaders[HeaderNames.ContentLength]); 462Assert.Equal("def", responseHeaders[HeaderNames.Host]); 570Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 571Assert.Equal("0", responseHeaders[HeaderNames.ContentLength]); 606Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 607Assert.Equal("0", responseHeaders[HeaderNames.ContentLength]); 641Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 642Assert.Equal("0", responseHeaders[HeaderNames.ContentLength]); 673Assert.Equal("Hello world", Encoding.ASCII.GetString(responseData.ToArray())); 809Assert.Equal("hello,", Encoding.UTF8.GetString(response.Span)); 812Assert.Equal(" world", Encoding.UTF8.GetString(secondResponse.Span)); 843Assert.Equal("Value1", responseTrailers["Trailer1"]); 844Assert.Equal("Value2", responseTrailers["Trailer2"]); 871Assert.Equal("Hello World", Encoding.ASCII.GetString(responseData.ToArray())); 875Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 905Assert.Equal("Hello World", Encoding.ASCII.GetString(responseData.ToArray())); 909Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 910Assert.Equal("Custom 你好 Type", responseHeaders[HeaderNames.ContentType]); 911Assert.Equal("Custom 你好 Value", responseHeaders["CustomName"]); 964Assert.Equal("Hello world", Encoding.ASCII.GetString(responseData.ToArray())); 969Assert.Equal("Value1", responseTrailers["Trailer1"]); 970Assert.Equal("Value2", responseTrailers["Trailer2"]); 1023Assert.Equal("Hello World", Encoding.ASCII.GetString(responseData.ToArray())); 1054Assert.Equal("Hello World", Encoding.ASCII.GetString(responseData.ToArray())); 1058Assert.Equal("Custom 你好 Value", responseTrailers["CustomName"]); 1059Assert.Equal("Custom 你好 Tag", responseTrailers[HeaderNames.ETag]); 1060Assert.Equal("Custom 你好 Accept", responseTrailers[HeaderNames.Accept]); 1088Assert.Equal("Hello World", Encoding.ASCII.GetString(responseData.ToArray())); 1163Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1164Assert.Equal("0", decodedHeaders["content-length"]); 1215Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1216Assert.Equal("0", decodedHeaders["content-length"]); 1219Assert.Equal("Custom Value", decodedTrailers["CustomName"]); 1243Assert.Equal(CoreStrings.FormatTooFewBytesWritten(0, 25), ex.Message); 1310Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1314Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1346Assert.Equal("Writing is not allowed after writer was completed.", ex.Message); 1362Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1363Assert.Equal("0", decodedHeaders[HeaderNames.ContentLength]); 1398Assert.Equal("Writing is not allowed after writer was completed.", ex.Message); 1414Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1417Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1456Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1457Assert.Equal("0", decodedHeaders["content-length"]); 1510Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1513Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1516Assert.Equal("Custom Value", decodedTrailers["CustomName"]); 1565Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1568Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1571Assert.Equal("Custom Value", decodedTrailers["CustomName"]); 1605Assert.Equal(CoreStrings.FormatTooFewBytesWritten(11, 25), ex.Message); 1626Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1663Assert.Equal(CoreStrings.FormatTooFewBytesWritten(11, 25), ex.Message); 1684Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1739Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1742Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1745Assert.Equal("Custom Value", decodedTrailers["CustomName"]); 1803Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 1806Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1809Assert.Equal("Custom Value", decodedTrailers["CustomName"]); 1867Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1935Assert.Equal("Hello World", Encoding.UTF8.GetString(data.Span)); 1992Assert.Equal("TestValue", testValue); 2079Assert.Equal("The request trailers are not available yet. They may not be available until the full request body is read.", ex.Message); 2339Assert.Equal("431", receivedHeaders[InternalHeaderNames.Status]); 2340Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2397Assert.Equal("431", receivedHeaders[InternalHeaderNames.Status]); 2398Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2521Assert.Equal("200", receivedHeaders[InternalHeaderNames.Status]); 2522Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2558Assert.Equal("The application completed without reading the entire request body.", requestStream.AbortReadException.Message); 2562Assert.Equal("413", receivedHeaders[InternalHeaderNames.Status]); 2563Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2594Assert.Equal("200", receivedHeaders[InternalHeaderNames.Status]); 2595Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2634Assert.Equal("413", receivedHeaders[InternalHeaderNames.Status]); 2635Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2689Assert.Equal("413", receivedHeaders[InternalHeaderNames.Status]); 2690Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2733Assert.Equal("200", receivedHeaders[InternalHeaderNames.Status]); 2734Assert.Equal("0", receivedHeaders[HeaderNames.ContentLength]); 2908Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 2912Assert.Equal(i + "-" + headerText, responseHeaders["Header" + i]); 2948Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]); 2953Assert.Equal(i + "-" + headerText, responseTrailers["Header" + i]); 2976Assert.Equal("200", responseHeaders[InternalHeaderNames.Status]);
HttpsConnectionMiddlewareTests.cs (23)
66Assert.Equal("content=Hello+World%3F", result); 100Assert.Equal("content=Hello+World%3F", result); 122Assert.Equal("hello world", result); 147Assert.Equal(expectedHostname, tlsFeature.HostName); 161Assert.Equal("hello world", result); 197Assert.Equal("hello world", result); 239Assert.Equal("hello world", result); 267Assert.Equal("hello world", result); 308Assert.Equal("localhost", name); 338Assert.Equal("localhost", clientHelloInfo.ServerName); 372Assert.Equal("localhost", name); 445Assert.Equal("localhost", name); 899Assert.Equal("Client stream needs to be drained before renegotiation.", ex.Message); 1036Assert.Equal(expectedBody, body); 1083Assert.Equal("Client stream needs to be drained before renegotiation.", ioe.Message); 1101Assert.Equal("HTTP/1.1 200 OK", await reader.ReadLineAsync().DefaultTimeout()); 1102Assert.Equal("Content-Length: 11", await reader.ReadLineAsync().DefaultTimeout()); 1103Assert.Equal("Connection: close", await reader.ReadLineAsync().DefaultTimeout()); 1105Assert.Equal("", await reader.ReadLineAsync().DefaultTimeout()); 1106Assert.Equal("hello world", await reader.ReadLineAsync().DefaultTimeout()); 1121Assert.Equal("https", result); 1351Assert.Equal(CoreStrings.FormatInvalidServerCertificateEku(cert.Thumbprint), ex.Message); 1526Assert.Equal("HTTP/1.1 200 OK", line);
HttpsTests.cs (1)
578Assert.Equal("HTTP/3 requires HTTPS.", ex.InnerException.InnerException.Message);
KestrelMetricsTests.cs (16)
97Assert.Equal("value!", (string)m.Tags["custom"]); 386Assert.Equal("value!", (string)m.Tags["custom"]); 754Assert.Equal("1.2", (string)m.Tags["tls.protocol.version"]); 762Assert.Equal("http", (string)measurement.Tags["network.protocol.name"]); 763Assert.Equal(httpVersion, (string)measurement.Tags["network.protocol.version"]); 914Assert.Equal(typeof(AuthenticationException).FullName, (string)m.Tags["error.type"]); 935Assert.Equal(networkTransport, (string)measurement.Tags["network.transport"]); 936Assert.Equal(localAddress, (string)measurement.Tags["server.address"]); 947Assert.Equal(networkType, (string)measurement.Tags["network.type"]); 955Assert.Equal("http", (string)measurement.Tags["network.protocol.name"]); 956Assert.Equal(httpVersion, (string)measurement.Tags["network.protocol.version"]); 965Assert.Equal(tlsProtocolVersion, (string)measurement.Tags["tls.protocol.version"]); 973Assert.Equal(error, (string)measurement.Tags["error.type"]); 991Assert.Equal(networkTransport, (string)measurement.Tags["network.transport"]); 992Assert.Equal(localAddress, (string)measurement.Tags["server.address"]); 1003Assert.Equal(networkType, (string)measurement.Tags["network.type"]);
LoggingConnectionMiddlewareTests.cs (1)
36Assert.Equal("Hello World!", response);
MaxRequestBodySizeTests.cs (12)
62Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(globalMaxRequestBodySize), requestRejectedEx.Message); 205Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(perRequestMaxRequestBodySize), requestRejectedEx.Message); 320Assert.Equal(CoreStrings.MaxRequestBodySizeCannotBeModifiedAfterRead, invalidOpEx.Message); 359Assert.Equal(CoreStrings.MaxRequestBodySizeCannotBeModifiedForUpgradedRequests, invalidOpEx.Message); 406Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(0), requestRejectedEx1.Message); 407Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(0), requestRejectedEx2.Message); 458Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(globalMaxRequestBodySize), requestRejectedEx.Message); 480Assert.Equal("Hello World", Encoding.ASCII.GetString(buffer)); 481Assert.Equal("trailing-value", context.Request.GetTrailer("Trailing-Header").ToString()); 575Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(globalMaxRequestBodySize), requestRejectedEx.Message); 619Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(0), requestRejectedEx1.Message); 620Assert.Equal(CoreStrings.FormatBadRequest_RequestBodyTooLarge(0), requestRejectedEx2.Message);
RequestTargetProcessingTests.cs (3)
24Assert.Equal("/\u0041\u030A/B/\u0041\u030A", context.Request.Path.Value); 69Assert.Equal(requestTarget, context.Features.Get<IHttpRequestFeature>().RawTarget); 101Assert.Equal(requestTarget, context.Features.Get<IHttpRequestFeature>().RawTarget);
RequestTests.cs (22)
48Assert.Equal(string.Empty, await server.HttpClientSlim.GetStringAsync($"http://localhost:{server.Port}/")); 49Assert.Equal(string.Empty, await server.HttpClientSlim.GetStringAsync($"http://localhost:{server.Port}/")); 72Assert.Equal("hello, world", await server.HttpClientSlim.GetStringAsync($"http://localhost:{server.Port}/")); 73Assert.Equal("hello, world", await server.HttpClientSlim.GetStringAsync($"http://localhost:{server.Port}/")); 105Assert.Equal("hello, world", await server.HttpClientSlim.GetStringAsync($"http://localhost:{server.Port}/")); 123Assert.Equal("Hello ", Encoding.ASCII.GetString(data)); 268Assert.Equal(requestUrl, await rawTargetTcs.Task); 275Assert.Equal(queryValue, (await queryTcs.Task)["q"]); 582Assert.Equal(knownId, requestId); 1699Assert.Equal(CoreStrings.SynchronousReadsDisallowed, ioEx.Message); 1702Assert.Equal(CoreStrings.SynchronousReadsDisallowed, ioEx2.Message); 1710Assert.Equal("Hello", Encoding.ASCII.GetString(buffer, 0, 5)); 1753Assert.Equal("Hello", Encoding.ASCII.GetString(buffer, 0, 5)); 1792Assert.Equal(CoreStrings.SynchronousReadsDisallowed, ioEx.Message); 1795Assert.Equal(CoreStrings.SynchronousReadsDisallowed, ioEx2.Message); 1801Assert.Equal("Hello", Encoding.ASCII.GetString(buffer)); 1843Assert.Equal("Hello", Encoding.ASCII.GetString(buffer, 0, 5)); 1908Assert.Equal("POST", request.Method); 1958Assert.Equal("POST", request.Method); 2043Assert.Equal("POST", request.Method); 2201Assert.Equal("£", context.Request.Headers["X-Test"]); 2294Assert.Equal("£", context.Request.Headers["X-Test"]);
ResponseDrainingTests.cs (1)
74Assert.Equal(CoreStrings.ConnectionTimedBecauseResponseMininumDataRateNotSatisfied, transportConnection.AbortReason.Message);
ResponseTests.cs (10)
704Assert.Equal(CoreStrings.FormatHeaderNotAllowedOnResponse("Content-Length", statusCode), ex.Message); 782Assert.Equal(CoreStrings.NonzeroContentLengthNotAllowedOn205, ex.Message); 820Assert.Equal(CoreStrings.FormatWritingToResponseBodyNotSupported(statusCode), ex.Message); 862Assert.Equal(CoreStrings.FormatWritingToResponseBodyNotSupported(205), ex.Message); 984Assert.Equal( 1022Assert.Equal( 1062Assert.Equal( 1097Assert.Equal( 3425Assert.Equal(CoreStrings.SynchronousWritesDisallowed, ioEx.Message); 3521Assert.Equal(CoreStrings.SynchronousWritesDisallowed, ioEx.Message);
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
14Assert.Equal(KestrelMetrics.GetErrorType(expectedReason), errorType);
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
126Assert.Equal(expected, actualText); 135Assert.Equal("", text);
UpgradeTests.cs (7)
32Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, ex.Message); 35Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, ex.Message); 84Assert.Equal(send, line); 155Assert.Equal(CoreStrings.UpgradeCannotBeCalledMultipleTimes, ex.Message); 239Assert.Equal("chunked", context.Request.Headers.TransferEncoding); 297Assert.Equal(CoreStrings.CannotUpgradeNonUpgradableRequest, ex.Message); 348Assert.Equal(CoreStrings.UpgradedConnectionLimitReached, exception.Message);
InProcessWebSite (19)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (18)
275Assert.Equal("GET", ctx.Request.Method); 277Assert.Equal("test", ctx.Request.Method); 279Assert.Equal("http", ctx.Request.Scheme); 281Assert.Equal("test", ctx.Request.Scheme); 283Assert.Equal("/FeatureCollectionSetRequestFeatures", ctx.Request.PathBase); 285Assert.Equal("/base", ctx.Request.PathBase); 287Assert.Equal("/path", ctx.Request.Path); 289Assert.Equal("/path", ctx.Request.Path); 291Assert.Equal("?query", ctx.Request.QueryString.Value); 293Assert.Equal("", ctx.Request.QueryString.Value); 295Assert.Equal("HTTP/1.1", ctx.Request.Protocol); 297Assert.Equal("HTTP/1.0", ctx.Request.Protocol); 337Assert.Equal("Set Response", ctx.Features.Get<IHttpResponseFeature>().ReasonPhrase); 1147Assert.Equal("£", value); 1154Assert.Equal("�", value); 1166Assert.Equal("gzip, chunked", ctx.Request.Headers["Transfer-Encoding"]); 1184Assert.Equal("gzip, chunked", ctx.Request.Headers["Transfer-Encoding"]); 1187Assert.Equal("5", ctx.Request.Headers["X-Content-Length"]);
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (1)
97Assert.Equal("Upgrade requires HTTP/1.1.", ex.Message);
InteractiveHost.UnitTests (56)
InteractiveHostCoreInitTests.cs (2)
91Assert.Equal("", error); 92Assert.Equal("[Metadata.ICSProp]\r\n", output);
InteractiveHostCoreTests.cs (2)
34Assert.Equal("", output); 43Assert.Equal("2\r\n", output.ToString());
InteractiveHostDesktopInitTests.cs (2)
64Assert.Equal("", error); 65Assert.Equal("[Metadata.ICSProp]\r\n", output);
InteractiveHostDesktopTests.cs (50)
38Assert.Equal("hello-\u4567!\r\n2\r\n", output); 39Assert.Equal("error-\u7890!\r\n", error); 50Assert.Equal("1\r\n", output); 51Assert.Equal("2\r\n", error); 60Assert.Equal("3\r\n", output); 61Assert.Equal("4\r\n", error); 78Assert.Equal("", output); 87Assert.Equal("2\r\n", output.ToString()); 124Assert.Equal("2\r\n", output); 162Assert.Equal("", error); 195Assert.Equal("2\r\n", output); 241Assert.Equal("5", output.Trim()); 245Assert.Equal("2", output.Trim()); 249Assert.Equal("3", output.Trim()); 253Assert.Equal("4", output.Trim()); 296Assert.Equal("2\r\n", output); 325Assert.Equal("[4.0.0.0]\r\n", output); 343Assert.Equal("", error.Trim()); 344Assert.Equal("", output.Trim()); 350Assert.Equal("", error.Trim()); 351Assert.Equal("", output.Trim()); 357Assert.Equal("", error.Trim()); 358Assert.Equal("", output.Trim()); 375Assert.Equal("C { }", output.Trim()); 384Assert.Equal("", error.Trim()); 385Assert.Equal("C { }", output.Trim()); 446Assert.Equal("", error.Trim()); 447Assert.Equal("1", output.Trim()); 474Assert.Equal("", error.Trim()); 475Assert.Equal("2", output.Trim()); 529Assert.Equal("", error.Trim()); 530Assert.Equal(@"1 562Assert.Equal(@"(2,1): error CS1704: An assembly with the same simple name 'C' has already been imported. Try removing one of the references (e.g. '" + file1.Path + @"') or sign them to enable side-by-side. 566Assert.Equal("", output.Trim()); 597Assert.Equal("TODO: error", error.Trim()); 598Assert.Equal("", output.Trim()); 850Assert.Equal("", error); 868Assert.Equal("", output); 886Assert.Equal("", error); 887Assert.Equal("OK\r\n", output); 903Assert.Equal("1\r\n2\r\n3\r\n", output); 922Assert.Equal("", error); 923Assert.Equal("object[3] { Class1 { }, Class2 { }, Class3 { } }\r\n", output); 950Assert.Equal("", error); 966Assert.Equal("42", output); 977Assert.Equal("", output); 1032Assert.Equal("", error); 1054Assert.Equal("null\r\n", output); 1063Assert.Equal("2\r\n", output); 1071Assert.Equal("", output);
Interop.FunctionalTests (80)
Http2\Http2RequestTests.cs (16)
78Assert.Equal("http", (string)tags.Single(t => t.Key == "network.protocol.name").Value); 79Assert.Equal("2", (string)tags.Single(t => t.Key == "network.protocol.version").Value); 80Assert.Equal("tcp", (string)tags.Single(t => t.Key == "network.transport").Value); 81Assert.Equal("ipv4", (string)tags.Single(t => t.Key == "network.type").Value); 82Assert.Equal("127.0.0.1", (string)tags.Single(t => t.Key == "server.address").Value); 84Assert.Equal("invalid_handshake", (string)tags.Single(t => t.Key == "error.type").Value); 145Assert.Equal("http", (string)m.Tags["network.protocol.name"]); 146Assert.Equal("2", (string)m.Tags["network.protocol.version"]); 147Assert.Equal("tcp", (string)m.Tags["network.transport"]); 148Assert.Equal("ipv6", (string)m.Tags["network.type"]); 149Assert.Equal("::1", (string)m.Tags["server.address"]); 151Assert.Equal("1.2", (string)m.Tags["tls.protocol.version"]); 191Assert.Equal("abc", response.Headers.GetValues("test").Single()); 192Assert.Equal(longValue, response.Headers.GetValues(longKey).Single()); 218Assert.Equal("An HTTP/1.x request was sent to an HTTP/2 only endpoint.", await responseMessage.Content.ReadAsStringAsync()); 287Assert.Equal("value!", trailers.GetValues("test-trailer").Single());
Http2WebSocketInteropTests.cs (3)
61Assert.Equal(expectedVersion, context.Request.Protocol); 68Assert.Equal("Hello", Encoding.UTF8.GetString(bytes, 0, result.Count)); 92Assert.Equal("Hi there", Encoding.UTF8.GetString(bytes, 0, result.Count));
Http3\Http3RequestTests.cs (18)
105Assert.Equal("ipv4", (string)m.Tags["network.type"]); 106Assert.Equal("http", (string)m.Tags["network.protocol.name"]); 107Assert.Equal("3", (string)m.Tags["network.protocol.version"]); 108Assert.Equal("udp", (string)m.Tags["network.transport"]); 109Assert.Equal("127.0.0.1", (string)m.Tags["server.address"]); 111Assert.Equal("1.3", (string)m.Tags["tls.protocol.version"]); 155Assert.Equal("hello, world", await responseMessage.Content.ReadAsStringAsync()); 439Assert.Equal("Hello world", responseText); 521Assert.Equal("The client reset the request stream.", serverEx.Message); 587Assert.Equal("The connection was aborted by the application.", serverEx.Message); 740Assert.Equal("Hello world", responseText); 1046Assert.Equal("The client reset the request stream.", serverEx.Message); 1256Assert.Equal(new string('!', i), value); 1312Assert.Equal(connectionId1, connectionId2); // ConnectionId unchanged 1314Assert.Equal($"{connectionId1}:00000000", traceId1); 1315Assert.Equal($"{connectionId2}:00000004", traceId2); 1376Assert.Equal("TestUserAgent", request1HeaderValue); 1942Assert.Equal("The connection was aborted because the server is shutting down and request processing didn't complete within the time specified by HostOptions.ShutdownTimeout.", ex.Message);
Http3\Http3TlsTests.cs (10)
44Assert.Equal("testhost", host); 65Assert.Equal("Hello World", result); 111Assert.Equal("True", result); 153Assert.Equal("False", result); 211Assert.Equal("True", await response.Content.ReadAsStringAsync().DefaultTimeout()); 250Assert.Equal("False", await response.Content.ReadAsStringAsync()); 283Assert.Equal("The OnAuthenticate callback is not supported with HTTP/3.", exception.Message); 331Assert.Equal("Hello World", result); 485Assert.Equal(expectedCertificate.GetSerialNumberString(), actualCertificate.GetSerialNumberString()); 496Assert.Equal("Hello World", result);
HttpClientHttp2InteropTests.cs (33)
66Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 393Assert.Equal("Hello World", lastData); 442Assert.Equal("Hello World", read); 447Assert.Equal("Hello World", await clientEcho.Task.DefaultTimeout()); 537Assert.Equal("TestTrailer", response.Headers.Trailer.Single()); 539Assert.Equal("TestValue", response.TrailingHeaders.GetValues("TestTrailer").Single()); 540Assert.Equal("", await response.Content.ReadAsStringAsync()); 569Assert.Equal("TestTrailer", response.Headers.Trailer.Single()); 574Assert.Equal("Hello World", responseBody); 576Assert.Equal("TestValue", response.TrailingHeaders.GetValues("TestTrailer").Single()); 600Assert.Equal("The HTTP/2 server reset the stream. HTTP/2 error code 'CANCEL' (0x8). (HttpProtocolError)", exception?.InnerException?.Message); 629Assert.Equal("The HTTP/2 server reset the stream. HTTP/2 error code 'CANCEL' (0x8). (HttpProtocolError)", exception?.InnerException?.Message); 656Assert.Equal("Hello World", body); 684Assert.Equal("TestTrailer", response.Headers.Trailer.Single()); 686Assert.Equal("Hello World", responseBody); 688Assert.Equal("TestValue", response.TrailingHeaders.GetValues("TestTrailer").Single()); 1039Assert.Equal(oneKbString + i, context.Request.Headers["header" + i]); 1113Assert.Equal(oneKbString + i, response.Headers.GetValues("header" + i).Single()); 1148Assert.Equal(oneKbString + i, context.Request.Headers["header" + i]); 1328Assert.Equal("Hello World", responseBody); 1332Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 1362Assert.Equal("Hello World", responseBody); 1371Assert.Equal("The HTTP request headers length exceeded the server limit of 32768 bytes.", ex.Message); 1402Assert.Equal("The HTTP response headers length exceeded the set limit of 65536 bytes.", ex.InnerException?.InnerException?.Message); 1447Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 1537Assert.Equal("Hello World", await response0.Content.ReadAsStringAsync()); 1538Assert.Equal("Hello World", await response1.Content.ReadAsStringAsync()); 1558Assert.Equal("點.看", context.Request.Host.Host); 1570Assert.Equal("點.看", await response.Content.ReadAsStringAsync()); 1592Assert.Equal("/ !\"$%&'()*++,-./0123456789:;<>=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[/]^_`{|}~點看", await response.Content.ReadAsStringAsync()); 1637Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 1682Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 1734Assert.Equal("Hello World", Encoding.UTF8.GetString(responseBuffer));
Microsoft.Analyzers.Extra.Tests (37)
CallAnalysis\LegacyLoggingTests.cs (19)
81Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 82Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 174Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 175Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 238Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 239Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 298Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 299Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 372Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 373Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 449Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 450Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 531Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 532Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 619Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 620Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 691Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 692Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 771Assert.Equal(DiagDescriptors.LegacyLogging.Id, f.FixableDiagnosticIds[0]);
CallAnalysis\LegacyLoggingTests.Extra.cs (16)
100Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 101Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 181Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 182Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 242Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 243Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 305Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 306Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 366Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 367Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 442Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 443Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 692Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 693Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget); 754Assert.Equal(ExpectedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualSource); 755Assert.Equal(ExpectedTarget.Replace("\r\n", "\n", StringComparison.Ordinal), actualTarget);
MakeExeTypesInternalTests.cs (2)
75Assert.Equal(ExpectedFixedSource.Replace("\r\n", "\n", StringComparison.Ordinal), actualFixedSources[0]); 173Assert.Equal(DiagDescriptors.MakeExeTypesInternal.Id, f.FixableDiagnosticIds[0]);
Microsoft.Analyzers.Local.Tests (21)
Json\JsonReaderTest.cs (11)
33Assert.Equal("true", JsonReader.Parse("true").AsString); 37Assert.Equal("true", JsonReader.Parse(reader).AsString); 60Assert.Equal("\"", JsonReader.Parse("\"\\\"\"").AsString); 61Assert.Equal("\\", JsonReader.Parse("\"\\\\\"").AsString); 62Assert.Equal("/", JsonReader.Parse("\"\\/\"").AsString); 63Assert.Equal("\b", JsonReader.Parse("\"\\b\"").AsString); 64Assert.Equal("\f", JsonReader.Parse("\"\\f\"").AsString); 65Assert.Equal("\n", JsonReader.Parse("\"\\n\"").AsString); 66Assert.Equal("\r", JsonReader.Parse("\"\\r\"").AsString); 67Assert.Equal("\t", JsonReader.Parse("\"\\t\"").AsString); 68Assert.Equal("\u0123\u4567\u89AB\uCDEF", JsonReader.Parse("\"\\u0123\\u4567\\u89AB\\uCDEF\"").AsString);
Json\JsonValueTest.cs (10)
36Assert.Equal("text", new JsonValue("text").AsString); 55Assert.Equal("interface Microsoft.Extensions.Metrics.IHistogram2<in T> where T : struct", 122Assert.Equal("false", new JsonValue(false).AsString); 123Assert.Equal("true", new JsonValue(true).AsString); 124Assert.Equal("0.5", new JsonValue(0.5).AsString); 125Assert.Equal("1", new JsonValue(1.0).AsString); 126Assert.Equal("text", new JsonValue("text").AsString); 135Assert.Equal("0.5", new JsonValue(0.5).AsString); 211Assert.Equal(time.ToString("o", CultureInfo.InvariantCulture), ((JsonValue)time).AsString); 280Assert.Equal("text", (string?)new JsonValue("text"));
Microsoft.Arcade.Test.Common (2)
AssertEx.cs (2)
352Assert.Equal(parameterName, e.ParamName); 364Assert.Equal(parameterName, e.ParamName);
Microsoft.AspNetCore.Analyzers.Test (5)
StartupAnalyzerTest.cs (5)
61Assert.Collection(ConfigureServicesMethods, m => Assert.Equal("ConfigureServices", m.Name)); 62Assert.Collection(ConfigureMethods, m => Assert.Equal("Configure", m.Name)); 112m => Assert.Equal("ConfigureServices", m.Name)); 116m => Assert.Equal("Configure", m.Name), 117m => Assert.Equal("ConfigureProduction", m.Name));
Microsoft.AspNetCore.Antiforgery.Test (86)
AntiforgeryApplicationBuilderExtensionsTest.cs (1)
44Assert.Equal(
AntiforgeryOptionsSetupTest.cs (2)
34Assert.Equal(expectedCookieName, cookieName); 59Assert.Equal("antiforgery", cookieName);
AntiforgeryTokenTest.cs (6)
15Assert.Equal("", token.AdditionalData); 19Assert.Equal("additional data", token.AdditionalData); 23Assert.Equal("", token.AdditionalData); 70Assert.Equal("", token.Username); 74Assert.Equal("my username", token.Username); 78Assert.Equal("", token.Username);
BinaryBlobTest.cs (2)
28Assert.Equal("bitLength", ex.ParamName); 63Assert.Equal("data", ex.ParamName);
DefaultAntiforgeryTest.cs (44)
81Assert.Equal( 102Assert.Equal( 123Assert.Equal( 146Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenset.CookieToken); 147Assert.Equal(context.TestTokenSet.FormTokenString, tokenset.RequestToken); 154Assert.Equal(context.TestTokenSet.NewCookieTokenString, antiforgeryFeature.NewCookieTokenString); 156Assert.Equal(context.TestTokenSet.FormTokenString, antiforgeryFeature.NewRequestTokenString); 183Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenset.CookieToken); 184Assert.Equal(context.TestTokenSet.FormTokenString, tokenset.RequestToken); 204Assert.Equal(context.TestTokenSet.FormTokenString, tokenset.RequestToken); 212Assert.Equal(context.TestTokenSet.FormTokenString, antiforgeryFeature.NewRequestTokenString); 239Assert.Equal("serialized-form-token-from-context", tokenset.RequestToken); 274Assert.Equal(context.TestTokenSet.FormTokenString, tokenSet.RequestToken); 282Assert.Equal(context.TestTokenSet.FormTokenString, antiforgeryFeature.NewRequestTokenString); 307Assert.Equal(context.TestTokenSet.FormTokenString, tokenSet.RequestToken); 311Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers.CacheControl); 312Assert.Equal("no-cache", context.HttpContext.Response.Headers.Pragma); 338Assert.Equal(context.TestTokenSet.FormTokenString, tokenSet.RequestToken); 342Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers.CacheControl); 343Assert.Equal("no-cache", context.HttpContext.Response.Headers.Pragma); 381Assert.Equal(headerValue, actualHeaderValue); 435Assert.Equal(headerValue, actualHeaderValue); 464Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenSet.CookieToken); 465Assert.Equal(context.TestTokenSet.FormTokenString, tokenSet.RequestToken); 472Assert.Equal(context.TestTokenSet.NewCookieTokenString, antiforgeryFeature.NewCookieTokenString); 474Assert.Equal(context.TestTokenSet.FormTokenString, antiforgeryFeature.NewRequestTokenString); 498Assert.Equal(context.TestTokenSet.NewCookieTokenString, tokenSet.CookieToken); 499Assert.Equal(context.TestTokenSet.FormTokenString, tokenSet.RequestToken); 504Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers.CacheControl); 505Assert.Equal("no-cache", context.HttpContext.Response.Headers.Pragma); 550Assert.Equal("serialized-cookie-token-from-context", tokenset.CookieToken); 551Assert.Equal("serialized-form-token-from-context", tokenset.RequestToken); 594Assert.Equal("serialized-cookie-token-from-context", tokenset.CookieToken); 595Assert.Equal("serialized-form-token-from-context", tokenset.RequestToken); 1004Assert.Equal(expectedHeaderValue, xFrameOptions); 1026Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers["Cache-Control"]); 1027Assert.Equal("no-cache", context.HttpContext.Response.Headers["Pragma"]); 1049Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers["Cache-Control"]); 1050Assert.Equal("no-cache", context.HttpContext.Response.Headers["Pragma"]); 1073Assert.Equal("no-cache, no-store", context.HttpContext.Response.Headers["Cache-Control"]); 1074Assert.Equal("no-cache", context.HttpContext.Response.Headers["Pragma"]); 1104Assert.Equal(expectedHeaderValue, xFrameOptions); 1111Assert.Equal(context.TestTokenSet.NewCookieTokenString, antiforgeryFeature.NewCookieTokenString); 1272Assert.Equal("public", context.HttpContext.Response.Headers["Cache-Control"]);
DefaultAntiforgeryTokenGeneratorTest.cs (11)
97Assert.Equal( 137Assert.Equal("additional-data", fieldToken.AdditionalData); 170Assert.Equal("", fieldToken.Username); 172Assert.Equal("", fieldToken.AdditionalData); 203Assert.Equal("my-username", fieldToken.Username); 330Assert.Equal(expectedMessage, message); 357Assert.Equal(expectedMessage, message); 382Assert.Equal(expectedMessage, message); 422Assert.Equal(expectedMessage, message); 460Assert.Equal(expectedMessage, message); 497Assert.Equal(expectedMessage, message);
DefaultAntiforgeryTokenSerializerTest.cs (3)
51Assert.Equal(@"The antiforgery token could not be decrypted.", ex.Message); 178Assert.Equal(expected.AdditionalData, actual.AdditionalData); 182Assert.Equal(expected.Username, actual.Username);
DefaultAntiforgeryTokenStoreTest.cs (13)
70Assert.Equal(expectedToken, token); 387Assert.Equal(_cookieName, cookies.Key); 388Assert.Equal("serialized-value", cookies.Value); 426Assert.Equal(_cookieName, cookies.Key); 427Assert.Equal("serialized-value", cookies.Value); 429Assert.Equal(expectedCookiePath, cookies.Options.Path); 466Assert.Equal(_cookieName, cookies.Key); 467Assert.Equal("serialized-value", cookies.Value); 469Assert.Equal(expectedCookiePath, cookies.Options.Path); 505Assert.Equal(_cookieName, cookies.Key); 506Assert.Equal("serialized-value", cookies.Value); 508Assert.Equal("/vdir1", cookies.Options.Path); 509Assert.Equal(expectedCookieDomain, cookies.Options.Domain);
DefaultClaimUidExtractorTest.cs (4)
48Assert.Equal("yhXE+2v4zSXHtRHmzm4cmrhZca2J0g7yTUwtUerdeF4=", claimUid); 73Assert.Equal(identiferParameters[index++], claim.Type); 74Assert.Equal(identiferParameters[index++], claim.Value); 75Assert.Equal(identiferParameters[index++], claim.Issuer);
Microsoft.AspNetCore.App.Analyzers.Test (142)
Dependencies\AddPackageTests.cs (1)
79Assert.Equal("Microsoft.AspNetCore.OpenApi", packageInstallData.PackageName);
Infrastructure\WellKnownTypesTests.cs (2)
36Assert.Collection(diagnostics, d => Assert.Equal("TEST001", d.Id)); 69Assert.Collection(diagnostics, d => Assert.Equal("TEST001", d.Id));
RouteEmbeddedLanguage\FrameworkParametersCompletionProviderTests.cs (35)
35i => Assert.Equal("id", i.DisplayText)); 38Assert.Equal("id", change.TextChange.NewText); 63i => Assert.Equal("id", i.DisplayText)); 66Assert.Equal("id", change.TextChange.NewText); 91i => Assert.Equal("id", i.DisplayText)); 94Assert.Equal("id", change.TextChange.NewText); 119i => Assert.Equal("id", i.DisplayText)); 122Assert.Equal("id", change.TextChange.NewText); 149i => Assert.Equal("id", i.DisplayText)); 152Assert.Equal("id", change.TextChange.NewText); 177i => Assert.Equal("id", i.DisplayText)); 180Assert.Equal("id", change.TextChange.NewText); 205i => Assert.Equal("id", i.DisplayText)); 208Assert.Equal("id", change.TextChange.NewText); 233i => Assert.Equal("id", i.DisplayText)); 236Assert.Equal("id", change.TextChange.NewText); 261i => Assert.Equal("ids", i.DisplayText)); 264Assert.Equal("ids", change.TextChange.NewText); 334i => Assert.Equal("id", i.DisplayText)); 359i => Assert.Equal("id", i.DisplayText)); 405i => Assert.Equal("id2", i.DisplayText)); 429i => Assert.Equal("id", i.DisplayText), 430i => Assert.Equal("id2", i.DisplayText)); 454i => Assert.Equal("id", i.DisplayText)); 531i => Assert.Equal("id", i.DisplayText)); 564i => Assert.Equal("id", i.DisplayText)); 660i => Assert.Equal("id", i.DisplayText)); 747i => Assert.Equal("id", i.DisplayText)); 801i => Assert.Equal("id", i.DisplayText)); 875i => Assert.Equal("id", i.DisplayText)); 935i => Assert.Equal("id", i.DisplayText)); 965i => Assert.Equal("id", i.DisplayText)); 995i => Assert.Equal("id", i.DisplayText)); 998Assert.Equal("id", change.TextChange.NewText); 1060i => Assert.Equal("id", i.DisplayText));
RouteEmbeddedLanguage\RoutePatternAnalyzerTests.cs (11)
47Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.TemplateRoute_InvalidRouteTemplate), diagnostic.GetMessage(CultureInfo.InvariantCulture)); 79Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.TemplateRoute_InvalidRouteTemplate), diagnostic.GetMessage(CultureInfo.InvariantCulture)); 112Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.TemplateRoute_InvalidRouteTemplate), diagnostic.GetMessage(CultureInfo.InvariantCulture)); 140Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.TemplateRoute_InvalidRouteTemplate), diagnostic.GetMessage(CultureInfo.InvariantCulture)); 168Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.TemplateRoute_InvalidRouteTemplate), diagnostic.GetMessage(CultureInfo.InvariantCulture)); 197Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.TemplateRoute_InvalidRouteTemplate), diagnostic.GetMessage(CultureInfo.InvariantCulture)); 228Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.FormatTemplateRoute_InvalidLiteral("~hi?")), d.GetMessage(CultureInfo.InvariantCulture)); 233Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.TemplateRoute_InvalidRouteTemplate), d.GetMessage(CultureInfo.InvariantCulture)); 295Assert.Equal(Resources.FormatAnalyzer_RouteIssue_Message(Resources.AttributeRoute_TokenReplacement_UnclosedToken), d.GetMessage(CultureInfo.InvariantCulture)); 335Assert.Equal(Resources.FormatAnalyzer_UnusedParameter_Message("id"), d.GetMessage(CultureInfo.InvariantCulture)); 489Assert.Equal(Resources.FormatAnalyzer_UnusedParameter_Message("id"), d.GetMessage(CultureInfo.InvariantCulture));
RouteEmbeddedLanguage\RoutePatternCompletionProviderTests.cs (25)
64Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 67Assert.Equal("Matches a string that contains only lowercase or uppercase letters A through Z in the English alphabet.", description.Text); 70Assert.Equal("alpha", change.TextChange.NewText); 95Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 120Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 123Assert.Equal("alpha", change.TextChange.NewText); 149Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 152Assert.Equal("alpha", change.TextChange.NewText); 178Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 181Assert.Equal("alpha", change.TextChange.NewText); 210Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 258i => Assert.Equal("id", i.DisplayText)); 283i => Assert.Equal("id1", i.DisplayText)); 312i => Assert.Equal("id", i.DisplayText)); 341i => Assert.Equal("id", i.DisplayText)); 370i => Assert.Equal("id", i.DisplayText)); 406i => Assert.Equal("id", i.DisplayText)); 446i => Assert.Equal("PageIndex", i.DisplayText), 447i => Assert.Equal("PageNumber", i.DisplayText)); 520i => Assert.Equal("id", i.DisplayText)); 603i => Assert.Equal("id2", i.DisplayText)); 636i => Assert.Equal("id", i.DisplayText)); 658Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 680Assert.Equal("alpha", result.Completions.ItemsList[0].DisplayText); 706Assert.Equal("bool", result.Completions.ItemsList[0].DisplayText);
RouteEmbeddedLanguage\RoutePatternParserTests_ConformanceTests.cs (25)
577Assert.Collection(parameter.Policies, p => Assert.Equal(":" + constraint.Replace("{", "{{").Replace("}", "}}"), p)); 590Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_MismatchedParameter, p.Message)); 599Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_UnescapedBrace, p.Message)); 627Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_OptionalParameterCanbBePrecededByPeriod(template, "p2", parameter), p.Message)); 634Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_RepeatedParameter("controller"), p.Message)); 655Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_CannotHaveCatchAllInMultiSegment, p.Message)); 662Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_CatchAllMustBeLast, p.Message)); 671p => Assert.Equal(Resources.TemplateRoute_CannotHaveCatchAllInMultiSegment, p.Message), 672p => Assert.Equal(Resources.TemplateRoute_CannotHaveCatchAllInMultiSegment, p.Message)); 679Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_InvalidParameterName(""), p.Message)); 705Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_MismatchedParameter, p.Message)); 720Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_RepeatedParameter("AAA"), p.Message)); 727Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_RepeatedParameter("AAA"), p.Message)); 734Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_MismatchedParameter, p.Message)); 741Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_UnescapedBrace, p.Message)); 748Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_InvalidParameterName(""), p.Message)); 755Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_InvalidParameterName(""), p.Message)); 762Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_CannotHaveConsecutiveSeparators, p.Message)); 769Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_CatchAllMustBeLast, p.Message)); 776Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_CannotHaveConsecutiveParameters, p.Message)); 792Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_InvalidRouteTemplate, p.Message)); 799Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_InvalidLiteral("foor?bar"), p.Message)); 806Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.FormatTemplateRoute_InvalidParameterName("foor?b"), p.Message)); 813Assert.Collection(tree.Diagnostics, p => Assert.Equal(Resources.TemplateRoute_CatchAllCannotBeOptional, p.Message)); 855Assert.Equal(expectedQualifier, qualifier);
RouteHandlers\DetectMisplacedLambdaAttributeTest.cs (7)
50Assert.Equal("'AuthorizeAttribute' should be placed directly on the route handler lambda to be effective", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 72Assert.Equal("'AuthorizeAttribute' should be placed directly on the route handler lambda to be effective", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 98Assert.Equal("'AuthorizeAttribute' should be placed directly on the route handler lambda to be effective", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 104Assert.Equal("'ProducesAttribute' should be placed directly on the route handler lambda to be effective", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 131Assert.Equal("'ProducesAttribute' should be placed directly on the route handler lambda to be effective", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 170Assert.Equal("CS0103", diagnostic.Descriptor.Id); 220Assert.Equal("'AuthorizeAttribute' should be placed directly on the route handler lambda to be effective", diagnostic.GetMessage(CultureInfo.InvariantCulture));
RouteHandlers\DisallowMvcBindArgumentsOnParametersTest.cs (2)
63Assert.Equal("BindAttribute should not be specified for a MapGet Delegate parameter", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 85Assert.Equal("ModelBinderAttribute should not be specified for a MapPost Delegate parameter", diagnostic.GetMessage(CultureInfo.InvariantCulture));
RouteHandlers\DisallowReturningActionResultsFromMapMethodsTest.cs (6)
132Assert.Equal("IActionResult instances should not be returned from a MapGet Delegate parameter. Consider returning an equivalent result from Microsoft.AspNetCore.Http.Results.", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 155Assert.Equal("IActionResult instances should not be returned from a MapGet Delegate parameter. Consider returning an equivalent result from Microsoft.AspNetCore.Http.Results.", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 183Assert.Equal("IActionResult instances should not be returned from a MapPost Delegate parameter. Consider returning an equivalent result from Microsoft.AspNetCore.Http.Results.", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 215Assert.Equal("IActionResult instances should not be returned from a MapPost Delegate parameter. Consider returning an equivalent result from Microsoft.AspNetCore.Http.Results.", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 253Assert.Equal("IActionResult instances should not be returned from a MapPost Delegate parameter. Consider returning an equivalent result from Microsoft.AspNetCore.Http.Results.", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 291Assert.Equal("IActionResult instances should not be returned from a MapPost Delegate parameter. Consider returning an equivalent result from Microsoft.AspNetCore.Http.Results.", diagnostic.GetMessage(CultureInfo.InvariantCulture));
WebApplicationBuilder\DisallowConfigureHostBuilderConfigureWebHostTest.cs (7)
47Assert.Equal("ConfigureWebHost cannot be used with WebApplicationBuilder.Host", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 68Assert.Equal("ConfigureWebHost cannot be used with WebApplicationBuilder.Host", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 90Assert.Equal("ConfigureWebHost cannot be used with WebApplicationBuilder.Host", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 130Assert.Equal("ConfigureWebHost cannot be used with WebApplicationBuilder.Host", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 158Assert.Equal("ConfigureWebHost cannot be used with WebApplicationBuilder.Host", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 187Assert.Equal("ConfigureWebHost cannot be used with WebApplicationBuilder.Host", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 221Assert.Equal("ConfigureWebHost cannot be used with WebApplicationBuilder.Host", diagnostic.GetMessage(CultureInfo.InvariantCulture));
WebApplicationBuilder\DisallowConfigureHostLoggingTest.cs (1)
275Assert.Equal("Suggest using builder.Logging instead of ConfigureLogging", diagnostic.GetMessage(CultureInfo.InvariantCulture));
WebApplicationBuilder\DisallowConfigureServicesTest.cs (1)
286Assert.Equal("Suggest using builder.Services instead of ConfigureServices", diagnostic.GetMessage(CultureInfo.InvariantCulture));
WebApplicationBuilder\DisallowConfigureWebHostBuilderConfigureTest.cs (4)
49Assert.Equal("Configure cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 70Assert.Equal("Configure cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 97Assert.Equal("Configure cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 125Assert.Equal("Configure cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture));
WebApplicationBuilder\DisallowConfigureWebHostBuilderUseStartupTest.cs (6)
48Assert.Equal("UseStartup cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 69Assert.Equal("UseStartup cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 89Assert.Equal("UseStartup cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 110Assert.Equal("UseStartup cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 137Assert.Equal("UseStartup cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 165Assert.Equal("UseStartup cannot be used with WebApplicationBuilder.WebHost", diagnostic.GetMessage(CultureInfo.InvariantCulture));
WebApplicationBuilder\UseTopLevelRouteRegistrationInsteadOfUseEndpointsTest.cs (9)
124Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 165Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic1.GetMessage(CultureInfo.InvariantCulture)); 169Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic2.GetMessage(CultureInfo.InvariantCulture)); 173Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic3.GetMessage(CultureInfo.InvariantCulture)); 177Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic2.GetMessage(CultureInfo.InvariantCulture)); 209Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 235Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic.GetMessage(CultureInfo.InvariantCulture)); 265Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic1.GetMessage(CultureInfo.InvariantCulture)); 269Assert.Equal("Suggest using top level route registrations instead of UseEndpoints", diagnostic2.GetMessage(CultureInfo.InvariantCulture));
Microsoft.AspNetCore.App.UnitTests (12)
SharedFxTests.cs (8)
95Assert.Equal("Microsoft.NETCore.App", (string)runtimeConfig["runtimeOptions"]["framework"]["name"]); 96Assert.Equal(_expectedTfm, (string)runtimeConfig["runtimeOptions"]["tfm"]); 97Assert.Equal("LatestPatch", (string)runtimeConfig["runtimeOptions"]["rollForward"]); 99Assert.Equal(TestData.GetMicrosoftNETCoreAppPackageVersion(), (string)runtimeConfig["runtimeOptions"]["framework"]["version"]); 115Assert.Equal(target, (string)depsFile["runtimeTarget"]["name"]); 122Assert.Equal("package", lib["type"].Value<string>()); 254Assert.Equal(TestData.GetRepositoryCommit(), lines[0]); 255Assert.Equal(TestData.GetSharedFxVersion(), lines[1]);
TargetingPackTests.cs (4)
178Assert.Equal(netCoreAppPackageVersion, packageVersion); 182Assert.Equal(aspNetCoreAppPackageVersion, packageVersion); 279Assert.Equal("Microsoft.AspNetCore.App.Ref", parts[1]); 421Assert.Equal(expectedLanguage, actualLanguage);
Microsoft.AspNetCore.Authentication.Core.Test (56)
AuthenticationPropertiesTests.cs (23)
83Assert.Equal("foo bar", props.GetString("foo")); 84Assert.Equal("foo bar", props.Items["foo"]); 88Assert.Equal("foo baz", props.GetString("foo")); 89Assert.Equal("foo baz", props.Items["foo"]); 93Assert.Equal("xy", props.GetString("bar")); 94Assert.Equal("xy", props.Items["bar"]); 98Assert.Equal(string.Empty, props.GetString("bar")); 99Assert.Equal(string.Empty, props.Items["bar"]); 118Assert.Equal("foo bar", props.GetParameter<string>("foo")); 173Assert.Equal(string.Empty, props.Items.First().Value); 186Assert.Equal("http://example.com", props.RedirectUri); 187Assert.Equal("http://example.com", props.Items.First().Value); 201Assert.Equal("Wed, 21 Mar 2018 00:00:00 GMT", props.Items.First().Value); 215Assert.Equal("Mon, 19 Mar 2018 12:34:56 GMT", props.Items.First().Value); 229Assert.Equal("True", props.Items.First().Value); 233Assert.Equal("False", props.Items.First().Value); 245Assert.Equal("Mon, 19 Mar 2018 12:34:56 GMT", props.Items["foo"]); 268Assert.Equal("BAR", props.Items["foo"]); 277Assert.Equal(true.ToString(), props.Items["foo"]); 280Assert.Equal(false.ToString(), props.Items["foo"]); 302Assert.Equal("BAR", props.Items["foo"]); 336Assert.Equal(props.RedirectUri, deserialized.RedirectUri); 340Assert.Equal(props.Items["foo"], deserialized.Items["foo"]);
AuthenticationSchemeProviderTests.cs (17)
49Assert.Equal("B", (await provider.GetDefaultForbidSchemeAsync())!.Name); 50Assert.Equal("B", (await provider.GetDefaultAuthenticateSchemeAsync())!.Name); 51Assert.Equal("B", (await provider.GetDefaultChallengeSchemeAsync())!.Name); 52Assert.Equal("B", (await provider.GetDefaultSignInSchemeAsync())!.Name); 53Assert.Equal("B", (await provider.GetDefaultSignOutSchemeAsync())!.Name); 67Assert.Equal("B", (await provider.GetDefaultForbidSchemeAsync())!.Name); 68Assert.Equal("B", (await provider.GetDefaultAuthenticateSchemeAsync())!.Name); 69Assert.Equal("B", (await provider.GetDefaultChallengeSchemeAsync())!.Name); 70Assert.Equal("B", (await provider.GetDefaultSignInSchemeAsync())!.Name); 71Assert.Equal("B", (await provider.GetDefaultSignOutSchemeAsync())!.Name); 87Assert.Equal("signin", scheme!.Name); 103Assert.Equal("challenge", scheme!.Name); 124Assert.Equal("B", (await provider.GetDefaultForbidSchemeAsync())!.Name); 125Assert.Equal("C", (await provider.GetDefaultAuthenticateSchemeAsync())!.Name); 126Assert.Equal("A", (await provider.GetDefaultChallengeSchemeAsync())!.Name); 127Assert.Equal("C", (await provider.GetDefaultSignInSchemeAsync())!.Name); 128Assert.Equal("A", (await provider.GetDefaultSignOutSchemeAsync())!.Name);
TokenExtensionTests.cs (16)
25Assert.Equal("1", props.GetTokenValue("One")); 26Assert.Equal("2", props.GetTokenValue("Two")); 27Assert.Equal("3", props.GetTokenValue("Three")); 47Assert.Equal("0", props.GetTokenValue("Zero")); 72Assert.Equal(".1", props.GetTokenValue("One")); 73Assert.Equal(".2", props.GetTokenValue("Two")); 74Assert.Equal(".3", props.GetTokenValue("Three")); 95Assert.Equal(".11", props.GetTokenValue("One")); 96Assert.Equal(".22", props.GetTokenValue("Two")); 97Assert.Equal(".33", props.GetTokenValue("Three")); 134Assert.Equal("1", await context.GetTokenAsync("One")); 135Assert.Equal("2", await context.GetTokenAsync("Two")); 136Assert.Equal("3", await context.GetTokenAsync("Three")); 147Assert.Equal("1", await context.GetTokenAsync("simple", "One")); 148Assert.Equal("2", await context.GetTokenAsync("simple", "Two")); 149Assert.Equal("3", await context.GetTokenAsync("simple", "Three"));
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (14)
UserJwtsTests.cs (14)
76Assert.Equal("dotnet-user-jwts", appSettings["Authentication"]["Schemes"]["Bearer"]["ValidIssuer"].GetValue<string>()); 79Assert.Equal("new-issuer", appSettings["Authentication"]["Schemes"]["Bearer"]["ValidIssuer"].GetValue<string>()); 124Assert.Equal(schemeName, jwt.Scheme); 214Assert.Equal("baz", fooField["Bar"].GetValue<string>()); 319Assert.Equal(Environment.UserName, deserialized.Name); 320Assert.Equal(DevJwtsDefaults.Scheme, deserialized.Scheme); 321Assert.Equal($"http://localhost:23528, https://localhost:44395, https://localhost:5001, http://localhost:5000", deserialized.Audience); 378Assert.Equal(DevJwtsDefaults.Scheme, deserialized.Scheme); 379Assert.Equal(Environment.UserName, deserialized.Name); 435Assert.Equal("baz", fooField["Bar"].GetValue<string>()); 463Assert.Equal("baz", fooField["Bar"].GetValue<string>()); 501Assert.Equal("test-issuer", signingKey["Issuer"].GetValue<string>()); 542Assert.Equal("test-issuer", signingKey1["Issuer"].GetValue<string>()); 546Assert.Equal("test-issuer", signingKey2["Issuer"].GetValue<string>());
Microsoft.AspNetCore.Authentication.Negotiate.Test (45)
EventTests.cs (21)
42Assert.Equal("Negotiate", result.Response.Headers.WWWAuthenticate); 66Assert.Equal("Teapot", result.Response.Headers.WWWAuthenticate); 81Assert.Equal("InvalidBlob", context.Exception.Message); 90Assert.Equal("InvalidBlob", ex.Message); 114Assert.Equal("Teapot", result.Response.Headers.WWWAuthenticate); 129Assert.Equal("A test other error occurred", context.Exception.Message); 138Assert.Equal("A test other error occurred", ex.Message); 164Assert.Equal("Teapot", result.Response.Headers.WWWAuthenticate); 180Assert.Equal("A test credential error occurred", context.Exception.Message); 214Assert.Equal("Teapot", result.Response.Headers.WWWAuthenticate); 230Assert.Equal("A test client error occurred", context.Exception.Message); 264Assert.Equal("Teapot", result.Response.Headers.WWWAuthenticate); 281Assert.Equal("name", identity.Name); 282Assert.Equal("Kerberos", identity.AuthenticationType); 340Assert.Equal("Negotiate", result.Response.Headers.WWWAuthenticate); 364Assert.Equal("Negotiate", result.Response.Headers.WWWAuthenticate); 399Assert.Equal("Negotiate ServerKerberosBlob1", result.Response.Headers.WWWAuthenticate); 406Assert.Equal("Negotiate ServerKerberosBlob2", result.Response.Headers.WWWAuthenticate); 444Assert.Equal("HTTP/1.1", context.Request.Protocol); // Not HTTP/2 552Assert.Equal("NTLM", _protocol); 569Assert.Equal("Kerberos", _protocol);
NegotiateHandlerTests.cs (22)
30Assert.Equal("Negotiate authentication requires a server that supports IConnectionItemsFeature like Kestrel.", ex.Message); 61Assert.Equal("Negotiate", result.Response.Headers.WWWAuthenticate); 73Assert.Equal("Negotiate", result.Response.Headers.WWWAuthenticate); 83Assert.Equal("Negotiate ServerNtlmBlob1", result.Response.Headers.WWWAuthenticate); 95Assert.Equal("An anonymous request was received in between authentication handshake requests.", ex.Message); 105Assert.Equal("Stage1Complete", ex.Message); 192Assert.Equal("Negotiate", result.Response.Headers.WWWAuthenticate); 301Assert.Equal("Negotiate", result.Response.Headers.WWWAuthenticate); 323Assert.Equal("A test other error occurred", ex.Message); 329Assert.Equal("Negotiate ServerKerberosBlob", result.Response.Headers.WWWAuthenticate); 337Assert.Equal("Negotiate ServerKerberosBlob", result.Response.Headers.WWWAuthenticate); 350Assert.Equal("Negotiate ServerKerberosBlob1", result.Response.Headers.WWWAuthenticate); 357Assert.Equal("Negotiate ServerKerberosBlob2", result.Response.Headers.WWWAuthenticate); 370Assert.Equal("Negotiate ServerNtlmBlob1", result.Response.Headers.WWWAuthenticate); 377Assert.Equal("Negotiate ServerNtlmBlob2", result.Response.Headers.WWWAuthenticate); 409Assert.Equal("HTTP/1.1", context.Request.Protocol); 416Assert.Equal("HTTP/2", context.Request.Protocol); 429Assert.Equal("HTTP/1.1", context.Request.Protocol); // Not HTTP/2 443Assert.Equal("HTTP/1.1", context.Request.Protocol); // Not HTTP/2 455Assert.Equal("HTTP/1.1", context.Request.Protocol); // Not HTTP/2 576Assert.Equal("NTLM", _protocol); 593Assert.Equal("Kerberos", _protocol);
ServerDeferralTests.cs (2)
29Assert.Equal("The Negotiate Authentication handler cannot be used on a server that directly supports Windows Authentication." 39Assert.Equal("DeferralScheme", options.ForwardDefault);
Microsoft.AspNetCore.Authentication.Test (529)
AuthenticationMiddlewareTests.cs (1)
180Assert.Equal("SomeIssuer", options.TokenValidationParameters.ValidIssuer);
CertificateTests.cs (21)
35Assert.Equal("CertificateAuthenticationHandler", scheme.HandlerType.Name); 482Assert.Equal(Certificates.SelfSignedValidWithNoEku.Issuer, actual.First().Value); 486Assert.Equal(Certificates.SelfSignedValidWithNoEku.Thumbprint, actual.First().Value); 495Assert.Equal(Certificates.SelfSignedValidWithNoEku.SubjectName.Name, actual.First().Value); 505Assert.Equal(Certificates.SelfSignedValidWithNoEku.SerialNumber, actual.First().Value); 515Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.DnsName, false), actual.First().Value); 525Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.EmailName, false), actual.First().Value); 535Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.SimpleName, false), actual.First().Value); 545Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.UpnName, false), actual.First().Value); 555Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.UrlName, false), actual.First().Value); 611Assert.Equal(Expected, name.First().Value); 614Assert.Equal("1", count.First().Value); 630Assert.Equal(Expected, name.First().Value); 634Assert.Equal(expected, count.First().Value); 681Assert.Equal(Expected, actual.First().Value); 738Assert.Equal(Expected, name.First().Value); 741Assert.Equal("1", count.First().Value); 757Assert.Equal(Expected, name.First().Value); 761Assert.Equal(expected, count.First().Value); 779Assert.Equal(Expected, name.First().Value); 784Assert.Equal(laterExpected, count.First().Value);
ClaimActionTests.cs (16)
22Assert.Equal("name", identity.FindFirst("name").Type); 23Assert.Equal("test", identity.FindFirst("name").Value); 38Assert.Equal("role", roleClaims[0].Type); 39Assert.Equal("role1", roleClaims[0].Value); 40Assert.Equal("role", roleClaims[1].Type); 41Assert.Equal("role2", roleClaims[1].Value); 54Assert.Equal("name", identity.FindFirst("name").Type); 55Assert.Equal("test", identity.FindFirst("name").Value); 70Assert.Equal("role", roleClaims[0].Type); 71Assert.Equal("role1", roleClaims[0].Value); 72Assert.Equal("role", roleClaims[1].Type); 73Assert.Equal("role2", roleClaims[1].Value); 85Assert.Equal("name0", identity.FindFirst("name0").Type); 86Assert.Equal("value0", identity.FindFirst("name0").Value); 87Assert.Equal("name1", identity.FindFirst("name1").Type); 88Assert.Equal("value1", identity.FindFirst("name1").Value);
CookieTests.cs (67)
102Assert.Equal("http://example.com/Account/Login?ReturnUrl=%2FCustomRedirect", location.ToString()); 148Assert.Equal("no-cache", transaction.Response.Headers.Pragma.ToString()); 205Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 216Assert.Equal("Alice", FindClaimValue(transaction4, ClaimTypes.Name)); 240Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 281Assert.Equal("no-cache", transaction.Response.Headers.Pragma.ToString()); 416Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 432Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 433Assert.Equal("yup", FindClaimValue(transaction2, "xform")); 460Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 462Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 494Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 496Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 585Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 621Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 627Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 666Assert.Equal("Alice2", FindClaimValue(transaction2, ClaimTypes.Name)); 698Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 701Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 708Assert.Equal("Alice2", FindClaimValue(transaction4, ClaimTypes.Name)); 709Assert.Equal("yes", FindPropertiesValue(transaction4, "updated")); 714Assert.Equal("Alice2", FindClaimValue(transaction5, ClaimTypes.Name)); 715Assert.Equal("yes", FindPropertiesValue(transaction4, "updated")); 742Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 748Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 754Assert.Equal("Alice", FindClaimValue(transaction4, ClaimTypes.Name)); 798Assert.Equal("1", FindClaimValue(transaction2, "counter")); 804Assert.Equal("11", FindClaimValue(transaction3, "counter")); 810Assert.Equal("111", FindClaimValue(transaction4, "counter")); 857Assert.Equal("1", FindClaimValue(transaction2, "counter")); 863Assert.Equal("11", FindClaimValue(transaction3, "counter")); 869Assert.Equal("111", FindClaimValue(transaction4, "counter")); 903Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 909Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 955Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 967Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 973Assert.Equal("Alice", FindClaimValue(transaction4, ClaimTypes.Name)); 1002Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 1008Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 1032Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 1038Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 1045Assert.Equal("Alice", FindClaimValue(transaction4, ClaimTypes.Name)); 1051Assert.Equal("Alice", FindClaimValue(transaction5, ClaimTypes.Name)); 1078Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 1084Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 1091Assert.Equal("Alice", FindClaimValue(transaction4, ClaimTypes.Name)); 1097Assert.Equal("Alice", FindClaimValue(transaction5, ClaimTypes.Name)); 1126Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name)); 1132Assert.Equal("Alice", FindClaimValue(transaction3, ClaimTypes.Name)); 1139Assert.Equal("Alice", FindClaimValue(transaction4, ClaimTypes.Name)); 1144Assert.Equal("Alice", FindClaimValue(transaction5, ClaimTypes.Name)); 1149Assert.Equal("Alice", FindClaimValue(transaction6, ClaimTypes.Name)); 1180Assert.Equal("/Account/Login", location.LocalPath); 1194Assert.Equal("/Account/AccessDenied", location.LocalPath); 1257Assert.Equal("/page", location.LocalPath); 1261Assert.Equal("/login/page", location.LocalPath); 1263Assert.Equal("?ReturnUrl=%2F", location.Query); 1392Assert.Equal("/page", location.OriginalString); 1440Assert.Equal("/page", location.OriginalString); 1464Assert.Equal("/denied", location.LocalPath); 1489Assert.Equal("/base/page", location.LocalPath); 1490Assert.Equal("?ReturnUrl=%2F", location.Query); 1516Assert.Equal(redirectUrl, transaction.Response.Headers.Location.ToString()); 1561Assert.Equal("/ret_path_2", transaction.Response.Headers.Location.ToString()); 1607Assert.Equal("/redirect_test", transaction.Response.Headers.Location.ToString()); 1631Assert.Equal("/base/denied", location.LocalPath); 1682Assert.Equal("Alice", FindClaimValue(transaction2, ClaimTypes.Name));
DynamicSchemeTests.cs (13)
34Assert.Equal("One", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "One")); 35Assert.Equal("1", transaction.FindClaimValue("Count")); 39Assert.Equal("One", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "One")); 40Assert.Equal("1", transaction.FindClaimValue("Count")); 46Assert.Equal("Two", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "Two")); 47Assert.Equal("2", transaction.FindClaimValue("Count")); 51Assert.Equal("One", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "One")); 52Assert.Equal("1", transaction.FindClaimValue("Count")); 54Assert.Equal("Two", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "Two")); 55Assert.Equal("2", transaction.FindClaimValue("Count")); 69Assert.Equal("One", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "One")); 75Assert.Equal("Two", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "Two")); 82Assert.Equal("One", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "One"));
FacebookTests.cs (8)
367Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 396Assert.Equal("Test App Id", entries["client_id"]); 397Assert.Equal("https://example.com/signin-facebook", entries["redirect_uri"]); 398Assert.Equal("Test App Secret", entries["client_secret"]); 399Assert.Equal("TestCode", entries["code"]); 400Assert.Equal("authorization_code", entries["grant_type"]); 440Assert.Equal("S256", queryParams["code_challenge_method"]); 449Assert.Equal("/challenge", transaction.Response.Headers.GetValues("Location").First());
GoogleTests.cs (82)
61Assert.Equal("code", queryParams["response_type"]); 62Assert.Equal("Test Id", queryParams["client_id"]); 67Assert.Equal("S256", queryParams["code_challenge_method"]); 191Assert.Equal("openid https://www.googleapis.com/auth/plus.login", query["scope"]); 192Assert.Equal("offline", query["access_type"]); 193Assert.Equal("force", query["approval_prompt"]); 194Assert.Equal("consent", query["prompt"]); 195Assert.Equal("false", query["include_granted_scopes"]); 196Assert.Equal("test@example.com", query["login_hint"]); 243Assert.Equal("https://www.googleapis.com/auth/plus.login", query["scope"]); 244Assert.Equal("offline", query["access_type"]); 245Assert.Equal("force", query["approval_prompt"]); 246Assert.Equal("consent", query["prompt"]); 247Assert.Equal("false", query["include_granted_scopes"]); 248Assert.Equal("test@example.com", query["login_hint"]); 299Assert.Equal("https://www.googleapis.com/auth/plus.login", query["scope"]); 300Assert.Equal("offline", query["access_type"]); 301Assert.Equal("force", query["approval_prompt"]); 302Assert.Equal("consent", query["prompt"]); 303Assert.Equal("false", query["include_granted_scopes"]); 304Assert.Equal("test@example.com", query["login_hint"]); 372Assert.Equal("The oauth state was missing or invalid.", error.GetBaseException().Message); 402Assert.Equal("/error?FailureMessage=AccessDenied", transaction.Response.Headers.GetValues("Location").First()); 407Assert.Equal("Access was denied by the resource owner or by the remote server.", error.GetBaseException().Message); 424Assert.Equal("/access-denied", ctx.AccessDeniedPath.Value); 425Assert.Equal("http://testhost/redirect", ctx.ReturnUrl); 426Assert.Equal("ReturnUrl", ctx.ReturnUrlParameter); 438Assert.Equal("https://example.com/custom-denied-page?rurl=http%3A%2F%2Fwww.google.com%2F", transaction.Response.Headers.GetValues("Location").First()); 456Assert.Equal("http://testhost/redirect", ctx.ReturnUrl); 457Assert.Equal("ReturnUrl", ctx.ReturnUrlParameter); 520Assert.Equal("/error?FailureMessage=itfailed" + UrlEncoder.Default.Encode(";Description=whyitfailed;Uri=https://example.com/fail"), transaction.Response.Headers.GetValues("Location").First()); 525Assert.Equal("itfailed;Description=whyitfailed;Uri=https://example.com/fail", error.GetBaseException().Message); 559Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 568Assert.Equal("Test Name", transaction.FindClaimValue(ClaimTypes.Name, expectedIssuer)); 569Assert.Equal("Test User ID", transaction.FindClaimValue(ClaimTypes.NameIdentifier, expectedIssuer)); 570Assert.Equal("Test Given Name", transaction.FindClaimValue(ClaimTypes.GivenName, expectedIssuer)); 571Assert.Equal("Test Family Name", transaction.FindClaimValue(ClaimTypes.Surname, expectedIssuer)); 572Assert.Equal("Test email", transaction.FindClaimValue(ClaimTypes.Email, expectedIssuer)); 575Assert.Equal("yup", transaction.FindClaimValue("xform")); 579Assert.Equal("Test Access Token", transaction.FindTokenValue("access_token")); 580Assert.Equal("Bearer", transaction.FindTokenValue("token_type")); 629Assert.Equal("/error?FailureMessage=" + UrlEncoder.Default.Encode("OAuth token endpoint failure: Status: BadRequest;Headers: ;Body: {\"Error\":\"Error\"};"), 635Assert.Equal("OAuth token endpoint failure: Status: BadRequest;Headers: ;Body: {\"Error\":\"Error\"};", error.GetBaseException().Message); 681Assert.Equal("/error?FailureMessage=" + UrlEncoder.Default.Encode("Failed to retrieve access token."), 687Assert.Equal("Failed to retrieve access token.", error.GetBaseException().Message); 722Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 730Assert.Equal("Test Refresh Token", transaction.FindClaimValue("RefreshToken")); 762Assert.Equal("/", transaction.Response.Headers.GetValues("Location").First()); 782Assert.Equal("Test Access Token", context.AccessToken); 783Assert.Equal("Test Refresh Token", context.RefreshToken); 785Assert.Equal("Test email", context.Identity.FindFirst(ClaimTypes.Email)?.Value); 786Assert.Equal("Test User ID", context.Identity.FindFirst(ClaimTypes.NameIdentifier)?.Value); 787Assert.Equal("Test Name", context.Identity.FindFirst(ClaimTypes.Name)?.Value); 788Assert.Equal("Test Family Name", context.Identity.FindFirst(ClaimTypes.Surname)?.Value); 789Assert.Equal("Test Given Name", context.Identity.FindFirst(ClaimTypes.GivenName)?.Value); 810Assert.Equal("/foo", transaction.Response.Headers.GetValues("Location").First()); 825Assert.Equal("The oauth state was missing or invalid.", error.GetBaseException().Message); 853Assert.Equal("/error?FailureMessage=" + UrlEncoder.Default.Encode("The oauth state was missing or invalid."), 883Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 891Assert.Equal("Test Name", transaction.FindClaimValue(ClaimTypes.Name)); 892Assert.Equal("Test User ID", transaction.FindClaimValue(ClaimTypes.NameIdentifier)); 893Assert.Equal("Test Given Name", transaction.FindClaimValue(ClaimTypes.GivenName)); 894Assert.Equal("Test Family Name", transaction.FindClaimValue(ClaimTypes.Surname)); 895Assert.Equal("Test email", transaction.FindClaimValue(ClaimTypes.Email)); 898Assert.Equal("yup", transaction.FindClaimValue("xform")); 927Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 935Assert.Equal("Test Name", transaction.FindClaimValue(ClaimTypes.Name)); 936Assert.Equal("Test User ID", transaction.FindClaimValue(ClaimTypes.NameIdentifier)); 937Assert.Equal("Test Given Name", transaction.FindClaimValue(ClaimTypes.GivenName)); 938Assert.Equal("Test Family Name", transaction.FindClaimValue(ClaimTypes.Surname)); 939Assert.Equal("Test email", transaction.FindClaimValue(ClaimTypes.Email)); 942Assert.Equal("yup", transaction.FindClaimValue("xform")); 971Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 1008Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 1035Assert.Equal("Test Client Id", entries["client_id"]); 1036Assert.Equal("https://example.com/signin-google", entries["redirect_uri"]); 1037Assert.Equal("Test Client Secret", entries["client_secret"]); 1038Assert.Equal("TestCode", entries["code"]); 1039Assert.Equal("authorization_code", entries["grant_type"]); 1073Assert.Equal("S256", queryParams["code_challenge_method"]); 1082Assert.Equal("/challenge", transaction.Response.Headers.GetValues("Location").First()); 1260Assert.Equal("protected_state", protectedText);
JsonDocumentAuthExtensionsTests.cs (1)
21Assert.Equal(expected, value);
JwtBearerTests.cs (32)
120Assert.Equal(tokenText, await response.Response.Content.ReadAsStringAsync()); 247Assert.Equal("Bob le Magnifique", response.ResponseText); 275Assert.Equal("", response.ResponseText); 293Assert.Equal("Bearer error=\"invalid_token\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 294Assert.Equal("", response.ResponseText); 320Assert.Equal($"Bearer error=\"invalid_token\", error_description=\"{message}\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 321Assert.Equal("", response.ResponseText); 344Assert.Equal($"Bearer error=\"invalid_token\", error_description=\"{message}\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 345Assert.Equal("", response.ResponseText); 364Assert.Equal("Bearer error=\"invalid_token\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 365Assert.Equal("", response.ResponseText); 384Assert.Equal("Bearer error=\"invalid_token\", error_description=\"The audience '(null)' is invalid; The signature key was not found\"", 386Assert.Equal("", response.ResponseText); 417Assert.Equal("", response.ResponseText); 451Assert.Equal(builder.ToString(), response.Response.Headers.WwwAuthenticate.First().ToString()); 466Assert.Equal("Bearer", response.Response.Headers.WwwAuthenticate.First().ToString()); 467Assert.Equal("", response.ResponseText); 478Assert.Equal("Bearer", response.Response.Headers.WwwAuthenticate.First().ToString()); 479Assert.Equal("", response.ResponseText); 496Assert.Equal("Bob le Tout Puissant", identifier.Value); 518Assert.Equal("Bob le Magnifique", response.ResponseText); 539Assert.Equal("CustomToken", token); 547Assert.Equal("Bob le Tout Puissant", response.ResponseText); 581Assert.Equal(string.Empty, response.ResponseText); 619Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 653Assert.Equal(string.Empty, response.ResponseText); 691Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 725Assert.Equal(string.Empty, response.ResponseText); 763Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 786Assert.Equal(string.Empty, response.ResponseText); 863Assert.Equal("You Shall Not Pass", await response.Response.Content.ReadAsStringAsync()); 912Assert.Equal("You Shall Not Pass", await response.Content.ReadAsStringAsync());
JwtBearerTests_Handler.cs (38)
110Assert.Equal(tokenText, await response.Response.Content.ReadAsStringAsync()); 233Assert.Equal("Bob le Magnifique", response.ResponseText); 261Assert.Equal("", response.ResponseText); 276Assert.Equal("Bearer error=\"invalid_token\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 277Assert.Equal("", response.ResponseText); 300Assert.Equal($"Bearer error=\"invalid_token\", error_description=\"{message}\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 301Assert.Equal("", response.ResponseText); 321Assert.Equal($"Bearer error=\"invalid_token\", error_description=\"{message}\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 322Assert.Equal("", response.ResponseText); 338Assert.Equal("Bearer error=\"invalid_token\"", response.Response.Headers.WwwAuthenticate.First().ToString()); 339Assert.Equal("", response.ResponseText); 355Assert.Equal("Bearer error=\"invalid_token\", error_description=\"The audience '(null)' is invalid; The signature key was not found\"", 357Assert.Equal("", response.ResponseText); 387Assert.Equal("", response.ResponseText); 421Assert.Equal(builder.ToString(), response.Response.Headers.WwwAuthenticate.First().ToString()); 435Assert.Equal("Bearer", response.Response.Headers.WwwAuthenticate.First().ToString()); 436Assert.Equal("", response.ResponseText); 447Assert.Equal("Bearer", response.Response.Headers.WwwAuthenticate.First().ToString()); 448Assert.Equal("", response.ResponseText); 465Assert.Equal("Bob le Tout Puissant", identifier.Value); 484Assert.Equal("Bob le Magnifique", response.ResponseText); 503Assert.Equal("CustomToken", token); 510Assert.Equal("Bob le Tout Puissant", response.ResponseText); 543Assert.Equal(string.Empty, response.ResponseText); 580Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 611Assert.Equal(string.Empty, response.ResponseText); 646Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 677Assert.Equal(string.Empty, response.ResponseText); 712Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 734Assert.Equal(string.Empty, response.ResponseText); 808Assert.Equal("You Shall Not Pass", await response.Response.Content.ReadAsStringAsync()); 857Assert.Equal("You Shall Not Pass", await response.Content.ReadAsStringAsync()); 977Assert.Equal("dotnet-user-jwts", jwtBearerOptions.TokenValidationParameters.ValidIssuer); 979Assert.Equal("http://localhost:5000", jwtBearerOptions.TokenValidationParameters.ValidAudience); 1042Assert.Equal(firstKey, Convert.ToBase64String(jwtBearerOptions.TokenValidationParameters.IssuerSigningKeys.OfType<SymmetricSecurityKey>().FirstOrDefault()?.Key)); 1043Assert.Equal(secondKey, Convert.ToBase64String(jwtBearerOptions.TokenValidationParameters.IssuerSigningKeys.OfType<SymmetricSecurityKey>().LastOrDefault()?.Key)); 1061Assert.Equal("https://localhost:5001", jwtBearerOptions.Authority); 1083Assert.Equal("https://localhost:5001", jwtBearerOptions.Authority);
MicrosoftAccountTests.cs (14)
244Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 252Assert.Equal("Test Refresh Token", transaction.FindClaimValue("RefreshToken")); 271Assert.Equal("https://graph.microsoft.com/user.read", query["scope"]); 272Assert.Equal("consumers", query["domain_hint"]); 273Assert.Equal("username", query["login_hint"]); 274Assert.Equal("select_account", query["prompt"]); 275Assert.Equal("query", query["response_mode"]); 302Assert.Equal("Test Client Id", entries["client_id"]); 303Assert.Equal("https://example.com/signin-microsoft", entries["redirect_uri"]); 304Assert.Equal("Test Client Secret", entries["client_secret"]); 305Assert.Equal("TestCode", entries["code"]); 306Assert.Equal("authorization_code", entries["grant_type"]); 340Assert.Equal("S256", queryParams["code_challenge_method"]); 349Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
OAuthChallengePropertiesTest.cs (10)
71Assert.Equal("login", properties.Prompt); 80Assert.Equal("consent", properties.Prompt); 96Assert.Equal("offline", properties.AccessType); 98Assert.Equal("force", properties.ApprovalPrompt); 100Assert.Equal("test@example.com", properties.LoginHint); 102Assert.Equal("login", properties.Prompt); 114Assert.Equal("offline", properties.AccessType); 115Assert.Equal("force", properties.ApprovalPrompt); 116Assert.Equal("test@example.com", properties.LoginHint); 117Assert.Equal("login", properties.Prompt);
OAuthTests.cs (6)
314Assert.Equal("https://www.example.com/access-denied?ReturnUrl=http%3A%2F%2Ftesthost%2Fredirect", transaction.Response.Headers.Location.ToString()); 336Assert.Equal("testvalue", context.Properties.Items["testkey"]); 371Assert.Equal("Access was denied by the resource owner or by the remote server.", context.Failure.Message); 372Assert.Equal("testvalue", context.Properties.Items["testkey"]); 408Assert.Equal("testvalue", context.Properties.Items["testkey"]); 557Assert.Equal("protected_state", protectedText);
OpenIdConnect\OpenIdConnectAuthenticateTests.cs (3)
36Assert.Equal("Hi from the callback path", transaction.ResponseText); 64Assert.Equal("Hi from the callback path", transaction.ResponseText); 119Assert.Equal("protected_state", protectedText);
OpenIdConnect\OpenIdConnectChallengeTests.cs (10)
165Assert.Equal("text/html", transaction.Response.Content.Headers.ContentType.MediaType); 204Assert.Equal(userState ?? string.Empty, actualProperties.Items[OpenIdConnectDefaults.UserstatePropertiesKey]); 241Assert.Equal(userState, actualProperties.Items[OpenIdConnectDefaults.UserstatePropertiesKey]); 323Assert.Equal($"{OpenIdConnectParameterNames.ClientId}={newClientId}", actual); 361Assert.Equal(newMessage.TestAuthorizeEndpoint, res.Headers.Location.AbsoluteUri); 391Assert.Equal("Oolong", res.Headers.GetValues("tea").Single()); 471Assert.Equal("Cannot redirect to the authorization endpoint, the configuration may be missing or invalid.", exception.Message); 757Assert.Equal("Pushed authorization is required by the OpenIdConnectOptions.PushedAuthorizationBehavior, but no pushed authorization endpoint is available.", exception.Message); 780Assert.Equal("Pushed authorization is required by the OpenId Connect provider, but disabled by the OpenIdConnectOptions.PushedAuthorizationBehavior.", exception.Message); 923Assert.Equal("login", mockBackchannel.PushedParameters["prompt"]);
OpenIdConnect\OpenIdConnectConfigurationTests.cs (5)
444Assert.Equal($"{TestServerBuilder.DefaultAuthority}/.well-known/openid-configuration", handler.Options.MetadataAddress); 492ex => Assert.Equal("ClientId", ex.ParamName)); 505ex => Assert.Equal("Provide Authority, MetadataAddress, Configuration, or ConfigurationManager to OpenIdConnectOptions", ex.Message) 520ex => Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", ex.Message) 535ex => Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", ex.Message)
OpenIdConnect\OpenIdConnectEventTests.cs (47)
48Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 72Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 94Assert.Equal("", await response.Content.ReadAsStringAsync()); 116Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 141Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 165Assert.Equal("", await response.Content.ReadAsStringAsync()); 201Assert.Equal("", await response.Content.ReadAsStringAsync()); 224Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 250Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 275Assert.Equal("", await response.Content.ReadAsStringAsync()); 305Assert.Equal("", await response.Content.ReadAsStringAsync()); 329Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 356Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 382Assert.Equal("", await response.Content.ReadAsStringAsync()); 413Assert.Equal("", await response.Content.ReadAsStringAsync()); 437Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 464Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 490Assert.Equal("", await response.Content.ReadAsStringAsync()); 521Assert.Equal("", await response.Content.ReadAsStringAsync()); 546Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 574Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 601Assert.Equal("", await response.Content.ReadAsStringAsync()); 633Assert.Equal("", await response.Content.ReadAsStringAsync()); 655Assert.Equal("TestException", context.Exception.Message); 664Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 687Assert.Equal("TestException", context.Exception.Message); 698Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 720Assert.Equal("TestException", context.Exception.Message); 731Assert.Equal("", await response.Content.ReadAsStringAsync()); 754Assert.Equal("TestException", context.Exception.Message); 779Assert.Equal("", await response.Content.ReadAsStringAsync()); 801Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 815Assert.Equal("testvalue", context.Properties.Items["testkey"]); 825Assert.Equal("", await response.Content.ReadAsStringAsync()); 848Assert.Equal("TestException", context.Exception.Message); 853Assert.Equal("TestException", context.Failure.Message); 862Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 885Assert.Equal("TestException", context.Failure.Message); 886Assert.Equal("testvalue", context.Properties.Items["testkey"]); 896Assert.Equal("", await response.Content.ReadAsStringAsync()); 922Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 949Assert.Equal("", await response.Content.ReadAsStringAsync()); 970Assert.Equal("http://testhost/end", response.Headers.Location.GetLeftPart(UriPartial.Path)); 1083Assert.Equal("http://testhost/redirect", response.Headers.Location.AbsoluteUri); 1333Assert.Equal("protected_state", protectedText); 1362Assert.Equal("my_id_token", securityToken); 1368Assert.Equal("my_id_token", securityToken);
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (47)
48Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 72Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 94Assert.Equal("", await response.Content.ReadAsStringAsync()); 116Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 141Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 165Assert.Equal("", await response.Content.ReadAsStringAsync()); 201Assert.Equal("", await response.Content.ReadAsStringAsync()); 224Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 250Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 275Assert.Equal("", await response.Content.ReadAsStringAsync()); 305Assert.Equal("", await response.Content.ReadAsStringAsync()); 329Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 356Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 382Assert.Equal("", await response.Content.ReadAsStringAsync()); 413Assert.Equal("", await response.Content.ReadAsStringAsync()); 437Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 464Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 490Assert.Equal("", await response.Content.ReadAsStringAsync()); 521Assert.Equal("", await response.Content.ReadAsStringAsync()); 546Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 574Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 601Assert.Equal("", await response.Content.ReadAsStringAsync()); 633Assert.Equal("", await response.Content.ReadAsStringAsync()); 655Assert.Equal("TestException", context.Exception.Message); 664Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 687Assert.Equal("TestException", context.Exception.Message); 698Assert.Equal("Authentication was aborted from user code.", exception.InnerException.Message); 720Assert.Equal("TestException", context.Exception.Message); 731Assert.Equal("", await response.Content.ReadAsStringAsync()); 754Assert.Equal("TestException", context.Exception.Message); 779Assert.Equal("", await response.Content.ReadAsStringAsync()); 801Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 815Assert.Equal("testvalue", context.Properties.Items["testkey"]); 825Assert.Equal("", await response.Content.ReadAsStringAsync()); 848Assert.Equal("TestException", context.Exception.Message); 853Assert.Equal("TestException", context.Failure.Message); 862Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 885Assert.Equal("TestException", context.Failure.Message); 886Assert.Equal("testvalue", context.Properties.Items["testkey"]); 896Assert.Equal("", await response.Content.ReadAsStringAsync()); 922Assert.Equal("/signin-oidc", await response.Content.ReadAsStringAsync()); 949Assert.Equal("", await response.Content.ReadAsStringAsync()); 970Assert.Equal("http://testhost/end", response.Headers.Location.GetLeftPart(UriPartial.Path)); 1083Assert.Equal("http://testhost/redirect", response.Headers.Location.AbsoluteUri); 1331Assert.Equal("protected_state", protectedText); 1352Assert.Equal("my_id_token", token); 1364Assert.Equal("my_id_token", token);
OpenIdConnect\OpenIdConnectTests.cs (9)
298Assert.Equal("Cannot redirect to the end session endpoint, the configuration may be missing or invalid.", exception.Message); 444Assert.Equal("https://authority.com", options.Authority); 449Assert.Equal("https://localhost:5000", options.CorrelationCookie.Domain); // Can set nested properties on cookie 450Assert.Equal("CookieName", options.CorrelationCookie.Name); 477Assert.Equal("https://localhost:5000", options.CorrelationCookie.Domain); 481Assert.Equal(".AspNetCore.Correlation.", options.CorrelationCookie.Name); 484Assert.Equal(OpenIdConnectDefaults.CookieNoncePrefix, options.NonceCookie.Name); 562Assert.Equal("client-id", options.ClientId); 563Assert.Equal("overwritten-client-secret", options.ClientSecret);
OpenIdConnect\UniqueJsonKeyClaimActionTests.cs (4)
24Assert.Equal("claimType", claim.Type); 25Assert.Equal("value", claim.Value); 41Assert.Equal("claimType", claims.First().Type); 42Assert.Equal("value", claims.First().Value);
PolicyTests.cs (8)
39Assert.Equal("auth1", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth1")); 42Assert.Equal("auth1", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth1")); 45Assert.Equal("auth2", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth2")); 48Assert.Equal("auth3", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth3")); 51Assert.Equal("auth2", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth2")); 354Assert.Equal("auth1", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth1")); 356Assert.Equal("auth2", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth2")); 358Assert.Equal("auth3", transaction.FindClaimValue(ClaimTypes.NameIdentifier, "auth3"));
SecureDataFormatTests.cs (2)
31Assert.Equal(input, result); 45Assert.Equal(input, result);
SharedAuthenticationTests.cs (1)
546Assert.Equal(DisplayName, scheme.DisplayName);
TicketSerializerTests.cs (13)
27Assert.Equal("bye", readTicket.Properties.RedirectUri); 28Assert.Equal("Hello", readTicket.AuthenticationScheme); 49Assert.Equal("misc", readTicket.Principal.Identity.AuthenticationType); 72Assert.Equal("misc", readTicket.Principal.Identity.AuthenticationType); 76Assert.Equal("actor", identity.Actor.AuthenticationType); 107Assert.Equal("misc", readTicket.Principal.Identity.AuthenticationType); 111Assert.Equal("type", claim.Type); 112Assert.Equal("value", claim.Value); 113Assert.Equal("valueType", claim.ValueType); 114Assert.Equal("issuer", claim.Issuer); 115Assert.Equal("original-issuer", claim.OriginalIssuer); 118Assert.Equal("property-value", property1); 121Assert.Equal(string.Empty, property2);
TokenExtensionTests.cs (10)
21Assert.Equal("1", props.GetTokenValue("One")); 22Assert.Equal("2", props.GetTokenValue("Two")); 23Assert.Equal("3", props.GetTokenValue("Three")); 43Assert.Equal("0", props.GetTokenValue("Zero")); 68Assert.Equal(".1", props.GetTokenValue("One")); 69Assert.Equal(".2", props.GetTokenValue("Two")); 70Assert.Equal(".3", props.GetTokenValue("Three")); 91Assert.Equal(".11", props.GetTokenValue("One")); 92Assert.Equal(".22", props.GetTokenValue("Two")); 93Assert.Equal(".33", props.GetTokenValue("Three"));
TwitterTests.cs (19)
120Assert.Equal("Invalid state cookie.", error.GetBaseException().Message); 224Assert.Equal("http://localhost/access-denied?ReturnUrl=%2Fchallenge", response.Headers.Location.ToString()); 243Assert.Equal("testvalue", context.Properties.Items["testkey"]); 303Assert.Equal(expectedErrorMessage, exception.Message); 347Assert.Equal("Access was denied by the resource owner or by the remote server.", context.Failure.Message); 349Assert.Equal("testvalue", context.Properties.Items["testkey"]); 432Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 438Assert.Equal("@dotnet", transaction.FindClaimValue(ClaimTypes.Name, expectedIssuer)); 439Assert.Equal("123456", transaction.FindClaimValue(ClaimTypes.NameIdentifier, expectedIssuer)); 440Assert.Equal("123456", transaction.FindClaimValue("urn:twitter:userid", expectedIssuer)); 441Assert.Equal("@dotnet", transaction.FindClaimValue("urn:twitter:screenname", expectedIssuer)); 445Assert.Equal("Test Access Token", transaction.FindTokenValue("access_token")); 446Assert.Equal("PLACEHOLDER", transaction.FindTokenValue("access_token_secret")); 511Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First()); 528Assert.Equal("@dotnet", transaction.FindClaimValue(ClaimTypes.Name, expectedIssuer)); 529Assert.Equal("123456", transaction.FindClaimValue(ClaimTypes.NameIdentifier, expectedIssuer)); 530Assert.Equal("123456", transaction.FindClaimValue("urn:twitter:userid", expectedIssuer)); 531Assert.Equal("@dotnet", transaction.FindClaimValue("urn:twitter:screenname", expectedIssuer)); 532Assert.Equal("Test email", transaction.FindClaimValue(ClaimTypes.Email, expectedIssuer));
WsFederation\WsFederationTest.cs (21)
36Assert.Equal("WsFederationHandler", scheme.HandlerType.Name); 37Assert.Equal(WsFederationDefaults.AuthenticationScheme, scheme.DisplayName); 66Assert.Equal("Provide MetadataAddress, Configuration, or ConfigurationManager to WsFederationOptions", exception.Message); 76Assert.Equal("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/wsfed", response.Headers.Location.GetLeftPart(System.UriPartial.Path)); 79Assert.Equal("http://Automation1", queryItems["wtrealm"]); 81Assert.Equal(httpClient.BaseAddress + "signin-wsfed", queryItems["wreply"]); 82Assert.Equal("wsignin1.0", queryItems["wa"]); 92Assert.Equal("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/wsfed", response.Headers.Location.GetLeftPart(System.UriPartial.Path)); 95Assert.Equal("http://Automation1", queryItems["wtrealm"]); 97Assert.Equal(httpClient.BaseAddress + "signin-wsfed", queryItems["wreply"]); 98Assert.Equal("wsignin1.0", queryItems["wa"]); 108Assert.Equal("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/wsfed", response.Headers.Location.GetLeftPart(System.UriPartial.Path)); 111Assert.Equal("http://Automation1", queryItems["wtrealm"]); 113Assert.Equal(httpClient.BaseAddress + "premapped-challenge/signin-wsfed", queryItems["wreply"]); 114Assert.Equal("wsignin1.0", queryItems["wa"]); 138Assert.Equal(WsFederationDefaults.AuthenticationScheme, await response.Content.ReadAsStringAsync()); 165Assert.Equal(WsFederationDefaults.AuthenticationScheme, await response.Content.ReadAsStringAsync()); 183Assert.Equal("AuthenticationFailed", await response.Content.ReadAsStringAsync()); 195Assert.Equal(".AspNetCore.Cookies=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax; httponly", cookie); 196Assert.Equal("OnRemoteSignOut", response.Headers.GetValues("EventHeader").Single()); 197Assert.Equal("", await response.Content.ReadAsStringAsync());
WsFederation\WsFederationTest_Handler.cs (21)
34Assert.Equal("WsFederationHandler", scheme.HandlerType.Name); 35Assert.Equal(WsFederationDefaults.AuthenticationScheme, scheme.DisplayName); 64Assert.Equal("Provide MetadataAddress, Configuration, or ConfigurationManager to WsFederationOptions", exception.Message); 74Assert.Equal("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/wsfed", response.Headers.Location.GetLeftPart(System.UriPartial.Path)); 77Assert.Equal("http://Automation1", queryItems["wtrealm"]); 79Assert.Equal(httpClient.BaseAddress + "signin-wsfed", queryItems["wreply"]); 80Assert.Equal("wsignin1.0", queryItems["wa"]); 90Assert.Equal("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/wsfed", response.Headers.Location.GetLeftPart(System.UriPartial.Path)); 93Assert.Equal("http://Automation1", queryItems["wtrealm"]); 95Assert.Equal(httpClient.BaseAddress + "signin-wsfed", queryItems["wreply"]); 96Assert.Equal("wsignin1.0", queryItems["wa"]); 106Assert.Equal("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/wsfed", response.Headers.Location.GetLeftPart(System.UriPartial.Path)); 109Assert.Equal("http://Automation1", queryItems["wtrealm"]); 111Assert.Equal(httpClient.BaseAddress + "premapped-challenge/signin-wsfed", queryItems["wreply"]); 112Assert.Equal("wsignin1.0", queryItems["wa"]); 136Assert.Equal(WsFederationDefaults.AuthenticationScheme, await response.Content.ReadAsStringAsync()); 163Assert.Equal(WsFederationDefaults.AuthenticationScheme, await response.Content.ReadAsStringAsync()); 181Assert.Equal("AuthenticationFailed", await response.Content.ReadAsStringAsync()); 193Assert.Equal(".AspNetCore.Cookies=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax; httponly", cookie); 194Assert.Equal("OnRemoteSignOut", response.Headers.GetValues("EventHeader").Single()); 195Assert.Equal("", await response.Content.ReadAsStringAsync());
Microsoft.AspNetCore.Authorization.Test (20)
AssertionRequirementsTests.cs (1)
20Assert.Equal("Handler assertion should evaluate to true.", formattedValue);
AuthorizationAppBuilderExtensionsTests.cs (1)
58Assert.Equal(
AuthorizationEndpointConventionBuilderExtensionsTests.cs (1)
66Assert.Equal("policy", authMetadata.Policy);
ClaimsAuthorizationRequirementTests.cs (3)
25Assert.Equal("ClaimsAuthorizationRequirement:Claim.Type=Custom and Claim.Value is one of the following values: (CustomValue1|CustomValue2)", formattedValue); 38Assert.Equal("ClaimsAuthorizationRequirement:Claim.Type=Custom", formattedValue); 51Assert.Equal("ClaimsAuthorizationRequirement:Claim.Type=Custom", formattedValue);
DefaultAuthorizationServiceTests.cs (7)
192Assert.Equal("1", first.Message); 195Assert.Equal("3", second.Message); 341Assert.Equal("No policy found: BogusPolicy.", exception.Message); 1192Assert.Equal("UserAuthorizationFailed", eventId.Name); 1195Assert.Equal("Authorization failed. These requirements were not met:" + Environment.NewLine + "LogRequirement" + Environment.NewLine + "LogRequirement", message); 1225Assert.Equal("UserAuthorizationFailed", eventId.Name); 1228Assert.Equal("Authorization failed. Fail() was explicitly called.", message);
DenyAnonymousAuthorizationRequirementTests.cs (1)
25Assert.Equal("DenyAnonymousAuthorizationRequirement: Requires an authenticated user.", formattedValue);
MetadataTest.cs (2)
20Assert.Equal("Authorize", value); 35Assert.Equal("Authorize Policy: Name, Roles: Role1, AuthenticationSchemes: Scheme1", value);
NameAuthorizationRequirementTests.cs (1)
25Assert.Equal("NameAuthorizationRequirement:Requires a user identity with Name equal to Custom", formattedValue);
OperationAuthorizationRequirementTests.cs (1)
28Assert.Equal("OperationAuthorizationRequirement:Name=Custom", formattedValue);
RolesAuthorizationRequirementTests.cs (2)
25Assert.Equal("RolesAuthorizationRequirement:User.IsInRole must be true for one of the following roles: (Custom1|Custom2)", formattedValue); 38Assert.Equal("RolesAuthorizationRequirement:User.IsInRole must be true for one of the following roles: (Custom1)", formattedValue);
Microsoft.AspNetCore.AzureAppServices.SiteExtension.Tests (18)
TransformTest.cs (18)
32Assert.Equal("add", depsElement.Name); 33Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value); 34Assert.Equal($@"{XdtExtensionPath}\additionalDeps\;{XdtExtensionPath}\additionalDeps\Microsoft.AspNetCore.AzureAppServices.HostingStartup\;" + 39Assert.Equal("add", sharedStoreElement.Name); 40Assert.Equal("DOTNET_SHARED_STORE", sharedStoreElement.Attributes["name"].Value); 41Assert.Equal($@"{XdtExtensionPath}\store", sharedStoreElement.Attributes["value"].Value); 44Assert.Equal("add", startupAssembliesElement.Name); 45Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value); 46Assert.Equal("Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value); 62Assert.Equal("add", depsElement.Name); 63Assert.Equal("DOTNET_ADDITIONAL_DEPS", depsElement.Attributes["name"].Value); 64Assert.Equal(@"ExistingValue1;" + 70Assert.Equal("add", sharedStoreElement.Name); 71Assert.Equal("DOTNET_SHARED_STORE", sharedStoreElement.Attributes["name"].Value); 72Assert.Equal($@"ExistingValue3;{XdtExtensionPath}\store", sharedStoreElement.Attributes["value"].Value); 75Assert.Equal("add", startupAssembliesElement.Name); 76Assert.Equal("ASPNETCORE_HOSTINGSTARTUPASSEMBLIES", startupAssembliesElement.Attributes["name"].Value); 77Assert.Equal("ExistingValue2;Microsoft.AspNetCore.AzureAppServices.HostingStartup", startupAssembliesElement.Attributes["value"].Value);
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Verifiers\CodeFixVerifier.cs (1)
129Assert.Equal(newSource, actual);
Microsoft.AspNetCore.Components.Authorization.Tests (21)
AuthorizeRouteViewTest.cs (1)
117Assert.Equal(resource, call.resource.ToString());
AuthorizeViewTest.cs (13)
78Assert.Equal("Nellie", call.user.Identity.Name); 106Assert.Equal("Nellie", call.user.Identity.Name); 142Assert.Equal("Nellie", call.user.Identity.Name); 178Assert.Equal("Nellie", call.user.Identity.Name); 225Assert.Equal("Ronaldo", call.user.Identity.Name); 246Assert.Equal("Do not specify both 'Authorized' and 'ChildContent'.", ex.Message); 342Assert.Equal("Monsieur", call.user.Identity.Name); 400Assert.Equal("Monsieur", call.user.Identity.Name); 423Assert.Equal("Nellie", call.user.Identity.Name); 426req => Assert.Equal("MyTestPolicy", ((TestPolicyRequirement)req).PolicyName)); 446Assert.Equal("Nellie", call.user.Identity.Name); 471Assert.Equal("Nellie", call.user.Identity.Name); 493Assert.Equal("The authorization data specifies an authentication scheme with value 'test scheme'. Authentication schemes cannot be specified for components.", ex.Message);
src\Components\Shared\test\AssertFrame.cs (7)
21Assert.Equal(textContent, frame.TextContent); 29Assert.Equal(markupContent, frame.MarkupContent); 37Assert.Equal(elementName, frame.ElementName); 45Assert.Equal(attributeName, frame.AttributeName); 87Assert.Equal(typeName, frame.ComponentType.FullName); 154Assert.Equal(eventType, frame.NamedEventType); 155Assert.Equal(assignedName, frame.NamedEventAssignedName);
Microsoft.AspNetCore.Components.Endpoints.Tests (153)
Assets\ImportMapDefinitionTest.cs (5)
37Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 66Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 96Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 128Assert.Equal(expectedJson, importMapDefinition.ToJson().Replace("\r\n", "\n")); 199Assert.Equal(expectedImportMap, combinedImportMap.ToJson().Replace("\r\n", "\n"));
Binding\FormDataMapperTests.cs (9)
1950element => Assert.Equal("file-1.txt", element.FileName), 1951element => Assert.Equal("file-2.txt", element.FileName), 1952element => Assert.Equal("file-3.txt", element.FileName) 2027Assert.Equal("file", browserFile.Name); 2031Assert.Equal(expectedString, Encoding.UTF8.GetString(buffer, 0, buffer.Length)); 2062Assert.Equal("file", browserFile1.Name); 2066Assert.Equal(expectedString1, Encoding.UTF8.GetString(buffer1, 0, buffer1.Length)); 2069Assert.Equal("file", browserFile2.Name); 2073Assert.Equal(expectedString1, Encoding.UTF8.GetString(buffer2, 0, buffer2.Length));
Buffering\BufferedTextWriterTest.cs (3)
28Assert.Equal("xMy stringbcd", underlying.ToString()); 62Assert.Equal("a", underlying.FlushedOutput); 69Assert.Equal("abc", underlying.FlushedOutput);
Buffering\TextChunkListBuilderTest.cs (3)
26Assert.Equal("Item1Item2Item3", writer1.ToString()); 32Assert.Equal("", writer2.ToString()); 39Assert.Equal("Item4", writer3.ToString());
Buffering\TextChunkPageTest.cs (1)
36Assert.Equal("Item1Item2Item3", writer.ToString());
Buffering\TextChunkTest.cs (4)
18Assert.Equal("string value", _writer.ToString()); 26Assert.Equal("x", _writer.ToString()); 40Assert.Equal("bcd", _writer.ToString()); 48Assert.Equal("123456", _writer.ToString());
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (7)
78Assert.Equal("named.css", list[0].Url); 99Assert.Equal("default.css", list[0].Url); 121Assert.Equal("default.css", list[0].Url); 143Assert.Equal("default.css", list[0].Url); 166Assert.Equal("named.css", list[0].Url); 192Assert.Equal("named.css", list[0].Url); 243Assert.Equal(frameworkEndpoint, ((RouteEndpoint)webJSEndpoint).RoutePattern.RawText);
EndpointHtmlRendererTest.cs (81)
66Assert.Equal("webassembly", marker.Type); 67Assert.Equal(typeof(SimpleComponent).Assembly.GetName().Name, marker.Assembly); 68Assert.Equal(typeof(SimpleComponent).FullName, marker.TypeName); 90Assert.Equal("webassembly", preambleMarker.Type); 91Assert.Equal(typeof(SimpleComponent).Assembly.GetName().Name, preambleMarker.Assembly); 92Assert.Equal(typeof(SimpleComponent).FullName, preambleMarker.TypeName); 95Assert.Equal("<h1>Hello from SimpleComponent</h1>", prerenderedContent); 99Assert.Equal(preambleMarker.PrerenderId, epilogueMarker.PrerenderId); 132Assert.Equal("webassembly", marker.Type); 133Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, marker.Assembly); 134Assert.Equal(typeof(GreetingComponent).FullName, marker.TypeName); 138Assert.Equal("Name", parameterDefinition.Name); 139Assert.Equal("System.String", parameterDefinition.TypeName); 140Assert.Equal("System.Private.CoreLib", parameterDefinition.Assembly); 144Assert.Equal("Daniel", rawValue.GetString()); 169Assert.Equal("webassembly", marker.Type); 170Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, marker.Assembly); 171Assert.Equal(typeof(GreetingComponent).FullName, marker.TypeName); 174Assert.Equal("Name", parameterDefinition.Name); 205Assert.Equal("webassembly", preambleMarker.Type); 206Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, preambleMarker.Assembly); 207Assert.Equal(typeof(GreetingComponent).FullName, preambleMarker.TypeName); 210Assert.Equal("Name", parameterDefinition.Name); 211Assert.Equal("System.String", parameterDefinition.TypeName); 212Assert.Equal("System.Private.CoreLib", parameterDefinition.Assembly); 216Assert.Equal("Daniel", rawValue.GetString()); 219Assert.Equal("<p>Hello Daniel!</p>", prerenderedContent); 223Assert.Equal(preambleMarker.PrerenderId, epilogueMarker.PrerenderId); 254Assert.Equal("webassembly", preambleMarker.Type); 255Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, preambleMarker.Assembly); 256Assert.Equal(typeof(GreetingComponent).FullName, preambleMarker.TypeName); 259Assert.Equal("Name", parameterDefinition.Name); 267Assert.Equal("<p>Hello (null)!</p>", prerenderedContent); 271Assert.Equal(preambleMarker.PrerenderId, epilogueMarker.PrerenderId); 292Assert.Equal("<h1>Hello from SimpleComponent</h1>", content); 314Assert.Equal("server", marker.Type); 319Assert.Equal(typeof(SimpleComponent).Assembly.GetName().Name, serverComponent.AssemblyName); 320Assert.Equal(typeof(SimpleComponent).FullName, serverComponent.TypeName); 323Assert.Equal("no-cache, no-store, max-age=0", httpContext.Response.Headers.CacheControl); 347Assert.Equal("server", preambleMarker.Type); 353Assert.Equal(typeof(SimpleComponent).Assembly.GetName().Name, serverComponent.AssemblyName); 354Assert.Equal(typeof(SimpleComponent).FullName, serverComponent.TypeName); 358Assert.Equal("<h1>Hello from SimpleComponent</h1>", prerenderedContent); 362Assert.Equal(preambleMarker.PrerenderId, epilogueMarker.PrerenderId); 367Assert.Equal("no-cache, no-store, max-age=0", httpContext.Response.Headers.CacheControl); 465Assert.Equal("server", marker.Type); 470Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, serverComponent.AssemblyName); 471Assert.Equal(typeof(GreetingComponent).FullName, serverComponent.TypeName); 481Assert.Equal("SomeName", rawValue.GetString()); 504Assert.Equal("server", marker.Type); 509Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, serverComponent.AssemblyName); 510Assert.Equal(typeof(GreetingComponent).FullName, serverComponent.TypeName); 544Assert.Equal("server", preambleMarker.Type); 550Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, serverComponent.AssemblyName); 551Assert.Equal(typeof(GreetingComponent).FullName, serverComponent.TypeName); 561Assert.Equal("SomeName", rawValue.GetString()); 564Assert.Equal("<p>Hello SomeName!</p>", prerenderedContent); 568Assert.Equal(preambleMarker.PrerenderId, epilogueMarker.PrerenderId); 595Assert.Equal("server", preambleMarker.Type); 601Assert.Equal(typeof(GreetingComponent).Assembly.GetName().Name, serverComponent.AssemblyName); 602Assert.Equal(typeof(GreetingComponent).FullName, serverComponent.TypeName); 615Assert.Equal("<p>Hello (null)!</p>", prerenderedContent); 619Assert.Equal(preambleMarker.PrerenderId, epilogueMarker.PrerenderId); 808Assert.Equal("http://localhost/redirect", ctx.Response.Headers.Location); 957Assert.Equal("Received call to updated handler", component.Message); 1078Assert.Equal("server", marker.Type); 1083Assert.Equal(typeof(InteractiveGreetingServer).Assembly.GetName().Name, serverComponent.AssemblyName); 1084Assert.Equal(typeof(InteractiveGreetingServer).FullName, serverComponent.TypeName); 1094Assert.Equal("ServerPrerendered", rawValue.GetString()); 1096Assert.Equal("<p>Hello ServerPrerendered!</p>", innerHtml); 1107Assert.Equal("server", marker.Type); 1112Assert.Equal(typeof(InteractiveGreetingServer).Assembly.GetName().Name, serverComponent.AssemblyName); 1113Assert.Equal(typeof(InteractiveGreetingServerNonPrerendered).FullName, serverComponent.TypeName); 1123Assert.Equal("Server", rawValue.GetString()); 1132Assert.Equal(typeof(InteractiveGreetingWebAssembly).FullName, marker.TypeName); 1135Assert.Equal("WebAssemblyPrerendered", parameterValues.Single().ToString()); 1137Assert.Equal("<p>Hello WebAssemblyPrerendered!</p>", innerHtml); 1145Assert.Equal(typeof(InteractiveGreetingWebAssemblyNonPrerendered).FullName, marker.TypeName); 1148Assert.Equal("WebAssembly", parameterValues.Single().ToString()); 1175Assert.Equal("webassembly", preambleMarker.Type); 1178Assert.Equal("<h1>This is InteractiveWithInteractiveChild</h1>\n\n<p>Hello from InteractiveGreetingServer!</p>", prerenderedContent.Replace("\r\n", "\n"));
HotReloadServiceTests.cs (9)
52Assert.Equal("/server", endpoint.RoutePattern.RawText); 71(ep) => Assert.Equal("/app/test", ((RouteEndpoint)ep).RoutePattern.RawText), 72(ep) => Assert.Equal("/server", ((RouteEndpoint)ep).RoutePattern.RawText)); 87Assert.Equal("/server", endpoint.RoutePattern.RawText); 109Assert.Equal("/server", endpoint.RoutePattern.RawText); 119Assert.Equal("/server", updatedEndpoint.RoutePattern.RawText); 135Assert.Equal("/server", endpoint.RoutePattern.RawText); 137Assert.Equal("/server", compositeEndpoint.RoutePattern.RawText); 184Assert.Equal("/server", endpoint.RoutePattern.RawText);
ImportMapTest.cs (13)
69Assert.Equal("script", frames.Array[0].ElementName); 71Assert.Equal("type", frames.Array[1].AttributeName); 73Assert.Equal("nonce", frames.Array[2].AttributeName); 76Assert.Equal(importMapDefinition.ToJson(), frames.Array[3].TextContent); 116Assert.Equal("script", frames.Array[0].ElementName); 118Assert.Equal("type", frames.Array[1].AttributeName); 121Assert.Equal(importMapDefinition.ToJson(), frames.Array[2].TextContent); 181Assert.Equal("script", frames.Array[0].ElementName); 183Assert.Equal("type", frames.Array[1].AttributeName); 186Assert.Equal(otherImportMapDefinition.ToJson(), frames.Array[2].TextContent); 240Assert.Equal("script", frames.Array[0].ElementName); 242Assert.Equal("type", frames.Array[1].AttributeName); 245Assert.Equal(importMapDefinition.ToJson(), frames.Array[2].TextContent);
RazorComponentEndpointFactoryTest.cs (4)
35Assert.Equal("/ (App)", endpoint.DisplayName); 38Assert.Equal("/", routeEndpoint.RoutePattern.RawText); 49method => Assert.Equal("GET", method), 50method => Assert.Equal("POST", method)
RazorComponentResultTest.cs (13)
64Assert.Equal("<h1>Hello from SimpleComponent</h1>", GetStringContent(responseBody)); 65Assert.Equal("text/html; charset=utf-8", httpContext.Response.ContentType); 86Assert.Equal("<h1>Hello from SimpleComponent</h1>", GetStringContent(responseBody)); 87Assert.Equal("application/test-content-type", httpContext.Response.ContentType); 105Assert.Equal( 117Assert.Equal( 136Assert.Equal( 144Assert.Equal( 168Assert.Equal( 176Assert.Equal( 203Assert.Equal( 220Assert.Equal($"[TestParentLayout with content: [TestLayout with content: Page\n]\n]\n", GetStringContent(responseBody)); 233Assert.Equal("https://test/somewhere/else", httpContext.Response.Headers.Location);
TypeNameHashTest.cs (1)
76Assert.Equal($"Cannot compute a hash for a type without a {nameof(Type.FullName)}.", ex.Message);
Microsoft.AspNetCore.Components.Forms.Tests (59)
EditContextDataAnnotationsExtensionsTest.cs (1)
18Assert.Equal("editContext", ex.ParamName);
EditContextTest.cs (2)
12Assert.Equal("model", ex.ParamName); 33Assert.Equal("testFieldName", fieldIdentifier.FieldName);
ExpressionFormatterTest.cs (22)
20Assert.Equal("person.Parent.Name", result); 33Assert.Equal("person.Country", result); 46Assert.Equal("person.Parent.Children[3].Name", result); 63Assert.Equal("person.Parent.Children[3].Name", result[0]); 64Assert.Equal("person.Parent.Children[3].Name", result[1]); 65Assert.Equal("person.Parent.Children[3].Name", result[2]); 79Assert.Equal("person.Parent.Children[42].Name", result); 97Assert.Equal("person.Parent.Children[0].Name", result[0]); 98Assert.Equal("person.Parent.Children[1].Name", result[1]); 99Assert.Equal("person.Parent.Children[2].Name", result[2]); 113Assert.Equal("person.Parent.Children[0].Name", result1[0]); 114Assert.Equal("person.Parent.Children[1].Name", result1[1]); 115Assert.Equal("person.Parent.Children[2].Name", result1[2]); 117Assert.Equal("person.Parent.Children[0].Name", result2[0]); 118Assert.Equal("person.Parent.Children[1].Name", result2[1]); 119Assert.Equal("person.Parent.Children[2].Name", result2[2]); 149Assert.Equal("person.Parent.Parent.Children[0].Parent.Children[0].Children[0].Name", result[0]); 150Assert.Equal("person.Parent.Parent.Children[1].Parent.Children[1].Children[1].Name", result[1]); 151Assert.Equal("person.Parent.Parent.Children[2].Parent.Children[2].Children[2].Name", result[2]); 169Assert.Equal("person.Parent.Nicknames[0]", result[0]); 170Assert.Equal("person.Parent.Nicknames[1]", result[1]); 171Assert.Equal("person.Parent.Nicknames[2]", result[2]);
FieldIdentifierTest.cs (19)
16Assert.Equal("model", ex.ParamName); 23Assert.Equal("model", ex.ParamName); 31Assert.Equal("fieldName", ex.ParamName); 38Assert.Equal(string.Empty, fieldIdentifier.FieldName); 50Assert.Equal("someField", fieldIdentifier.FieldName); 127Assert.Equal("field", fieldIdentifierLower.FieldName); 128Assert.Equal("Field", fieldIdentifierPascal.FieldName); 139Assert.Equal(nameof(model.StringProperty), fieldIdentifier.FieldName); 166Assert.Equal($"The provided expression contains a NewExpression which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object.", ex.Message); 175Assert.Equal(nameof(model.StringField), fieldIdentifier.FieldName); 187Assert.Equal(nameof(model.IntProperty), fieldIdentifier.FieldName); 195Assert.Equal(nameof(StringPropertyOnThisClass), fieldIdentifier.FieldName); 204Assert.Equal(nameof(TestModel.StringField), fieldIdentifier.FieldName); 213Assert.Equal(nameof(TestModel.StringField), fieldIdentifier.FieldName); 222Assert.Equal(nameof(TestModel.StringField), fieldIdentifier.FieldName); 230Assert.Equal(nameof(model.Field), fieldIdentifier.FieldName); 243Assert.Equal(nameof(Model2.Property), fieldIdentifier.FieldName); 255Assert.Equal(nameof(Model3.Value), fieldIdentifier.FieldName); 263Assert.Equal(nameof(@ÖvrigAnställning.Ort), fieldIdentifier.FieldName);
ReverseStringBuilderTest.cs (7)
19Assert.Equal(string.Empty, result); 33Assert.Equal(string.Empty, result); 52Assert.Equal("Hello, world!", result); 72Assert.Equal("Hello, 123 worlds!", result); 91Assert.Equal("Hello, world!", result); 112Assert.Equal(expected, result); 142Assert.Equal(expected, actual);
src\Components\Shared\test\AssertFrame.cs (7)
21Assert.Equal(textContent, frame.TextContent); 29Assert.Equal(markupContent, frame.MarkupContent); 37Assert.Equal(elementName, frame.ElementName); 45Assert.Equal(attributeName, frame.AttributeName); 87Assert.Equal(typeName, frame.ComponentType.FullName); 154Assert.Equal(eventType, frame.NamedEventType); 155Assert.Equal(assignedName, frame.NamedEventAssignedName);
ValidationMessageStoreTest.cs (1)
12Assert.Equal("editContext", ex.ParamName);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Verifiers\CodeFixVerifier.cs (1)
129Assert.Equal(newSource, actual);
Microsoft.AspNetCore.Components.Server.Tests (41)
Circuits\CircuitHostTest.cs (7)
433Assert.Equal(expectedMessage, component.Message); 459Assert.Equal(expectedMessage, component.Message); 486Assert.Equal(expectedMessage, component.Message); 520Assert.Equal(expectedMessage, component.Message); 524Assert.Equal("Cannot update components with mismatching types.", exception.Message); 557Assert.Equal(expectedMessage, component.Message); 561Assert.Equal("Cannot update components with mismatching keys.", exception.Message);
Circuits\CircuitIdFactoryTest.cs (2)
52Assert.Equal(id.Secret, parsed.Secret); 53Assert.Equal(id.Id, parsed.Id);
Circuits\RemoteJSDataStreamTest.cs (1)
308Assert.Equal("Blazor._internal.sendJSDataStream", identifier);
Circuits\RemoteJSRuntimeTest.cs (3)
34Assert.Equal("Exceeded the maximum byte array transfer limit for a call. (Parameter 'data')", ex.Message); 74Assert.Equal("Exceeded the maximum byte array transfer limit for a call. (Parameter 'data')", ex.Message); 86Assert.Equal("Exceeded the maximum byte array transfer limit for a call. (Parameter 'data')", ex.Message);
Circuits\RemoteRendererTest.cs (1)
615Assert.Equal($"No root component exists with SSR component ID 1.", ex.Message);
Circuits\RenderBatchWriterTest.cs (1)
344Assert.Equal(expectedString, stringTableEntries[indexIntoStringTable]);
Circuits\RevalidatingServerAuthenticationStateProviderTest.cs (5)
51Assert.Equal("test user", (await provider.GetAuthenticationStateAsync()).User.Identity.Name); 112call => Assert.Equal("test user", call.AuthenticationState.User.Identity.Name)); 124call => Assert.Equal("different user", call.AuthenticationState.User.Identity.Name)); 173Assert.Equal("different user", (await provider.GetAuthenticationStateAsync()).User.Identity.Name); 178call => Assert.Equal("different user", call.AuthenticationState.User.Identity.Name));
DependencyInjection\ComponentServiceCollectionExtensionsTest.cs (3)
25Assert.Equal(BlazorPackHubProtocol.ProtocolName, protocol); 46Assert.Equal(BlazorPackHubProtocol.ProtocolName, protocol); 73Assert.Equal(BlazorPackHubProtocol.ProtocolName, protocol);
ElementReferenceJsonConverterTest.cs (5)
36Assert.Equal(expected, json); 53Assert.Equal(id, elementReference.Id); 73Assert.Equal(id, elementReference.Id); 92Assert.Equal("Unexpected JSON property 'id'.", ex.Message); 111Assert.Equal("__internalId is required.", ex.Message);
ProtectedBrowserStorageTest.cs (11)
35Assert.Equal("testStore.setItem", invocation.Identifier); 38arg => Assert.Equal( 61Assert.Equal("testStore.setItem", invocation.Identifier); 64arg => Assert.Equal( 85Assert.Equal("testStore.setItem", invocation.Identifier); 88arg => Assert.Equal( 112Assert.Equal("Hello", result.Value.StringProperty); 116Assert.Equal("testStore.getItem", invocation.Identifier); 139Assert.Equal("Hello", result.Value.StringProperty); 143Assert.Equal("testStore.getItem", invocation.Identifier); 252Assert.Equal("testStore.removeItem", invocation.Identifier);
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (2)
366Assert.Equal(testData.ErrorMessage, exception.Message); 399Assert.Equal(testData.ErrorMessage, bindingFailure.BindingFailure.SourceException.Message);
Microsoft.AspNetCore.Components.Tests (145)
BindConverterTest.cs (8)
112Assert.Equal(expected, actual); 140Assert.Equal(expected, actual); 168Assert.Equal(expected, actual); 182Assert.Equal(expected, actual); 196Assert.Equal(expected, actual); 210Assert.Equal(expected, actual); 224Assert.Equal(expected, actual); 238Assert.Equal(expected, actual);
CascadingParameterTest.cs (3)
326Assert.Equal("The value of IsFixed cannot be changed dynamically.", ex.Message); 351Assert.Equal("The value of IsFixed cannot be changed dynamically.", ex.Message); 385Assert.Equal($"The {nameof(ParameterView)} instance can no longer be read because it has expired. {nameof(ParameterView)} can only be read synchronously and must not be stored for later use.", ex.Message);
ComponentFactoryTest.cs (2)
72Assert.Equal($"The component activator returned a null value for a component of type {componentType.FullName}.", ex.Message); 228Assert.Equal($"The component type '{componentType}' has a fixed rendermode of '{typeof(TestRenderMode)}', so it is not valid to specify any rendermode when using this component.", ex.Message);
DependencyInjectionTest.cs (3)
49Assert.Equal($"Cannot provide a value for property '{nameof(HasInjectableProperty.MyService)}' " + 62Assert.Equal($"Cannot provide a value for property '{nameof(HasInjectableProperty.MyService)}' " + 78Assert.Equal($"Cannot provide a value for property '{nameof(HasKeyedInjectableProperty.MyService)}' " +
EventCallbackFactoryBinderExtensionsTest.cs (3)
113Assert.Equal(expectedValue, value); 594Assert.Equal(expectedValue.Message, value.Message); 607Assert.Equal(
NavigationManagerTest.cs (12)
27Assert.Equal(expectedResult, actualResult); 45Assert.Equal(expectedResult, actualResult); 61Assert.Equal( 79Assert.Equal( 97Assert.Equal(expectedUri, actualUri); 111Assert.Equal(expectedUri, actualUri); 129Assert.Equal(expectedUri, actualUri); 163Assert.Equal(expectedUri, actualUri); 180Assert.Equal(expectedUri, actualUri); 702Assert.Equal(exceptionMessage, ex.Message); 733Assert.Equal(exceptionMessage, ex.Message); 759Assert.Equal(exceptionMessage, ex.Message);
ParameterViewTest.Assignment.cs (28)
31Assert.Equal("Hello", target.StringProp); 108Assert.Equal("Existing value", target.StringProp); 126Assert.Equal("hi", target.Cascading); 145Assert.Equal("bye", target.Cascading); 162Assert.Equal( 184Assert.Equal( 206Assert.Equal( 224Assert.Equal("Test", target.GetCascadingValue()); 241Assert.Equal( 260Assert.Equal( 279Assert.Equal( 299Assert.Equal("Hello", target.Parameter); 316Assert.Equal("Non-cascading", target.Parameter); 353Assert.Equal("hi", target.StringProp); 358Assert.Equal("test1", kvp.Key); 363Assert.Equal("test2", kvp.Key); 384Assert.Equal( 408Assert.Equal( 427Assert.Equal( 448Assert.Equal( 475Assert.Equal(nameof(HasCaptureUnmatchedValuesPropertyAndCascadingParameter.Cascading), kvp.Key); 478Assert.Equal("bye", target.Cascading); 494Assert.Equal( 516Assert.Equal( 537Assert.Equal( 555Assert.Equal( 578Assert.Equal( 625Assert.Equal("Hello", target.StringProp);
ParameterViewTest.cs (5)
142Assert.Equal("hello", value); 287Assert.Equal("entry 1", entry.Key); 292Assert.Equal("entry 2", entry.Key); 343Assert.Equal($"The {nameof(ParameterView)} instance can no longer be read because it has expired. {nameof(ParameterView)} can only be read synchronously and must not be stored for later use.", ex.Message); 575Assert.Equal(expectedName, parameter.Name);
RendererTest.cs (16)
720Assert.Equal("Error", exception.Message); 2095Assert.Equal("String that will change", childComponentInstance.StringProperty); 2104Assert.Equal("String that did change", childComponentInstance.StringProperty); 2925Assert.Equal("The render handle is not yet assigned.", ex.Message); 3141Assert.Equal("hello", value); 3180Assert.Equal("hello", value); 3220Assert.Equal("hello", value); 3260Assert.Equal("hello", value); 4352Assert.Equal("new property value", component.BoundString); 4404Assert.Equal(newPropertyValue, component.BoundString); 4465Assert.Equal($"The {nameof(ParameterView)} instance can no longer be read because it has expired. {nameof(ParameterView)} can only be read synchronously and must not be stored for later use.", ex.Message); 4830Assert.Equal($"The renderer does not have a component with ID {rootComponentId}.", ex.Message); 4856Assert.Equal($"The renderer does not have a component with ID {rootComponentId}.", ex.Message); 4885Assert.Equal("The specified component is not a root component", ex.Message); 5086Assert.Equal("Some message", resolvedComponent.Message); 5111Assert.Equal("Some message", resolvedComponent.Message);
Rendering\RendererSynchronizationContextTest.cs (1)
790Assert.Equal(expected, actual);
Rendering\RenderTreeBuilderTest.cs (9)
1751Assert.Equal("Cannot set a key outside the scope of a component or element.", ex.Message); 1767Assert.Equal($"Cannot set a key on a frame of type {RenderTreeFrameType.Region}.", ex.Message); 2140Assert.Equal($"The enclosing frame is not of the required type '{nameof(RenderTreeFrameType.Component)}'.", ex.Message); 2179Assert.Equal($"Component parameters may only be added immediately after frames of type {RenderTreeFrameType.Component}", ex.Message); 2215Assert.Equal($"Named events may only be added as children of frames of type {RenderTreeFrameType.Element}", ex.Message); 2230Assert.Equal("eventType", ex.ParamName); 2245Assert.Equal("assignedName", ex.ParamName); 2260Assert.Equal("assignedName", ex.ParamName); 2276Assert.Equal($"Attributes may only be added immediately after frames of type {RenderTreeFrameType.Element} or {RenderTreeFrameType.Component}", ex.Message);
RenderTreeDiffBuilderTest.cs (25)
399Assert.Equal("More than one sibling of element 'el' has the same key value, 'key1'. Key values must be unique.", ex.Message); 416Assert.Equal("More than one sibling of element 'el' has the same key value, 'key1'. Key values must be unique.", ex.Message); 433Assert.Equal("More than one sibling of element 'el' has the same key value, 'key1'. Key values must be unique.", ex.Message); 766Assert.Equal("was inserted", referenceFrames[entry.ReferenceFrameIndex].MarkupContent); 772Assert.Equal("was updated", referenceFrames[entry.ReferenceFrameIndex].MarkupContent); 877Assert.Equal("will be removed", entry.RemovedAttributeName); 960Assert.Equal("oldname", entry.RemovedAttributeName); 1177Assert.Equal("attr1", entry.RemovedAttributeName); 1204Assert.Equal("attr2", entry.RemovedAttributeName); 1231Assert.Equal("attr3", entry.RemovedAttributeName); 1258Assert.Equal("attr1", entry.RemovedAttributeName); 1285Assert.Equal("attr2", entry.RemovedAttributeName); 1312Assert.Equal("attr3", entry.RemovedAttributeName); 1605Assert.Equal("some string", componentInstance.StringProperty); 1726Assert.Equal("String did change", newComponentInstance.StringProperty); 1863Assert.Equal(ref1.Id, frame.ElementReferenceCaptureId); 1868Assert.Equal(ref2.Id, frame.ElementReferenceCaptureId); 2005Assert.Equal("First modified", referenceFrames[entry.ReferenceFrameIndex].TextContent); 2185Assert.Equal("some text", referenceFrames[entry.ReferenceFrameIndex].TextContent); 2209Assert.Equal("some elem", referenceFrames[entry.ReferenceFrameIndex].ElementName); 2238Assert.Equal("new element", referenceFrames[entry.ReferenceFrameIndex].ElementName); 2292Assert.Equal("attr1", referenceFrames[entry.ReferenceFrameIndex].AttributeName); 2385Assert.Equal("myattribute_final", entry.RemovedAttributeName); 2563Assert.Equal(eventType, namedEvent.EventType); 2564Assert.Equal(assignedName, namedEvent.AssignedName);
ResourceAssetCollectionTest.cs (1)
21Assert.Equal("image1.jpg", collectionAsReadOnlyList[0].Url);
RouteViewTest.cs (1)
41Assert.Equal($"The {nameof(RouteView)} component requires a non-null value for the parameter {nameof(RouteView.RouteData)}.", ex.Message);
Routing\QueryParameterValueSupplierTest.cs (4)
176Assert.Equal($"Cannot parse the value '{value.Replace('+', ' ')}' as type '{targetType}' for '{key}'.", ex.Message); 201Assert.Equal($"Cannot parse the value '{invalidValue.Replace('+', ' ')}' as type '{targetType}' for '{key}'.", ex.Message); 218Assert.Equal($"Cannot parse the value '' as type '{targetType}' for '{key}'.", ex.Message); 284Assert.Equal($"Cannot parse the value '' as type '{targetType}' for '{key}'.", ex.Message);
Routing\RouterTest.cs (4)
145Assert.Equal(expected, cancelled); 199Assert.Equal($"Rendering route matching {typeof(MultiSegmentRouteComponent)}", renderedFrame.TextContent); 245Assert.Equal("Custom content", renderedFrame.TextContent); 265Assert.Equal("Not found", renderedFrame.TextContent);
Routing\RouteTableFactoryTests.cs (1)
1048Assert.Equal(expectedMessage, exception.Message);
Routing\TemplateParserTests.cs (10)
132Assert.Equal(expectedMessage, ex.Message); 150Assert.Equal(expectedMessage, ex.Message); 165Assert.Equal(expectedMessage, ex.Message); 175Assert.Equal(expectedMessage, ex.Message); 185Assert.Equal(expectedMessage, ex.Message); 195Assert.Equal(expectedMessage, ex.Message); 205Assert.Equal(expectedMessage, ex.Message); 218Assert.Equal(expectedMessage, ex.Message); 228Assert.Equal(expectedMessage, ex.Message); 238Assert.Equal(expectedMessage, ex.Message);
src\Components\Shared\test\AssertFrame.cs (7)
21Assert.Equal(textContent, frame.TextContent); 29Assert.Equal(markupContent, frame.MarkupContent); 37Assert.Equal(elementName, frame.ElementName); 45Assert.Equal(attributeName, frame.AttributeName); 87Assert.Equal(typeName, frame.ComponentType.FullName); 154Assert.Equal(eventType, frame.NamedEventType); 155Assert.Equal(assignedName, frame.NamedEventAssignedName);
StackObjectPoolTest.cs (2)
100Assert.Equal("There are no outstanding instances to return.", ex.Message); 116Assert.Equal("Attempting to return wrong pooled instance. Get/Return calls must form a stack.", ex.Message);
Microsoft.AspNetCore.Components.Web.Tests (77)
Forms\BrowserFileTest.cs (1)
29Assert.Equal("Supplied file with size 100 bytes exceeds the maximum of 80 bytes.", ex.Message);
Forms\HtmlFieldPrefixTest.cs (5)
22Assert.Equal("person.Children[0].BillingAddress.City", prefix.GetFieldName(valueExpression)); 40Assert.Equal("person.Children[0].Children[1].BillingAddress.City", prefix.GetFieldName(valueExpression)); 56Assert.Equal("person.BillingAddress.City", prefix.GetFieldName(valueExpression)); 72Assert.Equal("person.Nicknames[0]", prefix.GetFieldName(valueExpression)); 90Assert.Equal("person.Children[0].Nicknames[1]", prefix.GetFieldName(valueExpression));
Forms\InputBaseTest.cs (17)
53Assert.Equal("some value", inputComponent.CurrentValue); 106Assert.Equal("initial value", inputComponent.CurrentValue); 112Assert.Equal("new value", inputComponent.CurrentValue); 213Assert.Equal("valid", inputComponent.CssClass); // no Class was specified 217Assert.Equal("modified valid", inputComponent.CssClass); 222Assert.Equal("modified invalid", inputComponent.CssClass); 226Assert.Equal("invalid", inputComponent.CssClass); 230Assert.Equal("valid", inputComponent.CssClass); 251Assert.Equal("my-class other-class valid", inputComponent.CssClass); 255Assert.Equal("my-class other-class modified valid", inputComponent.CssClass); 272Assert.Equal("1915/03/02", inputComponent.CurrentValueAsString); 384Assert.Equal("valid", component.CssClass); 395Assert.Equal("invalid", component.CssClass); 452Assert.Equal("invalid", component.CssClass); 487Assert.Equal("invalid", component.CssClass); 515Assert.Equal("invalid", component.CssClass); 526Assert.Equal("valid", component.CssClass);
Forms\InputFileChangeEventArgsTest.cs (1)
63Assert.Equal($"The maximum number of files accepted is 1, but 2 were supplied.", ex.Message);
Forms\InputRadioTest.cs (1)
58Assert.All(inputRadioComponents, inputRadio => Assert.Equal(groupName, inputRadio.GroupName));
Forms\Mapping\FormMappingContextTest.cs (2)
14Assert.Equal("", context.MappingScopeName); 21Assert.Equal("name", context.MappingScopeName);
Forms\Mapping\FormMappingScopeTest.cs (5)
44Assert.Equal("named-context", capturedContext.MappingScopeName); 74Assert.Equal("child-context", capturedContext.MappingScopeName); 92Assert.Equal($"The FormMappingScope component requires a nonempty Name parameter value.", exception.Message); 107Assert.Equal($"The FormMappingScope component requires a nonempty Name parameter value.", exception.Message); 131Assert.Equal("FormMappingScope 'Name' can't change after initialization.", exception.Message);
HtmlRendering\HtmlRendererTest.cs (19)
63Assert.Equal("<p></p>", result.ToHtmlString()); 830Assert.Equal("Hello from the section content provider", first.ToHtmlString()); 857Assert.Equal("<p>Hey!</p>", actual); 875Assert.Equal("Loading...", result.ToHtmlString()); 880Assert.Equal("Finished loading", result.ToHtmlString()); 901Assert.Equal("sync", ex.Message); 921Assert.Equal("async", ex.Message); 942Assert.Equal("sync", ex.Message); 967Assert.Equal("async", ex.Message); 1005Assert.Equal(@"<script> 1030Assert.Equal("<div></div>", result.ToHtmlString()); 1053Assert.Equal("<form></form>", result.ToHtmlString()); 1078Assert.Equal("<form><input type=\"hidden\" name=\"_handler\" value=\"some &lt;name&gt;\" /></form>", result.ToHtmlString()); 1106Assert.Equal("<form><input type=\"hidden\" name=\"_handler\" value=\"[myscope]somename\" /></form>", result.ToHtmlString()); 1137Assert.Equal($"<form action=\"{HttpUtility.HtmlAttributeEncode(expectedAction)}\"></form>", result.ToHtmlString()); 1159Assert.Equal("<form method=\"post\" action=\"/page\"></form>", result.ToHtmlString()); 1181Assert.Equal("<form action=\"https://example.com/explicit\"></form>", result.ToHtmlString()); 1202Assert.Equal("<form></form>", result.ToHtmlString()); 1214Assert.Equal(expected, actualHtml);
src\Components\Shared\test\AssertFrame.cs (7)
21Assert.Equal(textContent, frame.TextContent); 29Assert.Equal(markupContent, frame.MarkupContent); 37Assert.Equal(elementName, frame.ElementName); 45Assert.Equal(attributeName, frame.AttributeName); 87Assert.Equal(typeName, frame.ComponentType.FullName); 154Assert.Equal(eventType, frame.NamedEventType); 155Assert.Equal(assignedName, frame.NamedEventAssignedName);
Virtualization\VirtualizeTest.cs (1)
99Assert.Equal("Thrown from items provider.", ex.Message);
WebEventData\ClipboardEventArgsReaderTest.cs (1)
24Assert.Equal(args.Type, result.Type);
WebEventData\DragEventArgsReaderTest.cs (4)
64Assert.Equal(expected.DropEffect, actual.DropEffect); 65Assert.Equal(expected.EffectAllowed, actual.EffectAllowed); 76Assert.Equal(expected[i].Kind, actual[i].Kind); 77Assert.Equal(expected[i].Type, actual[i].Type);
WebEventData\ErrorEventArgsReaderTest.cs (3)
30Assert.Equal(args.Filename, result.Filename); 32Assert.Equal(args.Message, result.Message); 33Assert.Equal(args.Type, result.Type);
WebEventData\FocusEventArgsReaderTest.cs (1)
25Assert.Equal(args.Type, result.Type);
WebEventData\KeyboardEventArgsReaderTest.cs (3)
35Assert.Equal(args.Code, result.Code); 37Assert.Equal(args.Key, result.Key); 42Assert.Equal(args.Type, result.Type);
WebEventData\MouseEventArgsReaderTest.cs (1)
63Assert.Equal(expected.Type, actual.Type);
WebEventData\PointerEventArgsReaderTest.cs (1)
49Assert.Equal(args.PointerType, result.PointerType);
WebEventData\ProgressEventArgsReaderTest.cs (1)
30Assert.Equal(args.Type, result.Type);
WebEventData\TouchEventArgsReaderTest.cs (1)
83Assert.Equal(args.Type, result.Type);
WebEventData\WebEventDescriptorReaderTest.cs (2)
32Assert.Equal(args.EventName, result.EventName); 60Assert.Equal(args.EventName, result.EventName);
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (16)
ContentEncodingNegotiatorTests.cs (16)
28Assert.Equal(expectedPath, httpContext.Request.Path); 30Assert.Equal(expectedEncoding, selectedEncoding); 50Assert.Equal(expectedPath, httpContext.Request.Path); 71Assert.Equal(expectedPath, httpContext.Request.Path); 73Assert.Equal(expectedEncoding, selectedEncoding); 94Assert.Equal(expectedPath, httpContext.Request.Path); 96Assert.Equal(expectedEncoding, selectedEncoding); 117Assert.Equal(expectedPath, httpContext.Request.Path); 119Assert.Equal(expectedEncoding, selectedEncoding); 140Assert.Equal(expectedPath, httpContext.Request.Path); 142Assert.Equal(expectedEncoding, selectedEncoding); 163Assert.Equal(expectedPath, httpContext.Request.Path); 165Assert.Equal(expectedEncoding, selectedEncoding); 185Assert.Equal(expectedPath, httpContext.Request.Path); 206Assert.Equal(expectedPath, httpContext.Request.Path); 208Assert.Equal(expectedEncoding, selectedEncoding);
Microsoft.AspNetCore.Components.WebAssembly.Tests (31)
Hosting\WebAssemblyCultureProviderTest.cs (1)
41Assert.Equal("Blazor detected a change in the application's culture that is not supported with the current project configuration. " +
Hosting\WebAssemblyHostBuilderTest.cs (4)
32Assert.Equal("value", host.Configuration["key"]); 149Assert.Equal("https://www.example.com/", navigationManager.BaseUri); 150Assert.Equal("https://www.example.com/awesome-part-that-will-be-truncated-in-tests/cool", navigationManager.Uri); 203Assert.Equal("value", configuration["key"]);
Hosting\WebAssemblyHostConfigurationTest.cs (22)
32Assert.Equal("car", configuration["type"]); 33Assert.Equal("blue", configuration["color"]); 34Assert.Equal("6", configuration["wheels:count"]); 52Assert.Equal("car", configuration["type"]); 57Assert.Equal("car", value); 100Assert.Equal("2008", section["year"]); 101Assert.Equal("4", section["count"]); 102Assert.Equal("michelin", section["brand"]); 103Assert.Equal("rally", section["brand:type"]); 116Assert.Equal("blue", configuration["color"]); 163Assert.Equal("NoKeyValue1", dict[""]); 164Assert.Equal("ValueInMem1", dict["KeyInMem1"]); 165Assert.Equal("ValueDeep1", dict["KeyInMem1:Deep1"]); 169Assert.Equal("NoKeyValue2", dict2[""]); 170Assert.Equal("ValueInMem2", dict2["KeyInMem2"]); 171Assert.Equal("ValueDeep2", dict2["KeyInMem2:Deep2"]); 175Assert.Equal("NoKeyValue3", dict3[""]); 176Assert.Equal("ValueInMem3", dict3["KeyInMem3"]); 177Assert.Equal("ValueInMem4", dict3["KeyInMem4"]); 178Assert.Equal("ValueDeep3", dict3["KeyInMem3:Deep3"]); 179Assert.Equal("ValueDeep4", dict3["KeyInMem3:Deep4"]); 204Assert.Equal("ValueInMem2", configuration["Key1:Key2"]);
PullFromJSDataStreamTest.cs (4)
73Assert.Equal("Failed to read the requested number of bytes from the stream.", ex.Message); 87Assert.Equal("Failed to read the requested number of bytes from the stream.", ex.Message); 101Assert.Equal("Failed to read the requested number of bytes from the stream.", ex.Message); 123Assert.Equal("Blazor._internal.getJSDataStreamChunk", identifier);
Microsoft.AspNetCore.Components.WebView.Test (6)
Infrastructure\AssertHelpers.cs (2)
15Assert.Equal("Blazor._internal.attachWebRendererInterop", args[1].GetString()); 24Assert.Equal(selector, args[1].GetString());
StaticContentProviderTests.cs (3)
38Assert.Equal("OK", statusMessage); 39Assert.Equal("this is css", contentString); 41Assert.Equal("text/css", contentTypeValue);
WebViewManagerTests.cs (1)
110Assert.Equal($"There is already a root component with selector '{arbitraryComponentSelector}'.", ex.Message);
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
ConcurrencyLimiterEventSourceTests.cs (1)
18Assert.Equal("Microsoft.AspNetCore.ConcurrencyLimiter", eventSource.Name);
Microsoft.AspNetCore.CookiePolicy.Test (68)
CookieChunkingTests.cs (4)
20Assert.Equal("TestCookie=" + testString + "; path=/", values[0]); 43Assert.Equal($"TestCookie={testString}; expires={now.AddMinutes(5).ToString("R")}; max-age=300; domain=foo.com; path=/bar; secure; samesite=strict; httponly", values[0]); 163Assert.Equal(testString, result); 204Assert.Equal(testString, result);
CookieConsentTests.cs (13)
30Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 94Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 113Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 166Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 242Assert.Equal(".AspNet.Consent", context.CookieName); 243Assert.Equal("yes", context.CookieValue); 305Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 337Assert.Equal("Started.Granted.", await reader.ReadToEndAsync()); 421Assert.Equal(".AspNet.Consent", context.CookieName); 488Assert.Equal("Started.Withdrawn.", await reader.ReadToEndAsync()); 489Assert.Equal("Test=Value1; path=/", httpContext.Response.Headers.SetCookie); 600Assert.Equal(".AspNet.Consent", context.CookieName); 601Assert.Equal("yes", context.CookieValue);
CookiePolicyTests.cs (51)
61Assert.Equal("A=A; path=/; secure", transaction.SetCookie[0]); 62Assert.Equal("B=B; path=/; secure", transaction.SetCookie[1]); 63Assert.Equal("C=C; path=/; secure", transaction.SetCookie[2]); 64Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3]); 81Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 82Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 83Assert.Equal("C=C; path=/", transaction.SetCookie[2]); 84Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3]); 101Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 102Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 103Assert.Equal("C=C; path=/", transaction.SetCookie[2]); 104Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3]); 110Assert.Equal("A=A; path=/; secure", transaction.SetCookie[0]); 111Assert.Equal("B=B; path=/; secure", transaction.SetCookie[1]); 112Assert.Equal("C=C; path=/; secure", transaction.SetCookie[2]); 113Assert.Equal("D=D; path=/; secure", transaction.SetCookie[3]); 130Assert.Equal("A=A; path=/; httponly", transaction.SetCookie[0]); 131Assert.Equal("B=B; path=/; httponly", transaction.SetCookie[1]); 132Assert.Equal("C=C; path=/; httponly", transaction.SetCookie[2]); 133Assert.Equal("D=D; path=/; httponly", transaction.SetCookie[3]); 150Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 151Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 152Assert.Equal("C=C; path=/", transaction.SetCookie[2]); 153Assert.Equal("D=D; path=/; httponly", transaction.SetCookie[3]); 170Assert.Equal("A=A; path=/; samesite=strict", transaction.SetCookie[0]); 171Assert.Equal("B=B; path=/; samesite=strict", transaction.SetCookie[1]); 172Assert.Equal("C=C; path=/; samesite=strict", transaction.SetCookie[2]); 173Assert.Equal("D=D; path=/; samesite=strict", transaction.SetCookie[3]); 174Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 191Assert.Equal("A=A; path=/; samesite=lax", transaction.SetCookie[0]); 192Assert.Equal("B=B; path=/; samesite=lax", transaction.SetCookie[1]); 193Assert.Equal("C=C; path=/; samesite=lax", transaction.SetCookie[2]); 194Assert.Equal("D=D; path=/; samesite=lax", transaction.SetCookie[3]); 195Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 212Assert.Equal("A=A; path=/; samesite=none", transaction.SetCookie[0]); 213Assert.Equal("B=B; path=/; samesite=none", transaction.SetCookie[1]); 214Assert.Equal("C=C; path=/; samesite=none", transaction.SetCookie[2]); 215Assert.Equal("D=D; path=/; samesite=lax", transaction.SetCookie[3]); 216Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 233Assert.Equal("A=A; path=/", transaction.SetCookie[0]); 234Assert.Equal("B=B; path=/", transaction.SetCookie[1]); 235Assert.Equal("C=C; path=/; samesite=none", transaction.SetCookie[2]); 236Assert.Equal("D=D; path=/; samesite=lax", transaction.SetCookie[3]); 237Assert.Equal("E=E; path=/; samesite=strict", transaction.SetCookie[4]); 238Assert.Equal("F=F; path=/", transaction.SetCookie[5]); 275Assert.Equal("Hao=Hao; path=/", transaction.SetCookie[0]); 276Assert.Equal("Hao=Hao; path=/", transaction.SetCookie[1]); 277Assert.Equal("Hao=Hao; path=/; samesite=strict", transaction.SetCookie[2]); 278Assert.Equal("Hao=Hao; path=/; secure", transaction.SetCookie[3]); 315Assert.Equal("A=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; secure", transaction.SetCookie[0]); 354Assert.Equal("Done", transaction.ResponseText);
Microsoft.AspNetCore.Cors.Test (60)
CorsEndpointConventionBuilderExtensionsTests.cs (1)
29Assert.Equal("TestPolicyName", metadata.PolicyName);
CorsMiddlewareTests.cs (31)
58Assert.Equal("Cross origin response", await response.Content.ReadAsStringAsync()); 59Assert.Equal(OriginUrl, response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault()); 100Assert.Equal("Cross origin response", await response.Content.ReadAsStringAsync()); 101Assert.Equal(OriginUrl, response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault()); 102Assert.Equal("AllowedHeader", response.Headers.GetValues(CorsConstants.AccessControlExposeHeaders).FirstOrDefault()); 151Assert.Equal(OriginUrl, response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault()); 204Assert.Equal(CorsConstants.AccessControlAllowHeaders, kvp.Key); 209Assert.Equal(CorsConstants.AccessControlAllowMethods, kvp.Key); 214Assert.Equal(CorsConstants.AccessControlAllowOrigin, kvp.Key); 270Assert.Equal(CorsConstants.AccessControlAllowCredentials, kvp.Key); 275Assert.Equal(CorsConstants.AccessControlAllowHeaders, kvp.Key); 280Assert.Equal(CorsConstants.AccessControlAllowMethods, kvp.Key); 285Assert.Equal(CorsConstants.AccessControlAllowOrigin, kvp.Key); 491Assert.Equal(CorsConstants.AccessControlAllowHeaders, kvp.Key); 496Assert.Equal(CorsConstants.AccessControlAllowMethods, kvp.Key); 501Assert.Equal(CorsConstants.AccessControlAllowOrigin, kvp.Key); 548Assert.Equal(CorsConstants.AccessControlAllowOrigin, kvp.Key); 549Assert.Equal(OriginUrl, Assert.Single(kvp.Value)); 553Assert.Equal(CorsConstants.AccessControlExposeHeaders, kvp.Key); 554Assert.Equal("AllowedHeader", Assert.Single(kvp.Value)); 558Assert.Equal("Test", kvp.Key); 559Assert.Equal("Should-Appear", Assert.Single(kvp.Value)); 562Assert.Equal("Cross origin response", await response.Content.ReadAsStringAsync()); 626Assert.Equal(CorsConstants.AccessControlAllowOrigin, kvp.Key); 627Assert.Equal(OriginUrl, Assert.Single(kvp.Value)); 631Assert.Equal(CorsConstants.AccessControlExposeHeaders, kvp.Key); 632Assert.Equal("AllowedHeader", Assert.Single(kvp.Value)); 671Assert.Equal(CorsConstants.AccessControlAllowHeaders, kvp.Key); 672Assert.Equal("AllowedHeader", Assert.Single(kvp.Value)); 676Assert.Equal(CorsConstants.AccessControlAllowOrigin, kvp.Key); 677Assert.Equal(OriginUrl, Assert.Single(kvp.Value));
CorsPolicyBuilderTests.cs (7)
345Assert.Equal(Resources.InsecureConfiguration, ex.Message); 358Assert.Equal(expected, normalizedOrigin); 371Assert.Equal(origin, normalizedOrigin); 384Assert.Equal("http://www.example.com", normalizedOrigin); 397Assert.Equal("http://www.example.com", normalizedOrigin); 409Assert.Equal(expected, normalizedOrigin); 424Assert.Equal(expected, normalizedOrigin);
CorsPolicyTests.cs (2)
54Assert.Equal( 78Assert.Equal(
CorsResultTests.cs (2)
36Assert.Equal( 60Assert.Equal(
CorsServiceTests.cs (17)
115Assert.Equal("*", result.AllowedOrigin); 131Assert.Equal("*", result.AllowedOrigin); 185Assert.Equal("*", result.AllowedOrigin); 202Assert.Equal("http://example.com", result.AllowedOrigin); 220Assert.Equal("http://example.com", result.AllowedOrigin); 237Assert.Equal("http://example.com", result.AllowedOrigin); 348Assert.Equal("http://example.com", result.AllowedOrigin); 370Assert.Equal("http://example.com", result.AllowedOrigin); 593Assert.Equal("http://example.com", httpContext.Response.Headers["Access-Control-Allow-Origin"]); 633Assert.Equal("true", httpContext.Response.Headers["Access-Control-Allow-Credentials"]); 653Assert.Equal("Origin", httpContext.Response.Headers["Vary"]); 674Assert.Equal("Cookie,Origin", httpContext.Response.Headers["Vary"]); 735Assert.Equal("PUT", httpContext.Response.Headers["Access-Control-Allow-Methods"]); 776Assert.Equal("foo", httpContext.Response.Headers["Access-Control-Allow-Headers"]); 838Assert.Equal("foo,bar", httpContext.Response.Headers[CorsConstants.AccessControlExposeHeaders]); 858Assert.Equal("foo", httpContext.Response.Headers["Access-Control-Expose-Headers"]); 899Assert.Equal("30", httpContext.Response.Headers["Access-Control-Max-Age"]);
Microsoft.AspNetCore.Cryptography.Internal.Tests (9)
Cng\CachedAlgorithmHandlesTests.cs (5)
116Assert.Equal("AES", algorithmHandle.GetAlgorithmName()); 138Assert.Equal(expectedAlgorithmName, algorithmHandle.GetAlgorithmName()); 152Assert.Equal(expectedDigest, Convert.ToBase64String(outputHash)); 169Assert.Equal(expectedAlgorithmName, algorithmHandle.GetAlgorithmName()); 185Assert.Equal(expectedDigest, Convert.ToBase64String(outputHash));
SafeHandles\SecureLocalAllocHandleTests.cs (1)
27Assert.Equal(expected, new string((char*)duplicateHandle.DangerousGetHandle(), 0, expected.Length)); // contents the same data
UnsafeBufferUtilTests.cs (3)
59Assert.Equal(expected, actual); 80Assert.Equal(expected, actual); 100Assert.Equal(expected, actual);
Microsoft.AspNetCore.Cryptography.KeyDerivation.Tests (1)
Pbkdf2Tests.cs (1)
206Assert.Equal(expectedDerivedKeyAsBase64, Convert.ToBase64String(derivedKey));
Microsoft.AspNetCore.DataProtection.Abstractions.Tests (3)
DataProtectionCommonExtensionsTests.cs (3)
117Assert.Equal(Resources.FormatDataProtectionExtensions_NoService(typeof(IDataProtectionProvider).FullName), ex.Message); 268Assert.Equal("AQIDBAU", retVal); 310Assert.Equal("Hello", retVal);
Microsoft.AspNetCore.DataProtection.Extensions.Tests (15)
DataProtectionAdvancedExtensionsTests.cs (3)
29Assert.Equal(SampleEncodedString, protectedPayload); 52Assert.Equal(SampleEncodedString, protectedPayload); 92Assert.Equal("this is plaintext", unprotectedPayload);
DataProtectionProviderTests.cs (8)
35Assert.Equal("payload", protector.Unprotect(protector.Protect("payload"))); 70Assert.Equal("payload", protector.Unprotect(protector.Protect("payload"))); 104Assert.Equal("payload", protector.Unprotect(protector.Protect("payload"))); 150Assert.Equal("payload", unprotector.Unprotect(data)); 202Assert.Equal("payload", unprotector.Unprotect(data)); 229Assert.Equal("payload", 258Assert.Equal("payload", 314Assert.Equal("payload", unprotector.CreateProtector("purpose").Unprotect(data));
TimeLimitedDataProtectorTests.cs (4)
109Assert.Equal(ExtResources.FormatTimeLimitedDataProtector_PayloadExpired(expectedExpiration), ex.Message); 130Assert.Equal(ExtResources.TimeLimitedDataProtector_PayloadInvalid, ex.Message); 147Assert.Equal(Resources.CryptCommon_GenericError, ex.Message); 148Assert.Equal("How exceptional!", ex.InnerException.Message);
Microsoft.AspNetCore.DataProtection.Tests (42)
ActivatorTests.cs (1)
64Assert.Equal(Resources.FormatTypeExtensions_BadCast(typeof(IDisposable).AssemblyQualifiedName, typeof(ClassWithParameterlessCtor).AssemblyQualifiedName), ex.Message);
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
128Assert.Equal($"Algorithm type {typeof(CustomAlgorithmNoConstructor).FullName} doesn't have a public parameterless constructor. If the app is published with trimming then the constructor may have been trimmed. Ensure the type's assembly is excluded from trimming.", ex.Message);
Cng\CbcAuthenticatedEncryptorTests.cs (1)
114Assert.Equal("AAAAAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh+36j4yWJOjBgOJxmYDYwhLnYqFxw+9mNh/cudyPrWmJmw4d/dmGaLJLLut2udiAAAAAAAA", retValAsString);
Cng\GcmAuthenticatedEncryptorTests.cs (1)
103Assert.Equal("AAAAAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaG0O2kY0NZtmh2UQtXY5B2jlgnOgAAAAA", retValAsString);
DataProtectionUtilityExtensionsTests.cs (3)
43Assert.Equal(expected, actual); 74Assert.Equal(expected, actual); 102Assert.Equal(expected, actual);
Internal\KeyManagementOptionsPostSetupTest.cs (1)
165Assert.Equal(keyDir, repository.Directory.FullName);
KeyManagement\KeyRingBasedDataProtectorTests.cs (3)
154Assert.Equal(Resources.ProtectionProvider_BadMagicHeader, ex.Message); 172Assert.Equal(Resources.ProtectionProvider_BadMagicHeader, ex.Message); 190Assert.Equal(Resources.ProtectionProvider_BadVersion, ex.Message);
KeyManagement\KeyRingProviderTests.cs (1)
267Assert.Equal(Resources.KeyRingProvider_NoDefaultKey_AutoGenerateDisabled, exception.Message);
KeyManagement\XmlKeyManagerTests.cs (4)
158Assert.Equal("key-3d6d01fd-c0e7-44ae-82dd-013b996b4093", friendlyNameStoredInRepository); 286Assert.Equal("key-3d6d01fd-c0e7-44ae-82dd-013b996b4093", friendlyNameStoredInRepository); 659Assert.Equal("revocation-20150302T0313197573854Z", friendlyNameStoredInRepository); 714Assert.Equal("revocation-a11f35fc-1fed-4bd4-b727-056a63b70932", friendlyNameStoredInRepository);
Managed\ManagedAuthenticatedEncryptorTests.cs (1)
104Assert.Equal("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh+36j4yWJOjBgOJxmYDYwhLnYqFxw+9mNh/cudyPrWmJmw4d/dmGaLJLLut2udiAAA=", retValAsString);
RegistryPolicyResolverTests.cs (13)
67Assert.Equal($"Unable to load type '{typeName}'. If the app is published with trimming then this type may have been trimmed. Ensure the type's assembly is excluded from trimming.", ex.Message); 104Assert.Equal(expectedConfiguration.EncryptionAlgorithm, actualConfiguration.EncryptionAlgorithm); 106Assert.Equal(expectedConfiguration.EncryptionAlgorithmProvider, actualConfiguration.EncryptionAlgorithmProvider); 107Assert.Equal(expectedConfiguration.HashAlgorithm, actualConfiguration.HashAlgorithm); 108Assert.Equal(expectedConfiguration.HashAlgorithmProvider, actualConfiguration.HashAlgorithmProvider); 140Assert.Equal(expectedConfiguration.EncryptionAlgorithm, actualConfiguration.EncryptionAlgorithm); 142Assert.Equal(expectedConfiguration.EncryptionAlgorithmProvider, actualConfiguration.EncryptionAlgorithmProvider); 143Assert.Equal(expectedConfiguration.HashAlgorithm, actualConfiguration.HashAlgorithm); 144Assert.Equal(expectedConfiguration.HashAlgorithmProvider, actualConfiguration.HashAlgorithmProvider); 164Assert.Equal(expectedConfiguration.EncryptionAlgorithm, actualConfiguration.EncryptionAlgorithm); 166Assert.Equal(expectedConfiguration.EncryptionAlgorithmProvider, actualConfiguration.EncryptionAlgorithmProvider); 194Assert.Equal(expectedConfiguration.EncryptionAlgorithm, actualConfiguration.EncryptionAlgorithm); 196Assert.Equal(expectedConfiguration.EncryptionAlgorithmProvider, actualConfiguration.EncryptionAlgorithmProvider);
Repositories\FileSystemXmlRepositoryTests.cs (1)
27Assert.Equal(expectedDir, defaultDirInfo.FullName);
SecretAssert.cs (1)
16Assert.Equal(SecretToBase64String(secret1), SecretToBase64String(secret2));
ServiceCollectionTests.cs (1)
97Assert.Equal(keyDir, repository.Directory.FullName);
SP800_108\SP800_108Tests.cs (2)
155Assert.Equal(expectedDerivedSubkeyAsBase64, Convert.ToBase64String(derivedSubkey)); 168Assert.Equal(expectedDerivedSubkeyAsBase64, Convert.ToBase64String(derivedSubkeySegment.AsStandaloneArray()));
TypeForwardingActivatorTests.cs (1)
86Assert.Equal(expected, new MockTypeForwardingActivator().Parse(typeName));
XmlEncryption\CertificateXmlEncryptionTests.cs (1)
51Assert.Equal("http://www.w3.org/2001/04/xmlenc#Element", (string)encryptedXmlInfo.EncryptedElement.Attribute("Type"));
XmlEncryption\EncryptedXmlDecryptorTests.cs (4)
26Assert.Equal("Unable to retrieve the decryption key.", ex.Message); 44Assert.Equal("Unable to retrieve the decryption key.", ex.Message); 62Assert.Equal("Unable to retrieve the decryption key.", ex.Message); 85Assert.Equal("Lorem ipsum", decrypted.Value);
XmlEncryption\XmlEncryptionExtensionsTests.cs (1)
225Assert.Equal(typeof(MyXmlDecryptor).AssemblyQualifiedName, (string)retVal.Attribute(XmlConstants.DecryptorTypeAttributeName));
Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests (11)
CertificateManagerTests.cs (11)
59Assert.Equal(TestCertificateSubject, httpsCertificate.Subject); 60Assert.Equal(TestCertificateSubject, httpsCertificate.Issuer); 61Assert.Equal("sha256RSA", httpsCertificate.SignatureAlgorithm.FriendlyName); 62Assert.Equal("1.2.840.113549.1.1.11", httpsCertificate.SignatureAlgorithm.Value); 100Assert.Equal(httpsCertificate.GetCertHashString(), exportedCertificate.GetCertHashString()); 155Assert.Equal(httpsCertificate.GetCertHashString(), exportedCertificate.GetCertHashString()); 189Assert.Equal("plaintext", Encoding.ASCII.GetString(exportedCertificate.GetRSAPrivateKey().Decrypt(exportedCertificate.GetRSAPrivateKey().Encrypt(Encoding.ASCII.GetBytes(message), RSAEncryptionPadding.OaepSHA256), RSAEncryptionPadding.OaepSHA256))); 190Assert.Equal(httpsCertificate.GetCertHashString(), exportedCertificate.GetCertHashString()); 253Assert.Equal(httpsCertificate.GetCertHashString(), importedCertificate.GetCertHashString()); 351Assert.Equal("plaintext", Encoding.ASCII.GetString(exportedCertificate.GetRSAPrivateKey().Decrypt(exportedCertificate.GetRSAPrivateKey().Encrypt(Encoding.ASCII.GetBytes(message), RSAEncryptionPadding.OaepSHA256), RSAEncryptionPadding.OaepSHA256))); 352Assert.Equal(httpsCertificate.GetCertHashString(), exportedCertificate.GetCertHashString());
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (51)
HealthCheckEndpointRouteBuilderExtensionsTest.cs (5)
40Assert.Equal( 81Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 82Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 126Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 127Assert.Equal("Custom!", await response.Content.ReadAsStringAsync());
HealthCheckMiddlewareSampleTest.cs (7)
31Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 32Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 53Assert.Equal("application/json", response.Content.Headers.ContentType.ToString()); 76Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 77Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 98Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 99Assert.Equal("Unhealthy", await response.Content.ReadAsStringAsync());
HealthCheckMiddlewareTests.cs (39)
35Assert.Equal( 122Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 123Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 152Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 153Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 185Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 186Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 218Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 219Assert.Equal("Degraded", await response.Content.ReadAsStringAsync()); 251Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 252Assert.Equal("Unhealthy", await response.Content.ReadAsStringAsync()); 284Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 285Assert.Equal("Unhealthy", await response.Content.ReadAsStringAsync()); 329Assert.Equal("application/json", response.Content.Headers.ContentType.ToString()); 332Assert.Equal(expectedJson, result); 367Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 402Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 431Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 432Assert.Equal("no-store, no-cache", response.Headers.CacheControl.ToString()); 433Assert.Equal("no-cache", response.Headers.Pragma.ToString()); 466Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 505Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 506Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 535Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 536Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 593Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 594Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 658Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 659Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 695Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 696Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 733Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 734Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 771Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 772Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 851Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 852Assert.Equal("Healthy", await response.Content.ReadAsStringAsync()); 895Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 896Assert.Equal("Healthy", await response.Content.ReadAsStringAsync());
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (44)
Latency\AddServerTimingHeaderMiddlewareTests.cs (1)
47Assert.Equal($"reqlatency;dur={TimeAdvanceMs}", header[0]);
Latency\ChecpointAcceptanceTests.cs (1)
132Assert.Equal("reqlatency;dur", metricFragments[0]);
Latency\RequestLatencyTelemetryMiddlewareTests.cs (2)
46Assert.Equal(serverName, header[0]); 104Assert.Equal(serverName, header[0]);
Logging\AcceptanceTests.cs (14)
181Assert.Equal(LoggingCategory, logCollector.LatestRecord.Category); 241Assert.Equal(LoggingCategory, logCollector.LatestRecord.Category); 307Assert.All(logRecords, x => Assert.Equal(LoggingCategory, x.Category)); 369Assert.Equal(LoggingCategory, lastRecord.Category); 415Assert.Equal(LoggingCategory, logCollector.LatestRecord.Category); 457Assert.Equal(LoggingCategory, logCollector.LatestRecord.Category); 488Assert.All(logRecords, x => Assert.Equal(LoggingCategory, x.Category)); 526Assert.All(logRecords, x => Assert.Equal(LoggingCategory, x.Category)); 570Assert.Equal("Test exception", ex.Message); 574Assert.Equal(LoggingCategory, logCollector.LatestRecord.Category); 611Assert.Equal("Test exception", originalException!.Message); 615Assert.Equal(LoggingCategory, logCollector.LatestRecord.Category); 645Assert.Equal("Test exception", originalException!.Message); 649Assert.Equal(LoggingCategory, logCollector.LatestRecord.Category);
Logging\AcceptanceTests.Mvc.cs (5)
74Assert.Equal(LoggingCategory, logRecord.Category); 109Assert.Equal(LoggingCategory, logRecord.Category); 155Assert.Equal(LoggingCategory, logRecord.Category); 199Assert.Equal(LoggingCategory, logRecord.Category); 240Assert.Equal(LoggingCategory, logRecord.Category);
Logging\AcceptanceTests.Routing.cs (6)
74Assert.Equal(LoggingCategory, logRecord.Category); 139Assert.Equal(expectedHttpPath, state[HttpLoggingTagNames.Path]); 177Assert.Equal(httpRoute, state[HttpLoggingTagNames.Path]); 181Assert.Equal(controller, state["controller"]); 186Assert.Equal(action, state["action"]); 195Assert.Equal(param, state["param"]);
Logging\HeaderNormalizerTests.cs (2)
23Assert.Equal(Prefix + "accept-charset", headers[0]); 24Assert.Equal(Prefix + "content-type", headers[1]);
Logging\HeaderReaderTests.cs (1)
62Assert.Equal(NormalizedHeader, redacted.Key);
Logging\HttpLoggingServiceExtensionsTests.cs (6)
81Assert.Equal("Taxonomy1", options.RouteParameterDataClasses["one"].TaxonomyName); 82Assert.Equal("Value1", options.RouteParameterDataClasses["one"].Value); 85Assert.Equal("Taxonomy2", options.RequestHeadersDataClasses["two"].TaxonomyName); 86Assert.Equal("Value2", options.RequestHeadersDataClasses["two"].Value); 89Assert.Equal("Taxonomy3", options.ResponseHeadersDataClasses["three"].TaxonomyName); 90Assert.Equal("Value3", options.ResponseHeadersDataClasses["three"].Value);
Logging\LoggingOptionsValidationTests.cs (1)
31Assert.Equal($"Unsupported value '{mode}' for enum type 'IncomingPathLoggingMode'", ex.Message);
Logging\RequestHeadersEnricherTests.cs (5)
105Assert.Equal($"redacted:{RequestId}", enrichedState[NormalizedHeaderKey1].ToString()); 106Assert.Equal(TestValue, enrichedState[NormalizedHeaderKey4].ToString()); 135Assert.Equal($"REDACTED:{RequestId}", enrichedState[NormalizedHeaderKey1].ToString()); 161Assert.Equal(RequestId, enrichedState[NormalizedHeaderKey1].ToString()); 187Assert.Equal(RequestId, enrichedState[NormalizedHeaderKey1].ToString());
Microsoft.AspNetCore.Diagnostics.Tests (68)
DeveloperExceptionPageMiddlewareTest.cs (17)
71Assert.Equal("Test exception", originalExceptionMessage); 127Assert.Equal("Test exception", originalExceptionMessage); 129Assert.Equal("1", routeValue); 130Assert.Equal("/test/1", path); 186Assert.Equal("Test exception", originalExceptionMessage); 188Assert.Equal("1", routeValue); 189Assert.Equal("/test/1", path); 261Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 296Assert.Equal("text/plain", response.Content.Headers.ContentType.MediaType); 297Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet); 403Assert.Equal("Test exception", await response.Content.ReadAsStringAsync()); 439Assert.Equal("Bad format exception!", await response.Content.ReadAsStringAsync()); 477Assert.Equal("An error occurred", await response.Content.ReadAsStringAsync()); 618Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 627Assert.Equal(exceptionName, (string)measurement.Tags["error.type"]); 628Assert.Equal(result, measurement.Tags["aspnetcore.diagnostics.exception.result"].ToString()); 635Assert.Equal(handler, (string)measurement.Tags["aspnetcore.diagnostics.handler.type"]);
ExceptionHandlerMiddlewareTest.cs (9)
77Assert.Equal("Test exception", originalExceptionMessage); 223Assert.Equal(DiagnosticsMetrics.MeterName, meter.Name); 350Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 351Assert.Equal("/path", (string)m.Tags["http.route"]); 417Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 418Assert.Equal("/new", (string)m.Tags["http.route"]); 451Assert.Equal(exceptionName, (string)measurement.Tags["error.type"]); 452Assert.Equal(result, measurement.Tags["aspnetcore.diagnostics.exception.result"].ToString()); 459Assert.Equal(handler, (string)measurement.Tags["aspnetcore.diagnostics.handler.type"]);
ExceptionHandlerTest.cs (35)
63Assert.Equal("An error occurred while adding a product", await response.Content.ReadAsStringAsync()); 90Assert.Equal("Something bad happened", exception.Message); 118Assert.Equal("Hello", await response.Content.ReadAsStringAsync()); 184Assert.Equal(expectedResponseBody, await response.Content.ReadAsStringAsync()); 190Assert.Equal("no-cache", values.First()); 193Assert.Equal("-1", values.First()); 240Assert.Equal(expectedResponseBody, await response.Content.ReadAsStringAsync()); 246Assert.Equal("no-cache", values.First()); 249Assert.Equal("-1", values.First()); 295Assert.Equal(expectedResponseBody, await response.Content.ReadAsStringAsync()); 299Assert.Equal("max-age=3600", values.First()); 302Assert.Equal("max-age=3600", values.First()); 305Assert.Equal(expiresTime, values.First()); 308Assert.Equal("abcdef", values.First()); 367Assert.Equal("Custom 404", await response.Content.ReadAsStringAsync()); 373Assert.Equal("no-cache", values.First()); 403Assert.Equal("Something bad happened", exception.Message); 437Assert.Equal("Hello", await response.Content.ReadAsStringAsync()); 441Assert.Equal("max-age=3600", values.First()); 444Assert.Equal("max-age=3600", values.First()); 447Assert.Equal(expiresTime, values.First()); 450Assert.Equal("abcdef", values.First()); 529Assert.Equal("An error occurred when configuring the exception handler middleware. " + 563Assert.Equal("The exception handler configured on ExceptionHandlerOptions produced a 404 status response. " + 570Assert.Equal("Something bad happened.", exception.InnerException.Message); 601Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 650Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 771Assert.Equal("separate pipeline", await response.Content.ReadAsStringAsync()); 822Assert.Equal("Handled", await response.Content.ReadAsStringAsync()); 876Assert.Equal("Handled", await response.Content.ReadAsStringAsync()); 928Assert.Equal("Handled", await response.Content.ReadAsStringAsync()); 986Assert.Equal("Custom handler", await response.Content.ReadAsStringAsync()); 1040Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 1110Assert.Equal("System.Exception", (string)m.Tags["error.type"]); 1172Assert.Equal("System.Exception", (string)m.Tags["error.type"]);
StatusCodeMiddlewareTest.cs (7)
63Assert.Equal(expectedUri, response.Headers.First(s => s.Key == "Location").Value.First()); 67Assert.Equal(expectedQueryString, content); 68Assert.Equal(expectedQueryString, response.RequestMessage.RequestUri.Query); 129Assert.Equal($"?id={expectedStatusCode}, /location, ?name=James", content); 191Assert.Equal($"?id={expectedStatusCode}, /location, ?name=James", content); 280Assert.Equal("errorPage", content); 390Assert.Equal("Status: 400", content);
Microsoft.AspNetCore.FunctionalTests (7)
WebHostFunctionalTests.cs (7)
45Assert.Equal("Kestrel", response.Headers.Server.ToString()); 47Assert.Equal(applicationName, responseText); 70Assert.Equal("Kestrel", response.Headers.Server.ToString()); 72Assert.Equal(applicationName, responseText); 171Assert.Equal("Microsoft-IIS/10.0", response.Headers.Server.ToString()); 173Assert.Equal(applicationName, responseText); 193Assert.Equal(applicationName, responseText);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (242)
ConverterTests\JsonConverterReadTests.cs (8)
36Assert.Equal("A field name", m.HidingFieldName); 47Assert.Equal("", m.FieldName); 48Assert.Equal("A field name", m.HidingFieldName); 59Assert.Equal("A field name", m.FieldName); 253AssertReadJsonError<HelloRequest.Types.DataTypes>(json, ex => Assert.Equal(@"Error converting value ""INVALID"" to enum type Transcoding.HelloRequest+Types+DataTypes+Types+NestedEnum.", ex.Message), descriptorRegistry: serviceDescriptorRegistry, deserializeOld: false); 395Assert.Equal("In any!", helloRequest.Name); 485AssertReadJsonError<HelloRequest>(json, ex => Assert.Equal("Multiple values specified for oneof oneof_test", ex.Message.TrimEnd('.'))); 563AssertReadJsonError<NullValueContainer>(json, ex => Assert.Equal("Invalid enum value: MONKEY for enum type: google.protobuf.NullValue", ex.Message));
ConverterTests\JsonConverterWriteTests.cs (3)
232Assert.Equal(expectedJson, json); 247Assert.Equal(expectedJson, json); 517Assert.Equal(@"{""b"":10,""a"":20,""d"":30}", json);
HttpRoutePatternParserTests.cs (57)
23s => Assert.Equal("shelves", s), 24s => Assert.Equal("*", s), 25s => Assert.Equal("books", s), 26s => Assert.Equal("*", s)); 33Assert.Equal("shelf", string.Join(".", v.FieldPath)); 40Assert.Equal("book", string.Join(".", v.FieldPath)); 52s => Assert.Equal("v1", s), 53s => Assert.Equal("shelves", s), 54s => Assert.Equal("*", s), 55s => Assert.Equal("books", s), 56s => Assert.Equal("*", s)); 63Assert.Equal("book.name", string.Join(".", v.FieldPath)); 74s => Assert.Equal("shelves", s), 75s => Assert.Equal("**", s)); 85s => Assert.Equal("**", s)); 95s => Assert.Equal("*", s)); 111Assert.Equal("foo", pattern.Verb); 114s => Assert.Equal("a", s)); 124s => Assert.Equal("*", s), 125s => Assert.Equal("**", s)); 135s => Assert.Equal("*", s), 136s => Assert.Equal("a", s), 137s => Assert.Equal("**", s)); 147s => Assert.Equal("a", s), 148s => Assert.Equal("*", s)); 155Assert.Equal("a.b.c", string.Join(".", v.FieldPath)); 166s => Assert.Equal("a", s), 167s => Assert.Equal("*", s)); 174Assert.Equal("a.b.c", string.Join(".", v.FieldPath)); 185s => Assert.Equal("a", s), 186s => Assert.Equal("**", s)); 193Assert.Equal("b", string.Join(".", v.FieldPath)); 204s => Assert.Equal("a", s), 205s => Assert.Equal("c", s), 206s => Assert.Equal("*", s)); 213Assert.Equal("b", string.Join(".", v.FieldPath)); 224s => Assert.Equal("a", s), 225s => Assert.Equal("c", s), 226s => Assert.Equal("*", s), 227s => Assert.Equal("d", s)); 234Assert.Equal("b", string.Join(".", v.FieldPath)); 245s => Assert.Equal("a", s), 246s => Assert.Equal("c", s), 247s => Assert.Equal("**", s)); 254Assert.Equal("b", string.Join(".", v.FieldPath)); 265s => Assert.Equal("a", s), 266s => Assert.Equal("**", s), 267s => Assert.Equal("b", s), 268s => Assert.Equal("c", s), 269s => Assert.Equal("d", s)); 276Assert.Equal("x.y.z", string.Join(".", v.FieldPath)); 285Assert.Equal("verb", pattern.Verb); 288s => Assert.Equal("a", s), 289s => Assert.Equal("*", s), 290s => Assert.Equal("**", s)); 297Assert.Equal("b", string.Join(".", v.FieldPath)); 323Assert.Equal(errorMessage, ex.InnerException!.Message);
JsonTranscodingRouteAdapterTests.cs (20)
25Assert.Equal("/shelves/{shelf}/books/{book}", adapter.ResolvedRouteTemplate); 35Assert.Equal("/v1/shelves/{__Complex_book.name_2}/books/{__Complex_book.name_4}", adapter.ResolvedRouteTemplate); 56Assert.Equal("/shelves/{**__Discard_1}", adapter.ResolvedRouteTemplate); 66Assert.Equal("/{__Discard_0}", adapter.ResolvedRouteTemplate); 76Assert.Equal("/a:foo", adapter.ResolvedRouteTemplate); 86Assert.Equal("/{__Discard_0}/{**__Discard_1}", adapter.ResolvedRouteTemplate); 96Assert.Equal("/{__Discard_0}/a/{**__Discard_2}", adapter.ResolvedRouteTemplate); 106Assert.Equal("/a/{a.b.c}", adapter.ResolvedRouteTemplate); 116Assert.Equal("/a/{a.b.c}", adapter.ResolvedRouteTemplate); 126Assert.Equal("/a/{**b}", adapter.ResolvedRouteTemplate); 136Assert.Equal("/a/{**__Complex_x.y.z_1:regex(/b/c/d$)}", adapter.ResolvedRouteTemplate); 155Assert.Equal("/a/{**__Complex_x.y.z_1:regex(/b/c/d:verb$)}", adapter.ResolvedRouteTemplate); 174Assert.Equal("/a/c/{__Complex_b_2}", adapter.ResolvedRouteTemplate); 193Assert.Equal("/a/c/{__Complex_b_2}/d", adapter.ResolvedRouteTemplate); 212Assert.Equal("/a/c/{**__Complex_b_2}", adapter.ResolvedRouteTemplate); 231Assert.Equal("/{a}/{b}/{c}", adapter.ResolvedRouteTemplate); 240Assert.Equal("/a/{b}/{**__Discard_2:regex(:verb$)}", adapter.ResolvedRouteTemplate); 249Assert.Equal("/v1/greeter/{**__Complex_name_2:regex(:verb$)}", adapter.ResolvedRouteTemplate); 268Assert.Equal("/v1/greeter/{**__Complex_name_2:regex(:verb$)}", adapter.ResolvedRouteTemplate); 287Assert.Equal("/v1/greeter/{name}:verb", adapter.ResolvedRouteTemplate);
JsonTranscodingServerCallContextTests.cs (3)
52Assert.Equal("testname", headers[0].Key); 53Assert.Equal("TestValue", headers[0].Value); 54Assert.Equal("hello-bin", headers[1].Key);
JsonTranscodingServiceMethodProviderTests.cs (38)
30Assert.Equal("GET", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 31Assert.Equal("/v1/greeter/{name}", endpoint.RoutePattern.RawText); 33Assert.Equal("name", endpoint.RoutePattern.Parameters[0].Name); 45Assert.Equal("/v1/greeter/{name}", endpoint.RoutePattern.RawText); 46Assert.Equal("HEAD", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 61Assert.Equal("GET", getMethodModel.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 62Assert.Equal("/v1/additional_bindings/{name}", getMethodModel.Metadata.GetMetadata<GrpcJsonTranscodingMetadata>()?.HttpRule.Get); 63Assert.Equal("/v1/additional_bindings/{name}", getMethodModel.RoutePattern.RawText); 66Assert.Equal("DELETE", additionalMethodModel.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 67Assert.Equal("/v1/additional_bindings/{name}", additionalMethodModel.Metadata.GetMetadata<GrpcJsonTranscodingMetadata>()?.HttpRule.Delete); 68Assert.Equal("/v1/additional_bindings/{name}", additionalMethodModel.RoutePattern.RawText); 81Assert.Equal("POST", startFrameImport.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 82Assert.Equal("/v1/frames:startFrameImport", startFrameImport.Metadata.GetMetadata<GrpcJsonTranscodingMetadata>()?.HttpRule.Post); 83Assert.Equal("/v1/frames:startFrameImport", startFrameImport.RoutePattern.RawText); 85Assert.Equal("POST", getFrameImport.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 86Assert.Equal("/v1/frames:getFrameImport", getFrameImport.Metadata.GetMetadata<GrpcJsonTranscodingMetadata>()?.HttpRule.Post); 87Assert.Equal("/v1/frames:getFrameImport", getFrameImport.RoutePattern.RawText); 98Assert.Equal("Couldn't find gRPC endpoint for method NoOption.", ex.Message); 132Assert.Equal(@"Found HttpRule mapping. Method SayHello on transcoding.JsonTranscodingGreeter. HttpRule payload: { ""get"": ""/v1/greeter/{name}"" }", write.Message); 157Assert.Equal("GET", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 158Assert.Equal("/v1/server_greeter/{name}", endpoint.Metadata.GetMetadata<GrpcJsonTranscodingMetadata>()?.HttpRule.Get); 159Assert.Equal("/v1/server_greeter/{name}", endpoint.RoutePattern.RawText); 169Assert.Equal("Error binding gRPC service 'JsonTranscodingInvalidResponseBodyGreeterService'.", ex.Message); 170Assert.Equal("Error binding BadResponseBody on JsonTranscodingInvalidResponseBodyGreeterService to HTTP API.", ex.InnerException!.InnerException!.Message); 171Assert.Equal("Couldn't find matching field for response body 'NoMatch' on HelloReply.", ex.InnerException!.InnerException!.InnerException!.Message); 181Assert.Equal("Error binding gRPC service 'JsonTranscodingInvalidNestedResponseBodyGreeterService'.", ex.Message); 182Assert.Equal("Error binding BadResponseBody on JsonTranscodingInvalidNestedResponseBodyGreeterService to HTTP API.", ex.InnerException!.InnerException!.Message); 183Assert.Equal("The response body field 'sub.subfield' references a nested field. The response body field name must be on the top-level response message.", ex.InnerException!.InnerException!.InnerException!.Message); 193Assert.Equal("Error binding gRPC service 'JsonTranscodingInvalidBodyGreeterService'.", ex.Message); 194Assert.Equal("Error binding BadBody on JsonTranscodingInvalidBodyGreeterService to HTTP API.", ex.InnerException!.InnerException!.Message); 195Assert.Equal("Couldn't find matching field for body 'NoMatch' on HelloRequest.", ex.InnerException!.InnerException!.InnerException!.Message); 205Assert.Equal("Error binding gRPC service 'JsonTranscodingInvalidNestedBodyGreeterService'.", ex.Message); 206Assert.Equal("Error binding BadBody on JsonTranscodingInvalidNestedBodyGreeterService to HTTP API.", ex.InnerException!.InnerException!.Message); 207Assert.Equal("The body field 'sub.subfield' references a nested field. The body field name must be on the top-level request message.", ex.InnerException!.InnerException!.InnerException!.Message); 217Assert.Equal("Error binding gRPC service 'JsonTranscodingInvalidPatternGreeterService'.", ex.Message); 218Assert.Equal("Error binding BadPattern on JsonTranscodingInvalidPatternGreeterService to HTTP API.", ex.InnerException!.InnerException!.Message); 219Assert.Equal("Error parsing path template 'v1/greeter/{name}'.", ex.InnerException!.InnerException!.InnerException!.Message); 220Assert.Equal("Path template must start with a '/'.", ex.InnerException!.InnerException!.InnerException!.InnerException!.Message);
ServerStreamingServerCallHandlerTests.cs (16)
64Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType); 68Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString()); 75Assert.Equal("Hello TestName! 2", responseJson2.RootElement.GetProperty("message").GetString()); 112Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString()); 116Assert.Equal("Exception was thrown by handler.", responseJson2.RootElement.GetProperty("message").GetString()); 120Assert.Equal("Error when executing service method 'TestMethodName'.", exceptionWrite.Message); 121Assert.Equal("Exception!", exceptionWrite.Exception.Message); 154Assert.Equal("Hello TestName! 1", responseJson1.RootElement.GetProperty("message").GetString()); 158Assert.Equal("Detail!", responseJson2.RootElement.GetProperty("message").GetString()); 162Assert.Equal("Error status code 'Aborted' with detail 'Detail!' raised.", exceptionWrite.Message); 195Assert.Equal("Exception was thrown by handler. Exception: Exception!", responseJson.RootElement.GetProperty("message").GetString()); 199Assert.Equal("Error when executing service method 'TestMethodName'.", exceptionWrite.Message); 200Assert.Equal("Exception!", exceptionWrite.Exception.Message); 245Assert.Equal("application/xml", httpContext.Response.ContentType); 249Assert.Equal("Hello TestName! 1", (string)responseXml1.Element("message")!); 256Assert.Equal("Hello TestName! 2", (string)responseXml2.Element("message")!);
ServiceDescriptorHelpersTests.cs (2)
21Assert.Equal("/say", httpRule.Post); 22Assert.Equal("*", httpRule.Body);
UnaryServerCallHandlerTests.cs (95)
74Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType); 77Assert.Equal("TestName!", request!.Name); 78Assert.Equal("Subfield!", request!.Sub.Subfield); 82Assert.Equal("Hello TestName!", responseJson.RootElement.GetProperty("message").GetString()); 116Assert.Equal(name, request!.Name); 120Assert.Equal(name, responseJson.RootElement.GetString()); 153Assert.Equal("null", content); 181Assert.Equal("One", responseJson.RootElement[0].GetString()); 182Assert.Equal("Two", responseJson.RootElement[1].GetString()); 183Assert.Equal("", responseJson.RootElement[2].GetString()); 217Assert.Equal("TestName!", request!.Name); 256Assert.Equal("QueryStringTestName!", request!.Name); 257Assert.Equal("Subfield!", request!.Sub.Subfield); 303Assert.Equal("QueryStringTestName!", request!.Name); 304Assert.Equal("QueryStringTestSubfield!", request!.Sub.Subfield); 306Assert.Equal("One", request!.RepeatedStrings[0]); 307Assert.Equal("Two", request!.RepeatedStrings[1]); 308Assert.Equal("Three", request!.RepeatedStrings[2]); 353Assert.Equal("QueryStringTestName!", request!.Name); 354Assert.Equal("QueryStringTestSubfield!", request!.Sub.Subfield); 356Assert.Equal("One", request!.RepeatedMessages[0].Subfield); 357Assert.Equal("Two", request!.RepeatedMessages[1].Subfield); 358Assert.Equal("Three", request!.RepeatedMessages[2].Subfield); 403Assert.Equal("QueryStringTestName!", request!.Name); 404Assert.Equal("QueryStringTestSubfield!", request!.Sub.Subfield); 406Assert.Equal("One", request!.MapStrings["key1"]); 407Assert.Equal("Two", request!.MapStrings["key2"]); 408Assert.Equal("Three", request!.MapStrings["key3"]); 453Assert.Equal("QueryStringTestName!", request!.Name); 454Assert.Equal("QueryStringTestSubfield!", request!.Sub.Subfield); 456Assert.Equal("One", request!.MapMessage["key1"].Subfield); 457Assert.Equal("Two", request!.MapMessage["key2"].Subfield); 458Assert.Equal("Three", request!.MapMessage["key3"].Subfield); 503Assert.Equal("QueryStringTestName!", request!.Name); 504Assert.Equal("QueryStringTestSubfield!", request!.Sub.Subfield); 535Assert.Equal("TestName!", request!.Name); 536Assert.Equal("TestSubfield!", request!.Sub.Subfield); 562Assert.Equal("TestName!", request!.FieldName); 686Assert.Equal("", request!.FieldName); 687Assert.Equal("TestName!", request!.HidingFieldName); 713Assert.Equal("TestName!", request!.Name); 717Assert.Equal("", responseJson.RootElement.GetProperty("message").GetString()); 749Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString()); 787Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString()); 817Assert.Equal(expectedError, responseJson.RootElement.GetProperty("message").GetString()); 841Assert.Equal("Detail!", responseJson.RootElement.GetProperty("message").GetString()); 866Assert.Equal("Detail!", responseJson.RootElement.GetProperty("message").GetString()); 870Assert.Equal("Error status code 'Unauthenticated' with detail 'Detail!' raised.", exceptionWrite.Message); 934Assert.Equal("This is a message", responseJson.RootElement.GetProperty("message").GetString()); 940Assert.Equal("type.googleapis.com/google.rpc.DebugInfo", d.GetProperty("@type").GetString()); 941Assert.Equal("This is some debugging information", d.GetProperty("detail").GetString()); 945Assert.Equal("type.googleapis.com/google.rpc.RequestInfo", d.GetProperty("@type").GetString()); 946Assert.Equal("request-id", d.GetProperty("requestId").GetString()); 950Assert.Equal("type.googleapis.com/google.rpc.BadRequest", d.GetProperty("@type").GetString()); 1012Assert.Equal("This is a message", responseJson.RootElement.GetProperty("message").GetString()); 1018Assert.Equal("type.googleapis.com/google.rpc.DebugInfo", d.GetProperty("@type").GetString()); 1019Assert.Equal("This is some debugging information", d.GetProperty("detail").GetString()); 1023Assert.Equal("type.googleapis.com/google.rpc.RequestInfo", d.GetProperty("@type").GetString()); 1024Assert.Equal("request-id", d.GetProperty("requestId").GetString()); 1028Assert.Equal("type.googleapis.com/google.rpc.BadRequest", d.GetProperty("@type").GetString()); 1053Assert.Equal("Exception was thrown by handler.", responseJson.RootElement.GetProperty("message").GetString()); 1057Assert.Equal("Error when executing service method 'TestMethodName'.", exceptionWrite.Message); 1058Assert.Equal("Error!", exceptionWrite.Exception.Message); 1083Assert.Equal("Exception was thrown by handler. InvalidOperationException: Error!", responseJson.RootElement.GetProperty("message").GetString()); 1087Assert.Equal("Error when executing service method 'TestMethodName'.", exceptionWrite.Message); 1088Assert.Equal("Error!", exceptionWrite.Exception.Message); 1112Assert.Equal(@"Detail!", responseJson.RootElement.GetProperty("message").GetString()); 1147Assert.Equal("application/xml", requestContentType); 1148Assert.Equal(requestContent, Encoding.UTF8.GetString(requestData!)); 1151Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType); 1155Assert.Equal(@"Hello World!", responseJson.RootElement.GetProperty("message").GetString()); 1201Assert.Equal("application/octet-stream", requestContentType); 1205Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType); 1209Assert.Equal($"Hello {requestContent.Length}!", responseJson.RootElement.GetProperty("message").GetString()); 1236Assert.Equal("Unable to deserialize null to Int32Value.", responseJson.RootElement.GetProperty("message").GetString()); 1299Assert.Equal("", requestContentType); 1335Assert.Equal("QueryStringTestName!", request!.Name); 1336Assert.Equal("", request!.Sub.ContentType); 1337Assert.Equal(requestContent, Encoding.UTF8.GetString(request!.Sub.Data.ToByteArray())); 1364Assert.Equal("application/xml", httpContext.Response.ContentType); 1368Assert.Equal(@"Hello world", (string)responseXml.Element("message")!); 1450Assert.Equal("ipv4:127.0.0.1:0", peer); 1451Assert.Equal("localhost", host); 1452Assert.Equal("/ServiceName/TestMethodName", method); 1475Assert.Equal("Exception was thrown by handler.", responseJson.RootElement.GetProperty("message").GetString()); 1503Assert.Equal("TestSubfields1!", request!.Sub.Subfields[0]); 1504Assert.Equal("TestSubfields2!", request!.Sub.Subfields[1]); 1559Assert.Equal("A string", request!.Data.SingleString); 1562Assert.Equal("Nested string", request!.Data.SingleMessage.Subfield); 1627Assert.Equal($"Error status code 'InvalidArgument' with detail 'Invalid value '{value}' for enum type NestedEnum.' raised.", exceptionWrite.Message); 1682Assert.Equal("1", request!.Wrappers.StringValue); 1731Assert.Equal("Test", request!.Name); 1732Assert.Equal("type.googleapis.com/google.protobuf.Int32Value", request!.AnyMessage.TypeUrl); 1738Assert.Equal("type.googleapis.com/google.protobuf.StringValue", anyMessage.GetProperty("@type").GetString()); 1739Assert.Equal("A value!", anyMessage.GetProperty("value").GetString());
Microsoft.AspNetCore.Grpc.Swagger.Tests (99)
Binding\BodyTests.cs (6)
32Assert.Equal("array", bodySchema.Type); 33Assert.Equal("RequestBody", bodySchema.Items.Reference.Id); 51Assert.Equal("object", bodySchema.Type); 52Assert.Equal("integer", bodySchema.AdditionalProperties.Type); 66Assert.Equal("RequestBody", bodySchema.Reference.Id); 80Assert.Equal("RequestOne", bodySchema.Reference.Id);
Binding\ParametersTests.cs (26)
31Assert.Equal("parameterInt", operation.Parameters[0].Name); 33Assert.Equal("parameterString", operation.Parameters[1].Name); 47Assert.Equal("parameterInt", operation.Parameters[0].Name); 49Assert.Equal("parameterString", operation.Parameters[1].Name); 63Assert.Equal("parameterOne", operation.Parameters[0].Name); 65Assert.Equal("parameterTwo", operation.Parameters[1].Name); 67Assert.Equal("parameterThree", operation.Parameters[2].Name); 84Assert.Equal("parameterTwo", operation.Parameters[0].Name); 101Assert.Equal("parameterFour.requestBody", operation.Parameters[3].Name); 115Assert.Equal("parameterOne", operation.Parameters[0].Name); 116Assert.Equal("array", operation.Parameters[0].Schema.Type); 117Assert.Equal("integer", operation.Parameters[0].Schema.Items.Type); 131Assert.Equal("parameterOne.nestedParameterOne", operation.Parameters[0].Name); 133Assert.Equal("parameterOne.nestedParameterTwo", operation.Parameters[1].Name); 135Assert.Equal("parameterOne.nestedParameterThree", operation.Parameters[2].Name); 137Assert.Equal("parameterOne.nestedParameterFour", operation.Parameters[3].Name); 139Assert.Equal("parameterTwo", operation.Parameters[4].Name); 153Assert.Equal("fieldMaskValue", operation.Parameters[0].Name); 154Assert.Equal("string", operation.Parameters[0].Schema.Type); 156Assert.Equal("stringValue", operation.Parameters[1].Name); 157Assert.Equal("string", operation.Parameters[1].Schema.Type); 159Assert.Equal("int32Value", operation.Parameters[2].Name); 160Assert.Equal("integer", operation.Parameters[2].Schema.Type); 161Assert.Equal("int32", operation.Parameters[2].Schema.Format); 181Assert.Equal("parameterInt", operation.Parameters[0].Name); 183Assert.Equal("parameterString", operation.Parameters[1].Name);
Binding\ResponseBodyTests.cs (10)
32Assert.Equal("string", bodySchema.Type); 47Assert.Equal("array", bodySchema.Type); 48Assert.Equal("string", bodySchema.Items.Type); 64Assert.Equal("string", enumSchema.Type); 69v => Assert.Equal("ENUM_WITHOUT_MESSAGE_BAR", v), 70v => Assert.Equal("ENUM_WITHOUT_MESSAGE_BAZ", v), 71v => Assert.Equal("ENUM_WITHOUT_MESSAGE_FOO", v), 72v => Assert.Equal("ENUM_WITHOUT_MESSAGE_NEG", v), 73v => Assert.Equal("ENUM_WITHOUT_MESSAGE_UNSPECIFIED", v)); 89Assert.Equal("object", enumSchema.Type);
GrpcSwaggerServiceExtensionsTests.cs (2)
49Assert.Equal("OK", operation.Responses["200"].Description); 50Assert.Equal("Error", operation.Responses["default"].Description);
SchemaGeneratorIntegrationTests.cs (38)
40Assert.Equal("object", schema.Type); 44Assert.Equal("string", enumSchema.Type); 49v => Assert.Equal("BAR", v), 50v => Assert.Equal("BAZ", v), 51v => Assert.Equal("FOO", v), 52v => Assert.Equal("NEG", v), 53v => Assert.Equal("NESTED_ENUM_UNSPECIFIED", v)); 64Assert.Equal("string", schema.Type); 69v => Assert.Equal("ENUM_WITHOUT_MESSAGE_BAR", v), 70v => Assert.Equal("ENUM_WITHOUT_MESSAGE_BAZ", v), 71v => Assert.Equal("ENUM_WITHOUT_MESSAGE_FOO", v), 72v => Assert.Equal("ENUM_WITHOUT_MESSAGE_NEG", v), 73v => Assert.Equal("ENUM_WITHOUT_MESSAGE_UNSPECIFIED", v)); 84Assert.Equal("object", schema.Type); 86Assert.Equal("string", schema.Properties["message"].Type); 88Assert.Equal("array", valuesSchema.Type); 90Assert.Equal("string", valuesSchema.Items.Type); 101Assert.Equal("object", schema.Type); 103Assert.Equal("RecursiveMessage", schema.Properties["child"].Reference.Id); 114Assert.Equal("object", schema.Type); 116Assert.Equal("string", schema.Properties["bytesValue"].Type); 117Assert.Equal("string", schema.Properties["bytesNullableValue"].Type); 127Assert.Equal("array", schema.Type); 141Assert.Equal("Struct", schema.Reference.Id); 145Assert.Equal("object", resolvedSchema.Type); 159Assert.Equal("object", schema.Type); 163Assert.Equal("string", schema.Properties["@type"].Type); 174Assert.Equal("object", schema.Type); 176Assert.Equal("string", schema.Properties["firstOne"].Type); 177Assert.Equal("string", schema.Properties["firstTwo"].Type); 178Assert.Equal("string", schema.Properties["secondOne"].Type); 179Assert.Equal("string", schema.Properties["secondTwo"].Type); 191Assert.Equal("object", schema.Type); 193Assert.Equal("object", schema.Properties["mapValue"].Type); 194Assert.Equal("number", schema.Properties["mapValue"].AdditionalProperties.Type); 195Assert.Equal("double", schema.Properties["mapValue"].AdditionalProperties.Format); 206Assert.Equal("object", schema.Type); 208Assert.Equal("string", schema.Properties["fieldMaskValue"].Type);
XmlComments\XmlCommentsDocumentFilterTests.cs (1)
44Assert.Equal(expectedDescription, document.Tags[0].Description);
XmlComments\XmlDocumentationIntegrationTests.cs (16)
28Assert.Equal("XmlDoc", swagger.Tags[0].Name); 29Assert.Equal("XmlDocServiceWithComments XML comment!", swagger.Tags[0].Description); 39Assert.Equal("XmlDoc", swagger.Tags[0].Name); 40Assert.Equal("XmlDoc!", swagger.Tags[0].Description); 51Assert.Equal("Name field!", path.Operations[OperationType.Get].Parameters[0].Description); 62Assert.Equal("BasicGet XML summary!", path.Operations[OperationType.Get].Summary); 63Assert.Equal("BasicGet XML remarks!", path.Operations[OperationType.Get].Description); 74Assert.Equal("BasicGet!", path.Operations[OperationType.Get].Summary); 86Assert.Equal("Request XML param!", path.Operations[OperationType.Post].RequestBody.Description); 108Assert.Equal("Detail field!", path.Operations[OperationType.Post].RequestBody.Description); 123Assert.Equal("name", p.Name); 124Assert.Equal("Name field!", p.Description); 129Assert.Equal("detail.age", p.Name); 130Assert.Equal("Age field!", p.Description); 142Assert.Equal("StringReply!", helloReplyMessage.Description); 143Assert.Equal("Message field!", helloReplyMessage.Properties["message"].Description);
Microsoft.AspNetCore.HeaderParsing.Tests (43)
CommonHeadersTests.cs (17)
15Assert.Equal(HeaderNames.Host, CommonHeaders.Host.HeaderName); 23Assert.Equal(HeaderNames.Accept, CommonHeaders.Accept.HeaderName); 31Assert.Equal(HeaderNames.AcceptEncoding, CommonHeaders.AcceptEncoding.HeaderName); 39Assert.Equal(HeaderNames.AcceptLanguage, CommonHeaders.AcceptLanguage.HeaderName); 47Assert.Equal(HeaderNames.CacheControl, CommonHeaders.CacheControl.HeaderName); 55Assert.Equal(HeaderNames.ContentDisposition, CommonHeaders.ContentDisposition.HeaderName); 63Assert.Equal(HeaderNames.ContentType, CommonHeaders.ContentType.HeaderName); 71Assert.Equal(HeaderNames.Cookie, CommonHeaders.Cookie.HeaderName); 79Assert.Equal(HeaderNames.Date, CommonHeaders.Date.HeaderName); 87Assert.Equal(HeaderNames.IfMatch, CommonHeaders.IfMatch.HeaderName); 95Assert.Equal(HeaderNames.IfModifiedSince, CommonHeaders.IfModifiedSince.HeaderName); 103Assert.Equal(HeaderNames.IfNoneMatch, CommonHeaders.IfNoneMatch.HeaderName); 111Assert.Equal(HeaderNames.IfRange, CommonHeaders.IfRange.HeaderName); 119Assert.Equal(HeaderNames.IfUnmodifiedSince, CommonHeaders.IfUnmodifiedSince.HeaderName); 127Assert.Equal(HeaderNames.Range, CommonHeaders.Range.HeaderName); 135Assert.Equal(HeaderNames.Referer, CommonHeaders.Referer.HeaderName); 143Assert.Equal("X-Forwarded-For", CommonHeaders.XForwardedFor.HeaderName);
HeaderKeyTests.cs (2)
22Assert.Equal(TestHeaderName, sut.ToString()); 30Assert.Equal(TestHeaderName, sut.Name);
HeaderParsingExtensionsTests.cs (2)
113Assert.Equal(date, parsedDate.ToString("R", CultureInfo.InvariantCulture)); 117Assert.Equal(date, parsedDate.ToString("R", CultureInfo.InvariantCulture));
HeaderParsingFeatureTests.cs (8)
54Assert.Equal(date, value.ToString("R", CultureInfo.InvariantCulture)); 73Assert.Equal(currentDate, value.ToString("R", CultureInfo.InvariantCulture)); 79Assert.Equal(futureDate, textValue.ToString("R", CultureInfo.InvariantCulture)); 97Assert.Equal(date, value.ToString("R", CultureInfo.InvariantCulture)); 111Assert.Equal("Header 'Date' not found.", _logger.Collector.LatestRecord.Message); 127Assert.Equal(date, value.ToString("R", CultureInfo.InvariantCulture)); 130Assert.Equal("Using a default value for header 'Date'.", _logger.Collector.LatestRecord.Message); 148Assert.Equal("Can't parse header 'Date' due to 'Unable to parse date time offset value.'.", _logger.Collector.LatestRecord.Message);
HeaderRegistryTests.cs (1)
33Assert.Equal(CommonHeaders.Date.HeaderName, key.Name);
HeaderSetupTests.cs (2)
19Assert.Equal(TestHeaderName, sut.HeaderName); 29Assert.Equal(TestHeaderName, sut.HeaderName);
HostHeaderValueTests.cs (2)
75Assert.Equal("foo", hhv.ToString()); 78Assert.Equal("foo:82", hhv.ToString());
ParserTests.cs (9)
22Assert.Equal("web.vortex.data.microsoft.com", result.Host); 80Assert.Equal("csrftoken", result[0].Name.Value); 81Assert.Equal("u32t4o3tb3gg43", result[0].Value.Value); 91Assert.Equal("csrftoken", result[0].Name.Value); 92Assert.Equal("u32t4o3tb3gg43", result[0].Value.Value); 93Assert.Equal("_gat", result[1].Name.Value); 94Assert.Equal("1", result[1].Value.Value); 275Assert.Equal("foo.com", result!.Host); 428Assert.Equal("IP address cannot be empty.", error);
Microsoft.AspNetCore.HeaderPropagation.Tests (10)
HeaderPropagationIntegrationTest.cs (3)
69Assert.Equal( 91Assert.Equal( 165Assert.Equal(
HeaderPropagationMessageHandlerEntryCollectionTest.cs (4)
16Assert.Equal("foo", entry.CapturedHeaderName); 17Assert.Equal("foo", entry.OutboundHeaderName); 28Assert.Equal("foo", entry.CapturedHeaderName); 29Assert.Equal("bar", entry.OutboundHeaderName);
HeaderPropagationMiddlewareTest.cs (3)
136Assert.Equal("in", receivedName); 153Assert.Equal("test", CapturedHeaders["in"]); 196Assert.Equal("Test", CapturedHeaders["in"]);
Microsoft.AspNetCore.Hosting.FunctionalTests (3)
LinkedApplicationTests.cs (1)
49Assert.Equal("Hello World", body);
ShutdownTests.cs (1)
115Assert.Equal(CompletionMessage, output);
WebHostBuilderTests.cs (1)
64Assert.Equal($"IStartupInjectionAssemblyName", output);
Microsoft.AspNetCore.Hosting.Tests (148)
ConfigureBuilderTests.cs (2)
29Assert.Equal($"Could not resolve a service of type '{typeof(CrasherService).FullName}' for the parameter" 34Assert.Equal("Service instantiation failed", ex.InnerException.Message);
GenericWebHostBuilderTests.cs (4)
26Assert.Equal("true", config[randomEnvKey]); 64Assert.Equal("TEST_URL", server.Addresses.Single()); 88Assert.Equal("TEST_URL", server.Addresses.Single()); 128Assert.Equal(expected, string.Join(';', server.Addresses));
HostingApplicationDiagnosticsTests.cs (24)
208Assert.Equal(HostingApplicationDiagnostics.ActivityName, measurementActivity.OperationName); 611Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 636Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 660Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 683Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 711Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 739Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 740Assert.Equal("ParentId1", Activity.Current.ParentId); 769Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 799Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 830Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 860Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 897Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 927Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", Activity.Current.OperationName); 929Assert.Equal("0123456789abcdef0123456789abcdef", Activity.Current.TraceId.ToHexString()); 930Assert.Equal("0123456789abcdef", Activity.Current.ParentSpanId.ToHexString()); 931Assert.Equal("TraceState1", Activity.Current.TraceStateString); 968Assert.Equal("00-35aae61e3e99044eb5ea5007f2cd159b-40a8bd87c078cb4c-00", parentId); 969Assert.Equal("40a8bd87c078cb4c", parentSpanId); 970Assert.Equal("35aae61e3e99044eb5ea5007f2cd159b", traceId); 974Assert.Equal("35aae61e3e99044eb5ea5007f2cd159b", options.TraceId.ToHexString()); 975Assert.Equal("40a8bd87c078cb4c", options.Parent.SpanId.ToHexString()); 995Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", activity.OperationName); 1038Assert.Equal("0123456789abcdef", parentSpanId);
HostingEnvironmentExtensionsTests.cs (6)
26Assert.Equal(Path.GetFullPath("."), env.ContentRootPath); 27Assert.Equal(Path.GetFullPath("testroot"), env.WebRootPath); 39Assert.Equal(Path.GetFullPath("testroot"), env.ContentRootPath); 40Assert.Equal(Path.GetFullPath(Path.Combine("testroot", "wwwroot")), env.WebRootPath); 52Assert.Equal(Path.GetFullPath(Path.Combine("testroot", "wwwroot")), env.ContentRootPath); 73Assert.Equal("NewName", env.EnvironmentName);
HostingMetricsTests.cs (5)
32Assert.Equal(HostingMetrics.MeterName, meter.Name); 95Assert.Equal(httpVersion, (string)measurement.Tags["network.protocol.version"]); 103Assert.Equal(exceptionName, (string)measurement.Tags["error.type"]); 130Assert.Equal(HostingMetrics.MeterName, meter.Name); 166Assert.Equal(HostingMetrics.MeterName, meter.Name);
Internal\HostingEventSourceTests.cs (6)
22Assert.Equal("Microsoft.AspNetCore.Hosting", eventSource.Name); 42Assert.Equal("HostStart", eventData.EventName); 65Assert.Equal("HostStop", eventData.EventName); 121Assert.Equal("RequestStart", eventData.EventName); 149Assert.Equal("RequestStop", eventData.EventName); 171Assert.Equal("UnhandledException", eventData.EventName);
Internal\HostingRequestStartLogTests.cs (1)
31Assert.Equal(expected, logger.ToString());
StartupManagerTests.cs (20)
34Assert.Equal("StartupServicesFilter Before 1", before.Message); 35Assert.Equal("StartupServicesFilter After 1", after.Message); 56Assert.Equal("StartupServicesFilter Before 1", before.Message); 57Assert.Equal("StartupServicesFilter After 2", after.Message); 81Assert.Equal(expectedMessage, exception.Message); 102Assert.Equal("ConfigureContainerFilter Before 1", before.Message); 103Assert.Equal("ConfigureContainerFilter After 1", after.Message); 124Assert.Equal("ConfigureContainerFilter Before 1", before.Message); 125Assert.Equal("ConfigureContainerFilter After 2", after.Message); 146Assert.Equal("StartupServicesFilter Before 1", before.Message); 147Assert.Equal("ConfigureContainerFilter After 2", after.Message); 356Assert.Equal(environment, options.Environment); 368Assert.Equal("A public method named 'ConfigureBoom' or 'Configure' could not be found in the 'Microsoft.AspNetCore.Hosting.Fakes.StartupBoom' type.", ex.Message); 380Assert.Equal("StartupCaseInsensitive", type.Name); 403Assert.Equal("ConfigureCaseInsensitiveServices", options.Environment); 417Assert.Equal("Having multiple overloads of method 'Configure' is not supported.", ex.Message); 432Assert.Equal("A public method named 'ConfigurePrivateConfigure' or 'Configure' could not be found in the 'Microsoft.AspNetCore.Hosting.Fakes.StartupPrivateConfigure' type.", ex.Message); 446Assert.Equal("Having multiple overloads of method 'ConfigureServices' is not supported.", ex.Message); 499Assert.Equal("Configure", foo.Message); 591Assert.Equal(((MyContainer)app.ApplicationServices).Environment, Environments.Production);
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (5)
289Assert.Equal("file.version.js", file.Name); 306Assert.Equal("", file.Name); 323Assert.Equal("other.html", file.Name); 342Assert.Equal("other.html", file.Name); 358Assert.Equal("project-transitive-dep.js", file.Name);
WebHostBuilderTests.cs (58)
34Assert.Equal("MyStartupAssembly", options.ApplicationName); 35Assert.Equal("MyStartupAssembly", options.StartupAssembly); 78Assert.Equal("The specified factory returned null startup instance.", ex.Message); 331Assert.Equal("value1", context.Configuration["key1"]); 351Assert.Equal("value1", context.Configuration["key1"]); 382Assert.Equal("value1", config["key1"]); 412Assert.Equal("value1", config["key1"]); 425Assert.Equal("A public method named 'ConfigureProduction' or 'Configure' could not be found in the 'Microsoft.AspNetCore.Hosting.Fakes.StartupBoom' type.", exception.Message); 455Assert.Equal("A public method named 'ConfigureProduction' or 'Configure' could not be found in the 'Microsoft.AspNetCore.Hosting.Fakes.StartupBoom' type.", exception.Message); 499Assert.Equal("EnvB", options.Environment); 525Assert.Equal("EnvB", options.Environment); 551Assert.Equal("EnvB", options.Environment); 586Assert.Equal("EnvB", options.Environment); 611Assert.Equal(expected, host.Services.GetService<IHostEnvironment>().EnvironmentName); 612Assert.Equal(expected, host.Services.GetService<IWebHostEnvironment>().EnvironmentName); 614Assert.Equal(expected, host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().EnvironmentName); 615Assert.Equal(expected, host.Services.GetService<Extensions.Hosting.IHostingEnvironment>().EnvironmentName); 659Assert.Equal("/", host.Services.GetService<IHostEnvironment>().ContentRootPath); 660Assert.Equal("/", host.Services.GetService<IWebHostEnvironment>().ContentRootPath); 662Assert.Equal("/", host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath); 663Assert.Equal("/", host.Services.GetService<Extensions.Hosting.IHostingEnvironment>().ContentRootPath); 701Assert.Equal(appBase, host.Services.GetService<IHostEnvironment>().ContentRootPath); 703Assert.Equal(appBase, host.Services.GetService<AspNetCore.Hosting.IHostingEnvironment>().ContentRootPath); 736Assert.Equal(typeof(Startup).Assembly.GetName().Name, hostingEnv.ApplicationName); 737Assert.Equal(typeof(Startup).Assembly.GetName().Name, hostingEnv2.ApplicationName); 754Assert.Equal(typeof(StartupNoServicesNoInterface).Assembly.GetName().Name, hostingEnv.ApplicationName); 755Assert.Equal(typeof(StartupNoServicesNoInterface).Assembly.GetName().Name, hostingEnv2.ApplicationName); 769Assert.Equal(typeof(StartupNoServicesNoInterface).Assembly.GetName().Name, hostingEnv.ApplicationName); 784Assert.Equal(typeof(WebHostBuilderTests).Assembly.GetName().Name, hostingEnv.ApplicationName); 800Assert.Equal(typeof(WebHostBuilderTests).Assembly.GetName().Name, hostingEnv.ApplicationName); 814Assert.Equal("Microsoft.AspNetCore.Hosting.Tests", hostingEnv.ApplicationName); 828Assert.Equal("Microsoft.AspNetCore.Hosting.Tests", hostingEnv.ApplicationName); 842Assert.Equal("WebHostBuilder allows creation only of a single instance of WebHost", ex.Message); 896Assert.Equal("1", builder.GetSetting("testhostingstartup1")); 897Assert.Equal("1", builder.GetSetting("testhostingstartup1_calls")); 916Assert.Equal("1", builder.GetSetting("testhostingstartup1")); 917Assert.Equal("1", builder.GetSetting("testhostingstartup1_calls")); 933Assert.Equal("0", builder.GetSetting("testhostingstartup")); 934Assert.Equal("1", builder.GetSetting("testhostingstartup1")); 935Assert.Equal("01", builder.GetSetting("testhostingstartup_chain")); 1006Assert.Equal("Microsoft.AspNetCore.Hosting.IStartup isn't supported", exception.Message); 1022Assert.Equal("Building this implementation of IWebHostBuilder is not supported.", exception.Message); 1038Assert.Equal($"ConfigureServices returning an {typeof(IServiceProvider)} isn't supported.", exception.Message); 1055Assert.Equal("0", builder.GetSetting("testhostingstartup_chain")); 1093Assert.Equal("value", configuration["testhostingstartup:config"]); 1113Assert.Equal("appvalue", context.Configuration["appconfig"]); 1117Assert.Equal("appvalue", context.Configuration["appconfig"]); 1121Assert.Equal("appvalue", context.Configuration["appconfig"]); 1129Assert.Equal("appvalue", configuration["appconfig"]); 1137Assert.Equal("value", config["testhostingstartup:config"]); 1156Assert.Equal("0", builder.GetSetting("testhostingstartup")); 1187Assert.Equal("0", builder.GetSetting("testhostingstartup")); 1334Assert.Equal("nestedvalue", builder.GetSetting("key")); 1338Assert.Equal("nestedvalue", appConfig["key"]); 1355Assert.Equal("Hosted Service throws in StartAsync", startEx.Message); 1361Assert.Equal("Hosted Service throws in StopAsync", stopEx.Message); 1380Assert.Equal("Hosted Service throws in StartAsync", startEx.Message); 1387Assert.Equal("Hosted Service throws in StopAsync", stopEx.Message);
WebHostConfigurationsTests.cs (5)
27Assert.Equal("wwwroot", config.WebRoot); 28Assert.Equal("MyProjectReference", config.ApplicationName); 29Assert.Equal("MyProjectReference", config.StartupAssembly); 30Assert.Equal(Environments.Development, config.Environment); 42Assert.Equal(Environments.Development, config.Environment);
WebHostTests.cs (12)
28Assert.Equal("No service for type 'Microsoft.AspNetCore.Hosting.Server.IServer' has been registered.", ex.Message); 63Assert.Equal("http://localhost:5002", serverAddressFeature.Addresses.First()); 82Assert.Equal("http://localhost:5003", serverAddressFeature.Addresses.First()); 102Assert.Equal("http://localhost:5009", serverAddressFeature.Addresses.First()); 718Assert.Equal("Changed", env.EnvironmentName); 719Assert.Equal("Changed", env2.EnvironmentName); 805Assert.Equal(Environments.Production, env.EnvironmentName); 806Assert.Equal(Environments.Production, env2.EnvironmentName); 828Assert.Equal(Environments.Staging, env.EnvironmentName); 829Assert.Equal(Environments.Staging, env.EnvironmentName); 848Assert.Equal(Path.GetFullPath("testroot"), env.WebRootPath); 854Assert.Equal(Path.GetFullPath("testroot"), env1.WebRootPath);
Microsoft.AspNetCore.Html.Abstractions.Tests (48)
HtmlContentBuilderExtensionsTest.cs (22)
25entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry))); 40entry => Assert.Equal("Hi", Assert.IsType<UnencodedString>(entry).Value), 41entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry))); 58entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry))); 73entry => Assert.Equal("Hi", Assert.IsType<EncodedString>(entry).Value), 74entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry))); 90entry => Assert.Equal("Hi", Assert.IsType<UnencodedString>(entry).Value)); 124entry => Assert.Equal("Hi", Assert.IsType<EncodedString>(entry).Value)); 137Assert.Equal( 152Assert.Equal( 167Assert.Equal("First!", HtmlContentToString(builder)); 180Assert.Equal( 195Assert.Equal( 210Assert.Equal( 225Assert.Equal( 240Assert.Equal("0xHtmlEncode[[32]]", HtmlContentToString(builder)); 259Assert.Equal( 278Assert.Equal( 297Assert.Equal( 317Assert.Equal( 333Assert.Equal( 349Assert.Equal(
HtmlContentBuilderTest.cs (13)
40Assert.Equal("HtmlEncode[[Hello]]", writer.ToString()); 56Assert.Equal("Hello", writer.ToString()); 74Assert.Equal("Written from TestHtmlContent: Hello", writer.ToString()); 91entry => Assert.Equal("Written from TestHtmlContent: hello", entry.ToString()), 130entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 132entry => Assert.Equal("Test", Assert.IsType<string>(entry))); 158entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 160entry => Assert.Equal("Test", Assert.IsType<string>(entry))); 182entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 184entry => Assert.Equal("Test", Assert.IsType<string>(entry))); 210entry => Assert.Equal("some-content", Assert.IsType<string>(entry)), 212entry => Assert.Equal("Test", Assert.IsType<string>(entry))); 229Assert.Equal("Written from TestHtmlContent: HelloHtmlEncode[[Test]]", writer.ToString());
HtmlFormattableStringTest.cs (13)
22Assert.Equal("Hello, World!", result); 35Assert.Equal("Hello, World!", result); 48Assert.Equal( 63Assert.Equal("First!", result); 79Assert.Equal("HtmlEncode[[First]]!", result); 96Assert.Equal("Happy Birthday, HtmlEncode[[Billy]]!", result); 109Assert.Equal(" First!", result); 122Assert.Equal( 137Assert.Equal( 151Assert.Equal("0xHtmlEncode[[32]]", result); 170Assert.Equal( 188Assert.Equal("HtmlEncode[[1,21]] in french!", result); 202Assert.Equal("HtmlEncode[[Sonntag, 1. Februar 2015]]", result);
Microsoft.AspNetCore.Http.Abstractions.Tests (182)
CookieBuilderTests.cs (2)
51Assert.Equal(new CookieOptions().Path, new CookieBuilder().Build(new DefaultHttpContext()).Path); 73Assert.Equal("name=value; path=/; simple; key=value", cookie.ToString());
EndpointFilterInvocationContextOfTTests.cs (2)
36Assert.Equal("Foo", context.GetArgument<string>(0)); 96Assert.Equal(currentContent, generatedContent);
EndpointMetadataCollectionTests.cs (1)
80Assert.Equal("2", requiredMetadata);
HostStringTest.cs (2)
39Assert.Equal(expectedDomain, result); 93Assert.Equal(expectedHost, host);
HttpProtocolTests.cs (6)
11Assert.Equal("HTTP/3", HttpProtocol.Http3); 30Assert.Equal("HTTP/2", HttpProtocol.Http2); 49Assert.Equal("HTTP/1.1", HttpProtocol.Http11); 68Assert.Equal("HTTP/1.0", HttpProtocol.Http10); 87Assert.Equal("HTTP/0.9", HttpProtocol.Http09); 118Assert.Equal(expected, actual);
HttpValidationProblemDetailsJsonConverterTest.cs (28)
35Assert.Equal(problemDetails.Type, document.RootElement.GetProperty("type").GetString()); 36Assert.Equal(problemDetails.Title, document.RootElement.GetProperty("title").GetString()); 38Assert.Equal(problemDetails.Detail, document.RootElement.GetProperty("detail").GetString()); 39Assert.Equal(problemDetails.Instance, document.RootElement.GetProperty("instance").GetString()); 40Assert.Equal((string)problemDetails.Extensions["traceId"]!, document.RootElement.GetProperty("traceId").GetString()); 42Assert.Equal("error0", errorsElement.GetProperty("key0")[0].GetString()); 43Assert.Equal("error1", errorsElement.GetProperty("key1")[0].GetString()); 44Assert.Equal("error2", errorsElement.GetProperty("key1")[1].GetString()); 66Assert.Equal(type, problemDetails.Type); 67Assert.Equal(title, problemDetails.Title); 69Assert.Equal(instance, problemDetails.Instance); 70Assert.Equal(detail, problemDetails.Detail); 75Assert.Equal("traceId", kvp.Key); 76Assert.Equal(traceId, kvp.Value?.ToString()); 82Assert.Equal("key0", kvp.Key); 87Assert.Equal("key1", kvp.Key); 109Assert.Equal(type, problemDetails.Type); 110Assert.Equal(title, problemDetails.Title); 116Assert.Equal("traceId", kvp.Key); 117Assert.Equal(traceId, kvp.Value?.ToString()); 123Assert.Equal("key0", kvp.Key); 128Assert.Equal("key1", kvp.Key); 148Assert.Equal(type, problemDetails!.Type); 149Assert.Equal(title, problemDetails.Title); 155Assert.Equal("traceId", kvp.Key); 156Assert.Equal(traceId, kvp.Value?.ToString()); 162Assert.Equal("key0", kvp.Key); 167Assert.Equal("key1", kvp.Key);
MapPathMiddlewareTests.cs (17)
63Assert.Equal(basePath, context.Request.PathBase.Value); 64Assert.Equal(requestPath, context.Request.Path.Value); 65Assert.Equal(expectedPathBase, (string)context.Items["test.PathBase"]!); 93Assert.Equal(string.Concat(basePath, requestPath.AsSpan(0, matchPath.Length)), (string)context.Items["test.PathBase"]!); 121Assert.Equal(basePath, (string)context.Items["test.PathBase"]!); 152Assert.Equal(basePath, context.Request.PathBase.Value); 153Assert.Equal(requestPath, context.Request.Path.Value); 174Assert.Equal(basePath, context.Request.PathBase.Value); 175Assert.Equal(requestPath, context.Request.Path.Value); 196Assert.Equal(string.Empty, context.Request.PathBase.Value); 197Assert.Equal("/route1/subroute1", context.Request.Path.Value); 202Assert.Equal(string.Empty, context.Request.PathBase.Value); 203Assert.Equal("/route2", context.Request.Path.Value); 208Assert.Equal(string.Empty, context.Request.PathBase.Value); 209Assert.Equal("/route2/subroute2", context.Request.Path.Value); 214Assert.Equal(string.Empty, context.Request.PathBase.Value); 215Assert.Equal("/route2/subroute2/subsub2", context.Request.Path.Value);
MetadataTests.cs (9)
14Assert.Equal("Produces StatusCode: 100", new ProducesResponseTypeMetadata(100).ToString()); 15Assert.Equal("Produces StatusCode: 200, ContentTypes: application/json", new ProducesResponseTypeMetadata(200, contentTypes: new[] { "application/json" }).ToString()); 16Assert.Equal("Produces StatusCode: 300, ContentTypes: application/json,text/plain", new ProducesResponseTypeMetadata(300, contentTypes: new[] { "application/json", "text/plain" }).ToString()); 17Assert.Equal("Produces StatusCode: 400, Type: System.Version", new ProducesResponseTypeMetadata(400, type: typeof(Version)).ToString()); 18Assert.Equal("Produces StatusCode: 500, Type: System.Void", new ProducesResponseTypeMetadata(500, type: typeof(void)).ToString()); 25Assert.Equal("Accepts ContentTypes: application/json, IsOptional: False", new AcceptsMetadata(new[] { "application/json" }).ToString()); 26Assert.Equal("Accepts ContentTypes: application/json,text/plain, IsOptional: False", new AcceptsMetadata(new[] { "application/json", "text/plain" }).ToString()); 27Assert.Equal("Accepts ContentTypes: application/json, RequestType: System.Version, IsOptional: False", new AcceptsMetadata(new[] { "application/json" }, type: typeof(Version)).ToString()); 28Assert.Equal("Accepts ContentTypes: application/json, IsOptional: True", new AcceptsMetadata(new[] { "application/json" }, isOptional: true).ToString());
PathStringTests.cs (12)
90Assert.Equal(expected, result.Value); 104Assert.Equal("http://localhost:80/base/path?query#frag", result); 107Assert.Equal("/base/path?query#frag", result); 110Assert.Equal("/pathtext", result); 286Assert.Equal(expected, path.ToUriComponent()); 294Assert.Equal("/foo", result.ToString()); 321Assert.Equal(input, sut.Value); 333Assert.Equal(input, sut.Value); 343Assert.Equal(expected, sut.Value); 354Assert.Equal(expected, sut.Value); 369Assert.Equal(input, sut.ToUriComponent()); 378Assert.Equal(expected, sut.Value);
ProblemDetailsJsonConverterTest.cs (25)
50Assert.Equal(type, problemDetails.Type); 51Assert.Equal(title, problemDetails.Title); 53Assert.Equal(instance, problemDetails.Instance); 54Assert.Equal(detail, problemDetails.Detail); 59Assert.Equal("traceId", kvp.Key); 60Assert.Equal(traceId, kvp.Value?.ToString()); 81Assert.Equal(type, problemDetails!.Type); 82Assert.Equal(title, problemDetails.Title); 84Assert.Equal(instance, problemDetails.Instance); 85Assert.Equal(detail, problemDetails.Detail); 90Assert.Equal("traceId", kvp.Key); 91Assert.Equal(traceId, kvp.Value?.ToString()); 113Assert.Equal(type, problemDetails!.Type); 114Assert.Equal(title, problemDetails.Title); 116Assert.Equal(instance, problemDetails.Instance); 117Assert.Equal(detail, problemDetails.Detail); 122Assert.Equal("traceId", kvp.Key); 124Assert.Equal(traceId, kvp.Value?.ToString()); 145Assert.Equal(type, problemDetails.Type); 146Assert.Equal(title, problemDetails.Title); 152Assert.Equal("traceId", kvp.Key); 153Assert.Equal(traceId, kvp.Value?.ToString()); 186Assert.Equal(expected, actual); 210Assert.Equal(expected, actual); 241Assert.Equal(expected, actual);
QueryStringTests.cs (9)
31Assert.Equal(string.Empty, query.Value); 39Assert.Equal("?", query.Value); 46Assert.Equal("?Hello=Wor%23ld", query.ToString()); 60Assert.Equal(expected, query.Value); 74Assert.Equal("?key1=value1&key2=value2&key3=value3&key4=&key5=", query.Value); 88Assert.Equal("?key1=value1&key2=value2&key3=value3&key4=&key5=", query.Value); 105Assert.Equal(expected, q1.Add(q2).Value); 106Assert.Equal(expected, (q1 + q2).Value); 127Assert.Equal(expected, q2.Value);
RouteValueDictionaryTests.cs (46)
127Assert.Equal("Address", kvp.Key); 129Assert.Equal("Redmond", address.City); 130Assert.Equal("WA", address.State); 132kvp => { Assert.Equal("Age", kvp.Key); Assert.Equal(30, kvp.Value); }, 133kvp => { Assert.Equal("Name", kvp.Key); Assert.Equal("James", kvp.Value); }); 147kvp => { Assert.Equal("First Name", kvp.Key); Assert.Equal("James", kvp.Value); }, 148kvp => { Assert.Equal("Last Name", kvp.Key); Assert.Equal("Henrik", kvp.Value); }, 149kvp => { Assert.Equal("Middle Name", kvp.Key); Assert.Equal("Bob", kvp.Value); }); 199kvp => { Assert.Equal("awesome", kvp.Key); Assert.Equal(123, kvp.Value); }, 200kvp => { Assert.Equal("cool", kvp.Key); Assert.Equal("beans", kvp.Value); }); 218Assert.Equal("CoolnessFactor", kvp.Key); 223Assert.Equal("IsAwesome", kvp.Key); 244Assert.Equal("IsPublic", kvp.Key); 296Assert.Equal("DerivedProperty", kvp.Key); 302Assert.Equal("TotallySweetProperty", kvp.Key); 322kvp => { Assert.Equal("DerivedProperty", kvp.Key); Assert.Equal(5, kvp.Value); }); 375kvp => { Assert.Equal("City", kvp.Key); Assert.Equal("Singapore", kvp.Value); }, 376kvp => { Assert.Equal("State", kvp.Key); Assert.Null(kvp.Value); }); 393kvp => { Assert.Equal("City", kvp.Key); Assert.Equal("Singapore", kvp.Value); }, 394kvp => { Assert.Equal("State", kvp.Key); Assert.Null(kvp.Value); }); 580Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 596kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 597kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 611Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 625Assert.Collection(dict, kvp => { Assert.Equal("kEy", kvp.Key); Assert.Equal("value", kvp.Value); }); 644kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 645kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 662Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 679Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 827Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 856kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 857kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 884kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 885kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 906kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 927kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 946kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 947kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 1373Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 1394Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 1450Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 1498Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 1594Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 1647Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 2079Assert.Equal("key", storage[0].Key); 2081Assert.Equal("key3", storage[1].Key);
UseExtensionsTests.cs (1)
74Assert.Equal("From Use", ex.Message);
UseMiddlewareTest.cs (15)
18Assert.Equal( 32Assert.Equal( 46Assert.Equal( 60Assert.Equal( 74Assert.Equal( 87Assert.Equal( 100Assert.Equal( 113Assert.Equal( 127Assert.Equal( 141Assert.Equal( 154Assert.Equal( 166Assert.Equal( 217Assert.Equal(Resources.FormatException_UseMiddlewareExplicitArgumentsNotSupported(typeof(IMiddleware)), exception.Message); 234Assert.Equal(Resources.FormatException_UseMiddlewareNoMiddlewareFactory(typeof(IMiddlewareFactory)), exception.Message); 253Assert.Equal(
UsePathBaseExtensionsTests.cs (7)
163Assert.Equal("Response", response); 185Assert.Equal("Response", response); 205Assert.Equal("Response", response); 222Assert.Equal(expectedPath, ((PathString?)requestContext.Items["test.Path"])!.Value.Value); 223Assert.Equal(expectedPathBase, ((PathString?)requestContext.Items["test.PathBase"])!.Value.Value); 226Assert.Equal(pathBase, requestContext.Request.PathBase.Value); 227Assert.Equal(requestPath, requestContext.Request.Path.Value);
Microsoft.AspNetCore.Http.Connections.Tests (97)
HttpConnectionDispatcherTests.cs (37)
99Assert.Equal(connectionId, connectionContext.ConnectionId); 162Assert.Equal("The client requested a non-integer protocol version.", error); 190Assert.Equal("The client requested version '0', but the server does not support this version.", error); 245Assert.Equal("Hi", Encoding.UTF8.GetString(result.Buffer.ToArray())); 322Assert.Equal("No Connection with that ID", Encoding.UTF8.GetString(strm.ToArray())); 363Assert.Equal("No Connection with that ID", Encoding.UTF8.GetString(strm.ToArray())); 401Assert.Equal("POST requests are not allowed for WebSocket connections.", Encoding.UTF8.GetString(strm.ToArray())); 613Assert.Equal("Hello World", Encoding.UTF8.GetString(result.Buffer.ToArray())); 803Assert.Equal("application/octet-stream", context.Response.ContentType); 817Assert.Equal("value", connectionHttpContext.Request.Query["another"]); 820Assert.Equal("h1", connectionHttpContext.Request.Headers["header1"]); 821Assert.Equal("h2", connectionHttpContext.Request.Headers["header2"]); 822Assert.Equal("h3", connectionHttpContext.Request.Headers["header3"]); 823Assert.Equal("requestid", connectionHttpContext.TraceIdentifier); 824Assert.Equal("claimValue", connectionHttpContext.User.Claims.FirstOrDefault().Value); 825Assert.Equal("connectionid", connectionHttpContext.Connection.Id); 833Assert.Equal("application/xml", connectionHttpContext.Response.ContentType); 836Assert.Equal("TestName", endpointFeature.Endpoint.DisplayName); 871Assert.Equal("Connection ID required", Encoding.UTF8.GetString(strm.ToArray())); 945Assert.Equal("Connection ID required", Encoding.UTF8.GetString(strm.ToArray())); 1169Assert.Equal(transportType.ToString(), (string)measurement.Tags["signalr.transport"]); 1175Assert.Equal(status.ToString(), (string)measurement.Tags["signalr.connection.status"]); 1176Assert.Equal(transportType.ToString(), (string)measurement.Tags["signalr.transport"]); 1781Assert.Equal(string.Empty, GetContentAsString(context1.Response.Body)); 1784Assert.Equal("Hello, World", GetContentAsString(context2.Response.Body)); 2044Assert.Equal("text/plain", deleteContext.Response.ContentType); 2045Assert.Equal("Cannot terminate this connection using the DELETE endpoint.", Encoding.UTF8.GetString(ms.ToArray())); 2093Assert.Equal("text/plain", deleteContext.Response.ContentType); 2135Assert.Equal("text/plain", deleteContext.Response.ContentType); 2197Assert.Equal("text/plain", deleteContext.Response.ContentType); 2242Assert.Equal("Message1", Encoding.UTF8.GetString(ms.ToArray())); 2252Assert.Equal("Message2", Encoding.UTF8.GetString(ms.ToArray())); 2803Assert.Equal("text/plain", deleteContext.Response.ContentType); 3719Assert.Equal($"{transportType} transport not supported by this end point type", Encoding.UTF8.GetString(strm.ToArray())); 3793Assert.Equal("no-cache, no-store", response.Headers.CacheControl); 3794Assert.Equal("no-cache", response.Headers.Pragma); 3795Assert.Equal("Thu, 01 Jan 1970 00:00:00 GMT", response.Headers.Expires);
HttpConnectionManagerTests.cs (5)
135Assert.Equal("Reading is not allowed after reader was completed.", exception.Message); 138Assert.Equal("Reading is not allowed after reader was completed.", exception.Message); 214Assert.Equal(connection.ConnectionId, connection.ConnectionToken); 326Assert.Equal("Error", exception.Message); 329Assert.Equal("Error", exception.Message);
Internal\HttpConnectionsEventSourceTests.cs (7)
23Assert.Equal("Microsoft.AspNetCore.Http.Connections", eventSource.Name); 43Assert.Equal("ConnectionStart", eventData.EventName); 46Assert.Equal("Started connection '{0}'.", eventData.Message); 70Assert.Equal("ConnectionStop", eventData.EventName); 73Assert.Equal("Stopped connection '{0}'.", eventData.Message); 97Assert.Equal("ConnectionTimedOut", eventData.EventName); 100Assert.Equal("Connection '{0}' timed out.", eventData.Message);
LongPollingTests.cs (2)
81Assert.Equal("Hello World", Encoding.UTF8.GetString(ms.ToArray())); 109Assert.Equal("Hello World", Encoding.UTF8.GetString(payload));
MapConnectionHandlerTests.cs (27)
50Assert.Equal("/auth/negotiate", endpoint.DisplayName); 60Assert.Equal("/auth", endpoint.DisplayName); 87Assert.Equal("/auth/negotiate", endpoint.DisplayName); 92Assert.Equal("/auth", endpoint.DisplayName); 114Assert.Equal("/auth/negotiate", endpoint.DisplayName); 119Assert.Equal("/auth", endpoint.DisplayName); 142Assert.Equal("/auth/negotiate", endpoint.DisplayName); 147Assert.Equal("/auth", endpoint.DisplayName); 173Assert.Equal("/auth/negotiate", endpoint.DisplayName); 178Assert.Equal("/auth", endpoint.DisplayName); 202Assert.Equal("/path/negotiate", endpoint.DisplayName); 207Assert.Equal("/path", endpoint.DisplayName); 232Assert.Equal("/path/negotiate", endpoint.DisplayName); 237Assert.Equal("/path", endpoint.DisplayName); 264Assert.Equal("/path/negotiate", endpoint.DisplayName); 269Assert.Equal("Foo", auth?.Policy); 274Assert.Equal("/path", endpoint.DisplayName); 279Assert.Equal("Foo", auth?.Policy); 302Assert.Equal("/path/negotiate", endpoint.DisplayName); 310Assert.Equal("/path", endpoint.DisplayName); 338Assert.Equal("/path/negotiate", endpoint.DisplayName); 349Assert.Equal("/path", endpoint.DisplayName); 372Assert.Equal("/path/negotiate", endpoint.DisplayName); 377Assert.Equal("/path", endpoint.DisplayName); 403Assert.Equal("protocol1", client.SubProtocol); 420Assert.Equal("/test/negotiate", endpoint.DisplayName); 425Assert.Equal("/test", endpoint.DisplayName);
NegotiateProtocolTests.cs (8)
34Assert.Equal(connectionId, response.ConnectionId); 36Assert.Equal(url, response.Url); 37Assert.Equal(accessToken, response.AccessToken); 39Assert.Equal(connectionToken, response.ConnectionToken); 64Assert.Equal(expectedMessage, exception.InnerException.Message); 84Assert.Equal("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.", exception.InnerException.Message); 96Assert.Equal("{\"negotiateVersion\":0,\"availableTransports\":[]}", json); 115Assert.Equal("{\"negotiateVersion\":0,\"availableTransports\":[{\"transport\":null,\"transferFormats\":[]}]}", json);
ServerSentEventsMessageFormatterTests.cs (2)
25Assert.Equal(encoded, Encoding.UTF8.GetString(output.ToArray())); 37Assert.Equal(encoded, Encoding.UTF8.GetString(output.ToArray()));
ServerSentEventsTests.cs (6)
34Assert.Equal("text/event-stream", context.Response.ContentType); 35Assert.Equal("no-cache,no-store", context.Response.Headers["Cache-Control"]); 36Assert.Equal("no-cache", context.Response.Headers["Pragma"]); 79Assert.Equal(":\r\ndata: Hello\r\n\r\n", Encoding.ASCII.GetString(ms.ToArray())); 104Assert.Equal(":\r\ndata: " + hText + wText + "\r\n\r\n", Encoding.ASCII.GetString(ms.ToArray())); 130Assert.Equal(expected, Encoding.UTF8.GetString(ms.ToArray()));
WebSocketsTests.cs (3)
56Assert.Equal("Hello", Encoding.UTF8.GetString(buffer.ToArray())); 106Assert.Equal("Hello", Encoding.UTF8.GetString(clientSummary.Received[0].Buffer)); 381Assert.Equal(ExpectedSubProtocol, feature.SubProtocol);
Microsoft.AspNetCore.Http.Extensions.Tests (362)
HttpRequestJsonExtensionsTests.cs (6)
46Assert.Equal(expectedMessage, ex.Message); 61Assert.Equal(expectedMessage, ex.Message); 130Assert.Equal("激光這兩個字是甚麼意思", result!["name"]); 164Assert.Equal("Unable to read the request as JSON because the request content type charset 'invalid' is not a known encoding.", ex.Message); 194Assert.Equal("激光這兩個字是甚麼意思", result!["name"]); 208Assert.Equal("Unable to read the request as JSON because the request content type charset 'invalid' is not a known encoding.", ex.Message);
HttpResponseJsonExtensionsTests.cs (12)
54Assert.Equal("null", data); 74Assert.Equal("[false,true,false]", data); 119Assert.Equal("application/custom-type", context.Response.ContentType); 158Assert.Equal(@"{""stringProperty"":""激光這兩個字是甚麼意思""}", data); 195Assert.Equal("null", data); 239Assert.Equal(@"{""stringProperty"":""激光這兩個字是甚麼意思""}", data); 274Assert.Equal("[1,2]", Encoding.UTF8.GetString(body.ToArray())); 299Assert.Equal("[1,2]", Encoding.UTF8.GetString(body.ToArray())); 463Assert.Equal("[1,2,3]", data); 484Assert.Equal("null", data); 515Assert.Equal("t", headerValue); 547Assert.Equal("t", headerValue);
MetadataTest.cs (3)
20Assert.Equal("Description: A description", value); 33Assert.Equal("Summary: A summary", value); 46Assert.Equal("Tags: Tag1,Tag2", value);
ParameterBindingMethodCacheTests.cs (8)
575Assert.Equal("TryParseFromMultipleInterfaces implements multiple interfaces defining a static Boolean TryParse(System.String, TryParseFromMultipleInterfaces ByRef) method causing ambiguity.", ex.Message); 643Assert.Equal("BindAsyncFromMultipleInterfaces implements multiple interfaces defining a static System.Threading.Tasks.ValueTask`1[Microsoft.AspNetCore.Http.Extensions.Tests.ParameterBindingMethodCacheTests+BindAsyncFromMultipleInterfaces] BindAsync(Microsoft.AspNetCore.Http.HttpContext) method causing ambiguity.", ex.Message); 684Assert.Equal($"No public parameterless constructor found for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'.", ex.Message); 694Assert.Equal($"The abstract type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}' is not supported.", ex.Message); 704Assert.Equal($"Only a single public parameterized constructor is allowed for type '{TypeNameHelper.GetTypeDisplayName(type, fullName: false)}'.", ex.Message); 716Assert.Equal( 1080Assert.Equal("bindAsyncRecord", parameter.Name); 1096Assert.Equal("bindAsyncStruct", parameter.Name);
ProblemDetailsDefaultWriterTest.cs (66)
52Assert.Equal(expectedProblem.Type, problemDetails.Type); 53Assert.Equal(expectedProblem.Title, problemDetails.Title); 54Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 55Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 56Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 157Assert.Equal(expectedProblem.Type, problemDetails.Type); 158Assert.Equal(expectedProblem.Title, problemDetails.Title); 159Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 160Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 161Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 197Assert.Equal(expectedProblem.Type, problemDetails.Type); 198Assert.Equal(expectedProblem.Title, problemDetails.Title); 199Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 200Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 201Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 237Assert.Equal(expectedProblem.Type, problemDetails.Type); 238Assert.Equal(expectedProblem.Title, problemDetails.Title); 239Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 240Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 241Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 276Assert.Equal(expectedProblem.Type, problemDetails.Type); 277Assert.Equal(expectedProblem.Title, problemDetails.Title); 278Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 279Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 281Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 319Assert.Equal(expectedProblem.Type, problemDetails.Type); 320Assert.Equal(expectedProblem.Title, problemDetails.Title); 321Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 322Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 324Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 362Assert.Equal(expectedProblem.Type, problemDetails.Type); 363Assert.Equal(expectedProblem.Title, problemDetails.Title); 364Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 365Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 366Assert.Equal(expectedProblem.ExtraProperty, problemDetails.ExtraProperty); 367Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 405Assert.Equal(expectedProblem.Type, problemDetails.Type); 406Assert.Equal(expectedProblem.Title, problemDetails.Title); 407Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 408Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 409Assert.Equal(expectedProblem.ExtraProperty, problemDetails.ExtraProperty); 410Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 448Assert.Equal(expectedProblem.Type, problemDetails.Type); 449Assert.Equal(expectedProblem.Title, problemDetails.Title); 450Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 451Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 452Assert.Equal(expectedProblem.ExtraProperty, problemDetails.ExtraProperty); 453Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 484Assert.Equal("Extension1", extension.Key); 485Assert.Equal("Extension1-Value", extension.Value.ToString()); 489Assert.Equal("Extension2", extension.Key); 490Assert.Equal("Extension2-Value", extension.Value.ToString()); 494Assert.Equal("traceId", extension.Key); 495Assert.Equal(expectedTraceId, extension.Value.ToString()); 532Assert.Equal("Extension", extension.Key); 536Assert.Equal(expectedExtension.GetProperty("data").GetString(), value.GetProperty("data").GetString()); 540Assert.Equal("traceId", extension.Key); 541Assert.Equal(expectedTraceId, extension.Value.ToString()); 562Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", problemDetails.Type); 563Assert.Equal("An error occurred while processing your request.", problemDetails.Title); 564Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 598Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", problemDetails.Type); 599Assert.Equal("Custom Title", problemDetails.Title); 601Assert.Equal(expectedTraceId, problemDetails.Extensions["traceId"].ToString()); 630Assert.Equal(type, problemDetails.Type); 631Assert.Equal(title, problemDetails.Title);
ProblemDetailsServiceCollectionExtensionsTest.cs (1)
236Assert.Equal("Microsoft.AspNetCore.Http.ProblemDetailsJsonContext", jsonOptions.Value.SerializerOptions.TypeInfoResolverChain[1].GetType().FullName);
ProblemDetailsServiceTest.cs (3)
33Assert.Equal("\"SecondWriter\"", Encoding.UTF8.GetString(stream.ToArray())); 60Assert.Equal("\"SecondWriter\"", Encoding.UTF8.GetString(stream.ToArray())); 110Assert.Equal(string.Empty, Encoding.UTF8.GetString(stream.ToArray()));
PropertyAsParameterInfoTests.cs (2)
18Assert.Equal(propertyInfo.Name, parameterInfo.Name); 31Assert.Equal(propertyInfo.Name, parameterInfo.Name);
QueryBuilderTests.cs (10)
14Assert.Equal(string.Empty, builder.ToString()); 22Assert.Equal("?key=value", builder.ToString()); 30Assert.Equal("?key=value%201", builder.ToString()); 38Assert.Equal("?key%26=value%23", builder.ToString()); 48Assert.Equal("?key1=value1&key2=value2&key3=value3", builder.ToString()); 56Assert.Equal("?key=value1&key=value2&key=value3", builder.ToString()); 68Assert.Equal("?key1=value1&key2=value2&key3=value3", builder.ToString()); 80Assert.Equal("?key1=value1&key1=&key1=value3&key2=", builder.ToString()); 92Assert.Equal("?key1=value1&key2=value2&key3=value3", builder.ToString()); 105Assert.Equal("?key1=value1&key2=value2&key3=value3", builder1.ToString());
RequestDelegateFactoryTests.cs (44)
213Assert.Equal("handler", exNullAction.ParamName); 214Assert.Equal("methodInfo", exNullMethodInfo1.ParamName); 293Assert.Equal("'id' is not a route parameter.", ex.Message); 439Assert.Equal("myNullableBindAsyncStruct", parameter.Name); 455Assert.Equal("myBindAsyncStruct", parameter.Name); 494Assert.Equal("myAwaitedBindAsyncStruct", parameter.Name); 512Assert.Equal("myBothBindAsyncStruct", parameter.Name); 730Assert.Equal("notTryParsable must have a valid TryParse method to support converting from a string. No public static bool object.TryParse(string, out object) method found for notTryParsable.", ex.Message); 739Assert.Equal("Encountered a parameter of type 'System.Runtime.CompilerServices.Closure' without a name. Parameters must have a name.", ex.Message); 773Assert.Equal(@"Failed to bind parameter ""Nullable<int>[] values"" from """".", badHttpRequestException.Message); 879Assert.Equal(originalTodo.Name, ((ITodo)deserializedRequestBody!).Name); 910Assert.Equal("Unsupported return type: System.ReadOnlySpan<byte>", ex1.Message); 911Assert.Equal("Unsupported return type: System.Span<byte>", ex2.Message); 912Assert.Equal($"Unsupported return type: {typeof(RefStruct).FullName}", ex3.Message); 1022Assert.Equal(errorMessage, exception.Message); 1128Assert.Equal($"The by reference parameter 'out {typeName} foo' is not supported.", outParamException.Message); 1129Assert.Equal($"The by reference parameter 'in {typeName} foo' is not supported.", inParamException.Message); 1130Assert.Equal($"The by reference parameter 'ref {typeName} foo' is not supported.", refParamException.Message); 1163Assert.Equal("No service for type 'Microsoft.AspNetCore.Routing.Internal.RequestDelegateFactoryTests+MyService' has been registered.", ex.Message); 1360Assert.Equal("Write even more tests!", deserializedResponseBody!.Name); 1361Assert.Equal("With type hierarchies!", deserializedResponseBody!.Child); 1391Assert.Equal(nameof(JsonTodoChild), deserializedResponseBody["$type"]!.GetValue<string>()); 1485Assert.Equal("Still not enough tests!", decodedResponseBody); 1585Assert.Equal($@"Required parameter ""{expectedType}"" was not provided from query string.", log.Message); 1592Assert.Equal(expectedResponse, decodedResponseBody); 1686Assert.Equal(@"Required parameter ""MyNullableBindAsyncStruct myNullableBindAsyncStruct"" was not provided from MyNullableBindAsyncStruct.BindAsync(HttpContext, ParameterInfo).", log.Message); 1690Assert.Equal(@"Required parameter ""MyBindAsyncRecord myBindAsyncRecord"" was not provided from MyBindAsyncRecord.BindAsync(HttpContext, ParameterInfo).", log.Message); 1791Assert.Equal(expectedResponse, decodedResponseBody); 1821Assert.Equal(expectedResponse, decodedResponseBody); 1851Assert.Equal(expectedResponse, decodedResponseBody); 1878Assert.Equal(@"""Hello Tester. This is from an extension method.""", decodedResponseBody); 1918Assert.Equal(expectedResponse, decodedResponseBody); 1949Assert.Equal(@"Reading the request body failed with an IOException.", logMessage.Message); 1982Assert.Equal(@"Reading the request body failed with an IOException.", logMessage.Message); 2028Assert.Equal("Assigning a value to the IFromFormMetadata.Name property is not supported for parameters of type IFormFileCollection.", nse.Message); 2077Assert.Equal("Assigning a value to the IFromFormMetadata.Name property is not supported for parameters of type IFormCollection.", nse.Message); 2182Assert.Equal("Hello, TestName!", decodedResponseBody); 2228Assert.Equal("Hello, TestName!", decodedResponseBody); 2296Assert.Equal("foo", decodedResponseBody); 2391Assert.Equal(String.Empty, decodedResponseBody); 2428Assert.Equal(string.Empty, decodedResponseBody); 2513Assert.Equal("Test todo", deserializedResponseBody.Name); 2538Assert.Equal("application/json", Assert.Single(responseMetadata.ContentTypes)); 2550Assert.Equal("text/plain", Assert.Single(responseMetadata.ContentTypes));
RequestDelegateFactoryTests.FormMapping.cs (7)
61Assert.Equal("The number of elements in the dictionary exceeded the maximum number of '2' elements allowed.", exception.Message); 108Assert.Equal("The number of elements in the dictionary exceeded the maximum number of '2' elements allowed.", exception.Message); 156Assert.Equal("The number of elements in the dictionary exceeded the maximum number of '2' elements allowed.", exception.Message); 174Assert.Equal("Specified argument was out of the range of valid values.", anotherException.Message); 203Assert.Equal("Write tests", capturedTodo.Name); 282Assert.Equal("The maximum recursion depth of '3' was exceeded for 'Manager.Manager.Manager.Name'.", exception.Message); 303Assert.Equal("A test file", capturedArgument.Description);
RequestDelegateGenerator\CompileTimeCreationTests.AsParameters.cs (4)
33Assert.Equal(DiagnosticDescriptors.InvalidAsParametersNullable.Id, diagnostic.Id); 84Assert.Equal(diagnosticId, diagnostic.Id); 85Assert.Equal(message, diagnostic.GetMessage(CultureInfo.InvariantCulture)); 103Assert.Equal(DiagnosticDescriptors.InvalidAsParametersNested.Id, diagnostic.Id);
RequestDelegateGenerator\CompileTimeCreationTests.cs (13)
47Assert.Equal("'invalidName' is not a route parameter.", exception.Message); 201Assert.Equal(DiagnosticDescriptors.UnableToResolveAnonymousReturnType.Id, diagnostic.Id); 251Assert.Equal(DiagnosticDescriptors.TypeParametersNotSupported.Id, diagnostic.Id); 305Assert.Equal(DiagnosticDescriptors.InaccessibleTypesNotSupported.Id, diagnostic.Id); 351Assert.Equal(DiagnosticDescriptors.InaccessibleTypesNotSupported.Id, diagnostic.Id); 389Assert.All(TestSink.Writes, context => Assert.Equal("RequiredParameterNotProvided", context.EventId.Name)); 429Assert.Equal("JsonSerializerOptions instance must specify a TypeInfoResolver setting before being marked as read-only.", exception.Message); 460Assert.Equal(message, exception.Message); 566Assert.Equal(@"Implicit body inferred for parameter ""todo"" but no body was provided. Did you mean to use a Service instead?", log1.Message); 574Assert.Equal(@"Implicit body inferred for parameter ""todo1"" but no body was provided. Did you mean to use a Service instead?", log2.Message); 589Assert.Equal("MapGet", endpointModel.HttpMethod); 608Assert.Equal("MapGet", endpointModel.HttpMethod); 758Assert.Equal(DiagnosticDescriptors.UnableToResolveParameterDescriptor.Id, diagnostic.Id);
RequestDelegateGenerator\CompileTimeCreationTests.Routes.cs (3)
22Assert.Equal("MapGet", endpointModel.HttpMethod); 45Assert.Equal("MapGet", endpointModel.HttpMethod); 71Assert.Equal("MapGet", endpointModel.HttpMethod);
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (3)
185Assert.Equal(typeof(RequestDelegateGeneratorSources).Assembly.FullName, generatedCode.Tool); 257Assert.Equal(expectedContentType, httpContext.Response.ContentType); 266Assert.Equal(expectedBody, body);
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (30)
32Assert.Equal("MapGet", endpointModel.HttpMethod); 53Assert.Equal("MapGet", endpointModel.HttpMethod); 74Assert.Equal("MapGet", endpointModel.HttpMethod); 95Assert.Equal("MapGet", endpointModel.HttpMethod); 168Assert.Equal("MapGet", endpointModel.HttpMethod); 193Assert.Equal("MapGet", endpointModel.HttpMethod); 214Assert.Equal("MapGet", endpointModel.HttpMethod); 235Assert.Equal("MapGet", endpointModel.HttpMethod); 256Assert.Equal("MapGet", endpointModel.HttpMethod); 276Assert.Equal("MapGet", endpointModel.HttpMethod); 297Assert.Equal("MapGet", endpointModel.HttpMethod); 318Assert.Equal("MapGet", endpointModel.HttpMethod); 340Assert.Equal("MapGet", endpointModel.HttpMethod); 362Assert.Equal("MapGet", endpointModel.HttpMethod); 383Assert.Equal("MapGet", endpointModel.HttpMethod); 405Assert.Equal("MapGet", endpointModel.HttpMethod); 426Assert.Equal("MapGet", endpointModel.HttpMethod); 448Assert.Equal("MapGet", endpointModel.HttpMethod); 469Assert.Equal("MapGet", endpointModel.HttpMethod); 491Assert.Equal("MapGet", endpointModel.HttpMethod); 512Assert.Equal("MapGet", endpointModel.HttpMethod); 534Assert.Equal("MapGet", endpointModel.HttpMethod); 555Assert.Equal("MapGet", endpointModel.HttpMethod); 577Assert.Equal("MapGet", endpointModel.HttpMethod); 597Assert.Equal("MapPost", endpointModel.HttpMethod); 618Assert.Equal("MapPost", endpointModel.HttpMethod); 645Assert.Equal("MapMethods", endpointModel.HttpMethod); 672Assert.Equal("MapMethods", endpointModel.HttpMethod); 699Assert.Equal("MapMethods", endpointModel.HttpMethod); 726Assert.Equal("MapMethods", endpointModel.HttpMethod);
RequestDelegateGenerator\RequestDelegateCreationTests.AsParameters.cs (5)
347Assert.Equal(uriValue, value.Uri?.ToString()); 348Assert.Equal(uriValue, anotherValue.Uri?.ToString()); 395Assert.Equal(@"Required parameter ""string RequiredRouteParam"" was not provided from route.", logs[0].Message); 399Assert.Equal(@"Required parameter ""string RequiredQueryParam"" was not provided from query string.", logs[1].Message); 403Assert.Equal(@"Required parameter ""string RequiredHeaderParam"" was not provided from header.", logs[2].Message);
RequestDelegateGenerator\RequestDelegateCreationTests.BindAsync.cs (8)
104Assert.Equal("The request is missing the required Referer header.", ex.Message); 133Assert.Equal("The request is missing the required Referer header.", ex.Message); 148Assert.Equal($@"Required parameter ""{bindAsyncType} myBindAsyncParam"" was not provided from {bindAsyncType}.BindAsync{parameters}.", log.Message); 198Assert.Equal("BindAsync failed", ex.Message); 251Assert.Equal("https://example.org/", arg!.Uri.ToString()); 254Assert.Equal("Write more tests!", todo!.Name); 307Assert.Equal("Write more tests!", todo0!.Name); 310Assert.Equal("Write more tests!", todo1!.Name);
RequestDelegateGenerator\RequestDelegateCreationTests.cs (10)
36Assert.Equal("MapGet", endpointModel.HttpMethod); 57Assert.Equal("MapGet", endpointModel.HttpMethod); 63Assert.Equal("req", reqParam.SymbolName); 68Assert.Equal("res", reqParam.SymbolName); 92Assert.Equal("MapGet", endpointModel.HttpMethod); 129Assert.Equal("MapGet", endpointModel.HttpMethod); 136Assert.Equal("MapGet", endpointModel.HttpMethod); 143Assert.Equal("MapGet", endpointModel.HttpMethod); 148Assert.Equal("req", reqParam.SymbolName); 153Assert.Equal("res", reqParam.SymbolName);
RequestDelegateGenerator\RequestDelegateCreationTests.Filters.cs (2)
105Assert.Equal("New response", problemDetails.Detail); 623Assert.Equal("Test todo", todo.Name);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (38)
113Assert.Equal("file.txt", fileArgument!.FileName); 114Assert.Equal("file", fileArgument.Name); 151Assert.Equal("file.txt", fileArgument!.FileName); 152Assert.Equal("file", fileArgument.Name); 189Assert.Equal("file1.txt", file1Argument!.FileName); 190Assert.Equal("file1", file1Argument.Name); 194Assert.Equal("file2.txt", file2Argument!.FileName); 195Assert.Equal("file2", file2Argument.Name); 267Assert.Equal("file.txt", fileArgument!.FileName); 268Assert.Equal("my_file", fileArgument.Name); 304Assert.Equal("file.txt", fileArgument!.FileName); 305Assert.Equal("file", fileArgument.Name); 308Assert.Equal("my-trace-id", traceIdArgument.Id); 336Assert.Equal("Expected a supported form media type but got \"application/xml\".", ex.Message); 347Assert.Equal("Expected a supported form media type but got \"application/xml\".", logMessage.Message); 414Assert.Equal("file.txt", fileArgument!.FileName); 415Assert.Equal("file", fileArgument.Name); 461Assert.Equal("file.txt", fileArgument!.FileName); 462Assert.Equal("file", fileArgument.Name); 465Assert.Equal("my-trace-id", traceIdArgument.Id); 506Assert.Equal("file.txt", fileArgument!.FileName); 507Assert.Equal("file", fileArgument.Name); 510Assert.Equal("my-trace-id", traceIdArgument.Id); 562Assert.Equal("message", item.Key); 563Assert.Equal("hello", item.Value); 567Assert.Equal("name", item.Key); 568Assert.Equal("foo", item.Value); 609Assert.Equal("message", item.Key); 610Assert.Equal("hello", item.Value); 614Assert.Equal("name", item.Key); 615Assert.Equal("foo", item.Value); 776Assert.Equal("my-trace-id", traceIdArgument.Id); 840Assert.Equal("file.txt", formFilesArgument!["file"]!.FileName); 847Assert.Equal("name", item.Key); 848Assert.Equal("foo", item.Value); 943Assert.Equal("Reading the request body failed with an IOException.", logMessage.Message); 977Assert.Equal(@"Failed to read parameter ""IFormFile file"" from the request body as form.", logMessage.Message); 1016Assert.Equal(@"Failed to read parameter ""IFormFile file"" from the request body as form.", badHttpRequestException.Message);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBody.cs (1)
477Assert.Equal(@"Required parameter ""Todo todo"" was not provided from body.", log.Message);
RequestDelegateGenerator\RequestDelegateCreationTests.JsonBodyOrService.cs (1)
134Assert.Equal(@"Implicit body inferred for parameter ""todo"" but no body was provided. Did you mean to use a Service instead?", log.Message);
RequestDelegateGenerator\RequestDelegateCreationTests.KeyServices.cs (4)
50Assert.Equal($"The {nameof(FromKeyedServicesAttribute)} is not supported on parameters that are also annotated with {nameof(IFromServiceMetadata)}.", exception.Message); 129Assert.Equal("No service for type 'Microsoft.AspNetCore.Http.Generators.Tests.TestService' has been registered.", exception.Message); 218Assert.Equal("Unable to resolve service referenced by FromKeyedServicesAttribute. The service provider doesn't support keyed services.", runtimeException.Message); 225Assert.Equal("Unable to resolve service referenced by FromKeyedServicesAttribute. The service provider doesn't support keyed services.", exception.Message);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (23)
51Assert.Equal(@"Required parameter ""StringValues headerValues"" was not provided from header.", logs[0].Message); 59Assert.Equal(@"Required parameter ""StringValues queryValues"" was not provided from query string.", logs[1].Message); 67Assert.Equal(@"Required parameter ""StringValues formValues"" was not provided from form.", logs[2].Message); 75Assert.Equal(@"Required parameter ""string routeValues"" was not provided from route.", logs[3].Message); 114Assert.Equal(@"Failed to bind parameter ""int tryParsable"" from ""invalid!"".", logs[0].Message); 122Assert.Equal(@"Failed to bind parameter ""int tryParsable2"" from ""invalid again!"".", logs[1].Message); 164Assert.Equal(@"Failed to bind parameter ""int tryParsable"" from ""invalid!"".", badHttpRequestException.Message); 201Assert.Equal(@"Failed to bind parameter ""int[] values"" from ""NAN"".", badHttpRequestException.Message); 234Assert.Equal(@"Required parameter ""MyBindAsyncRecord myBindAsyncParam1"" was not provided from MyBindAsyncRecord.BindAsync(HttpContext, ParameterInfo).", logs[0].Message); 242Assert.Equal(@"Required parameter ""MyBindAsyncRecord myBindAsyncParam2"" was not provided from MyBindAsyncRecord.BindAsync(HttpContext, ParameterInfo).", logs[1].Message); 281Assert.Equal(@"Required parameter ""MyBindAsyncRecord myBindAsyncParam1"" was not provided from MyBindAsyncRecord.BindAsync(HttpContext, ParameterInfo).", badHttpRequestException.Message); 314Assert.Equal(@"Required parameter ""MySimpleBindAsyncRecord mySimpleBindAsyncRecord1"" was not provided from MySimpleBindAsyncRecord.BindAsync(HttpContext).", logs[0].Message); 322Assert.Equal(@"Required parameter ""MySimpleBindAsyncRecord mySimpleBindAsyncRecord2"" was not provided from MySimpleBindAsyncRecord.BindAsync(HttpContext).", logs[1].Message); 360Assert.Equal(@"Required parameter ""MySimpleBindAsyncRecord mySimpleBindAsyncRecord1"" was not provided from MySimpleBindAsyncRecord.BindAsync(HttpContext).", badHttpRequestException.Message); 393Assert.Equal("Expected a supported JSON media type but got \"application/xml\".", ex.Message); 404Assert.Equal("Expected a supported JSON media type but got \"application/xml\".", logMessage.Message); 442Assert.Equal("Expected a supported JSON media type but got \"application/xml\".", ex.Message); 453Assert.Equal("Expected a supported JSON media type but got \"application/xml\".", logMessage.Message); 494Assert.Equal("Reading the request body failed with an IOException.", logMessage.Message); 532Assert.Equal(@"Failed to read parameter ""Todo todo"" from the request body as JSON.", logMessage.Message); 574Assert.Equal(@"Failed to read parameter ""Todo todo"" from the request body as JSON.", badHttpRequestException.Message); 612Assert.Equal(@"Failed to read parameter ""Todo todo"" from the request body as JSON.", logMessage.Message); 653Assert.Equal(@"Failed to read parameter ""Todo todo"" from the request body as JSON.", badHttpRequestException.Message);
RequestDelegateGenerator\RequestDelegateCreationTests.Metadata.cs (9)
35Assert.Equal("text/plain", metadata.ContentTypes.Single()); 51Assert.Equal("application/json", metadata.ContentTypes.Single()); 81Assert.Equal("text/plain", metadata.ContentTypes.Single()); 95Assert.Equal("text/plain", metadata.ContentTypes.Single()); 109Assert.Equal("text/plain", metadata.ContentTypes.Single()); 123Assert.Equal("text/plain", metadata.ContentTypes.Single()); 138Assert.Equal("application/problem+json", metadata.ContentTypes.Single()); 181Assert.Equal("application/json", Assert.Single(responseMetadata.ContentTypes)); 195Assert.Equal("text/plain", Assert.Single(responseMetadata.ContentTypes));
RequestDelegateGenerator\RequestDelegateCreationTests.QueryParameters.cs (5)
72Assert.Equal($@"Required parameter ""{expectedType}"" was not provided from {parameterSource}.", log.Message); 79Assert.Equal(expectedResponse, decodedResponseBody); 93Assert.Equal("MapGet", endpointModel.HttpMethod); 117Assert.Equal("MapGet", endpointModel.HttpMethod); 171Assert.Equal("MapGet", endpointModel.HttpMethod);
RequestDelegateGenerator\RequestDelegateCreationTests.Responses.cs (22)
33Assert.Equal(httpMethod, endpointModel.HttpMethod); 58Assert.Equal("MapGet", endpointModel.HttpMethod); 80Assert.Equal("MapGet", endpointModel.HttpMethod); 114Assert.Equal("MapGet", endpointModel.HttpMethod); 138Assert.Equal("MapGet", endpointModel.HttpMethod); 165Assert.Equal("MapGet", endpointModel.HttpMethod); 190Assert.Equal("MapGet", endpointModel.HttpMethod); 218Assert.Equal("MapGet", endpointModel.HttpMethod); 240Assert.Equal("MapGet", endpointModel.HttpMethod); 246Assert.Equal("MapGet", endpointModel.HttpMethod); 321Assert.Equal("Write even more tests!", deserializedResponseBody!.Name); 393Assert.Equal("Write even more tests!", todo.Name); 470Assert.Equal("Write even more tests!", todo!.Name); 491Assert.Equal("Bob", todo.Name); 572Assert.Equal("Write even more tests!", todo!.Name); 573Assert.Equal("With type hierarchies!", todo!.Child); 656Assert.Equal("Write even more tests!", todo!.Name); 657Assert.Equal("With type hierarchies!", todo!.Child); 680Assert.Equal(nameof(JsonTodoChild), node["$type"]!.GetValue<string>()); 765Assert.Equal("text/plain; charset=utf-8", httpContext.Response.ContentType); 780Assert.Equal("binary; charset=utf-31", httpContext.Response.ContentType); 992Assert.Equal("MapGet", endpointModel.HttpMethod);
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (3)
166Assert.Equal("MapGet", endpointModel.HttpMethod); 189Assert.Equal("MapGet", endpointModel.HttpMethod); 230Assert.Equal("MapGet", endpointModel.HttpMethod);
RequestDelegateGenerator\RuntimeCreationTests.ComplexFormBinding.cs (3)
41Assert.Equal("Write tests", todo.Name); 77Assert.Equal("Write tests", todo.Name); 185Assert.Equal(@"Failed to bind parameter ""Dictionary<string, bool> elements"" from the request body as form.", log.Message);
RequestDelegateGenerator\SharedTypes.cs (1)
205Assert.Equal("customTodo", parameter.Name);
ResponseExtensionTests.cs (2)
21Assert.Equal(string.Empty, context.Response.Headers["custom"].ToString()); 47Assert.Equal(location, context.Response.Headers.Location.First());
SendFileResponseExtensionsTests.cs (1)
28Assert.Equal("bob", fakeFeature.Name);
UriHelperTests.cs (9)
13Assert.Equal("/", result); 22Assert.Equal("/un%3Fescaped/base/un%3Fescaped?name=val%23ue#my%20value", result); 30Assert.Equal("http:///", result); 39Assert.Equal("http://my.xn--host-cpd:80/un%3Fescaped/base/un%3Fescaped?name=val%23ue#my%20value", result); 80Assert.Equal(expectedUri, uri); 93Assert.Equal("http://my.xn--host-cpd:80/un%3Fescaped/base/un%3Fescaped?name=val%23ue", request.GetEncodedUrl()); 108Assert.Equal("http://my.hoψst:80" + pathBase + "/un?escaped?name=val%23ue", request.GetDisplayUrl()); 142Assert.Equal(scheme, expectedScheme); 166Assert.Equal(scheme, resScheme);
Microsoft.AspNetCore.Http.Microbenchmarks (4)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (3)
185Assert.Equal(typeof(RequestDelegateGeneratorSources).Assembly.FullName, generatedCode.Tool); 257Assert.Equal(expectedContentType, httpContext.Response.ContentType); 266Assert.Equal(expectedBody, body);
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
205Assert.Equal("customTodo", parameter.Name);
Microsoft.AspNetCore.Http.Results.Tests (371)
AcceptedAtRouteOfTResultTests.cs (3)
60Assert.Equal("\"Hello world\"", response); 99Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]); 204Assert.Equal(value, result.Value);
AcceptedAtRouteResultTests.cs (1)
53Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
AcceptedOfTResultTests.cs (3)
29Assert.Equal("\"Hello world\"", response); 45Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]); 128Assert.Equal(value, result.Value);
AcceptedResultTests.cs (1)
29Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
BadRequestOfTResultTests.cs (2)
81Assert.Equal("\"Hello\"", Encoding.UTF8.GetString(stream.ToArray())); 171Assert.Equal(value, result.Value);
ConflictOfTResultTests.cs (2)
80Assert.Equal("\"Hello\"", Encoding.UTF8.GetString(stream.ToArray())); 149Assert.Equal(value, result.Value);
ContentResultTests.cs (3)
30Assert.Equal("text/plain; charset=utf-16", httpContext.Response.ContentType); 121Assert.Equal(expectedContentType, finalResponseContentType); 145Assert.Equal(contentType, result.ContentType);
CreatedAtRouteOfTResultTests.cs (2)
69Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]); 171Assert.Equal(value, result.Value);
CreatedAtRouteResultTests.cs (1)
52Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
CreatedOfTResultTests.cs (4)
58Assert.Equal(location, httpContext.Response.Headers["Location"]); 75Assert.Equal(location, httpContext.Response.Headers["Location"]); 94Assert.Equal("\"testInput\"", response); 168Assert.Equal(value, result.Value);
CreatedResultTests.cs (2)
43Assert.Equal(location, httpContext.Response.Headers["Location"]); 60Assert.Equal(location, httpContext.Response.Headers["Location"]);
FileContentResultTests.cs (3)
46Assert.Equal(contentType, result.ContentType); 47Assert.Equal(downloadName, result.FileDownloadName); 59Assert.Equal(contentType, result.ContentType);
HttpFileStreamResultTests.cs (5)
55Assert.Equal(expectedMediaType, result.ContentType); 78Assert.Equal(expectedMediaType, result.ContentType); 101Assert.Equal(contentType, result.ContentType); 102Assert.Equal(downloadName, result.FileDownloadName); 114Assert.Equal(contentType, result.ContentType);
HttpResultsHelperTests.cs (12)
42Assert.Equal("Write even more tests!", body!.Name); 74Assert.Equal("Write even more tests!", body!.Name); 107Assert.Equal("Write even more tests!", body!.Name); 109Assert.Equal("With type hierarchies!", body!.Child); 141Assert.Equal("Write even more tests!", body!.Name); 143Assert.Equal("With type hierarchies!", body!.Child); 175Assert.Equal("Write even more tests!", body!.Name); 177Assert.Equal("With type hierarchies!", body!.Child); 207Assert.Equal("One", one.Name); 212Assert.Equal("Two", two.Name); 217Assert.Equal("Three", three.Name); 218Assert.Equal("ThreeChild", three.Child);
InternalServerErrorOfTResultTests.cs (2)
81Assert.Equal("\"Hello\"", Encoding.UTF8.GetString(stream.ToArray())); 171Assert.Equal(value, result.Value);
JsonResultTests.cs (11)
74Assert.Equal("\"Hello\"", Encoding.UTF8.GetString(stream.ToArray())); 107Assert.Equal(value.Title, responseDetails.Title); 108Assert.Equal(value.Description, responseDetails.Description); 111Assert.Equal(JsonSerializer.Serialize(value, options: jsonOptions), Encoding.UTF8.GetString(stream.ToArray())); 138Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", responseDetails.Type); 139Assert.Equal("An error occurred while processing your request.", responseDetails.Title); 167Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", responseDetails.Type); 168Assert.Equal("One or more validation errors occurred.", responseDetails.Title); 200Assert.Equal("I'm a teapot", responseDetails.Title); 264Assert.Equal(contentType, result.ContentType); 312Assert.Equal(value, result.Value);
LocalRedirectResultTests.cs (3)
72Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString()); 93Assert.Equal( 114Assert.Equal(
NotFoundOfTResultTests.cs (2)
48Assert.Equal("Test Content", notFound.Value); 131Assert.Equal(value, result.Value);
OkOfTResultTests.cs (3)
27Assert.Equal(value, result.Value); 62Assert.Equal("\"Hello\"", Encoding.UTF8.GetString(stream.ToArray())); 148Assert.Equal(value, result.Value);
PhysicalFileResultTest.cs (3)
48Assert.Equal(contentType, result.ContentType); 49Assert.Equal(downloadName, result.FileDownloadName); 61Assert.Equal(contentType, result.ContentType);
ProblemResultTests.cs (8)
41Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", responseDetails.Type); 42Assert.Equal("An error occurred while processing your request.", responseDetails.Title); 74Assert.Equal("An error occurred while processing your request.", responseDetails.Title); 102Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", responseDetails.Type); 103Assert.Equal("One or more validation errors occurred.", responseDetails.Title); 135Assert.Equal("I'm a teapot", responseDetails.Title); 168Assert.Equal("testError", error.Key); 249Assert.Equal("application/problem+json", result.ContentType);
PushStreamResultTests.cs (7)
26Assert.Equal("Hello World", Encoding.UTF8.GetString(ms.ToArray())); 27Assert.Equal("application/octet-stream", result.ContentType); 43Assert.Equal(expectedMediaType, result.ContentType); 67Assert.Equal(expectedMediaType, result.ContentType); 90Assert.Equal(contentType, result.ContentType); 91Assert.Equal(downloadName, result.FileDownloadName); 103Assert.Equal(contentType, result.ContentType);
RedirectToRouteResultTests.cs (3)
48Assert.Equal(locationUrl, httpContext.Response.Headers["Location"]); 66Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]); 84Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
ResultsCacheTests.cs (1)
22Assert.Equal(currentContent, generatedContent);
ResultsTests.cs (92)
35Assert.Equal(uri, result.Location); 51Assert.Equal(uri, result.Location); 66Assert.Equal(uri, result.Location); 93Assert.Equal(routeName, result.RouteName); 111Assert.Equal(routeName, result.RouteName); 143Assert.Equal(routeName, result.RouteName); 161Assert.Equal(routeName, result.RouteName); 206Assert.Equal(routeName, result.RouteName); 276Assert.Equal(contentType ?? "application/octet-stream", result.ContentType); 277Assert.Equal(fileDownloadName, result.FileDownloadName); 312Assert.Equal(contentType ?? "application/octet-stream", fileStreamResult.ContentType); 313Assert.Equal(fileDownloadName, fileStreamResult.FileDownloadName); 321Assert.Equal(contentType ?? "application/octet-stream", pushStreamResult.ContentType); 322Assert.Equal(fileDownloadName, pushStreamResult.FileDownloadName); 464Assert.Equal(authenticationSchemes?.First(), result.AuthenticationScheme); 531Assert.Equal(content, result.ResponseContent); 532Assert.Equal(mediaType.ToString(), result.ContentType); 548Assert.Equal(content, result.ResponseContent); 549Assert.Equal("text/plain; charset=utf-8", result.ContentType); 566Assert.Equal(content, result.ResponseContent); 567Assert.Equal("text/plain; charset=utf-8", result.ContentType); 592Assert.Equal(uri, result.Location); 608Assert.Equal(uri, result.Location); 623Assert.Equal(uri, result.Location); 638Assert.Equal(uri.ToString(), result.Location); 654Assert.Equal(uri.ToString(), result.Location); 669Assert.Equal(uri.ToString(), result.Location); 757Assert.Equal(routeName, result.RouteName); 775Assert.Equal(routeName, result.RouteName); 821Assert.Equal(routeName, result.RouteName); 839Assert.Equal(routeName, result.RouteName); 856Assert.Equal(routeName, result.RouteName); 873Assert.Equal(routeName, result.RouteName); 903Assert.Equal(routeName, result.RouteName); 944Assert.Equal(contentType, result.ContentType); 963Assert.Equal(contentType, result.ContentType); 1052Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'Microsoft.AspNetCore.Http.HttpResults.ResultsTests+Todo' from the context '{typeof(StringJsonContext).FullName}'."); 1059Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'Microsoft.AspNetCore.Http.HttpResults.ResultsTests+Todo' from the context '{typeof(StringJsonContext).FullName}'."); 1096Assert.Equal(localUrl, result.Url); 1113Assert.Equal(localUrl, result.Url); 1131Assert.Equal(localUrl, result.Url); 1149Assert.Equal(localUrl, result.Url); 1262Assert.Equal(detail, result.ProblemDetails.Detail); 1263Assert.Equal(instance, result.ProblemDetails.Instance); 1264Assert.Equal("application/problem+json", result.ContentType); 1266Assert.Equal(title, result.ProblemDetails.Title); 1267Assert.Equal(type, result.ProblemDetails.Type); 1286Assert.Equal(detail, result.ProblemDetails.Detail); 1287Assert.Equal(instance, result.ProblemDetails.Instance); 1288Assert.Equal("application/problem+json", result.ContentType); 1290Assert.Equal(title, result.ProblemDetails.Title); 1291Assert.Equal(type, result.ProblemDetails.Type); 1310Assert.Equal(detail, result.ProblemDetails.Detail); 1311Assert.Equal(instance, result.ProblemDetails.Instance); 1312Assert.Equal("application/problem+json", result.ContentType); 1314Assert.Equal(title, result.ProblemDetails.Title); 1315Assert.Equal(type, result.ProblemDetails.Type); 1333Assert.Equal("application/problem+json", result.ContentType); 1335Assert.Equal(title, result.ProblemDetails.Title); 1336Assert.Equal(type, result.ProblemDetails.Type); 1350Assert.Equal("application/problem+json", result.ContentType); 1352Assert.Equal("An error occurred while processing your request.", result.ProblemDetails.Title); 1353Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", result.ProblemDetails.Type); 1368Assert.Equal("Test title", result.ProblemDetails.Title); 1369Assert.Equal("application/problem+json", result.ContentType); 1384Assert.Equal("Test title", result.ProblemDetails.Title); 1385Assert.Equal("application/problem+json", result.ContentType); 1416Assert.Equal(detail, result.ProblemDetails.Detail); 1417Assert.Equal(instance, result.ProblemDetails.Instance); 1420Assert.Equal(title, result.ProblemDetails.Title); 1421Assert.Equal(type, result.ProblemDetails.Type); 1422Assert.Equal("application/problem+json", result.ContentType); 1447Assert.Equal(detail, result.ProblemDetails.Detail); 1448Assert.Equal(instance, result.ProblemDetails.Instance); 1451Assert.Equal(title, result.ProblemDetails.Title); 1452Assert.Equal(type, result.ProblemDetails.Type); 1453Assert.Equal("application/problem+json", result.ContentType); 1479Assert.Equal(url, result.Url); 1495Assert.Equal(url, result.Url); 1511Assert.Equal(url, result.Url); 1529Assert.Equal(routeName, result.RouteName); 1533Assert.Equal(fragment, result.Fragment); 1548Assert.Equal(routeName, result.RouteName); 1552Assert.Equal(fragment, result.Fragment); 1602Assert.Equal(content, result.ResponseContent); 1603Assert.Equal(contentType, result.ContentType); 1619Assert.Equal(contentType, result.ContentType); 1636Assert.Equal(contentType, result.ContentType); 1652Assert.Equal(content, result.ResponseContent); 1655Assert.Equal(expectedMediaType.ToString(), result.ContentType); 1672Assert.Equal(content, result.ResponseContent); 1675Assert.Equal(expectedMediaType.ToString(), result.ContentType);
src\Shared\ResultsTests\FileContentResultTestBase.cs (24)
81Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 82Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 84Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 86Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 88Assert.Equal(expectedString, body); 119Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 120Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 123Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 125Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 127Assert.Equal("Hello", body); 159Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 160Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 161Assert.Equal("Hello World", body); 193Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 194Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 195Assert.Equal("Hello World", body); 225Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 226Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 227Assert.Equal("Hello World", body); 255Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 256Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 258Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 259Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 350Assert.Equal(expectedContentType, httpContext.Response.ContentType);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (28)
60Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 61Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 63Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 64Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 66Assert.Equal(expectedString, body); 100Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 101Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 104Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 105Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 107Assert.Equal("Hello", body); 142Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 143Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 144Assert.Equal("Hello World", body); 179Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 180Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 181Assert.Equal("Hello World", body); 213Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 214Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 215Assert.Equal("Hello World", body); 245Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 246Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 248Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 249Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 360Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 361Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 364Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 365Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 417Assert.Equal(expectedContentType, httpContext.Response.ContentType);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (19)
56Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 57Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 60Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 86Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 88Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 90Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 92Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 119Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 146Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 175Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 204Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 205Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 310Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 316Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 317Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 336Assert.Equal(expectedContentType, httpContext.Response.ContentType); 337Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile_ASCII.txt")), sendFile.Name); 357Assert.Equal(Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 387Assert.Equal(expectedMessage, ex.Message);
src\Shared\ResultsTests\RedirectResultTestBase.cs (2)
34Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString()); 57Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString());
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (25)
68Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 69Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 72Assert.Equal(path, sendFileFeature.Name); 104Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 106Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 107Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 109Assert.Equal(path, sendFileFeature.Name); 141Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 142Assert.Equal(path, sendFileFeature.Name); 174Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 175Assert.Equal(path, sendFileFeature.Name); 210Assert.Equal(path, sendFileFeature.Name); 246Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 247Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 345Assert.Equal(Path.Combine("TestFiles", "FilePathResultTestFile.txt"), sendFile.Name); 351Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 352Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 371Assert.Equal(expectedContentType, httpContext.Response.ContentType); 372Assert.Equal("FilePathResultTestFile_ASCII.txt", sendFileFeature.Name); 389Assert.Equal(path, sendFileFeature.Name); 412Assert.Equal(path, sendFileFeature.Name); 435Assert.Equal(expectedPath, sendFileFeature.Name); 461Assert.Equal(expectedData, contents); 481Assert.Equal(expectedMessage, ex.Message); 482Assert.Equal(path, ex.FileName);
TypedResultsTests.cs (81)
34Assert.Equal(uri, result.Location); 49Assert.Equal(uri, result.Location); 63Assert.Equal(uri, result.Location); 78Assert.Equal(uri.ToString(), result.Location); 93Assert.Equal(uri.ToString(), result.Location); 121Assert.Equal(routeName, result.RouteName); 138Assert.Equal(routeName, result.RouteName); 254Assert.Equal(contentType ?? "application/octet-stream", result.ContentType); 255Assert.Equal(fileDownloadName, result.FileDownloadName); 280Assert.Equal(path, result.FileName); 281Assert.Equal(contentType ?? "application/octet-stream", result.ContentType); 282Assert.Equal(fileDownloadName, result.FileDownloadName); 299Assert.Equal(path, result.FileName); 300Assert.Equal(contentType ?? "application/octet-stream", result.ContentType); 301Assert.Equal(fileDownloadName, result.FileDownloadName); 396Assert.Equal(contentType ?? "application/octet-stream", fileStreamResult.ContentType); 397Assert.Equal(fileDownloadName, fileStreamResult.FileDownloadName); 405Assert.Equal(contentType ?? "application/octet-stream", pushStreamResult.ContentType); 406Assert.Equal(fileDownloadName, pushStreamResult.FileDownloadName); 474Assert.Equal(authenticationSchemes?.First(), result.AuthenticationScheme); 527Assert.Equal(content, result.ResponseContent); 528Assert.Equal(mediaType.ToString(), result.ContentType); 544Assert.Equal(content, result.ResponseContent); 545Assert.Equal("text/plain; charset=utf-8", result.ContentType); 562Assert.Equal(content, result.ResponseContent); 563Assert.Equal("text/plain; charset=utf-8", result.ContentType); 589Assert.Equal(uri, result.Location); 604Assert.Equal(uri, result.Location); 619Assert.Equal(uri.ToString(), result.Location); 634Assert.Equal(uri.ToString(), result.Location); 705Assert.Equal(routeName, result.RouteName); 722Assert.Equal(routeName, result.RouteName); 738Assert.Equal(routeName, result.RouteName); 839Assert.Equal(contentType, result.ContentType); 906Assert.Equal(ex.Message, $"Unable to obtain the JsonTypeInfo for type 'System.String' from the context '{typeof(ObjectJsonContext).FullName}'."); 940Assert.Equal(localUrl, result.Url); 957Assert.Equal(localUrl, result.Url); 975Assert.Equal(localUrl, result.Url); 993Assert.Equal(localUrl, result.Url); 1078Assert.Equal(detail, result.ProblemDetails.Detail); 1079Assert.Equal(instance, result.ProblemDetails.Instance); 1080Assert.Equal("application/problem+json", result.ContentType); 1082Assert.Equal(title, result.ProblemDetails.Title); 1083Assert.Equal(type, result.ProblemDetails.Type); 1102Assert.Equal(detail, result.ProblemDetails.Detail); 1103Assert.Equal(instance, result.ProblemDetails.Instance); 1104Assert.Equal("application/problem+json", result.ContentType); 1106Assert.Equal(title, result.ProblemDetails.Title); 1107Assert.Equal(type, result.ProblemDetails.Type); 1125Assert.Equal("application/problem+json", result.ContentType); 1127Assert.Equal(title, result.ProblemDetails.Title); 1128Assert.Equal(type, result.ProblemDetails.Type); 1142Assert.Equal("application/problem+json", result.ContentType); 1144Assert.Equal("An error occurred while processing your request.", result.ProblemDetails.Title); 1145Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", result.ProblemDetails.Type); 1160Assert.Equal("Test title", result.ProblemDetails.Title); 1161Assert.Equal("application/problem+json", result.ContentType); 1176Assert.Equal("Test title", result.ProblemDetails.Title); 1177Assert.Equal("application/problem+json", result.ContentType); 1203Assert.Equal(detail, result.ProblemDetails.Detail); 1204Assert.Equal(instance, result.ProblemDetails.Instance); 1207Assert.Equal(title, result.ProblemDetails.Title); 1208Assert.Equal(type, result.ProblemDetails.Type); 1209Assert.Equal("application/problem+json", result.ContentType); 1229Assert.Equal(detail, result.ProblemDetails.Detail); 1230Assert.Equal(instance, result.ProblemDetails.Instance); 1233Assert.Equal(title, result.ProblemDetails.Title); 1234Assert.Equal(type, result.ProblemDetails.Type); 1235Assert.Equal("application/problem+json", result.ContentType); 1261Assert.Equal(url, result.Url); 1277Assert.Equal(url, result.Url); 1293Assert.Equal(url, result.Url); 1311Assert.Equal(routeName, result.RouteName); 1315Assert.Equal(fragment, result.Fragment); 1381Assert.Equal(content, result.ResponseContent); 1382Assert.Equal(contentType, result.ContentType); 1398Assert.Equal(contentType, result.ContentType); 1431Assert.Equal(content, result.ResponseContent); 1434Assert.Equal(expectedMediaType.ToString(), result.ContentType); 1451Assert.Equal(content, result.ResponseContent); 1454Assert.Equal(expectedMediaType.ToString(), result.ContentType);
UnprocessableEntityOfTResultTests.cs (2)
79Assert.Equal("\"Hello\"", Encoding.UTF8.GetString(stream.ToArray())); 148Assert.Equal(value, result.Value);
Utf8ContentResultTests.cs (4)
26Assert.Equal("application/json charst=utf-8", result.ContentType); 45Assert.Equal("text/plain; charset=utf-8", context.Response.ContentType); 63Assert.Equal("text/plain; charset=utf-8", context.Response.ContentType); 74Assert.Equal(contentType, result.ContentType);
ValidationProblemResultTests.cs (4)
43Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", responseDetails.Type); 44Assert.Equal("One or more validation errors occurred.", responseDetails.Title); 76Assert.Equal("One or more validation errors occurred.", responseDetails.Title); 170Assert.Equal(contentType, result.ContentType);
VirtualFileResultTests.cs (3)
32Assert.Equal(contentType, result.ContentType); 33Assert.Equal(downloadName, result.FileDownloadName); 45Assert.Equal(contentType, result.ContentType);
Microsoft.AspNetCore.Http.Tests (76)
ApplicationBuilderTests.cs (1)
75Assert.Equal(expected, ex.Message);
BindingAddressTests.cs (12)
65Assert.Equal(scheme, serverAddress.Scheme); 66Assert.Equal(host, serverAddress.Host); 68Assert.Equal(pathBase, serverAddress.PathBase); 70Assert.Equal(toString ?? url, serverAddress.ToString()); 84Assert.Equal(scheme, serverAddress.Scheme); 85Assert.Equal(host, serverAddress.Host); 87Assert.Equal(pathBase, serverAddress.PathBase); 89Assert.Equal(toString ?? url, serverAddress.ToString()); 102Assert.Equal(scheme, serverAddress.Scheme); 103Assert.Equal(host, serverAddress.Host); 105Assert.Equal(pathBase, serverAddress.PathBase); 107Assert.Equal(toString ?? url, serverAddress.ToString());
DefaultHttpContextTests.cs (2)
24Assert.Equal("Session has not been configured for this application or request.", exception.Message); 103Assert.Equal("SomeAuthType", context.User.Identity.AuthenticationType);
Features\FormFeatureTests.cs (29)
43Assert.Equal("Form value count limit 1 exceeded.", exception.Message); 63Assert.Equal("bar", formCollection["foo"]); 64Assert.Equal("2", formCollection["baz"]); 105Assert.Equal("bar", formCollection["foo"]); 106Assert.Equal("2", formCollection["baz"]); 259Assert.Equal("Foo", formCollection["description"]); 301Assert.Equal("myfile1", file.Name); 302Assert.Equal("temp.html", file.FileName); 303Assert.Equal("text/html", file.ContentType); 304Assert.Equal(@"form-data; name=""myfile1""; filename=""temp.html""", file.ContentDisposition); 310Assert.Equal("<html><body>Hello World</body></html>", content); 344Assert.Equal("Foo", formCollection["description"]); 386Assert.Equal("myfile1", file.Name); 387Assert.Equal("t\u00e9mp.html", file.FileName); 388Assert.Equal("text/html", file.ContentType); 389Assert.Equal(@"form-data; name=""myfile1""; filename=""temp.html""; filename*=utf-8''t%c3%a9mp.html", file.ContentDisposition); 395Assert.Equal("<html><body>Hello World</body></html>", content); 429Assert.Equal("Foo", formCollection["description"]); 435Assert.Equal("text/html", file.ContentType); 436Assert.Equal(@"form-data; name=""myfile1""; filename=""temp.html""", file.ContentDisposition); 442Assert.Equal("<html><body>Hello World</body></html>", content); 469Assert.Equal("Form value count limit 2 exceeded.", exception.Message); 493Assert.Equal("Form value count limit 2 exceeded.", exception.Message); 517Assert.Equal("Form value count limit 2 exceeded.", exception.Message); 541Assert.Equal("Form value count limit 2 exceeded.", exception.Message); 578Assert.Equal("Foo", formCollection["description"]); 584Assert.Equal("text/html", file.ContentType); 585Assert.Equal(@"form-data; name=""myfile1""; filename=""temp.html""", file.ContentDisposition); 610Assert.Equal("Form section has invalid Content-Disposition value: " + InvalidContentDispositionValue, exception.Message);
Features\HttpRequestIdentifierFeatureTests.cs (1)
26Assert.Equal(id1, id2);
Features\QueryFeatureTests.cs (12)
21Assert.Equal("bar", queryCollection["foo"]); 37Assert.Equal("value1", queryCollection["key1"].FirstOrDefault()); 38Assert.Equal("value2", queryCollection["key2"].FirstOrDefault()); 57Assert.Equal(string.Empty, queryCollection[emptyParam]); 102Assert.Equal("valueB", queryCollection["key2"].FirstOrDefault()); 117Assert.Equal("valueB", queryCollection["key2"].FirstOrDefault()); 131Assert.Equal(string.Empty, queryCollection["key1"].FirstOrDefault()); 132Assert.Equal(string.Empty, queryCollection["key2"].FirstOrDefault()); 162Assert.Equal("", queryCollection["fields [todoItems]"].FirstOrDefault()); 176Assert.Equal("fields [todoItems]", queryCollection[""].FirstOrDefault()); 190Assert.Equal("", queryCollection["fields [todoItems]"].FirstOrDefault()); 204Assert.Equal("[ 1 ]", queryCollection["fields [todoItems]"].FirstOrDefault());
Features\RequestBodyPipeFeatureTests.cs (1)
38Assert.Equal(expectedString, GetStringFromReadResult(data));
HeaderDictionaryTests.cs (2)
33Assert.Equal("Value1", headers["header1"]); 83Assert.Equal("Value1", headers["header1"]);
Internal\DefaultHttpRequestTests.cs (13)
78Assert.Equal(expected, host.Value); 98Assert.Equal(expected, host.Value); 115Assert.Equal(expected, headers["Host"][0]); 122Assert.Equal(string.Empty, request.Scheme); 125Assert.Equal("https", request.Scheme); 127Assert.Equal("http", request.Scheme); 139Assert.Equal(string.Empty, requestFeature.QueryString); 149Assert.Equal("value0", query1["name0"]); 150Assert.Equal("value1", query1["name1"]); 159Assert.Equal("?name2=value2", requestFeature.QueryString); 181Assert.Equal("value0,", cookies1["name0"]); 182Assert.Equal("value1", cookies1["name1"]); 191Assert.Equal("value2", request.Cookies["name2"]);
RequestCookiesCollectionTests.cs (2)
55Assert.Equal(value, cookies.ElementAt(i).Value); 71Assert.Equal(c.ToString(), cookies.Single().Value);
ResponseCookiesTest.cs (1)
54Assert.Equal("The cookie 'TestCookie' has set 'SameSite=None' and must also set 'Secure'.", writeContext.Message);
Microsoft.AspNetCore.HttpLogging.Tests (77)
FileLoggerProcessorTests.cs (14)
53Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath)); 99Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePathToday)); 101Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePathTomorrow)); 140Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1)); 141Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2)); 192Assert.Equal("randomFile.txt", actualFiles[0]); 341Assert.Equal(GetLogFileName(options.FileName, _today, i + 2), actualFiles2[i]); 404Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1)); 405Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2)); 406Assert.Equal(_messageThree + Environment.NewLine, File.ReadAllText(filePath3)); 471Assert.Equal(_messageThree + Environment.NewLine, File.ReadAllText(filePath3)); 472Assert.Equal(_messageFour + Environment.NewLine, File.ReadAllText(filePath4)); 539Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1)); 540Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2));
HttpLoggingAttributeTests.cs (2)
12Assert.Equal(nameof(HttpLoggingAttribute.RequestBodyLogLimit), ex.ParamName); 15Assert.Equal(nameof(HttpLoggingAttribute.ResponseBodyLogLimit), ex.ParamName);
HttpLoggingEndpointConventionBuilderTests.cs (2)
46Assert.Equal("requestBodyLogLimit", ex.ParamName); 50Assert.Equal("responseBodyLogLimit", ex.ParamName);
HttpLoggingMiddlewareTests.cs (40)
352Assert.Equal(expected, body); 380Assert.Equal(expected, body); 1277Assert.Equal("No Content-Type header for request body.", contentTypeLog.Message); 1282Assert.Equal("Request and Response:", lines[i++]); 1283Assert.Equal("Protocol: HTTP/1.1", lines[i++]); 1284Assert.Equal("Method: GET", lines[i++]); 1285Assert.Equal("Scheme: http", lines[i++]); 1286Assert.Equal("PathBase: ", lines[i++]); 1287Assert.Equal("Path: /", lines[i++]); 1288Assert.Equal("Connection: Upgrade", lines[i++]); 1289Assert.Equal("Upgrade: websocket", lines[i++]); 1290Assert.Equal("StatusCode: 101", lines[i++]); 1291Assert.Equal("Connection: Upgrade", lines[i++]); 1530Assert.Equal("Request and Response:", lines[i++]); 1533Assert.Equal("Protocol: HTTP/1.0", lines[i++]); 1534Assert.Equal("Method: GET", lines[i++]); 1535Assert.Equal("Scheme: http", lines[i++]); 1536Assert.Equal("PathBase: /foo", lines[i++]); 1537Assert.Equal("Path: /foo", lines[i++]); 1538Assert.Equal("Connection: keep-alive", lines[i++]); 1541Assert.Equal("Content-Type: text/plain", lines[i++]); 1546Assert.Equal("StatusCode: 200", lines[i++]); 1547Assert.Equal("Transfer-Encoding: test", lines[i++]); 1550Assert.Equal("Content-Type: text/plain2", lines[i++]); 1555Assert.Equal("RequestBody: test", lines[i++]); 1556Assert.Equal("RequestBodyStatus: [Completed]", lines[i++]); 1560Assert.Equal("ResponseBody: test response", lines[i++]); 1592Assert.Equal("Request and Response:", lines[i++]); 1593Assert.Equal("Protocol: HTTP/1.0", lines[i++]); 1594Assert.Equal("Method: GET", lines[i++]); 1595Assert.Equal("Scheme: http", lines[i++]); 1596Assert.Equal("PathBase: /foo", lines[i++]); 1597Assert.Equal("Path: /foo", lines[i++]); 1598Assert.Equal("Connection: keep-alive", lines[i++]); 1599Assert.Equal("Content-Type: text/plain", lines[i++]); 1600Assert.Equal("StatusCode: 200", lines[i++]); 1601Assert.Equal("Transfer-Encoding: test", lines[i++]); 1602Assert.Equal("Content-Type: text/plain2", lines[i++]); 1603Assert.Equal("RequestBody: test", lines[i++]); 1604Assert.Equal("RequestBodyStatus: [Completed]", lines[i++]);
HttpLoggingServicesExtensionsTests.cs (2)
34Assert.Equal("Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddHttpLogging' in the application startup code.", ex.Message); 46Assert.Equal("Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddW3CLogging' in the application startup code.", ex.Message);
W3CLoggerTests.cs (5)
36Assert.Equal("#Version: 1.0", lines[0]); 45Assert.Equal("#Fields: date time", lines[2]); 80Assert.Equal("#Version: 1.0", lines[0]); 89Assert.Equal("#Fields: cs-uri-query sc-status cs-host", lines[2]); 90Assert.Equal("- - -", lines[3]);
W3CLoggingMiddlewareTests.cs (12)
91Assert.Equal("#Version: 1.0", lines[0]); 100Assert.Equal("#Fields: date time c-ip s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status time-taken cs-version cs-host cs(User-Agent) cs(Referer)", lines[2]); 136Assert.Equal("#Version: 1.0", lines[0]); 145Assert.Equal("#Fields: date time c-ip s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status time-taken cs-version cs-host cs(User-Agent) cs(Referer) cs(:invalid) cs(x-client-ssl-protocol) cs(x-forwarded-for)", lines[2]); 177Assert.Equal("Snickerdoodle", lines[3]); 209Assert.Equal("#Version: 1.0", lines[0]); 212Assert.Equal("#Fields: cs(x-forwarded-for)", lines[2]); 213Assert.Equal("1.3.3.7,+2001:db8:85a3:8d3:1319:8a2e:370:7348", lines[3]); 256Assert.Equal("#Version: 1.0", lines[0]); 265Assert.Equal("#Fields: date time c-ip s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status time-taken cs-version cs-host cs(User-Agent) cs(Cookie) cs(Referer) cs(:invalid) cs(x-client-ssl-protocol) cs(x-forwarded-for)", lines[2]); 294Assert.Equal("#Version: 1.0", lines[0]); 303Assert.Equal("#Fields: time-taken", lines[2]);
Microsoft.AspNetCore.HttpOverrides.Tests (47)
ForwardedHeadersMiddlewareTest.cs (37)
43Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString()); 81Assert.Equal(expectedIp, context.Connection.RemoteIpAddress.ToString()); 85Assert.Equal(header, context.Request.Headers["X-Forwarded-For"]); 139Assert.Equal(expectedIp, context.Connection.RemoteIpAddress.ToString()); 141Assert.Equal(remainingHeader, context.Request.Headers["X-Forwarded-For"].ToString()); 179Assert.Equal("10.0.0.1", context.Connection.RemoteIpAddress.ToString()); 182Assert.Equal(new IPEndPoint(IPAddress.Parse(originalIp), 99).ToString(), 187Assert.Equal(originalIp, context.Connection.RemoteIpAddress.ToString()); 250Assert.Equal(expectedIp, context.Connection.RemoteIpAddress.ToString()); 309Assert.Equal("testhost", context.Request.Host.ToString()); 365Assert.Equal(hostHeader, context.Request.Host.ToString()); 501Assert.Equal(hostHeader, context.Request.Headers.Host); 588Assert.Equal("bar.foo.com:432", context.Request.Headers.Host); 639Assert.Equal(expected, context.Request.Scheme); 677Assert.Equal(scheme, context.Request.Scheme); 734Assert.Equal("http", context.Request.Scheme); 789Assert.Equal(expected, context.Request.Scheme); 831Assert.Equal(expected, context.Request.Scheme); 882Assert.Equal(expected, context.Request.Scheme); 924Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString()); 925Assert.Equal("testhost", context.Request.Host.ToString()); 926Assert.Equal("Protocol", context.Request.Scheme); 927Assert.Equal("/pathbase", context.Request.PathBase); 960Assert.Equal("localhost", context.Request.Host.ToString()); 961Assert.Equal("http", context.Request.Scheme); 992Assert.Equal("11.111.111.11", context.Connection.RemoteIpAddress.ToString()); 993Assert.Equal("localhost", context.Request.Host.ToString()); 994Assert.Equal("Protocol", context.Request.Scheme); 1045Assert.Equal(expectedRemoteIp, context.Connection.RemoteIpAddress.ToString()); 1084Assert.Equal(expectedScheme, context.Request.Scheme); 1085Assert.Equal(remainingHeader, context.Request.Headers["X-Forwarded-Proto"].ToString()); 1121Assert.Equal(expectedScheme, context.Request.Scheme); 1122Assert.Equal(remainingHeader, context.Request.Headers["X-Forwarded-Proto"].ToString()); 1160Assert.Equal(expectedUnescapedPathBase, context.Request.PathBase.Value); 1203Assert.Equal(expectedUnescapedPathBase, context.Request.PathBase.Value); 1204Assert.Equal(expectedOriginalPrefix, context.Request.Headers["X-Original-Prefix"]); 1328Assert.Equal(expectedforwardedPrefix, context.Request.Headers["X-Forwarded-Prefix"].ToString());
HttpMethodOverrideMiddlewareTest.cs (6)
29Assert.Equal("DELETE", context.Request.Method); 59Assert.Equal("POST", context.Request.Method); 89Assert.Equal("GET", context.Request.Method); 122Assert.Equal("DELETE", context.Request.Method); 160Assert.Equal("POST", context.Request.Method); 197Assert.Equal("POST", context.Request.Method);
IPNetworkTest.cs (4)
57Assert.Equal(prefixText, network.Prefix.ToString()); 86Assert.Equal(expectedPrefix, network.Prefix.ToString()); 97Assert.Equal("An invalid IP address or prefix length was specified.", ex.Message); 119Assert.Equal(expectedPrefix, network.Prefix.ToString());
Microsoft.AspNetCore.HttpsPolicy.Tests (23)
HstsMiddlewareTests.cs (6)
71Assert.Equal("max-age=2592000", response.Headers.GetValues(HeaderNames.StrictTransportSecurity).FirstOrDefault()); 117Assert.Equal(expected, response.Headers.GetValues(HeaderNames.StrictTransportSecurity).FirstOrDefault()); 163Assert.Equal(expected, response.Headers.GetValues(HeaderNames.StrictTransportSecurity).FirstOrDefault()); 270Assert.Equal("Adding HSTS header to response.", message.State.ToString()); 372Assert.Equal("The request is insecure. Skipping HSTS header.", message.State.ToString()); 418Assert.Equal("Adding HSTS header to response.", message.State.ToString());
HttpsPolicyTests.cs (2)
70Assert.Equal(expectedUrl, response.Headers.Location.ToString()); 77Assert.Equal(expectedHstsHeader, response.Headers.GetValues(HeaderNames.StrictTransportSecurity).FirstOrDefault());
HttpsRedirectionMiddlewareTests.cs (15)
62Assert.Equal("Failed to determine the https port for redirect.", message.State.ToString()); 111Assert.Equal(expected, response.Headers.Location.ToString()); 118Assert.Equal($"Redirecting to '{expected}'.", message.State.ToString()); 167Assert.Equal(expectedUrl, response.Headers.Location.ToString()); 174Assert.Equal($"Redirecting to '{expectedUrl}'.", message.State.ToString()); 228Assert.Equal(expectedUrl, response.Headers.Location.ToString()); 268Assert.Equal("https://localhost:5050/", response.Headers.Location.ToString()); 275Assert.Equal("Https port '5050' discovered from server endpoints.", message.State.ToString()); 279Assert.Equal("Redirecting to 'https://localhost:5050/'.", message.State.ToString()); 313Assert.Equal("Cannot determine the https port from IServerAddressesFeature, multiple values were found. " + 356Assert.Equal("https://localhost:5050/", response.Headers.Location.ToString()); 363Assert.Equal("Https port '5050' discovered from server endpoints.", message.State.ToString()); 367Assert.Equal("Redirecting to 'https://localhost:5050/'.", message.State.ToString()); 409Assert.Equal("Failed to determine the https port for redirect.", message.State.ToString()); 453Assert.Equal("Failed to determine the https port for redirect.", message.State.ToString());
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (7)
SqlStoreOnlyUsersTestBase.cs (1)
112Assert.Equal("value", await userMgr.GetAuthenticationTokenAsync(user, "provider", "test"));
SqlStoreTestBase.cs (1)
211Assert.Equal("value", await userMgr.GetAuthenticationTokenAsync(user, "provider", "test"));
UserStoreEncryptPersonalDataTest.cs (2)
95Assert.Equal("123-456-7890", await manager.GetPhoneNumberAsync(user)); 291Assert.Equal("[ProtectedPersonalData] only works strings by default.", e.Message);
UserStoreWithGenericsTest.cs (3)
168Assert.Equal(claim.Type, newClaim.Type); 169Assert.Equal(claim.Value, newClaim.Value); 170Assert.Equal(claim.Issuer, newClaim.Issuer);
Microsoft.AspNetCore.Identity.FunctionalTests (78)
Extensions\ResponseAssert.cs (1)
24Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType);
ManagementTests.cs (5)
303Assert.Equal(userName, (string)jsonData["UserName"]); 305Assert.Equal(userName, (string)jsonData["Email"]); 309Assert.Equal("null", (string)jsonData["PhoneNumber"]); 325Assert.Equal(userName, (string)jsonData["Contoso external login provider key"]); 369Assert.Equal(expectedPrincipalClaim, actualPrincipalClaim);
MapIdentityApiTests.cs (65)
121Assert.Equal("Bearer", tokenType); 125Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 153Assert.Equal("Bearer", tokenType); 157Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 191Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 196Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 224Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 264Assert.Equal($"Hello, {Email}!", await client.GetStringAsync($"/auth/hello?accessToken={accessToken}")); 268Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 304Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 374Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 419Assert.Equal($"Hello, {newUsername}!", await client.GetStringAsync("/auth/hello")); 546Assert.Equal("Confirm your email", firstEmail.Subject); 547Assert.Equal(Email, firstEmail.Address); 558Assert.Equal("Confirm your email", resentEmail.Subject); 559Assert.Equal(Email, resentEmail.Address); 581Assert.Equal(Email, email.Address); 708Assert.Equal($"Hello, {Email}!", await client.GetStringAsync("/auth/hello")); 983Assert.Equal("Reset your password", resetEmail.Subject); 984Assert.Equal(confirmedEmail, resetEmail.Address); 1040Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1044Assert.Equal("pwd", GetSingleClaim(infoClaims, "amr")); 1045Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1046Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1058Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1063Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Name)); 1064Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1065Assert.Equal(originalNameIdentifier, GetSingleClaim(infoPostClaims, ClaimTypes.NameIdentifier)); 1078Assert.Equal("Confirm your email", email.Subject); 1079Assert.Equal(newEmail, email.Address); 1085Assert.Equal(newEmail, infoAfterEmailChange.GetProperty("email").GetString()); 1089Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Name)); 1090Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1091Assert.Equal(originalNameIdentifier, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.NameIdentifier)); 1100Assert.Equal(newEmail, infoAfterFinalLogin.GetProperty("email").GetString()); 1104Assert.Equal(newEmail, GetSingleClaim(claimsAfterFinalLogin, ClaimTypes.Name)); 1105Assert.Equal(newEmail, GetSingleClaim(claimsAfterFinalLogin, ClaimTypes.Email)); 1106Assert.Equal(originalNameIdentifier, GetSingleClaim(claimsAfterFinalLogin, ClaimTypes.NameIdentifier)); 1136Assert.Equal(Email, infoResponse.GetProperty("email").GetString()); 1139Assert.Equal("pwd", GetSingleClaim(infoClaims, "amr")); 1140Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Name)); 1141Assert.Equal(Email, GetSingleClaim(infoClaims, ClaimTypes.Email)); 1152Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1156Assert.Equal(Email, GetSingleClaim(infoPostClaims, ClaimTypes.Email)); 1157Assert.Equal(originalNameIdentifier, GetSingleClaim(infoPostClaims, ClaimTypes.NameIdentifier)); 1163Assert.Equal("Confirm your email", email.Subject); 1164Assert.Equal(newEmail, email.Address); 1174Assert.Equal(newEmail, infoAfterEmailChange.GetProperty("email").GetString()); 1178Assert.Equal(Email, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.Email)); 1179Assert.Equal(originalNameIdentifier, GetSingleClaim(claimsAfterEmailChange, ClaimTypes.NameIdentifier)); 1186Assert.Equal(newEmail, infoAfterFinalLogin.GetProperty("email").GetString()); 1189Assert.Equal(newEmail, GetSingleClaim(claimsAfterFinalLogin, ClaimTypes.Name)); 1190Assert.Equal(newEmail, GetSingleClaim(claimsAfterFinalLogin, ClaimTypes.Email)); 1191Assert.Equal(originalNameIdentifier, GetSingleClaim(claimsAfterFinalLogin, ClaimTypes.NameIdentifier)); 1251Assert.Equal(Email, infoPostContent.GetProperty("email").GetString()); 1265Assert.Equal(newEmail, changeEmail.Address); 1270Assert.Equal(newEmail, infoGetContent.GetProperty("email").GetString()); 1412Assert.Equal("Confirm your email", receivedEmail.Subject); 1413Assert.Equal(email, receivedEmail.Address); 1449Assert.Equal("application/problem+json", response.Content.Headers.ContentType?.ToString()); 1452Assert.Equal(title ?? ReasonPhrases.GetReasonPhrase((int)status), problem.Title); 1453Assert.Equal(detail, problem.Detail); 1459Assert.Equal("application/problem+json", response.Content.Headers.ContentType?.ToString()); 1463Assert.Equal(error, errorEntry.Key); 1528Assert.Equal(user.Email, email);
Pages\Account\Login.cs (2)
67Assert.Equal(Index.Path, loggedInLocation.ToString()); 90Assert.Equal("/Identity/Account/Lockout", lockedOut.ToString());
Pages\Account\LoginWith2fa.cs (1)
34Assert.Equal(Index.Path, goToIndex.ToString());
Pages\Account\Manage\DeleteUser.cs (1)
24Assert.Equal(Index.Path, deleteLocation.ToString());
Pages\Account\Register.cs (2)
47Assert.Equal(Index.Path, registeredLocation.ToString()); 64Assert.Equal(RegisterConfirmation.Path + "?email=" + userName + "&returnUrl=%2F", registeredLocation.ToString());
RegistrationTests.cs (1)
244Assert.Equal("Contoso", authenticationMethod);
Microsoft.AspNetCore.Identity.InMemory.Test (15)
ControllerTest.cs (2)
104Assert.Equal("refresh", await userManager.GetAuthenticationTokenAsync(user, authScheme, "refresh_token")); 105Assert.Equal("access", await userManager.GetAuthenticationTokenAsync(user, authScheme, "access_token"));
FunctionalTest.cs (13)
61Assert.Equal("hao", FindClaimValue(transaction3, ClaimTypes.Name)); 62Assert.Equal("role", FindClaimValue(transaction3, ClaimTypes.Role)); 96Assert.Equal("hao", FindClaimValue(transaction3, ClaimTypes.Name)); 102Assert.Equal("hao", FindClaimValue(transaction4, ClaimTypes.Name)); 142Assert.Equal("hao", FindClaimValue(transaction3, ClaimTypes.Name)); 148Assert.Equal("hao", FindClaimValue(transaction4, ClaimTypes.Name)); 156Assert.Equal("hao", FindClaimValue(transaction5, ClaimTypes.Name)); 160Assert.Equal("hao", FindClaimValue(transaction6, ClaimTypes.Name)); 194Assert.Equal("hao", FindClaimValue(transaction3, ClaimTypes.Name)); 200Assert.Equal("hao", FindClaimValue(transaction4, ClaimTypes.Name)); 208Assert.Equal("hao", FindClaimValue(transaction5, ClaimTypes.Name)); 209Assert.Equal("hao", FindClaimValue(transaction5, "PreviousName")); 213Assert.Equal("hao", FindClaimValue(transaction6, ClaimTypes.Name));
Microsoft.AspNetCore.Identity.Specification.Tests (45)
IdentityResultAssert.cs (3)
41Assert.Equal(error, result.Errors.First().Description); 53Assert.Equal(error.Description, result.Errors.FirstOrDefault()?.Description); 54Assert.Equal(error.Code, result.Errors.FirstOrDefault()?.Code);
IdentitySpecificationTestBase.cs (1)
557Assert.Equal(roleName, await roleMgr.GetRoleNameAsync(await roleMgr.FindByNameAsync(roleName)));
UserManagerSpecificationTests.cs (41)
513Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); 584Assert.Equal(provider, logins[0].LoginProvider); 585Assert.Equal(providerKey, logins[0].ProviderKey); 586Assert.Equal(display, logins[0].ProviderDisplayName); 647Assert.Equal(login.LoginProvider, logins[^1].LoginProvider); 648Assert.Equal(login.ProviderKey, logins[^1].ProviderKey); 649Assert.Equal(login.ProviderDisplayName, logins[^1].ProviderDisplayName); 780Assert.Equal(claim.Type, newClaim.Type); 781Assert.Equal(claim.Value, newClaim.Value); 808Assert.Equal(claim.Type, newClaim.Type); 809Assert.Equal(claim.Value, newClaim.Value); 813Assert.Equal("c", oldClaim2.Type); 814Assert.Equal("a", oldClaim2.Value); 1030Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); 1052Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); 1354Assert.Equal("123-456-7890", await manager.GetPhoneNumberAsync(user)); 1356Assert.Equal("111-111-1111", await manager.GetPhoneNumberAsync(user)); 1375Assert.Equal("111-111-1111", await manager.GetPhoneNumberAsync(user)); 1409Assert.Equal("123-456-7890", await manager.GetPhoneNumberAsync(user)); 1410Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); 1441Assert.Equal("111-111-1111", await manager.GetPhoneNumberAsync(user)); 1461Assert.Equal("123-456-7890", await manager.GetPhoneNumberAsync(user)); 1462Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); 1508Assert.Equal(await manager.GetEmailAsync(user), newEmail); 1531Assert.Equal(await manager.GetEmailAsync(user), newEmail); 1557Assert.Equal(await manager.GetEmailAsync(user), newEmail); 1581Assert.Equal("another@email.com", await manager.GetEmailAsync(user)); 1603Assert.Equal(await manager.GetEmailAsync(user), oldEmail); 1604Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); 1627Assert.Equal(await manager.GetEmailAsync(user), oldEmail); 1628Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); 1691Assert.Equal(error, ex.Message); 1694Assert.Equal(error, ex.Message); 1697Assert.Equal(error, ex.Message); 1700Assert.Equal(error, ex.Message); 1730Assert.Equal("value", await manager.GetAuthenticationTokenAsync(user, "provider", "name")); 1733Assert.Equal("value2", await manager.GetAuthenticationTokenAsync(user, "provider", "name")); 1736Assert.Equal("value2", await manager.GetAuthenticationTokenAsync(user, "provider", "name")); 1819Assert.Equal("Phone", factors[0]); 1830Assert.Equal("Phone", factors[0]); 1835Assert.Equal("Authenticator", factors[1]);
Microsoft.AspNetCore.Identity.Test (21)
IdentityOptionsTest.cs (9)
28Assert.Equal("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+", options.User.AllowedUserNameCharacters); 31Assert.Equal(ClaimTypes.Role, options.ClaimsIdentity.RoleClaimType); 32Assert.Equal(ClaimTypes.Name, options.ClaimsIdentity.UserNameClaimType); 33Assert.Equal(ClaimTypes.NameIdentifier, options.ClaimsIdentity.UserIdClaimType); 34Assert.Equal("AspNet.Identity.SecurityStamp", options.ClaimsIdentity.SecurityStampClaimType); 87Assert.Equal("a", options.Get(IdentityConstants.ApplicationScheme).Cookie.Name); 88Assert.Equal("b", options.Get(IdentityConstants.ExternalScheme).Cookie.Name); 89Assert.Equal("c", options.Get(IdentityConstants.TwoFactorRememberMeScheme).Cookie.Name); 90Assert.Equal("d", options.Get(IdentityConstants.TwoFactorUserIdScheme).Cookie.Name);
IdentityUIScriptsTest.cs (2)
41Assert.Equal(scriptTag.Integrity, integrity); 89Assert.Equal(RemoveLineEndings(cdnContent), RemoveLineEndings(fallbackSrcContent));
PasswordHasherTest.cs (5)
33Assert.Equal("The provided PasswordHasherCompatibilityMode is invalid.", ex.Message); 46Assert.Equal("The iteration count must be a positive integer.", ex.Message); 77Assert.Equal(V3_SHA512_100000iter_128salt_256subkey, retVal); 90Assert.Equal(V2_SHA1_1000iter_128salt_256subkey, retVal); 103Assert.Equal(V3_SHA512_100000iter_128salt_256subkey, retVal);
SignInManagerTest.cs (3)
1057Assert.Equal("Blah blah", externalLoginInfo.ProviderDisplayName); 1088Assert.Equal("bar", externalLoginInfo.ProviderKey); 1123Assert.Equal("fizzbuzz", customValue);
UserClaimsPrincipalFactoryTest.cs (1)
93Assert.Equal(IdentityConstants.ApplicationScheme, identity.AuthenticationType);
UserManagerTest.cs (1)
971Assert.Equal(expectedMessage, error.Message);
Microsoft.AspNetCore.InternalTesting (7)
ExceptionAssertions.cs (5)
96Assert.Equal(paramName, ex.ParamName); 123Assert.Equal(paramName, ex.ParamName); 140Assert.Equal(paramName, ex.ParamName); 207Assert.Equal(paramName, ex.ParamName); 260Assert.Equal(expectedMessage, exception.Message);
Tracing\EventAssert.cs (2)
51Assert.Equal(_expectedName, evt.EventName); 56return actualValue => Assert.Equal(val.name, actualValue);
Microsoft.AspNetCore.InternalTesting.Tests (22)
AssemblyTestLogTests.cs (2)
304Assert.Equal( 309Assert.Equal(
EnvironmentVariableSkipConditionTest.cs (2)
50Assert.Equal( 69Assert.Equal(
HttpClientSlimTest.cs (4)
22Assert.Equal("test", await HttpClientSlim.GetStringAsync(address)); 40Assert.Equal("test post", await HttpClientSlim.PostAsync(address, new StringContent("test post"))); 58Assert.Equal("[fe80::5d2a:d070:6fd6:1bac]:5003", HttpClientSlim.GetHost(requestUri)); 65Assert.Equal("[fe80::5d2a:d070:6fd6:1bac]", HttpClientSlim.GetHost(requestUri));
LoggedTestXunitTests.cs (5)
75Assert.Equal("Information", message.Formatter(message.State, null)); 86Assert.Equal("Debug", message.Formatter(message.State, null)); 99Assert.Equal("Information", message.Formatter(message.State, null)); 123Assert.Equal($"{nameof(LoggedTheoryNullArgumentsAreEscaped)}_null", ResolvedTestMethodName); 162Assert.Equal("Trace", message.Formatter(message.State, null));
TaskExtensionsTest.cs (2)
73Assert.Equal(message, exception.Message); 86Assert.Equal(message, exception.Message);
TestContextTest.cs (3)
18Assert.Equal(GetType().FullName, Context.FileOutput.TestClassName); 43Assert.Equal(GetType().Name, Context.FileOutput.TestClassName); 69Assert.Equal(GetType().Name, Context.FileOutput.TestClassName);
TestPathUtilitiesTest.cs (1)
19Assert.Equal($"Solution file NotTesting.slnf could not be found in {AppContext.BaseDirectory} or its parent directories.", exception.Message);
XunitLoggerProviderTest.cs (3)
30Assert.Equal(expectedOutput, MakeConsistent(testTestOutputHelper.Output)); 44Assert.Equal("| [TIMESTAMP] TestCategory Error: This is a bad error" + Environment.NewLine, MakeConsistent(testTestOutputHelper.Output)); 63Assert.Equal(expectedOutput, MakeConsistent(testTestOutputHelper.Output));
Microsoft.AspNetCore.JsonPatch.Tests (102)
IntegrationTests\AnonymousObjectIntegrationTest.cs (7)
27Assert.Equal("The target location specified by path segment 'NewProperty' was not found.", 51Assert.Equal("The target location specified by path segment 'NewInt' was not found.", 74Assert.Equal("The property at path 'StringProperty' could not be updated.", 97Assert.Equal("The property at path 'Test' could not be updated.", 121Assert.Equal("The property at path 'StringProperty' could not be updated.", 145Assert.Equal("The property at path 'StringProperty' could not be updated.", 186Assert.Equal("The current value 'A' at path 'StringProperty' is not equal to the test value 'B'.",
IntegrationTests\DictionaryIntegrationTest.cs (5)
174Assert.Equal("The current value 'James' at path 'Name' is not equal to the test value 'Mike'.", exception.Message); 198Assert.Equal("James", actualValue1.Name); 243Assert.Equal("James", actualValue2.Name); 267Assert.Equal("James", actualValue2.Name); 291Assert.Equal("James", actualValue1.Name);
IntegrationTests\DynamicObjectIntegrationTest.cs (3)
66Assert.Equal("The target location specified by path segment 'OtherProperty' was not found.", exception.Message); 166Assert.Equal("The target location specified by path segment 'Simpleobject' was not found.", exception.Message); 231Assert.Equal("The current value '1' at position '0' is not equal to the test value '2'.", exception.Message);
IntegrationTests\ExpandoObjectIntegrationTest.cs (5)
153Assert.Equal("The current value '' at path 'Test' is not equal to the test value 'TestValue'.", 174Assert.Equal("The current value 'Value' at path 'Test' is not equal to the test value 'TestValue'.", 278Assert.Equal("The target location specified by path segment 'NonExisting' was not found.", exception.Message); 318Assert.Equal("The target location specified by path segment 'test' was not found.", exception.Message); 360Assert.Equal("The target location specified by path segment 'test' was not found.", exception.Message);
IntegrationTests\HeterogenousCollectionTests.cs (2)
44Assert.Equal("Shape property", circle.ShapeProperty); 45Assert.Equal("Circle property", circle.CircleProperty);
IntegrationTests\ListIntegrationTest.cs (4)
49Assert.Equal("The index value provided by path segment '-1' is out of bounds of the array size.", 101Assert.Equal("ChangedString1", targetObject.SimpleObjectList[0].StringProperty); 166Assert.Equal($"The index value provided by path segment '{position}' is out of bounds of the array size.", exception.Message); 251Assert.Equal("The index value provided by path segment '-1' is out of bounds of the array size.", exception.Message);
IntegrationTests\NestedObjectIntegrationTest.cs (12)
33Assert.Equal("B", targetObject.SimpleObjectWithNullCheck.StringProperty); 56Assert.Equal("B", targetObject.NestedObject.StringProperty); 75Assert.Equal("A", targetObject.NestedObject.StringProperty); 95Assert.Equal("B", targetObject.NestedObject.StringProperty); 117Assert.Equal("B", targetObject.SimpleObject.StringProperty); 178Assert.Equal("A", targetObject.SimpleObject.AnotherStringProperty); 229Assert.Equal("C", targetObject.SimpleObject.StringProperty); 230Assert.Equal("D", targetObject.SimpleObject.AnotherStringProperty); 231Assert.Equal("C", targetObject.InheritedObject.StringProperty); 232Assert.Equal("D", targetObject.InheritedObject.AnotherStringProperty); 327Assert.Equal("C", targetObject.SimpleObject.StringProperty); 328Assert.Equal("D", targetObject.SimpleObject.AnotherStringProperty);
IntegrationTests\SimpleObjectIntegrationTest.cs (2)
46Assert.Equal("A", targetObject.AnotherStringProperty); 167Assert.Equal("For operation 'move', the target location specified by path '/Object/goodbye' was not found.", ex.Message);
Internal\DictionaryAdapterTest.cs (8)
81Assert.Equal($"The provided path segment '{guidKey.ToString()}' cannot be converted to the target type.", message); 108Assert.Equal("The target location specified by path segment 'NAME' was not found.", message); 136Assert.Equal("James", outValue?.ToString()); 194Assert.Equal("The value 'test' is invalid for target location.", message); 212Assert.Equal("The target location specified by path segment 'Name' was not found.", message); 230Assert.Equal("The target location specified by path segment 'Name' was not found.", message); 254Assert.Equal("James", dictionary[nameKey].RectangleProperty); 335Assert.Equal(expectedErrorMessage, errorMessage);
Internal\DynamicObjectAdapterTest.cs (7)
91Assert.Equal($"The target location specified by path segment '{segment}' was not found.", getErrorMessage); 129Assert.Equal($"The target location specified by path segment '{segment}' was not found.", errorMessage); 165Assert.Equal($"The target location specified by path segment '{segment}' was not found.", errorMessage); 183Assert.Equal($"The value 'test' is invalid for target location.", errorMessage); 204Assert.Equal("new", rect.RectangleProperty); 249Assert.Equal($"The target location specified by path segment '{segment}' was not found.", removeErrorMessage); 292Assert.Equal(expectedErrorMessage, errorMessage);
Internal\ListAdapterTest.cs (10)
27Assert.Equal($"The type '{targetObject.GetType().FullName}' which is an array is not supported for json patch operations as it has a fixed size.", message); 45Assert.Equal($"The type '{targetObject.GetType().FullName}' which is a non generic list is not supported for json patch operations. Only generic list types are supported.", message); 83Assert.Equal($"The index value provided by path segment '{position}' is out of bounds of the array size.", message); 101Assert.Equal($"The path segment '{position}' is invalid for an array index.", message); 191Assert.Equal("The value 'James' is invalid for target location.", message); 317Assert.Equal($"The index value provided by path segment '{position}' is out of bounds of the array size.", message); 356Assert.Equal($"The index value provided by path segment '{position}' is out of bounds of the array size.", message); 391Assert.Equal("The value 'James' is invalid for target location.", message); 477Assert.Equal(expectedErrorMessage, errorMessage); 494Assert.Equal(expectedErrorMessage, errorMessage);
Internal\ObjectVisitorTest.cs (2)
170Assert.Equal($"The index value provided by path segment '{position}' is out of bounds of the array size.", message); 188Assert.Equal($"The path segment '{position}' is invalid for an array index.", message);
Internal\PocoAdapterTest.cs (11)
33Assert.Equal("John", model.Name); 55Assert.Equal(expectedErrorMessage, errorMessage); 96Assert.Equal(expectedErrorMessage, errorMessage); 136Assert.Equal(expectedErrorMessage, errorMessage); 154Assert.Equal("John", model.Name); 178Assert.Equal(expectedErrorMessage, errorMessage); 197Assert.Equal("Joana", model.Name); 199Assert.Equal(expectedErrorMessage, errorMessage); 220Assert.Equal("Oval", model.Rectangle.RectangleProperty); 238Assert.Equal("Joana", model.Name); 260Assert.Equal(expectedErrorMessage, errorMessage);
JsonPatchDocumentGetPathTest.cs (7)
22Assert.Equal("/SimpleObject/IntegerList/-", path); 35Assert.Equal("/3", path); 48Assert.Equal("/key/3", path); 61Assert.Equal("/", path); 74Assert.Equal("/-", path); 87Assert.Equal("/DerivedObject", path); 103Assert.Equal("The expression '(p.IntegerValue >= 4)' is not supported. Supported expressions include member access and indexer expressions.", exception.Message);
JsonPatchDocumentJObjectTest.cs (6)
29Assert.Equal("foo@baz.com", model.CustomData["Emails"][1].Value<string>()); 60Assert.Equal("Bar Baz", model.CustomData["Name"].Value<string>()); 76Assert.Equal("foo@bar.com", model.CustomData["UserName"].Value<string>()); 109Assert.Equal("Bar", model.CustomData["LastName"].Value<string>()); 125Assert.Equal("Foo", model.CustomData["Name"].Value<string>()); 157Assert.Equal("foo@baz.com", model.CustomData["Email"].Value<string>());
JsonPatchDocumentJsonPropertyAttributeTest.cs (5)
24Assert.Equal("/AnotherName", pathToCheck); 40Assert.Equal("John", obj.FirstName); 41Assert.Equal("Doe", obj.LastName); 55Assert.Equal("/StringProperty", fromPath); 57Assert.Equal("/StringProperty2", toPath);
JsonPatchDocumentTest.cs (6)
25Assert.Equal( 43Assert.Equal( 68Assert.Equal("A", targetObject.AnotherStringProperty); 95Assert.Equal("A", targetObject.AnotherStringProperty); 142Assert.Equal("The JSON patch document was malformed and could not be parsed.", exception.Message); 159Assert.Equal("The JSON patch document was malformed and could not be parsed.", exception.Message);
Microsoft.AspNetCore.Localization.FunctionalTests (1)
LocalizationTest.cs (1)
118Assert.Equal(expected, await response.Content.ReadAsStringAsync());
Microsoft.AspNetCore.Localization.Routing.Tests (3)
RouteDataRequestCultureProviderTest.cs (3)
88Assert.Equal($"{expectedCulture},{expectedUICulture}", data); 134Assert.Equal("en-US,en-US", data); 210Assert.Equal($"{expectedCulture},{expectedUICulture}", data);
Microsoft.AspNetCore.Localization.Tests (29)
AcceptLanguageHeaderRequestCultureProviderTest.cs (5)
38Assert.Equal("ar-SA", requestCulture.Culture.Name); 79Assert.Equal("ar-SA", requestCulture.Culture.Name); 119Assert.Equal("fr-FR", requestCulture.Culture.Name); 164Assert.Equal("ar-YE", requestCulture.Culture.Name); 165Assert.Equal("ar-YE", requestCulture.UICulture.Name);
CookieRequestCultureProviderTest.cs (6)
52Assert.Equal("ar-SA", requestCulture.Culture.Name); 68Assert.Equal("c=ar-SA|uic=ar-SA", value); 104Assert.Equal("en-US", requestCulture.Culture.Name); 153Assert.Equal("en-US", requestCulture.Culture.Name); 225Assert.Equal(expectedMessage, write.State.ToString()); 284Assert.Equal(expectedMessage, write.State.ToString());
CustomRequestCultureProviderTest.cs (1)
49Assert.Equal("ar", requestCulture.Culture.Name);
QueryStringRequestCultureProviderTest.cs (14)
41Assert.Equal("ar-SA", requestCulture.Culture.Name); 42Assert.Equal("ar-YE", requestCulture.UICulture.Name); 75Assert.Equal("en-US", requestCulture.Culture.Name); 76Assert.Equal("en-US", requestCulture.UICulture.Name); 117Assert.Equal("en-US", requestCulture.Culture.Name); 158Assert.Equal("en-US", requestCulture.UICulture.Name); 199Assert.Equal("ar-SA", requestCulture.Culture.Name); 200Assert.Equal("ar-SA", requestCulture.UICulture.Name); 241Assert.Equal("ar-SA", requestCulture.Culture.Name); 242Assert.Equal("ar-SA", requestCulture.UICulture.Name); 288Assert.Equal("ar-SA", requestCulture.Culture.Name); 289Assert.Equal("ar-YE", requestCulture.UICulture.Name); 336Assert.Equal("fr", requestCulture.Culture.ToString()); 337Assert.Equal("fr", requestCulture.UICulture.ToString());
RequestLocalizationMiddlewareTest.cs (2)
53Assert.Equal(parentCulture, requestCulture.RequestCulture.Culture.Name); 54Assert.Equal(parentCulture, requestCulture.RequestCulture.UICulture.Name);
RequestLocalizationOptionsTest.cs (1)
124Assert.Equal(defaultCulture, options.DefaultRequestCulture.Culture.Name);
Microsoft.AspNetCore.MiddlewareAnalysis.Tests (3)
MiddlewareAnalysisTests.cs (3)
50Assert.Equal("Microsoft.AspNetCore.MiddlewareAnalysis.MiddlewareAnalysisTests+<>c", listener.MiddlewareStarting[1]); 53Assert.Equal("Microsoft.AspNetCore.MiddlewareAnalysis.MiddlewareAnalysisTests+<>c", listener.MiddlewareException[0]); 56Assert.Equal("Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware", listener.MiddlewareFinished[0]);
Microsoft.AspNetCore.Mvc.Abstractions.Test (74)
ModelBinding\ModelMetadataTest.cs (8)
301Assert.Equal("item", metadata.Name); 302Assert.Equal("item", metadata.ParameterName); 314Assert.Equal(nameof(string.Length), metadata.Name); 316Assert.Equal(nameof(string.Length), metadata.PropertyName); 333Assert.Equal("displayName", result); 348Assert.Equal("item", result); 362Assert.Equal("Length", result); 375Assert.Equal("String", result);
ModelBinding\ModelStateDictionaryTest.cs (61)
196Assert.Equal( 255Assert.Equal( 280Assert.Equal(entry.AttemptedValue, actual.AttemptedValue); 297Assert.Equal("some key", kvp.Key); 314Assert.Equal("some key", kvp.Key); 316Assert.Equal("some error", error.ErrorMessage); 335Assert.Equal("some key", kvp.Key); 338Assert.Equal("some error", kvp.Value.Errors[0].ErrorMessage); 567Assert.Equal("AttemptedValue1", item.AttemptedValue); 571Assert.Equal("AttemptedValue2", item.AttemptedValue); 574error => Assert.Equal("value2-Error1", error.ErrorMessage)); 604Assert.Equal("AttemptedValue2", item.AttemptedValue); 607error => Assert.Equal("value2-Error1", error.ErrorMessage)); 640Assert.Equal("some value", modelState.AttemptedValue); 659Assert.Equal("some error", modelState.Errors[0].ErrorMessage); 661Assert.Equal("some value", modelState.AttemptedValue); 771Assert.Equal(expected, error.Exception.Message); 800Assert.Equal(expected, error.Exception.Message); 841Assert.Equal(expected, error.Exception.Message); 872Assert.Equal(expected, error.Exception.Message); 877Assert.Equal("error3", error.ErrorMessage); 905Assert.Equal(expected, error.Exception.Message); 931Assert.Equal(expected, error.Exception.Message); 987Assert.Equal(expected, error.ErrorMessage); 1011Assert.Equal("key", entry.Key); 1013Assert.Equal(expected, error.ErrorMessage); 1039Assert.Equal("key", entry.Key); 1041Assert.Equal(expected, error.ErrorMessage); 1065Assert.Equal("key", entry.Key); 1067Assert.Equal(expected, error.ErrorMessage); 1101Assert.Equal(expected, error.ErrorMessage); 1126Assert.Equal("key", entry.Key); 1128Assert.Equal(expected, error.ErrorMessage); 1155Assert.Equal("key", entry.Key); 1157Assert.Equal(expected, error.ErrorMessage); 1182Assert.Equal("key", entry.Key); 1184Assert.Equal(expected, error.ErrorMessage); 1217Assert.Equal("key", entry.Key); 1219Assert.Equal(expectedMessage, error.ErrorMessage); 1235Assert.Equal("key", entry.Key); 1237Assert.Equal(expectedMessage, error.ErrorMessage); 1255Assert.Equal("key", entry.Key); 1257Assert.Equal(expectedMessage, error.ErrorMessage); 1275Assert.Equal("key", entry.Key); 1277Assert.Equal(expectedMessage, error.ErrorMessage); 1414Assert.Equal("Property1", entry.Key); 1422Assert.Equal("Property4", entry.Key); 1430Assert.Equal("Property1.Property2", entry.Key); 1433Assert.Equal("value", entry.Value.AttemptedValue); 1438Assert.Equal("Property2[Property3]", entry.Key); 1443error => Assert.Equal("Property2[Property3] invalid.", error.ErrorMessage)); 1460Assert.Equal("prop", entry.Key); 1465Assert.Equal("property", entry.Key); 1470Assert.Equal("property_name", entry.Key); 1553Assert.Equal("value", value.AttemptedValue); 1563error => Assert.Equal("Property2[Property3] invalid.", error.ErrorMessage)); 1655Assert.Equal( 1673Assert.Equal( 1690Assert.Equal( 1708Assert.Equal( 1726Assert.Equal(
ModelBinding\ValueProviderResultTest.cs (5)
64Assert.Equal("Hi There", result.Values); 65Assert.Equal("Hi There", result.FirstValue); 67Assert.Equal("Hi There", (string)result); 80Assert.Equal("Hi", result.FirstValue); 82Assert.Equal("Hi,There", (string)result);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (109)
ApiResponseTypeProviderTest.cs (24)
46Assert.Equal("application/json", format.MediaType); 111Assert.Equal("application/json", format.MediaType); 124Assert.Equal("application/json", format.MediaType); 169Assert.Equal("application/json", format.MediaType); 218format => Assert.Equal("application/json", format.MediaType)); 256format => Assert.Equal("application/json", format.MediaType)); 265format => Assert.Equal("application/json", format.MediaType)); 313format => Assert.Equal("application/json", format.MediaType)); 355format => Assert.Equal("application/json", format.MediaType)); 364format => Assert.Equal("application/json", format.MediaType)); 373format => Assert.Equal("application/json", format.MediaType)); 407format => Assert.Equal("application/json", format.MediaType)); 415format => Assert.Equal("application/json", format.MediaType)); 450format => Assert.Equal("application/json", format.MediaType)); 458format => Assert.Equal("application/json", format.MediaType)); 467format => Assert.Equal("application/json", format.MediaType)); 501format => Assert.Equal("application/json", format.MediaType)); 554format => Assert.Equal("application/json", format.MediaType)); 593format => Assert.Equal("application/json", format.MediaType)); 602format => Assert.Equal("application/json", format.MediaType)); 611format => Assert.Equal("application/json", format.MediaType)); 644format => Assert.Equal("application/json", format.MediaType)); 674format => Assert.Equal("application/json", format.MediaType)); 702Assert.Equal("application/pdf", format.MediaType);
DefaultApiDescriptionProviderTest.cs (27)
88Assert.Equal("Customers", description.GroupName); 103Assert.Equal("Customers", description.GroupName); 119Assert.Equal("Customers", description.GroupName); 187Assert.Equal("id", parameter.Name); 233Assert.Equal("id", parameter.Name); 298Assert.Equal("id", parameter.Name); 419Assert.Equal(relativePath, description.RelativePath); 485Assert.Equal("api/products/updateproduct/{productId}", description.RelativePath); 1233f => Assert.Equal("application/json", f.MediaType.ToString()), 1234f => Assert.Equal("application/xml", f.MediaType.ToString()), 1235f => Assert.Equal("text/json", f.MediaType.ToString()), 1236f => Assert.Equal("text/xml", f.MediaType.ToString())); 1257f => Assert.Equal("text/json", f.MediaType.ToString()), 1258f => Assert.Equal("text/xml", f.MediaType.ToString())); 1275f => Assert.Equal("application/xml", f.MediaType.ToString()), 1276f => Assert.Equal("text/xml", f.MediaType.ToString())); 1305Assert.Equal("text/xml", format.MediaType.ToString()); 1349Assert.Equal("name", parameter.Name); 1369Assert.Equal("id", parameter.Name); 1386Assert.Equal("id", parameter.Name); 1403Assert.Equal("product", parameter.Name); 1456Assert.Equal("multipart/form-data", requestFormat.MediaType); 1473Assert.Equal("id", parameter.Name); 1505Assert.Equal("product", parameter.Name); 1893Assert.Equal("C.C.C.C", c.Name); 1911Assert.Equal("Products", products.Name); 1930Assert.Equal("Items", items.Name);
EndpointMetadataApiDescriptionProviderTest.cs (58)
51Assert.Equal(declaringTypeName, apiDescription.ActionDescriptor.RouteValues["controller"]); 59Assert.Equal(nameof(EndpointMetadataApiDescriptionProviderTest), apiDescription.ActionDescriptor.RouteValues["controller"]); 68Assert.Equal("application/custom", requestFormat.MediaType); 94Assert.Equal("application/custom0", requestFormat0.MediaType); 98Assert.Equal("application/custom1", requestFormat1.MediaType); 113Assert.Equal("InferredJsonClass", apiParameterDescription.Type.Name); 128Assert.Equal("InferredJsonClass", apiParameterDescription.Type.Name); 143Assert.Equal("application/json", responseFormat.MediaType); 162Assert.Equal("text/plain", responseFormat.MediaType); 208Assert.Equal("application/custom", Assert.Single(annotatedResponseType.ApiResponseFormats).MediaType); 228Assert.Equal("application/json", rdfInferredResponseFormat.MediaType); 237Assert.Equal("application/json", createdResponseFormat.MediaType); 246Assert.Equal("application/json", badRequestResponseFormat.MediaType); 266Assert.Equal("application/json", createdResponseFormat.MediaType); 292Assert.Equal("application/json", createdResponseFormat.MediaType); 317Assert.Equal("application/json", createdResponseFormat.MediaType); 350Assert.Equal("application/json", createdResponseFormat.MediaType); 371Assert.Equal("application/json", createdResponseFormat.MediaType); 405Assert.Equal("application/json", createdResponseFormat.MediaType); 598Assert.Equal(expectedName, param.Name); 624Assert.Equal("foo", fooParam.Name); 631Assert.Equal("bar", barParam.Name); 638Assert.Equal("fromBody", fromBodyParam.Name); 655Assert.Equal(capturedName, param.Name); 662Assert.Equal("Bar", param.Name); 669Assert.Equal("FromBody", param.Name); 763Assert.Equal("FOO", apiDescription.ActionDescriptor.DisplayName); 816Assert.Equal("name", nameParam.ParameterDescriptor.Name); 826Assert.Equal("The name.", description.Description); 877Assert.Equal(endpointGroupName, apiDescription.GroupName); 1017Assert.Equal("application/json", requestType.MediaType); 1021Assert.Equal("application/xml", requestType.MediaType); 1050Assert.Equal("inferredJsonClass", bodyParameterDescription.Name); 1109Assert.Equal("inferredJsonClass", bodyParameterDescription.Name); 1115Assert.Equal("application/json", defaultRequestFormat.MediaType); 1141Assert.Equal("inferredJsonClass", bodyParameterDescription.Name); 1147Assert.Equal("application/json", defaultRequestFormat.MediaType); 1173Assert.Equal("inferredJsonClass", bodyParameterDescription.Name); 1179Assert.Equal("application/xml", defaultRequestFormat.MediaType); 1201Assert.Equal("formFile", bodyParameterDescription.Name); 1207Assert.Equal("multipart/form-data", defaultRequestFormat.MediaType); 1230Assert.Equal("inferredFormFile", bodyParameterDescription.Name); 1236Assert.Equal("multipart/form-data", defaultRequestFormat.MediaType); 1259Assert.Equal("file", bodyParameterDescription.Name); 1265Assert.Equal("multipart/form-data", defaultRequestFormat.MediaType); 1278Assert.Equal("application/custom0", requestFormat0.MediaType); 1282Assert.Equal("application/custom1", requestFormat1.MediaType); 1316Assert.Equal(expectedName, param.Name); 1347Assert.Equal(expectedName, bodyParameterDescription.Name); 1352Assert.Equal("multipart/form-data", defaultRequestFormat.MediaType); 1384Assert.Equal("fromQuery", parameter.Name); 1389Assert.Equal("name", parameter.Name); 1450Assert.Equal("A description", descriptionMetadata!.Description); 1454Assert.Equal("A summary", summaryMetadata!.Summary); 1481Assert.Equal("A description", descriptionMetadata!.Description); 1485Assert.Equal("A summary", summaryMetadata!.Summary); 1512Assert.Equal(expectedName, parameter.Name); 1513Assert.Equal(expectedName, parameter.ParameterDescriptor.Name);
Microsoft.AspNetCore.Mvc.Core.Test (1222)
AcceptedAtActionResultTests.cs (5)
30Assert.Equal(actionName, result.ActionName); 43Assert.Equal(controllerName, result.ControllerName); 168Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]); 210Assert.Equal("Location", header.Key); 211Assert.Equal("abc", header.Value);
AcceptedAtRouteResultTests.cs (1)
119Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
AcceptedResultTests.cs (2)
81Assert.Equal(location, httpContext.Response.Headers["Location"]); 100Assert.Equal(location, httpContext.Response.Headers["Location"]);
ActionResultOfTTest.cs (3)
19Assert.Equal($"Invalid type parameter '{typeof(FileStreamResult)}' specified for 'ActionResult<T>'.", ex.Message); 30Assert.Equal($"Invalid type parameter '{typeof(FileStreamResult)}' specified for 'ActionResult<T>'.", ex.Message); 41Assert.Equal($"Invalid type parameter '{typeof(TestResult)}' specified for 'ActionResult<T>'.", ex.Message);
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (1)
37Assert.Equal(expected, ex.Message);
ApplicationModels\AttributeRouteModelTests.cs (10)
78Assert.Equal(expected, combined); 103Assert.Equal(expected, combined); 119Assert.Equal(expected, combined); 143Assert.Equal(expected, combined); 155Assert.Equal(expected, result); 174Assert.Equal(expected, ex.Message); 201Assert.Equal(expected, ex.Message); 231Assert.Equal(expectedResult.Template, combined.Template); 261Assert.Equal(expectedTemplate, combined.Template); 277Assert.Equal(expectedName, combined.Name);
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (1)
91Assert.Equal("Authorize", action.ActionName);
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (2)
27Assert.Equal("application/json", Assert.Single(consumesAttribute.ContentTypes)); 48Assert.Equal("multipart/form-data", Assert.Single(consumesAttribute.ContentTypes));
ApplicationModels\ControllerActionDescriptorBuilderTest.cs (1)
53Assert.Equal("BoundProperty", property.Name);
ApplicationModels\ControllerActionDescriptorProviderTests.cs (44)
48Assert.Equal($"{controllerTypeInfo.FullName}.{nameof(PersonController.GetPerson)} ({controllerTypeInfo.Assembly.GetName().Name})", descriptor.DisplayName); 92Assert.Equal("OnlyPost", descriptor.ActionName); 109Assert.Equal("Items", descriptor.AttributeRouteInfo.Template); 129Assert.Equal("id", id.Name); 148Assert.Equal("id", id.Name); 154Assert.Equal("entity", entity.Name); 173Assert.Equal("id", id.Name); 179Assert.Equal("ID", upperCaseId.Name); 185Assert.Equal("Id", pascalCaseId.Name); 206Assert.Equal("entity", entity.Name); 227Assert.Equal("entity", entity.Name); 245Assert.Equal("ConventionallyRouted", controller.Value); 248Assert.Equal(nameof(ConventionallyRoutedController.ConventionalAction), actionConstraint.Value); 274metadata => Assert.Equal("ControllerPolicy", Assert.IsType<AuthorizeAttribute>(metadata).Policy), 275metadata => Assert.Equal("ActionPolicy", Assert.IsType<AuthorizeAttribute>(metadata).Policy)); 298Assert.Equal("GET", Assert.Single(httpMethodMetadata.HttpMethods)); 346Assert.Equal("AttributeRouted", controller.Value); 349Assert.Equal(nameof(AttributeRoutedController.AttributeRoutedAction), actionConstraint.Value); 412Assert.Equal("api/Token/value/TokenReplacement/stub/ThisIsAnAction", action.AttributeRouteInfo.Template); 458Assert.Equal("MultipleHttpGet", action.ActionName); 459Assert.Equal("MultiRouteAttributes", action.ControllerName); 483Assert.Equal("MultiRouteAttributes", action.ControllerName); 508Assert.Equal("MultiRouteAttributes", action.ControllerName); 517Assert.Equal("Override", action.AttributeRouteInfo.Template); 535Assert.Equal("MultiRouteAttributes", action.ControllerName); 574Assert.Equal("MultiRouteAttributes", action.ControllerName); 652Assert.Equal("Products/list", action.AttributeRouteInfo.Template); 743Assert.Equal("Action", action.ActionName); 744Assert.Equal("OnlyRoute", action.ControllerName); 747Assert.Equal("Products/Index", action.AttributeRouteInfo.Template); 883Assert.Equal(expectedMessage, ex.Message); 906Assert.Equal("ConventionalAndAttributeRoutedActionsWithArea", controllerDefault.Value); 909Assert.Equal("Index", actionDefault.Value); 912Assert.Equal("Home", areaDefault.Value); 926Assert.Equal("stub/ThisIsAnAction", action.AttributeRouteInfo.Template); 941Assert.Equal("stub/{controller}/{action}", action.AttributeRouteInfo.Template); 1021Assert.Equal("Store", action.GetProperty<ApiDescriptionActionData>().GroupName); 1035Assert.Equal("Blog", action.GetProperty<ApiDescriptionActionData>().GroupName); 1051Assert.Equal("Blog", action.GetProperty<ApiDescriptionActionData>().GroupName); 1054Assert.Equal("Store", action.GetProperty<ApiDescriptionActionData>().GroupName); 1103Assert.Equal(expected, ex.Message); 1411Assert.Equal(expectedLines[i], actualLines[i]); 1428Assert.Equal(orderedExpectedLines[i], orderedActualLines[i]); 1433Assert.Equal(expectedLines[i], actualLines[i]);
ApplicationModels\DefaultApplicationModelProviderTest.cs (25)
80Assert.Equal(nameof(ModelBinderController.Bound), property.PropertyName); 89Assert.Equal(nameof(ModelBinderController.FormFile), property.PropertyName); 97Assert.Equal(nameof(ModelBinderController.Service), property.PropertyName); 106Assert.Equal(nameof(ModelBinderController.Unbound), property.PropertyName); 132Assert.Equal(nameof(ModelBinderController.Bound), property.PropertyName); 141Assert.Equal(nameof(ModelBinderController.FormFile), property.PropertyName); 149Assert.Equal(nameof(ModelBinderController.Service), property.PropertyName); 158Assert.Equal(nameof(ModelBinderController.Unbound), property.PropertyName); 185Assert.Equal("fromQuery", parameter.ParameterName); 194Assert.Equal("formFileCollection", parameter.ParameterName); 202Assert.Equal("unbound", parameter.ParameterName); 229Assert.Equal("formFileEnumerable", parameter.ParameterName); 234Assert.Equal("formFileCollection", parameter.ParameterName); 239Assert.Equal("formFileIList", parameter.ParameterName); 244Assert.Equal("formFileList", parameter.ParameterName); 249Assert.Equal("formFileArray", parameter.ParameterName); 277Assert.Equal("guid", parameter.ParameterName); 305Assert.Equal("fromQuery", parameter.ParameterName); 327Assert.Equal("GetPerson", action.ActionName); 347Assert.Equal(nameof(AsyncActionController.GetPersonAsync), action.ActionName); 367Assert.Equal("GetRealAddressAsync", action.ActionName); 882Assert.Equal("Change", attributeRoute.Template); 906Assert.Equal("Update", attributeRoute.Template); 935Assert.Equal("ListAll", attributeRoute.Template); 1069Assert.Equal("Products", attributeRoute.Template);
ApplicationModels\InferParameterBindingInfoConventionTest.cs (15)
68Assert.Equal(expected, ex.Message); 87Assert.Equal(expected, ex.Message); 106Assert.Equal(expected, ex.Message); 126Assert.Equal("model", parameter.Name); 135Assert.Equal("cancellationToken", parameter.Name); 160Assert.Equal("model", parameter.Name); 186Assert.Equal("model", parameter.Name); 212Assert.Equal("model", parameter.Name); 239Assert.Equal("top", bindingInfo.BinderModelName); 281Assert.Equal("foo", bindingInfo.BinderModelName); 684Assert.Equal("top", bindingInfo.BinderModelName); 725Assert.Equal("gps", bindingInfo.BinderModelName); 788Assert.Equal("ids", bindingInfo.BinderModelName); 830Assert.Equal("top", bindingInfo.BinderModelName); 871Assert.Equal("gps", bindingInfo.BinderModelName);
ApplicationParts\AssemblyPartTest.cs (1)
18Assert.Equal("Microsoft.AspNetCore.Mvc.Core.Test", name);
ApplicationParts\RelatedAssemblyPartTest.cs (1)
37Assert.Equal(expected, ex.Message);
Authorization\AuthorizeFilterTest.cs (2)
65Assert.Equal(expected, ex.Message); 81Assert.Equal(expected, ex.Message);
Builder\MvcApplicationBuilderExtensionsTest.cs (2)
27Assert.Equal( 85Assert.Equal(expected, ex.Message);
Builder\MvcAreaRouteBuilderExtensionsTest.cs (29)
27Assert.Equal("site/Admin/", route.RouteTemplate); 32Assert.Equal("area", kvp.Key); 40Assert.Equal("area", kvp.Key); 61Assert.Equal("admin_area", route.Name); 62Assert.Equal("site/Admin/", route.RouteTemplate); 67Assert.Equal("area", kvp.Key); 75Assert.Equal("action", kvp.Key); 80Assert.Equal("area", kvp.Key); 102Assert.Equal("admin_area", route.Name); 103Assert.Equal("site/Admin/", route.RouteTemplate); 108Assert.Equal("area", kvp.Key); 113Assert.Equal("id", kvp.Key); 121Assert.Equal("action", kvp.Key); 126Assert.Equal("area", kvp.Key); 149Assert.Equal("admin_area", route.Name); 150Assert.Equal("site/Admin/", route.RouteTemplate); 155Assert.Equal("area", kvp.Key); 160Assert.Equal("id", kvp.Key); 167Assert.Equal("some_token", kvp.Key); 174Assert.Equal("action", kvp.Key); 179Assert.Equal("area", kvp.Key); 202Assert.Equal("admin_area", route.Name); 203Assert.Equal("site/Admin/", route.RouteTemplate); 208Assert.Equal("area", kvp.Key); 215Assert.Equal("some_token", kvp.Key); 222Assert.Equal("area", kvp.Key); 241Assert.Equal("site/Admin/", route.RouteTemplate); 246Assert.Equal("area", kvp.Key); 264Assert.Equal("area", kvp.Key);
ConsumesAttributeTests.cs (5)
29Assert.Equal(expectedMessage, exception.Message); 47Assert.Equal("The header contains invalid values at index 0: '" + (invalidContentType ?? "<null>") + "'", 68Assert.Equal( 399t => Assert.Equal("application/json", t), 400t => Assert.Equal("text/json", t));
ContentResultTest.cs (2)
138Assert.Equal(expectedContentType, finalResponseContentType); 243Assert.Equal(content, actualContent);
ControllerBaseTest.cs (133)
294Assert.Equal("SampleAction", resultTemporary.ActionName); 310Assert.Equal("SampleAction", resultTemporary.ActionName); 326Assert.Equal("SampleAction", resultPermanent.ActionName); 342Assert.Equal("SampleAction", resultPermanent.ActionName); 361Assert.Equal("SampleAction", resultTemporary.ActionName); 362Assert.Equal(controllerName, resultTemporary.ControllerName); 381Assert.Equal("SampleAction", resultTemporary.ActionName); 382Assert.Equal(controllerName, resultTemporary.ControllerName); 401Assert.Equal("SampleAction", resultPermanent.ActionName); 402Assert.Equal(controllerName, resultPermanent.ControllerName); 421Assert.Equal("SampleAction", resultPermanent.ActionName); 422Assert.Equal(controllerName, resultPermanent.ControllerName); 441Assert.Equal("SampleAction", resultTemporary.ActionName); 442Assert.Equal("SampleController", resultTemporary.ControllerName); 465Assert.Equal("SampleAction", resultTemporary.ActionName); 466Assert.Equal("SampleController", resultTemporary.ControllerName); 489Assert.Equal("SampleAction", resultPermanent.ActionName); 490Assert.Equal("SampleController", resultPermanent.ControllerName); 513Assert.Equal("SampleAction", resultPermanent.ActionName); 514Assert.Equal("SampleController", resultPermanent.ControllerName); 577Assert.Equal(expectedAction, result.ActionName); 579Assert.Equal(expectedController, result.ControllerName); 580Assert.Equal(expectedFragment, result.Fragment); 602Assert.Equal(expectedAction, result.ActionName); 604Assert.Equal(expectedController, result.ControllerName); 605Assert.Equal(expectedFragment, result.Fragment); 667Assert.Equal(expectedAction, result.ActionName); 669Assert.Equal(expectedController, result.ControllerName); 670Assert.Equal(expectedFragment, result.Fragment); 696Assert.Equal(expectedAction, result.ActionName); 698Assert.Equal(expectedController, result.ControllerName); 699Assert.Equal(expectedFragment, result.Fragment); 758Assert.Equal(expectedRoute, result.RouteName); 760Assert.Equal(expectedFragment, result.Fragment); 781Assert.Equal(expectedRoute, result.RouteName); 783Assert.Equal(expectedFragment, result.Fragment); 842Assert.Equal(expectedRoute, result.RouteName); 844Assert.Equal(expectedFragment, result.Fragment); 865Assert.Equal(expectedRoute, result.RouteName); 867Assert.Equal(expectedFragment, result.Fragment); 1013Assert.Equal(pageName, result.PageName); 1029Assert.Equal(pageName, result.PageName); 1030Assert.Equal(pageHandler, result.PageHandler); 1046Assert.Equal(pageName, result.PageName); 1051Assert.Equal("key", item.Key); 1070Assert.Equal(pageName, result.PageName); 1071Assert.Equal(pageHandler, result.PageHandler); 1072Assert.Equal(fragment, result.Fragment); 1090Assert.Equal(pageName, result.PageName); 1091Assert.Equal(pageHandler, result.PageHandler); 1096Assert.Equal("key", item.Key); 1099Assert.Equal(fragment, result.Fragment); 1114Assert.Equal(pageName, result.PageName); 1131Assert.Equal(pageName, result.PageName); 1132Assert.Equal(pageHandler, result.PageHandler); 1149Assert.Equal(pageName, result.PageName); 1154Assert.Equal("key", item.Key); 1174Assert.Equal(pageName, result.PageName); 1175Assert.Equal(pageHandler, result.PageHandler); 1176Assert.Equal(fragment, result.Fragment); 1195Assert.Equal(pageName, result.PageName); 1196Assert.Equal(pageHandler, result.PageHandler); 1201Assert.Equal("key", item.Key); 1204Assert.Equal(fragment, result.Fragment); 1332Assert.Equal(uri.OriginalString, result.Location); 1363Assert.Equal(uri.OriginalString, result.Location); 1378Assert.Equal("SampleAction", result.ActionName); 1397Assert.Equal("SampleAction", result.ActionName); 1398Assert.Equal(controllerName, result.ControllerName); 1421Assert.Equal("SampleAction", result.ActionName); 1422Assert.Equal("SampleController", result.ControllerName); 1542Assert.Equal(uri.OriginalString, result.Location); 1558Assert.Equal(uri.OriginalString, result.Location); 1573Assert.Equal("SampleAction", result.ActionName); 1591Assert.Equal("SampleAction", result.ActionName); 1592Assert.Equal(controllerName, result.ControllerName); 1615Assert.Equal("SampleAction", result.ActionName); 1616Assert.Equal("SampleController", result.ControllerName); 1675Assert.Equal("application/pdf", result.ContentType.ToString()); 1676Assert.Equal(string.Empty, result.FileDownloadName); 1693Assert.Equal("application/pdf", result.ContentType.ToString()); 1694Assert.Equal(string.Empty, result.FileDownloadName); 1717Assert.Equal("application/pdf", result.ContentType.ToString()); 1718Assert.Equal(string.Empty, result.FileDownloadName); 1737Assert.Equal("application/pdf", result.ContentType.ToString()); 1738Assert.Equal("someDownloadName", result.FileDownloadName); 1761Assert.Equal("application/pdf", result.ContentType.ToString()); 1762Assert.Equal("someDownloadName", result.FileDownloadName); 1780Assert.Equal(path, result.FileName); 1781Assert.Equal("application/pdf", result.ContentType.ToString()); 1782Assert.Equal(string.Empty, result.FileDownloadName); 1804Assert.Equal(path, result.FileName); 1805Assert.Equal("application/pdf", result.ContentType.ToString()); 1806Assert.Equal(string.Empty, result.FileDownloadName); 1824Assert.Equal(path, result.FileName); 1825Assert.Equal("application/pdf", result.ContentType.ToString()); 1826Assert.Equal("someDownloadName", result.FileDownloadName); 1848Assert.Equal(path, result.FileName); 1849Assert.Equal("application/pdf", result.ContentType.ToString()); 1850Assert.Equal("someDownloadName", result.FileDownloadName); 1874Assert.Equal("application/pdf", result.ContentType.ToString()); 1875Assert.Equal(string.Empty, result.FileDownloadName); 1903Assert.Equal("application/pdf", result.ContentType.ToString()); 1904Assert.Equal(string.Empty, result.FileDownloadName); 1927Assert.Equal("application/pdf", result.ContentType.ToString()); 1928Assert.Equal("someDownloadName", result.FileDownloadName); 1955Assert.Equal("application/pdf", result.ContentType.ToString()); 1956Assert.Equal("someDownloadName", result.FileDownloadName); 2190Assert.Equal("TestContent", actualContentResult.Content); 2205Assert.Equal("TestContent", actualContentResult.Content); 2207Assert.Equal("text/plain", actualContentResult.ContentType.ToString()); 2221Assert.Equal("TestContent", actualContentResult.Content); 2223Assert.Equal("text/plain; charset=utf-8", actualContentResult.ContentType.ToString()); 2252Assert.Equal(contentType, contentResult.ContentType.ToString()); 2282Assert.Equal(contentType, contentResult.ContentType); 2359Assert.Equal("One or more validation errors occurred.", problemDetails.Title); 2360Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", problemDetails.Type); 2385Assert.Equal(title, problemDetails.Title); 2386Assert.Equal(type, problemDetails.Type); 2387Assert.Equal(detail, problemDetails.Detail); 2478Assert.Equal("An error occurred while processing your request.", problemDetails.Title); 2479Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", problemDetails.Type); 2504Assert.Equal(title, problemDetails.Title); 2505Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", problemDetails.Type); 2506Assert.Equal(detail, problemDetails.Detail); 2549Assert.Equal("Unprocessable entity.", problemDetails.Title); 2550Assert.Equal("https://tools.ietf.org/html/rfc4918#section-11.2", problemDetails.Type); 2712Assert.Equal("some error", error.ErrorMessage); 3118Assert.Equal("Out of range!", error.ErrorMessage); 3155Assert.Equal("Out of range!", error.ErrorMessage); 3184Assert.Equal("page", result.PageName); 3185Assert.Equal("handler", result.PageHandler); 3189Assert.Equal("test", item.Key);
Controllers\ControllerBinderDelegateProviderTest.cs (5)
417Assert.Equal( 513Assert.Equal( 648Assert.Equal("Hello", controller.StringProperty); 1061Assert.Equal("Hello", controller.StringProperty); 1246Assert.Equal("Some error", error.ErrorMessage);
Controllers\DefaultControllerFactoryTest.cs (1)
180Assert.Equal(
Controllers\ServiceBasedControllerActivatorTest.cs (1)
69Assert.Equal(expected, ex.Message);
CreatedAtActionResultTests.cs (1)
41Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
CreatedAtRouteResultTests.cs (1)
55Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
CreatedResultTests.cs (2)
75Assert.Equal(location, httpContext.Response.Headers["Location"]); 109Assert.Equal(location, httpContext.Response.Headers["Location"]);
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (5)
46Assert.Equal("One or more validation errors occurred.", problemDetails.Title); 47Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", problemDetails.Type); 68Assert.Equal("One or more validation errors occurred.", problemDetails.Title); 69Assert.Equal(link, problemDetails.Type); 92Assert.Equal("One or more validation errors occurred.", problemDetails.Title);
FileResultHelperTest.cs (10)
25Assert.Equal("text/plain", result.ContentType.ToString()); 48Assert.Equal("application/my-type", httpContext.Response.Headers["Content-Type"]); 49Assert.Equal(@"attachment; filename=""some\\file""; filename*=UTF-8''some%5Cfile", httpContext.Response.Headers["Content-Disposition"]); 69Assert.Equal("application/my-type", httpContext.Response.Headers["Content-Type"]); 70Assert.Equal(@"attachment; filename=""ABCXYZabcxyz012789!@#$%^&*()-=_+.:~_""; filename*=UTF-8''ABCXYZabcxyz012789!%40#$%25^&%2A%28%29-%3D_+.%3A~%CE%94", 95Assert.Equal("application/my-type", httpContext.Response.ContentType); 116Assert.Equal("application/my-type", httpContext.Response.ContentType); 117Assert.Equal("attachment; filename=filename.ext; filename*=UTF-8''filename.ext", httpContext.Response.Headers["Content-Disposition"]); 218Assert.Equal(expectedOutput, actual); 234Assert.Equal("bytes", httpContext.Response.Headers.AcceptRanges);
FileStreamResultTest.cs (2)
66Assert.Equal(expectedMediaType, result.ContentType); 89Assert.Equal(expectedMediaType, result.ContentType);
Filters\DisableRequestSizeLimitFilterTest.cs (3)
68Assert.Equal($"A request body size limit could not be applied. This server does not support the IHttpRequestBodySizeFeature.", 91Assert.Equal($"A request body size limit could not be applied. The IHttpRequestBodySizeFeature for the server is read-only.", write.State.ToString()); 112Assert.Equal($"The request body size limit has been disabled.", write.State.ToString());
Filters\FilterFactoryTest.cs (2)
240Assert.Equal("foo", request1Filter3.Data); 253Assert.Equal("bar", request2Filter3.Data);
Filters\MiddlewareFilterBuilderTest.cs (3)
101Assert.Equal($"Feature '{typeof(IMiddlewareFilterFeature)}' is not present.", exception.Message); 216Assert.Equal("Error!!!", exception.Message); 284Assert.Equal("Error!!!", exception.Message);
Filters\MiddlewareFilterConfigurationProviderTest.cs (3)
27Assert.Equal($"Unable to create an instance of type '{configurationType}'. The type specified in configurationType must not be abstract and must have a parameterless constructor.", exception.Message); 74Assert.Equal(expected, exception.Message); 90Assert.Equal(expected, exception.Message);
Filters\MiddlewareFilterTest.cs (2)
127Assert.Equal(expectedHeaderValue, response.Headers[expectedHeader]); 161Assert.Equal(expectedMessage, exception.Message);
Filters\RequestFormLimitsFilterTest.cs (3)
74Assert.Equal( 99Assert.Equal( 125Assert.Equal(
Filters\RequestSizeLimitFilterTest.cs (3)
72Assert.Equal($"A request body size limit could not be applied. This server does not support the IHttpRequestBodySizeFeature.", 96Assert.Equal($"A request body size limit could not be applied. The IHttpRequestBodySizeFeature for the server is read-only.", write.State.ToString()); 118Assert.Equal($"The maximum request body size has been set to 12345.", write.State.ToString());
Filters\ResponseCacheFilterExecutorTest.cs (14)
29Assert.Equal("no-store", context.HttpContext.Response.Headers["Cache-control"]); 60Assert.Equal("If the 'NoStore' property is not set to true, 'Duration' property must be specified.", 188Assert.Equal(output, context.HttpContext.Response.Headers["Cache-control"]); 245Assert.Equal(output, context.HttpContext.Response.Headers["Cache-control"]); 325Assert.Equal(varyOutput, context.HttpContext.Response.Headers["Vary"]); 326Assert.Equal(cacheControlOutput, context.HttpContext.Response.Headers["Cache-control"]); 409Assert.Equal(cacheControlOutput, context.HttpContext.Response.Headers.CacheControl); 429Assert.Equal("'VaryByQueryKeys' requires the response cache middleware.", exception.Message); 450Assert.Equal("no-store,no-cache", context.HttpContext.Response.Headers["Cache-control"]); 451Assert.Equal("no-cache", context.HttpContext.Response.Headers["Pragma"]); 470Assert.Equal("public,max-age=20", context.HttpContext.Response.Headers["Cache-control"]); 490Assert.Equal("private,max-age=10", context.HttpContext.Response.Headers["Cache-control"]); 510Assert.Equal("public,max-age=10", context.HttpContext.Response.Headers["Cache-control"]); 530Assert.Equal("Test", context.HttpContext.Response.Headers["Vary"]);
Formatters\FormatFilterTest.cs (2)
299Assert.Equal(expected, filter.GetFormat(context)); 318Assert.Equal(expected, filter.GetFormat(context));
Formatters\InputFormatterTest.cs (4)
344Assert.Collection(results, c => Assert.Equal("text/xml", c)); 361c => Assert.Equal("application/xml", c), 362c => Assert.Equal("text/xml", c)); 377Assert.Collection(results, c => Assert.Equal("text/xml", c));
Formatters\JsonInputFormatterTestBase.cs (18)
60Assert.Equal("application/json", mediaType.ToString()); 102Assert.Equal("abcd", stringValue); 123Assert.Equal(content, stringValue); 151Assert.Equal(expectedKey, kvp.Key); 178Assert.Equal(expectedKey, kvp.Key); 206Assert.Equal(expectedKey, kvp.Key); 250Assert.Equal("Person Name", userModel.Name); 329Assert.Equal(expectedKey, kvp.Key); 355Assert.Equal(expectedKey, kvp.Key); 382Assert.Equal(expectedValue, kvp.Key); 408Assert.Equal(expectedKey, kvp.Key); 489Assert.Equal(expectedKey, kvp.Key); 514Assert.Equal(ReadAsync_NestedParseError_Expected, kvp.Key); 556Assert.Equal("Test", userModel.Name); 578Assert.Equal("Test", userModel.Name); 581Assert.Equal(content, new StreamReader(requestBody).ReadToEnd()); 604Assert.Equal("Test", userModel.Name); 606Assert.Equal(content, new StreamReader(requestBody).ReadToEnd());
Formatters\JsonOutputFormatterTestBase.cs (1)
137Assert.Equal(expectedContent, actualContent);
Formatters\MediaTypeTest.cs (1)
146Assert.Equal(expectedMediaType, result);
Formatters\OutputFormatterTests.cs (4)
29Assert.Equal(formatter.SupportedMediaTypes[0].ToString(), context.ContentType.ToString()); 101Assert.Equal(requestedContentType, context.ContentType.ToString()); 144Assert.Equal("application/json", contentType.ToString()); 165Assert.Equal("application/vnd.test+json;v=2", contentType.ToString());
Formatters\SystemTextJsonInputFormatterTest.cs (4)
83Assert.Equal("$[1]", kvp.Key); 107Assert.Equal("The supplied value is invalid.", error.ErrorMessage); 128Assert.Equal("The supplied value is invalid.", error.ErrorMessage); 158Assert.Equal(expectedMessage, modelError.ErrorMessage);
Formatters\SystemTextJsonOutputFormatterTest.cs (4)
59Assert.Equal(expectedContent, actualContent); 205Assert.Equal(expectedContent, actualContent); 245Assert.Equal(expectedContent, actualContent); 266Assert.Equal("JsonSerializerOptions instance must specify a TypeInfoResolver setting before being marked as read-only.", exception.Message);
Formatters\TextOutputFormatterTests.cs (1)
254Assert.Equal(expectedValue, Assert.Single(result).Value.Value);
Infrastructure\ActionMethodExecutorTest.cs (15)
33Assert.Equal("VoidResultExecutor", actionMethodExecutor.GetType().Name); 59Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 85Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 112Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 141Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 170Assert.Equal("SyncObjectResultExecutor", actionMethodExecutor.GetType().Name); 197Assert.Equal("SyncActionResultExecutor", actionMethodExecutor.GetType().Name); 222Assert.Equal("TaskResultExecutor", actionMethodExecutor.GetType().Name); 248Assert.Equal("AwaitableResultExecutor", actionMethodExecutor.GetType().Name); 274Assert.Equal("TaskOfIActionResultExecutor", actionMethodExecutor.GetType().Name); 300Assert.Equal("TaskOfActionResultExecutor", actionMethodExecutor.GetType().Name); 327Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 356Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 383Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name); 410Assert.Equal("AwaitableObjectResultExecutor", actionMethodExecutor.GetType().Name);
Infrastructure\ActionSelectorTest.cs (5)
516Assert.Equal(expectedMessage, write.State?.ToString()); 844Assert.Equal(expectedMessage, ex.Message); 864Assert.Equal("Patch", result.ActionName); 885Assert.Equal("Put", result.ActionName); 970Assert.Equal(actionName, result.ActionName);
Infrastructure\AsyncEnumerableReaderTest.cs (1)
186Assert.Equal(expected, ex.Message);
Infrastructure\ControllerActionInvokerTest.cs (11)
1582m => Assert.Equal($"Route matched with {{}}. Executing controller action with signature {actionSignature} on controller {controllerName}.", m), 1583m => Assert.Equal("Execution plan of authorization filters (in the following order): None", m), 1584m => Assert.Equal("Execution plan of resource filters (in the following order): None", m), 1585m => Assert.Equal("Execution plan of action filters (in the following order): None", m), 1586m => Assert.Equal("Execution plan of exception filters (in the following order): None", m), 1587m => Assert.Equal("Execution plan of result filters (in the following order): None", m), 1588m => Assert.Equal($"Executing controller factory for controller {controllerName}", m), 1589m => Assert.Equal($"Executed controller factory for controller {controllerName}", m), 1590m => Assert.Equal($"Executing action method {actionName} - Validation state: Valid", m), 1592m => Assert.Equal($"Before executing action result {actionResultName}.", m), 1593m => Assert.Equal($"After executing action result {actionResultName}.", m),
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (8)
48Assert.Equal(expectedProblem.Type, problemDetails.Type); 49Assert.Equal(expectedProblem.Title, problemDetails.Title); 50Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 51Assert.Equal(expectedProblem.Instance, problemDetails.Instance); 87Assert.Equal(expectedProblem.Type, problemDetails.Type); 88Assert.Equal(expectedProblem.Title, problemDetails.Title); 89Assert.Equal(expectedProblem.Detail, problemDetails.Detail); 90Assert.Equal(expectedProblem.Instance, problemDetails.Instance);
Infrastructure\JsonResultExecutorTestBase.cs (13)
39Assert.Equal("application/json; charset=utf-8", context.HttpContext.Response.ContentType); 60Assert.Equal("text/json", context.HttpContext.Response.ContentType); 84Assert.Equal("text/json; charset=utf-16", context.HttpContext.Response.ContentType); 104Assert.Equal("text/json; charset=utf-16", context.HttpContext.Response.ContentType); 128Assert.Equal("text/json; charset=us-ascii", context.HttpContext.Response.ContentType); 150Assert.Equal(expectedContentType, context.HttpContext.Response.ContentType); 175Assert.Equal(expectedContentType, context.HttpContext.Response.ContentType); 199Assert.Equal("application/json; charset=utf-8", context.HttpContext.Response.ContentType); 219Assert.Equal("Property Age has not been implemented", ex.Message); 224Assert.Equal("Property Age has not been implemented", expectedException.Message); 247Assert.Equal(expected, write.State.ToString()); 265Assert.Equal(expected, write.State.ToString()); 342Assert.Equal(expected, Encoding.UTF8.GetString(written));
Infrastructure\ObjectResultExecutorTest.cs (5)
88Assert.Equal("application/json; charset=utf-8", httpContext.Response.ContentType); 299Assert.Equal( 320Assert.Equal(expected, exception.Message); 358Assert.Equal(expectedMessage, exception.Message); 395Assert.Equal(expectedContentType, actionContext.HttpContext.Response.Headers.ContentType);
Infrastructure\ProblemDetailsFactoryTest.cs (23)
23Assert.Equal("An error occurred while processing your request.", problemDetails.Title); 24Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.6.1", problemDetails.Type); 31Assert.Equal("traceId", kvp.Key); 44Assert.Equal("Not Acceptable", problemDetails.Title); 45Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.7", problemDetails.Type); 52Assert.Equal("traceId", kvp.Key); 67Assert.Equal(title, problemDetails.Title); 68Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.7", problemDetails.Type); 70Assert.Equal(detail, problemDetails.Detail); 75Assert.Equal("traceId", kvp.Key); 90Assert.Equal("One or more validation errors occurred.", problemDetails.Title); 91Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", problemDetails.Type); 98Assert.Equal("traceId", kvp.Key); 105Assert.Equal("some-key", kvp.Key); 120Assert.Equal("One or more validation errors occurred.", problemDetails.Title); 121Assert.Equal("https://tools.ietf.org/html/rfc4918#section-11.2", problemDetails.Type); 128Assert.Equal("traceId", kvp.Key); 135Assert.Equal("some-key", kvp.Key); 152Assert.Equal(title, problemDetails.Title); 153Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", problemDetails.Type); 154Assert.Equal(instance, problemDetails.Instance); 160Assert.Equal("traceId", kvp.Key); 167Assert.Equal("some-key", kvp.Key);
Infrastructure\ProblemDetalsClientErrorFactoryTest.cs (2)
61Assert.Equal("Some link", problemDetails.Type); 62Assert.Equal("Summary", problemDetails.Title);
Infrastructure\ValidationProblemDetailsJsonConverterTest.cs (22)
32Assert.Equal(type, problemDetails.Type); 33Assert.Equal(title, problemDetails.Title); 35Assert.Equal(instance, problemDetails.Instance); 36Assert.Equal(detail, problemDetails.Detail); 41Assert.Equal("traceId", kvp.Key); 42Assert.Equal(traceId, kvp.Value.ToString()); 48Assert.Equal("key0", kvp.Key); 53Assert.Equal("key1", kvp.Key); 74Assert.Equal(type, problemDetails.Type); 75Assert.Equal(title, problemDetails.Title); 81Assert.Equal("traceId", kvp.Key); 82Assert.Equal(traceId, kvp.Value.ToString()); 88Assert.Equal("key0", kvp.Key); 93Assert.Equal("key1", kvp.Key); 112Assert.Equal(type, problemDetails.Type); 113Assert.Equal(title, problemDetails.Title); 119Assert.Equal("traceId", kvp.Key); 120Assert.Equal(traceId, kvp.Value.ToString()); 126Assert.Equal("key0", kvp.Key); 131Assert.Equal("key1", kvp.Key); 157Assert.Equal(expectedJSON, json); 190Assert.Equal(expectedJSON, json);
LocalRedirectResultTest.cs (3)
78Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString()); 100Assert.Equal( 122Assert.Equal(
ModelBinding\Binders\ArrayModelBinderTest.cs (2)
119Assert.Equal("modelName", keyValuePair.Key); 121Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage);
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
49Assert.Equal(model.Name, person.Name);
ModelBinding\Binders\BodyModelBinderProviderTest.cs (1)
53Assert.Equal(expected, exception.Message);
ModelBinding\Binders\BodyModelBinderTests.cs (28)
71Assert.Equal(string.Empty, entry.Key); 96Assert.Equal("custom", entry.Key); 154Assert.Equal("custom", entry.Key); 155Assert.Equal("Customized error message", entry.Value.Errors.Single().ErrorMessage); 244Assert.Equal("Unsupported content type ''.", bindingContext.ModelState[bindingContext.BinderModelName].Errors[0].Exception.Message); 276Assert.Equal(string.Empty, entry.Key); 278Assert.Equal("Bad input!!", errorMessage); 319Assert.Equal(string.Empty, entry.Key); 321Assert.Equal("An error occurred while deserializing input data.", errorMessage); 350Assert.Equal(string.Empty, entry.Key); 390Assert.Equal(string.Empty, entry.Key); 392Assert.Equal("An error occurred while deserializing input data.", errorMessage); 421Assert.Equal(string.Empty, entry.Key); 459Assert.Equal("Unable to read input stream!!", exception.Message); 501Assert.Equal(string.Empty, entry.Key); 503Assert.Equal("Unable to read input stream!!", errorMessage); 528Assert.Equal("Unable to read input stream!!", exception.Message); 557Assert.Equal(string.Empty, entry.Key); 559Assert.Equal("Unsupported content type 'text/xyz'.", errorMessage); 613Assert.Equal($"Attempting to bind model of type '{typeof(Person)}' using the name 'someName' in request data ...", writeList[0].State.ToString()); 614Assert.Equal($"Rejected input formatter '{typeof(TestInputFormatter)}' for content type 'application/json'.", writeList[1].State.ToString()); 615Assert.Equal($"Selected input formatter '{typeof(TestInputFormatter)}' for content type 'application/json'.", writeList[2].State.ToString()); 643write => Assert.Equal( 645write => Assert.Equal( 647write => Assert.Equal( 649write => Assert.Equal( 651write => Assert.Equal( 653write => Assert.Equal(
ModelBinding\Binders\ByteArrayModelBinderTests.cs (2)
32Assert.Equal("foo", modelState.Key); 78Assert.Equal(expected, error.ErrorMessage);
ModelBinding\Binders\CollectionModelBinderTest.cs (3)
305Assert.Equal("modelName", keyValuePair.Key); 307Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage); 461Assert.Equal("someName", mbc.ModelName);
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (15)
317Assert.Equal(string.Empty, keyValuePair.Key); 319Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage); 361Assert.Equal(string.Empty, keyValuePair.Key); 363Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage); 405Assert.Equal(string.Empty, keyValuePair.Key); 407Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage); 624Assert.Equal("A value for the 'Age' parameter or property was not provided.", modelError.ErrorMessage); 689Assert.Equal("A value for the 'Age' parameter or property was not provided.", modelError.ErrorMessage); 728Assert.Equal(string.Empty, modelError.ErrorMessage); 855Assert.Equal("John", model.FirstName); 856Assert.Equal("Doe", model.LastName); 903Assert.Equal("preinitialized", person.PropertyWithInitializedValue); 927Assert.Equal("preinitialized", person.PropertyWithInitializedValueAndDefault); 1057Assert.Equal("Date of death can't be before date of birth. (Parameter 'value')", 1080Assert.Equal("This is a different exception. (Parameter 'value')",
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (18)
377Assert.Equal(string.Empty, keyValuePair.Key); 379Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage); 421Assert.Equal(string.Empty, keyValuePair.Key); 423Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage); 465Assert.Equal(string.Empty, keyValuePair.Key); 467Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage); 540Assert.Equal( 565Assert.Equal(expectedMessage, exception.Message); 582Assert.Equal( 802Assert.Equal("A value for the 'Age' parameter or property was not provided.", modelError.ErrorMessage); 836Assert.Equal("A value for the 'Age' parameter or property was not provided.", modelError.ErrorMessage); 872Assert.Equal(string.Empty, modelError.ErrorMessage); 991Assert.Equal("John", model.FirstName); 992Assert.Equal("Doe", model.LastName); 1065Assert.Equal("preinitialized", person.PropertyWithInitializedValue); 1089Assert.Equal("preinitialized", person.PropertyWithInitializedValueAndDefault); 1219Assert.Equal("Date of death can't be before date of birth. (Parameter 'value')", 1242Assert.Equal("This is a different exception. (Parameter 'value')",
ModelBinding\Binders\DateTimeModelBinderTest.cs (2)
50Assert.Equal(message, error.ErrorMessage); 151Assert.Equal("theModelName", entry.Key);
ModelBinding\Binders\DictionaryModelBinderTest.cs (6)
48Assert.Equal("forty-two", dictionary[42]); 49Assert.Equal("eighty-four", dictionary[84]); 89Assert.Equal("forty-two", dictionary[42]); 90Assert.Equal("eighty-four", dictionary[84]); 491Assert.Equal("modelName", keyValuePair.Key); 493Assert.Equal("A value for the 'fieldName' parameter or property was not provided.", error.ErrorMessage);
ModelBinding\Binders\EnumTypeModelBinderTest.cs (7)
44Assert.Equal(message, error.ErrorMessage); 88Assert.Equal(expected, boundModel.ToString()); 112Assert.Equal(expected, boundModel.ToString()); 149Assert.Equal(message, error.ErrorMessage); 174Assert.Equal(expected, boundModel.ToString()); 199Assert.Equal(expected, boundModel.ToString()); 232Assert.Equal(message, error.ErrorMessage);
ModelBinding\Binders\FloatingPointTypeModelBinderTestOfT.cs (2)
72Assert.Equal(message, error.ErrorMessage); 232Assert.Equal("theModelName", entry.Key);
ModelBinding\Binders\FormCollectionModelBinderProviderTest.cs (1)
22Assert.Equal(
ModelBinding\Binders\FormCollectionModelBinderTest.cs (2)
36Assert.Equal("value1", form["field1"]); 37Assert.Equal("value2", form["field2"]);
ModelBinding\Binders\FormFileModelBinderTest.cs (9)
33Assert.Equal("file", entry.Key); 67Assert.Equal("file", entry.Key); 107Assert.Equal($"{propertyName}", entry.Key); 149Assert.Equal($"FileList.{propertyName}", entry.Key); 183Assert.Equal("[myFile]", entry.Key); 219Assert.Equal("FileDictionary[myFile]", entry.Key); 240Assert.Equal("file", entry.Key); 288Assert.Equal("file1.txt", file.FileName); 355Assert.Equal(expected, file.Name);
ModelBinding\Binders\HeaderModelBinderTests.cs (3)
295Assert.Equal($"The value '{headerValue}' is not valid.", error.ErrorMessage); 319Assert.Equal($"The value '{headerValues[0]}' is not valid.", entry.Errors[0].ErrorMessage); 320Assert.Equal($"The value '{headerValues[1]}' is not valid.", entry.Errors[1].ErrorMessage);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (5)
31Assert.Equal("someName", bindingContext.ModelName); 33Assert.Equal("A value is required.", error.ErrorMessage); 55Assert.Equal("someName", bindingContext.ModelName); 59Assert.Equal("A value is required.", error.ErrorMessage); 125Assert.Equal("someName.Key", context.ModelName);
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (4)
155Assert.Equal(message, error.ErrorMessage); 326Assert.Equal("theModelName", entry.Key); 327Assert.Equal("32,000", entry.Value.AttemptedValue); 331Assert.Equal("The value '32,000' is not valid.", error.ErrorMessage);
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (4)
104Assert.Equal(message, error.ErrorMessage); 252Assert.Equal("theModelName", entry.Key); 253Assert.Equal("32,000", entry.Value.AttemptedValue); 257Assert.Equal("The value '32,000' is not valid.", error.ErrorMessage);
ModelBinding\CompositeValueProviderTest.cs (2)
85Assert.Equal("prefix-test", result.Key); 86Assert.Equal("some-value", result.Value);
ModelBinding\DefaultModelBindingContextTest.cs (2)
53Assert.Equal("fieldName", bindingContext.FieldName); 57Assert.Equal("modelprefix.fieldName", bindingContext.ModelName);
ModelBinding\ElementalValueProviderTests.cs (1)
82Assert.Equal("hi", (string)result);
ModelBinding\EnumerableValueProviderTest.cs (2)
167Assert.Equal("someOtherValue", (string)result); 183Assert.Equal("someValue1,someValue2", (string)result);
ModelBinding\JQueryFormValueProviderFactoryTest.cs (1)
114Assert.Equal("found", (string)result);
ModelBinding\JQueryFormValueProviderTest.cs (1)
47Assert.Equal("some-value", (string)result);
ModelBinding\JQueryQueryStringValueProviderFactoryTest.cs (1)
80Assert.Equal("found", (string)result);
ModelBinding\JQueryQueryStringValueProviderTest.cs (1)
50Assert.Equal("some-value", (string)result);
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (9)
78Assert.Equal("Product", context.BindingMetadata.BinderModelName); 102Assert.Equal("Product", context.BindingMetadata.BinderModelName); 403a => Assert.Equal("Instance1", ((CustomAttribute)a).Identifier), 404a => Assert.Equal("Instance2", ((CustomAttribute)a).Identifier)); 746p => Assert.Equal("name", p.Name)); 812p => Assert.Equal("Name", p.Name), 813p => Assert.Equal("Value", p.Name)); 843p => Assert.Equal("Name", p.Name), 844p => Assert.Equal("Age", p.Name));
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (25)
24Assert.Equal("OnType", attribute.Value); 74Assert.Equal("Property1", propertyMetadata.PropertyName); 80Assert.Equal("Property2", propertyMetadata.PropertyName); 164Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(attributes[0]).Value); 165Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(attributes[1]).Value); 238Assert.Equal("ParamAttrib1", modelAttribute.Value); 243Assert.Equal("ParamAttrib2", modelAttribute.Value); 284a => Assert.Equal("OnParameter", Assert.IsType<ModelAttribute>(a).Value), 285a => Assert.Equal("OnDerivedType", Assert.IsType<ModelAttribute>(a).Value), 286a => Assert.Equal("OnType", Assert.IsType<ModelAttribute>(a).Value)); 292Assert.Equal(nameof(DerivedModelType.DerivedProperty), p.Name); 297a => Assert.Equal("OnDerivedProperty", Assert.IsType<ModelAttribute>(a).Value)); 301Assert.Equal(nameof(DerivedModelType.Property1), p.Name); 306a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 307a => Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(a).Value)); 311Assert.Equal(nameof(DerivedModelType.Property2), p.Name); 368a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 369a => Assert.Equal("OnDerivedType", Assert.IsType<ModelAttribute>(a).Value), 370a => Assert.Equal("OnType", Assert.IsType<ModelAttribute>(a).Value)); 376Assert.Equal(nameof(DerivedModelType.DerivedProperty), p.Name); 381a => Assert.Equal("OnDerivedProperty", Assert.IsType<ModelAttribute>(a).Value)); 385Assert.Equal(nameof(DerivedModelType.Property1), p.Name); 390a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 391a => Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(a).Value)); 395Assert.Equal(nameof(DerivedModelType.Property2), p.Name);
ModelBinding\Metadata\DefaultModelMetadataTest.cs (4)
110Assert.Equal("Message", metadata.PropertyName); 147Assert.Equal(newFormat, result); 184Assert.Equal(newFormat, result); 221Assert.Equal(newDisplay, result);
ModelBinding\Metadata\DisplayMetadataTest.cs (30)
18Assert.Equal("expected string", displayMetadata.DisplayFormatString); 19Assert.Equal("expected string", displayMetadata.DisplayFormatStringProvider()); 32Assert.Equal("expected string", displayMetadata.DisplayFormatString); 33Assert.Equal("expected string", displayMetadata.DisplayFormatStringProvider()); 46Assert.Equal("first string", displayMetadata.DisplayFormatString); 47Assert.Equal("first string", displayMetadata.DisplayFormatStringProvider()); 53Assert.Equal("second string", displayMetadata.DisplayFormatString); 54Assert.Equal("second string", displayMetadata.DisplayFormatStringProvider()); 60Assert.Equal("third string", displayMetadata.DisplayFormatString); 61Assert.Equal("third string", displayMetadata.DisplayFormatStringProvider()); 74Assert.Equal("expected string", displayMetadata.EditFormatString); 75Assert.Equal("expected string", displayMetadata.EditFormatStringProvider()); 88Assert.Equal("expected string", displayMetadata.EditFormatString); 89Assert.Equal("expected string", displayMetadata.EditFormatStringProvider()); 102Assert.Equal("first string", displayMetadata.EditFormatString); 103Assert.Equal("first string", displayMetadata.EditFormatStringProvider()); 109Assert.Equal("second string", displayMetadata.EditFormatString); 110Assert.Equal("second string", displayMetadata.EditFormatStringProvider()); 116Assert.Equal("third string", displayMetadata.EditFormatString); 117Assert.Equal("third string", displayMetadata.EditFormatStringProvider()); 130Assert.Equal("expected string", displayMetadata.NullDisplayText); 131Assert.Equal("expected string", displayMetadata.NullDisplayTextProvider()); 144Assert.Equal("expected string", displayMetadata.NullDisplayText); 145Assert.Equal("expected string", displayMetadata.NullDisplayTextProvider()); 158Assert.Equal("first string", displayMetadata.NullDisplayText); 159Assert.Equal("first string", displayMetadata.NullDisplayTextProvider()); 165Assert.Equal("second string", displayMetadata.NullDisplayText); 166Assert.Equal("second string", displayMetadata.NullDisplayTextProvider()); 172Assert.Equal("third string", displayMetadata.NullDisplayText); 173Assert.Equal("third string", displayMetadata.NullDisplayTextProvider());
ModelBinding\Metadata\ModelAttributesTest.cs (1)
299Assert.Equal("Only one ModelMetadataType attribute is permitted per type.", exception.Message);
ModelBinding\Metadata\SystemTextJsonValidationMetadataProviderTest.cs (3)
26Assert.Equal(propertyName, context.ValidationMetadata.ValidationModelName); 44Assert.Equal(JsonNamingPolicy.CamelCase.ConvertName(propertyName), context.ValidationMetadata.ValidationModelName); 79Assert.Equal(namingPolicy.ConvertName(propertyName), context.ValidationMetadata.ValidationModelName);
ModelBinding\ModelBinderFactoryTest.cs (2)
35Assert.Equal(expected, exception.Message); 57Assert.Equal(
ModelBinding\ModelBindingHelperTest.cs (23)
85Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("MyProperty"), error.ErrorMessage); 124Assert.Equal("MyPropertyValue", model.MyProperty); 203Assert.Equal("MyPropertyValue", model.MyProperty); 204Assert.Equal("IncludedPropertyValue", model.IncludedProperty); 205Assert.Equal("Old-ExcludedPropertyValue", model.ExcludedProperty); 280Assert.Equal("MyPropertyValue", model.MyProperty); 281Assert.Equal("IncludedPropertyValue", model.IncludedProperty); 282Assert.Equal("Old-ExcludedPropertyValue", model.ExcludedProperty); 330Assert.Equal("MyPropertyValue", model.MyProperty); 331Assert.Equal("IncludedPropertyValue", model.IncludedProperty); 332Assert.Equal("ExcludedPropertyValue", model.ExcludedProperty); 345Assert.Equal(nameof(User.Address), propertyName); 358Assert.Equal(string.Format( 399Assert.Equal( 418Assert.Equal( 434Assert.Equal( 450Assert.Equal( 534Assert.Equal("MyPropertyValue", model.MyProperty); 535Assert.Equal("IncludedPropertyValue", model.IncludedProperty); 536Assert.Equal("Old-ExcludedPropertyValue", model.ExcludedProperty); 601Assert.Equal("MyPropertyValue", model.MyProperty); 1251Assert.Equal(expectedMessage, ex.Message); 1267Assert.Equal(expectedMessage, ex.Message);
ModelBinding\ParameterBinderTest.cs (24)
79Assert.Equal("myParam", actionContext.ModelState.Single().Key); 80Assert.Equal( 117Assert.Equal("myParam", actionContext.ModelState.Single().Key); 118Assert.Equal( 218Assert.Equal(expectedKey, modelState.Key); 220Assert.Equal(attribute.FormatErrorMessage(expectedFieldName), error.ErrorMessage); 255Assert.Equal("myParam", actionContext.ModelState.Single().Key); 256Assert.Equal( 296Assert.Equal("myParam", actionContext.ModelState.Single().Key); 297Assert.Equal( 352Assert.Equal($"{parameter.Name}.{nameof(DerivedPerson.DerivedProperty)}", kvp.Key); 354Assert.Equal("The DerivedProperty field is required.", error.ErrorMessage); 407Assert.Equal(parameter.Name, kvp.Key); 409Assert.Equal("Always Invalid", error.ErrorMessage); 462Assert.Equal($"{property.Name}.{nameof(DerivedPerson.DerivedProperty)}", kvp.Key); 464Assert.Equal("The DerivedProperty field is required.", error.ErrorMessage); 516Assert.Equal($"{property.Name}", kvp.Key); 518Assert.Equal("Always Invalid", error.ErrorMessage); 574Assert.Equal("id", kvp.Key); 577Assert.Equal("This is not valid.", error.ErrorMessage); 638Assert.Equal("This is also not valid.", error.ErrorMessage); 642Assert.Equal("id", kvp.Key); 645Assert.Equal("This is not valid.", error.ErrorMessage); 700Assert.Equal("id", keyValuePair.Key);
ModelBinding\PrefixContainerTest.cs (18)
213Assert.Equal("0", item.Key); 214Assert.Equal("[0]", item.Value); 218Assert.Equal("foo", item.Key); 219Assert.Equal("foo", item.Value); 223Assert.Equal("item1", item.Key); 224Assert.Equal("[item1]", item.Value); 256Assert.Equal("0", item.Key); 257Assert.Equal("foo[0]", item.Value); 261Assert.Equal("1", item.Key); 262Assert.Equal("foo[1]", item.Value); 266Assert.Equal("age", item.Key); 267Assert.Equal("foo.age", item.Value); 271Assert.Equal("name", item.Key); 272Assert.Equal("foo.name", item.Value); 290Assert.Equal("0", item.Key); 291Assert.Equal("person[0].address[0]", item.Value); 295Assert.Equal("1", item.Key); 296Assert.Equal("person[0].address[1]", item.Value);
ModelBinding\RouteValueProviderTests.cs (5)
43Assert.Equal("test-value", (string)result); 61Assert.Equal("10/31/2018 07:37:38 -07:00", (string)result); 80Assert.Equal(expected, (string)result); 97Assert.Equal(string.Empty, (string)result); 175Assert.Equal(expectedValue, (string)result);
ModelBinding\Validation\DefaultCollectionValidationStrategyTest.cs (9)
27Assert.Equal("prefix[0]", e.Key); 33Assert.Equal("prefix[1]", e.Key); 39Assert.Equal("prefix[2]", e.Key); 67Assert.Equal("prefix[0]", e.Key); 73Assert.Equal("prefix[1]", e.Key); 79Assert.Equal("prefix[2]", e.Key); 102Assert.Equal("prefix[0]", e.Key); 108Assert.Equal("prefix[1]", e.Key); 114Assert.Equal("prefix[2]", e.Key);
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (12)
34Assert.Equal("prefix.Age", entry.Key); 40Assert.Equal("prefix.Id", entry.Key); 46Assert.Equal("prefix.Name", entry.Key); 74Assert.Equal("prefix.AGE", entry.Key); 80Assert.Equal("prefix.ID", entry.Key); 86Assert.Equal("prefix.NAME", entry.Key); 108Assert.Equal("prefix.Age", entry.Key); 114Assert.Equal("prefix.Id", entry.Key); 120Assert.Equal("prefix.Name", entry.Key); 143Assert.Equal("prefix.Age", entry.Key); 149Assert.Equal("prefix.Id", entry.Key); 155Assert.Equal("prefix.Name", entry.Key);
ModelBinding\Validation\DefaultModelValidatorProviderTest.cs (2)
49Assert.Equal("Class", validator.Tag); 71Assert.Equal("Property", validator.Tag);
ModelBinding\Validation\DefaultObjectValidatorTests.cs (48)
240Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Name"), error.ErrorMessage); 245Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Profession"), error.ErrorMessage); 382Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Profession"), error.ErrorMessage); 387Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Name"), error.ErrorMessage); 392Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Profession"), error.ErrorMessage); 417Assert.Equal("FirstName", state.Key); 419Assert.Equal("User object lacks some data.", error.ErrorMessage); 423Assert.Equal("Address.City", state.Key); 425Assert.Equal("User object lacks some data.", error.ErrorMessage); 451Assert.Equal("invalidProperties.FirstName", state.Key); 453Assert.Equal("User object lacks some data.", error.ErrorMessage); 457Assert.Equal("invalidProperties.Address.City", state.Key); 459Assert.Equal("User object lacks some data.", error.ErrorMessage); 492Assert.Equal("Error1 about '' (display: 'ValidatableModel').", error.ErrorMessage); 497Assert.Equal("Error2", error.ErrorMessage); 502Assert.Equal("Error3", error.ErrorMessage); 507Assert.Equal("Error3", error.ErrorMessage); 538Assert.Equal("parameter", entry.Key); 544Assert.Equal("parameter.ValidatableModelProperty", entry.Key); 547Assert.Equal( 553Assert.Equal("parameter.ValidatableModelProperty.Property1", entry.Key); 556Assert.Equal("Error2", error.ErrorMessage); 560Assert.Equal("parameter.ValidatableModelProperty.Property2", entry.Key); 563Assert.Equal("Error3", error.ErrorMessage); 567Assert.Equal("parameter.ValidatableModelProperty.Property3", entry.Key); 570Assert.Equal("Error3", error.ErrorMessage); 673Assert.Equal(error.ErrorMessage, ValidationAttributeUtil.GetRequiredErrorMessage("Profession")); 709Assert.Equal(error.ErrorMessage, ValidationAttributeUtil.GetRequiredErrorMessage("Profession")); 806Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Name"), error.ErrorMessage); 811Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Profession"), error.ErrorMessage); 816Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Name"), error.ErrorMessage); 821Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Profession"), error.ErrorMessage); 849Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Name"), error.ErrorMessage); 854Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Profession"), error.ErrorMessage); 859Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Name"), error.ErrorMessage); 864Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage("Profession"), error.ErrorMessage); 963Assert.Equal("Items[0]", state.Key); 965Assert.Equal("Collection contains duplicate value 'Joe'.", error.ErrorMessage); 969Assert.Equal("Items[2]", state.Key); 971Assert.Equal("Collection contains duplicate value 'Joe'.", error.ErrorMessage); 1063Assert.Equal(error.ErrorMessage, ValidationAttributeUtil.GetRequiredErrorMessage("Name")); 1068Assert.Equal(error.ErrorMessage, ValidationAttributeUtil.GetRequiredErrorMessage("Profession")); 1073Assert.Equal(error.ErrorMessage, ValidationAttributeUtil.GetRequiredErrorMessage("Name")); 1078Assert.Equal(error.ErrorMessage, ValidationAttributeUtil.GetRequiredErrorMessage("Profession")); 1254Assert.Equal("one", kvp.Key); 1257Assert.Equal("1", error.ErrorMessage); 1280Assert.Equal(expected, ex.Message); 1281Assert.Equal("https://aka.ms/AA21ue1", ex.HelpLink);
ModelBinding\Validation\ExplicitIndexCollectionValidationStrategyTest.cs (13)
27Assert.Equal("prefix[one]", e.Key); 33Assert.Equal("prefix[two]", e.Key); 39Assert.Equal("prefix[zero]", e.Key); 67Assert.Equal("prefix[one]", e.Key); 73Assert.Equal("prefix[two]", e.Key); 79Assert.Equal("prefix[zero]", e.Key); 102Assert.Equal("prefix[one]", e.Key); 108Assert.Equal("prefix[two]", e.Key); 114Assert.Equal("prefix[zero]", e.Key); 138Assert.Equal("prefix[one]", e.Key); 144Assert.Equal("prefix[zero]", e.Key); 168Assert.Equal("prefix[one]", e.Key); 174Assert.Equal("prefix[zero]", e.Key);
ModelBinding\Validation\ShortFormDictionaryValidationStrategyTest.cs (7)
38Assert.Equal("prefix[2]", e.Key); 44Assert.Equal("prefix[3]", e.Key); 50Assert.Equal("prefix[5]", e.Key); 85Assert.Equal("prefix[2]", e.Key); 91Assert.Equal("prefix[3]", e.Key); 126Assert.Equal("prefix[2]", e.Key); 132Assert.Equal("prefix[3]", e.Key);
MvcCoreLoggerExtensionsTest.cs (11)
60Assert.Equal( 90Assert.Equal( 119Assert.Equal( 206Assert.Equal( 252Assert.Equal( 298Assert.Equal( 344Assert.Equal( 390Assert.Equal( 420Assert.Equal( 449Assert.Equal( 477Assert.Equal(
MvcOptionsTest.cs (1)
16Assert.Equal("value", ex.ParamName);
ProducesAttributeTests.cs (2)
102Assert.Equal("The header contains invalid values at index 0: '" + (invalidContentType ?? "<null>") + "'", 125Assert.Equal(
ProducesResponseTypeAttributeTests.cs (1)
44Assert.Equal(
RedirectToActionResultTest.cs (2)
108Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]); 136Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
RedirectToPageResultTest.cs (13)
115Assert.Equal("test", value.Key); 120Assert.Equal("page", value.Key); 125Assert.Equal("handler", value.Key); 128Assert.Equal("ftp", context.Protocol); 129Assert.Equal("test-fragment", context.Fragment); 169Assert.Equal("test", value.Key); 174Assert.Equal("page", value.Key); 179Assert.Equal("handler", value.Key); 182Assert.Equal("ftp", context.Protocol); 183Assert.Equal("test-fragment", context.Fragment); 231Assert.Equal("page", value.Key); 282Assert.Equal("page", value.Key); 287Assert.Equal("handler", value.Key);
RedirectToRouteResultTest.cs (3)
112Assert.Equal(locationUrl, httpContext.Response.Headers["Location"]); 137Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]); 162Assert.Equal(expectedUrl, httpContext.Response.Headers["Location"]);
RequireHttpsAttributeTests.cs (2)
101Assert.Equal(expectedUrl, result.Url); 189Assert.Equal(expectedUrl, result.Url);
ResponseCacheAttributeTest.cs (4)
56Assert.Equal("The 'HelloWorld' cache profile is not defined.", ex.Message); 170Assert.Equal(expectedProfile.VaryByHeader, responseCacheFilter.VaryByHeader); 226Assert.Equal("Accept", data); 318Assert.Equal(
Routing\ActionEndpointDataSourceBaseTest.cs (4)
37Assert.Equal("/Template!", endpoint.RoutePattern.RawText); 61(e) => Assert.Equal("/test", Assert.IsType<RouteEndpoint>(e).RoutePattern.RawText)); 99Assert.Equal("/test", routePattern.RawText); 121Assert.Equal("/test", routePattern.RawText);
Routing\ActionEndpointFactoryTest.cs (10)
50Assert.Equal(string.Empty, routeNameMetadata.RouteName); 149Assert.Equal("{controller}/{action}/{id?}", endpoint.RoutePattern.RawText); 184Assert.Equal("{controller}/{action=TESTACTION}/{id?}", endpoint.RoutePattern.RawText); 214Assert.Equal( 232Assert.Equal("{controller}/{action}/{page}", endpoint.RoutePattern.RawText); 250Assert.Equal("{controller}/{action}/{page}", endpoint.RoutePattern.RawText); 254Assert.Equal("Test", endpoint.Metadata.GetMetadata<IRouteNameMetadata>().RouteName); 255Assert.Equal("Test", endpoint.Metadata.GetMetadata<IEndpointNameMetadata>().EndpointName); 347Assert.Equal("{controller}/{action}/{id?}", matcherEndpoint.RoutePattern.RawText); 355Assert.Equal("named/{controller}/{action}/{id?}", matcherEndpoint.RoutePattern.RawText);
Routing\AttributeRouteTest.cs (35)
149Assert.Equal("BLOG_INDEX", e.RouteName); 152Assert.Equal("api/Blog/{id}", e.RouteTemplate.TemplateText); 193Assert.Equal("BLOG_INDEX", e.RouteName); 196Assert.Equal("api/Blog/{id:int}", e.RouteTemplate.TemplateText); 237Assert.Equal("BLOG_INDEX", e.RouteName); 240Assert.Equal("api/Blog/{*slug=hello}", e.RouteTemplate.TemplateText); 298Assert.Equal("BLOG_INDEX", e.RouteName); 301Assert.Equal("api/Blog/{id}", e.RouteTemplate.TemplateText); 308Assert.Equal("BLOG_INDEX", e.RouteName); 311Assert.Equal("api/Blog/{id}", e.RouteTemplate.TemplateText); 352Assert.Equal("BLOG_INDEX", e.RouteName); 353Assert.Equal("api/Blog/{id}", e.RouteTemplate.TemplateText); 395Assert.Equal("BLOG_INDEX", e.RouteName); 396Assert.Equal("api/Blog/{id:int}", e.RouteTemplate.TemplateText); 438Assert.Equal("BLOG_INDEX", e.RouteName); 439Assert.Equal("api/Blog/{*slug=hello}", e.RouteTemplate.TemplateText); 500Assert.Equal("BLOG_INDEX", e.RouteName); 501Assert.Equal("api/Blog/{id}", e.RouteTemplate.TemplateText); 536Assert.Equal(expectedErrorMessage, exception.Message); 586Assert.Equal("BLOG_INDEX2", e.RouteName); 587Assert.Equal("blog/{snake-cased-name}", e.RouteTemplate.TemplateText); 591Assert.Equal("BLOG_HOME", e.RouteName); 592Assert.Equal("blog/", e.RouteTemplate.TemplateText); 642Assert.Equal("BLOG_LINK2", e.RouteName); 643Assert.Equal("blog/get/{id}", e.RouteTemplate.TemplateText); 647Assert.Equal("BLOG_HOME", e.RouteName); 648Assert.Equal("blog/", e.RouteTemplate.TemplateText); 698Assert.Equal("BLOG_LINK1", e.RouteName); 699Assert.Equal("blog/get/{id}", e.RouteTemplate.TemplateText); 703Assert.Equal("BLOG_LINK2", e.RouteName); 704Assert.Equal("blog/{snake-cased-name}", e.RouteTemplate.TemplateText); 754Assert.Equal("BLOG_LINK2", e.RouteName); 755Assert.Equal("blog/get/{id}", e.RouteTemplate.TemplateText); 759Assert.Equal("BLOG_HOME", e.RouteName); 760Assert.Equal("blog/", e.RouteTemplate.TemplateText);
Routing\AttributeRoutingTest.cs (4)
45Assert.Equal(expectedMessage, ex.Message); 72Assert.Equal(expectedMessage, ex.Message); 106Assert.Equal(expectedMessage, ex.Message); 144Assert.Equal(expectedMessage, ex.Message);
Routing\ControllerActionEndpointDataSourceTest.cs (46)
94Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 99Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 107Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 109Assert.Equal("1", e.Metadata.GetMetadata<IRouteNameMetadata>().RouteName); 110Assert.Equal("1", e.Metadata.GetMetadata<IEndpointNameMetadata>().EndpointName); 114Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 116Assert.Equal("2", e.Metadata.GetMetadata<IRouteNameMetadata>().RouteName); 117Assert.Equal("2", e.Metadata.GetMetadata<IEndpointNameMetadata>().EndpointName); 121Assert.Equal("/test", e.RoutePattern.RawText); 123Assert.Equal("Test", e.Metadata.GetMetadata<IRouteNameMetadata>().RouteName); 124Assert.Equal("Test", e.Metadata.GetMetadata<IEndpointNameMetadata>().EndpointName); 176Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 178Assert.Equal("Hi there", e.Metadata.GetMetadata<string>()); 182Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 184Assert.Equal("Hi there", e.Metadata.GetMetadata<string>()); 191Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 193Assert.Equal("Hi there", e.Metadata.GetMetadata<string>()); 197Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 199Assert.Equal("Hi there", e.Metadata.GetMetadata<string>()); 203Assert.Equal("/test", e.RoutePattern.RawText); 205Assert.Equal("Hi there", e.Metadata.GetMetadata<string>()); 263Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 268Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 276Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 278Assert.Equal("1", e.Metadata.GetMetadata<IRouteNameMetadata>().RouteName); 279Assert.Equal("1", e.Metadata.GetMetadata<IEndpointNameMetadata>().EndpointName); 283Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 285Assert.Equal("2", e.Metadata.GetMetadata<IRouteNameMetadata>().RouteName); 286Assert.Equal("2", e.Metadata.GetMetadata<IEndpointNameMetadata>().EndpointName); 290Assert.Equal("/test", e.RoutePattern.RawText); 292Assert.Equal("Test", e.Metadata.GetMetadata<IRouteNameMetadata>().RouteName); 293Assert.Equal("NewName", e.Metadata.GetMetadata<IEndpointNameMetadata>().EndpointName); 345Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 351Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 360Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 366Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 372Assert.Equal("/test", e.RoutePattern.RawText); 374Assert.Equal("Hi there", e.Metadata.GetMetadata<string>()); 439Assert.Equal("/group1/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 446Assert.Equal("/group1/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 456Assert.Equal("/group1/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 464Assert.Equal("/group1/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 471Assert.Equal("/group1/test", e.RoutePattern.RawText); 529Assert.Equal("/1/{controller}/{action}/{id?}", e.RoutePattern.RawText); 534Assert.Equal("/2/{controller}/{action}/{id?}", e.RoutePattern.RawText); 539Assert.Equal("/test", e.RoutePattern.RawText);
Routing\ControllerLinkGeneratorExtensionsTest.cs (9)
27Assert.Equal("host", exception.ParamName); 31Assert.Equal("action", exception.ParamName); 35Assert.Equal("controller", exception.ParamName); 39Assert.Equal("scheme", exception.ParamName); 69Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 97Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 128Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 158Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 189Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", uri);
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (11)
194Assert.Equal("action", kvp.Key); 199Assert.Equal("controller", kvp.Key); 272Assert.Equal("action", kvp.Key); 277Assert.Equal("controller", kvp.Key); 282Assert.Equal("slug", kvp.Key); 287Assert.Equal("state", kvp.Key); 372Assert.Equal("action", kvp.Key); 377Assert.Equal("controller", kvp.Key); 382Assert.Equal("slug", kvp.Key); 387Assert.Equal("state", kvp.Key); 390Assert.Equal("ReplacedEndpoint", candidates[0].Endpoint.DisplayName);
Routing\EndpointRoutingUrlHelperTest.cs (3)
36Assert.Equal("/" + endpoint2.RoutePattern.RawText, url); 69Assert.Equal("/api/orders/500", url); 95Assert.Equal("/api/orders/10", url);
Routing\KnownRouteValueConstraintTests.cs (1)
199Assert.Equal(
Routing\MvcRouteHandlerTests.cs (1)
46Assert.Equal(expectedMessage, write.State?.ToString());
Routing\PageLinkGeneratorExtensionsTest.cs (5)
40Assert.Equal("/Foo/Bar%3Fencodeme%3F/About/18/?query=some%3Fquery#Fragment?", path); 68Assert.Equal("/Foo/Bar%3Fencodeme%3F/Admin/ManageUsers/Delete/?user=jamesnk&query=some%3Fquery#Fragment?", path); 98Assert.Equal("/Foo/Bar%3Fencodeme%3F/About/19/?query=some%3Fquery#Fragment?", path); 128Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/About/19/?query=some%3Fquery#Fragment?", path); 159Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Admin/ManageUsers/?query=some%3Fquery#Fragment?", uri);
Routing\RoutePatternWriterTests.cs (1)
30Assert.Equal(template, sb.ToString());
Routing\UrlHelperBaseTest.cs (3)
50Assert.Equal(expected, builder.ToString()); 71Assert.Equal(expected, builder.ToString()); 99Assert.Equal(expected, url);
Routing\UrlHelperExtensionsTest.cs (49)
44Assert.Equal("page", value.Key); 92Assert.Equal("id", value.Key); 97Assert.Equal("page", value.Key); 124Assert.Equal("id", value.Key); 129Assert.Equal("page", value.Key); 132Assert.Equal("https", actual.Protocol); 156Assert.Equal("id", value.Key); 161Assert.Equal("page", value.Key); 164Assert.Equal("https", actual.Protocol); 165Assert.Equal("mytesthost", actual.Host); 188Assert.Equal("id", value.Key); 193Assert.Equal("page", value.Key); 198Assert.Equal("handler", value.Key); 201Assert.Equal("https", actual.Protocol); 202Assert.Equal("mytesthost", actual.Host); 203Assert.Equal("#toc", actual.Fragment); 238Assert.Equal("id", value.Key); 243Assert.Equal("page", value.Key); 287Assert.Equal("id", value.Key); 292Assert.Equal("page", value.Key); 330Assert.Equal("id", value.Key); 335Assert.Equal("page", value.Key); 340Assert.Equal("handler", value.Key); 378Assert.Equal("handler", value.Key); 383Assert.Equal("page", value.Key); 421Assert.Equal("handler", value.Key); 426Assert.Equal("page", value.Key); 456Assert.Equal("page", value.Key); 483Assert.Equal("page", value.Key); 527Assert.Equal("page", value.Key); 550Assert.Equal( 590Assert.Equal("area", value.Key); 595Assert.Equal("page", value.Key); 628Assert.Equal(expectedAction, actual.Action); 632Assert.Equal(expectedProtocol, actual.Protocol); 633Assert.Equal(expectedHost, actual.Host); 667Assert.Equal(expectedProtocol, actual.Protocol); 668Assert.Equal(expectedHost, actual.Host); 702Assert.Equal(expectedProtocol, actual.Protocol); 703Assert.Equal(expectedHost, actual.Host); 746Assert.Equal("page", value.Key); 751Assert.Equal(expectedProtocol, actual.Protocol); 752Assert.Equal(expectedHost, actual.Host); 794Assert.Equal("page", value.Key); 799Assert.Equal(expectedProtocol, actual.Protocol); 800Assert.Equal(expectedHost, actual.Host); 842Assert.Equal("page", value.Key); 847Assert.Equal(expectedProtocol, actual.Protocol); 848Assert.Equal(expectedHost, actual.Host);
Routing\UrlHelperTestBase.cs (32)
34Assert.Equal(expectedPath, path); 57Assert.Equal(expectedPath, path); 343Assert.Equal("/app/home2/newaction/someid", url); 366Assert.Equal("http://localhost/app/named/home2/newaction/someid", url); 389Assert.Equal("http://foo.bar.com/app/named/home2/newaction/someid", url); 412Assert.Equal("http://foo.bar.com/app/named/home2/newaction/someid", url); 435Assert.Equal("/app/named/home2/newaction/someid", url); 448Assert.Equal("/app/home2/newaction/someid", url); 469Assert.Equal("https://localhost/app/named/home2/newaction/someid", url); 491Assert.Equal("https://pingüino/app/named/home2/newaction/someid", url); 506Assert.Equal("/app/api/orders/500", url); 542Assert.Equal("/app/named/home2/newaction/someid", url); 562Assert.Equal("/app/named/home2/newaction/someid", url); 589Assert.Equal("ftp://remotetown/app/named/home2/newaction/someid#somefragment", url); 612Assert.Equal("https://remotetown/app/named/home2/newaction/someid#somefragment", url); 639Assert.Equal("/app/home/contact/suppliedid?isprint=true", url); 657Assert.Equal("http://pingüino/app/home/contact", url); 685Assert.Equal("/app/named/home/contact/suppliedid", url); 708Assert.Equal("ftp://remotelyhost/app/home3/contact/idone#somefragment", url); 727Assert.Equal("https://remotelyhost/app/home3/contact#somefragment", url); 747Assert.Equal("http://localhost/app/named/home/newaction/someid", url); 767Assert.Equal("http://localhost/app/home/newaction/someid", url); 792Assert.Equal("http://localhost/app/home/newaction/someid", url); 818Assert.Equal("http://localhost/app/home/newaction/someid", url); 836Assert.Equal("/app/any/url", url); 854Assert.Equal("http://localhost/app/any/url", url); 879Assert.Equal("https://myhost/named/home/newaction/someid", url); 982Assert.Equal("/b/Store/Checkout", url); 1023Assert.Equal("/b/default/Store/Checkout", url); 1061Assert.Equal("/b/Store/Checkout", url); 1074Assert.Equal("http://localhost/app/home/contact", url); 1095Assert.Equal(expectedMessage, ex.Message);
Routing\ViewEnginePathTest.cs (1)
19Assert.Equal(expected, result);
SerializableErrorTests.cs (5)
24Assert.Equal("Test Error 1", arr[0]); 25Assert.Equal("Test Error 2", arr[1]); 26Assert.Equal("Test Error 3", (serializableError["key2"] as string[])[0]); 41Assert.Equal("x", arr[0]); 56Assert.Equal("The input was not valid.", arr[0]);
src\Shared\ResultsTests\FileContentResultTestBase.cs (24)
81Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 82Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 84Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 86Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 88Assert.Equal(expectedString, body); 119Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 120Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 123Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 125Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 127Assert.Equal("Hello", body); 159Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 160Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 161Assert.Equal("Hello World", body); 193Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 194Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 195Assert.Equal("Hello World", body); 225Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 226Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 227Assert.Equal("Hello World", body); 255Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 256Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 258Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 259Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 350Assert.Equal(expectedContentType, httpContext.Response.ContentType);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (28)
60Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 61Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 63Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 64Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 66Assert.Equal(expectedString, body); 100Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 101Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 104Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 105Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 107Assert.Equal("Hello", body); 142Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 143Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 144Assert.Equal("Hello World", body); 179Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 180Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 181Assert.Equal("Hello World", body); 213Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 214Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 215Assert.Equal("Hello World", body); 245Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 246Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 248Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 249Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 360Assert.Equal(lastModified.ToString("R"), httpResponse.Headers.LastModified); 361Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 364Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 365Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 417Assert.Equal(expectedContentType, httpContext.Response.ContentType);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (19)
56Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 57Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 60Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 86Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 88Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 90Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 92Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 119Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 146Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 175Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 204Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 205Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 310Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 316Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 317Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 336Assert.Equal(expectedContentType, httpContext.Response.ContentType); 337Assert.Equal(Path.GetFullPath(Path.Combine("TestFiles", "FilePathResultTestFile_ASCII.txt")), sendFile.Name); 357Assert.Equal(Path.GetFullPath(Path.Combine(".", "TestFiles", "FilePathResultTestFile.txt")), sendFile.Name); 387Assert.Equal(expectedMessage, ex.Message);
src\Shared\ResultsTests\RedirectResultTestBase.cs (2)
34Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString()); 57Assert.Equal(expectedPath, httpContext.Response.Headers.Location.ToString());
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (25)
68Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 69Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 72Assert.Equal(path, sendFileFeature.Name); 104Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 106Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 107Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 109Assert.Equal(path, sendFileFeature.Name); 141Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 142Assert.Equal(path, sendFileFeature.Name); 174Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 175Assert.Equal(path, sendFileFeature.Name); 210Assert.Equal(path, sendFileFeature.Name); 246Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 247Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 345Assert.Equal(Path.Combine("TestFiles", "FilePathResultTestFile.txt"), sendFile.Name); 351Assert.Equal("bytes", httpResponse.Headers.AcceptRanges); 352Assert.Equal(contentRange.ToString(), httpResponse.Headers.ContentRange); 371Assert.Equal(expectedContentType, httpContext.Response.ContentType); 372Assert.Equal("FilePathResultTestFile_ASCII.txt", sendFileFeature.Name); 389Assert.Equal(path, sendFileFeature.Name); 412Assert.Equal(path, sendFileFeature.Name); 435Assert.Equal(expectedPath, sendFileFeature.Name); 461Assert.Equal(expectedData, contents); 481Assert.Equal(expectedMessage, ex.Message); 482Assert.Equal(path, ex.FileName);
ValidationProblemDetailsTest.cs (9)
17Assert.Equal("One or more validation errors occurred.", problemDescription.Title); 35Assert.Equal("One or more validation errors occurred.", problemDescription.Title); 40Assert.Equal("key1", item.Key); 45Assert.Equal("key3", item.Key); 65Assert.Equal("One or more validation errors occurred.", problemDescription.Title); 70Assert.Equal("unsafeError", item.Key); 89Assert.Equal("One or more validation errors occurred.", problemDescription.Title); 94Assert.Equal("key1", item.Key); 99Assert.Equal("key2", item.Key);
VirtualFileResultTest.cs (2)
29Assert.Equal(path, result.FileName); 44Assert.Equal(path, result.FileName);
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
CommonResourceInvokerTest.cs (1)
1696Assert.Equal(message, exception.Message);
Microsoft.AspNetCore.Mvc.Cors.Test (8)
CorsAuthorizationFilterTest.cs (8)
42Assert.Equal("http://example.com", response.Headers[CorsConstants.AccessControlAllowOrigin]); 43Assert.Equal("header1,header2", response.Headers[CorsConstants.AccessControlAllowHeaders]); 46Assert.Equal("PUT", response.Headers[CorsConstants.AccessControlAllowMethods]); 47Assert.Equal("exposed1,exposed2", response.Headers[CorsConstants.AccessControlExposeHeaders]); 48Assert.Equal("123", response.Headers[CorsConstants.AccessControlMaxAge]); 49Assert.Equal("true", response.Headers[CorsConstants.AccessControlAllowCredentials]); 92Assert.Equal("http://example.com", response.Headers[CorsConstants.AccessControlAllowOrigin]); 93Assert.Equal("exposed1,exposed2", response.Headers[CorsConstants.AccessControlExposeHeaders]);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (254)
CompareAttributeAdapterTest.cs (36)
41kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 42kvp => { Assert.Equal("data-val-equalto", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 45Assert.Equal("data-val-equalto-other", kvp.Key); 46Assert.Equal("*.OtherProperty", kvp.Value); 84kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 85kvp => { Assert.Equal("data-val-equalto", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 88Assert.Equal("data-val-equalto-other", kvp.Key); 89Assert.Equal("*.OtherProperty", kvp.Value); 119kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 120kvp => { Assert.Equal("data-val-equalto", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 123Assert.Equal("data-val-equalto-other", kvp.Key); 124Assert.Equal("*.OtherProperty", kvp.Value); 156kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 157kvp => { Assert.Equal("data-val-equalto", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 160Assert.Equal("data-val-equalto-other", kvp.Key); 161Assert.Equal("*.OtherProperty", kvp.Value); 196kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 197kvp => { Assert.Equal("data-val-equalto", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 200Assert.Equal("data-val-equalto-other", kvp.Key); 201Assert.Equal("*.OtherProperty", kvp.Value); 233kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 234kvp => { Assert.Equal("data-val-equalto", kvp.Key); Assert.Equal("original", kvp.Value); }, 235kvp => { Assert.Equal("data-val-equalto-other", kvp.Key); Assert.Equal("original", kvp.Value); });
DataAnnotationsClientModelValidatorProviderTest.cs (1)
112Assert.Equal("Custom Required Message", adapter.Attribute.ErrorMessage);
DataAnnotationsMetadataProviderTest.cs (26)
205Assert.Equal("DisplayAttributeValue", context.DisplayMetadata.DisplayName()); 228Assert.Equal(string.Empty, context.DisplayMetadata.DisplayName()); 251Assert.Equal("DisplayNameAttributeValue", context.DisplayMetadata.DisplayName()); 288Assert.Equal("Name from DisplayNameAttribute", e.Key.Name); 324Assert.Equal("Name from DisplayNameAttribute", context.DisplayMetadata.DisplayName()); 391Assert.Equal("name from resources", context.DisplayMetadata.DisplayName()); 426Assert.Equal("name from resources", context.DisplayMetadata.DisplayName()); 461Assert.Equal("description from resources", context.DisplayMetadata.Description()); 490Assert.Equal("description from resources", context.DisplayMetadata.Description()); 525Assert.Equal("prompt from resources", context.DisplayMetadata.Placeholder()); 554Assert.Equal("prompt from resources", context.DisplayMetadata.Placeholder()); 601Assert.Equal("name from localizer en-US", context.DisplayMetadata.DisplayName()); 602Assert.Equal("description from localizer en-US", context.DisplayMetadata.Description()); 603Assert.Equal("prompt from localizer en-US", context.DisplayMetadata.Placeholder()); 607Assert.Equal("name from localizer fr-FR", context.DisplayMetadata.DisplayName()); 608Assert.Equal("description from localizer fr-FR", context.DisplayMetadata.Description()); 609Assert.Equal("prompt from localizer fr-FR", context.DisplayMetadata.Placeholder()); 1033Assert.Equal("Loc_Two_Name", groupTwo.Key.Name); 1038Assert.Equal("Loc_Two_Name", groupTwo.Key.Name); 1053Assert.Equal("Loc_Two_Name en-US", groupTwo.Key.Name); 1058Assert.Equal("Loc_Two_Name fr-FR", groupTwo.Key.Name); 1073Assert.Equal("type three name en-US", groupThree.Key.Name); 1078Assert.Equal("type three name fr-FR", groupThree.Key.Name); 1093Assert.Equal("type three name en-US", groupThree.Key.Name); 1098Assert.Equal("type three name fr-FR", groupThree.Key.Name); 1190Assert.Equal("Test", ((RequiredAttribute)attribute).ErrorMessage);
DataAnnotationsModelValidatorTest.cs (4)
100Assert.Equal(expectedMemberName, context.MemberName); 180Assert.Equal(attribute.Object.FormatErrorMessage("Length"), validationResult.Message); 235Assert.Equal(new RequiredAttribute().FormatErrorMessage("Length"), validationResult.Message); 392Assert.Equal("Longueur est invalide : 4", validationResult.Message);
DefaultModelClientValidatorProviderTest.cs (2)
51Assert.Equal("Class", customModelValidator.Tag); 73Assert.Equal("Property", validatorItem.Tag);
FileExtensionsAttributeAdapterTest.cs (24)
41kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 42kvp => { Assert.Equal("data-val-fileextensions", kvp.Key); Assert.Equal(expectedErrorMessage, kvp.Value); }, 43kvp => { Assert.Equal("data-val-fileextensions-extensions", kvp.Key); Assert.Equal(expectedExtensions, kvp.Value); }); 92kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 93kvp => { Assert.Equal("data-val-fileextensions", kvp.Key); Assert.Equal(expectedErrorMessage, kvp.Value); }, 94kvp => { Assert.Equal("data-val-fileextensions-extensions", kvp.Key); Assert.Equal(expectedExtensions, kvp.Value); }); 127kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 128kvp => { Assert.Equal("data-val-fileextensions", kvp.Key); Assert.Equal(expectedErrorMessage, kvp.Value); }, 129kvp => { Assert.Equal("data-val-fileextensions-extensions", kvp.Key); Assert.Equal(expectedExtensions, kvp.Value); }); 156kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 157kvp => { Assert.Equal("data-val-fileextensions", kvp.Key); Assert.Equal("original", kvp.Value); }, 158kvp => { Assert.Equal("data-val-fileextensions-extensions", kvp.Key); Assert.Equal("original", kvp.Value); });
MaxLengthAttributeAdapterTest.cs (30)
44kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 45kvp => { Assert.Equal("data-val-maxlength", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 46kvp => { Assert.Equal("data-val-maxlength-max", kvp.Key); Assert.Equal("10", kvp.Value); }); 71kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 72kvp => { Assert.Equal("data-val-maxlength", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 73kvp => { Assert.Equal("data-val-maxlength-max", kvp.Key); Assert.Equal("10", kvp.Value); }); 100kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 101kvp => { Assert.Equal("data-val-maxlength", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 102kvp => { Assert.Equal("data-val-maxlength-max", kvp.Key); Assert.Equal("5", kvp.Value); }); 133kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 134kvp => { Assert.Equal("data-val-maxlength", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 135kvp => { Assert.Equal("data-val-maxlength-max", kvp.Key); Assert.Equal("10", kvp.Value); }); 164kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 165kvp => { Assert.Equal("data-val-maxlength", kvp.Key); Assert.Equal("original", kvp.Value); }, 166kvp => { Assert.Equal("data-val-maxlength-max", kvp.Key); Assert.Equal("original", kvp.Value); });
MinLengthAttributeAdapterTest.cs (24)
44kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 45kvp => { Assert.Equal("data-val-minlength", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 46kvp => { Assert.Equal("data-val-minlength-min", kvp.Key); Assert.Equal("6", kvp.Value); }); 71kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 72kvp => { Assert.Equal("data-val-minlength", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 73kvp => { Assert.Equal("data-val-minlength-min", kvp.Key); Assert.Equal("6", kvp.Value); }); 99kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 100kvp => { Assert.Equal("data-val-minlength", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 101kvp => { Assert.Equal("data-val-minlength-min", kvp.Key); Assert.Equal("2", kvp.Value); }); 129kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 130kvp => { Assert.Equal("data-val-minlength", kvp.Key); Assert.Equal("original", kvp.Value); }, 131kvp => { Assert.Equal("data-val-minlength-min", kvp.Key); Assert.Equal("original", kvp.Value); });
ModelMetadataProviderTest.cs (16)
57Assert.Equal("TypePrefix", metadata.BinderModelName); 128Assert.Equal("HiddenInput", result); 143Assert.Equal("HiddenInput", result); 156Assert.Equal("PersonType", propertyMetadata.BinderModelName); 169Assert.Equal("GrandParentProperty", propertyMetadata.BinderModelName); 236Assert.Equal("value", result); 252Assert.Equal("Property", result); 421Assert.Equal("description", result); 437Assert.Equal("prompt", result); 461Assert.Equal("name from resources" + culture, result); 487Assert.Equal("description from resources" + culture, result); 522Assert.Equal(expected, result); 540Assert.Equal(expected, result); 558Assert.Equal(expected, result); 581Assert.Equal(expected, result); 599Assert.Equal(expected, result);
NumericClientModelValidatorTest.cs (20)
34kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 35kvp => { Assert.Equal("data-val-number", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }); 66kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 67kvp => { Assert.Equal("data-val-number", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }); 98kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 99kvp => { Assert.Equal("data-val-number", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }); 124kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 125kvp => { Assert.Equal("data-val-number", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }); 150kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 151kvp => { Assert.Equal("data-val-number", kvp.Key); Assert.Equal("original", kvp.Value); });
RangeAttributeAdapterTest.cs (24)
38kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 39kvp => { Assert.Equal("data-val-range", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 40kvp => { Assert.Equal("data-val-range-max", kvp.Key); Assert.Equal("100", kvp.Value); }, 41kvp => { Assert.Equal("data-val-range-min", kvp.Key); Assert.Equal("0", kvp.Value); }); 74kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 75kvp => { Assert.Equal("data-val-range", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 76kvp => { Assert.Equal("data-val-range-max", kvp.Key); Assert.Equal("100", kvp.Value); }, 77kvp => { Assert.Equal("data-val-range-min", kvp.Key); Assert.Equal("0", kvp.Value); }); 107kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 108kvp => { Assert.Equal("data-val-range", kvp.Key); Assert.Equal("original", kvp.Value); }, 109kvp => { Assert.Equal("data-val-range-max", kvp.Key); Assert.Equal("original", kvp.Value); }, 110kvp => { Assert.Equal("data-val-range-min", kvp.Key); Assert.Equal("original", kvp.Value); });
RequiredAttributeAdapterTest.cs (12)
45kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 46kvp => { Assert.Equal("data-val-required", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }); 70kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 71kvp => { Assert.Equal("data-val-required", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }); 98kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 99kvp => { Assert.Equal("data-val-required", kvp.Key); Assert.Equal("original", kvp.Value); });
StringLengthAttributeAdapterTest.cs (32)
45kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 46kvp => { Assert.Equal("data-val-length", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 47kvp => { Assert.Equal("data-val-length-max", kvp.Key); Assert.Equal("8", kvp.Value); }); 72kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 73kvp => { Assert.Equal("data-val-length", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 74kvp => { Assert.Equal("data-val-length-max", kvp.Key); Assert.Equal("8", kvp.Value); }); 99kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 100kvp => { Assert.Equal("data-val-length", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }, 101kvp => { Assert.Equal("data-val-length-max", kvp.Key); Assert.Equal("10", kvp.Value); }, 102kvp => { Assert.Equal("data-val-length-min", kvp.Key); Assert.Equal("3", kvp.Value); }); 127kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 128kvp => { Assert.Equal("data-val-length", kvp.Key); Assert.Equal(expectedMessage, kvp.Value); }); 158kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 159kvp => { Assert.Equal("data-val-length", kvp.Key); Assert.Equal("original", kvp.Value); }, 160kvp => { Assert.Equal("data-val-length-max", kvp.Key); Assert.Equal("original", kvp.Value); }, 161kvp => { Assert.Equal("data-val-length-min", kvp.Key); Assert.Equal("original", kvp.Value); });
ValidatableObjectAdapterTest.cs (2)
134Assert.Equal(expectedDisplayName, model.DisplayName); 135Assert.Equal(expectedMemberName, model.MemberName);
ValidationAttributeAdapterProviderTest.cs (1)
88Assert.Equal(expectedRuleName, dataTypeAdapter.RuleName);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (55)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetupTest.cs (2)
24Assert.Equal("application/xml", mappedContentType); 40Assert.Equal("text/xml", mappedContentType);
DependencyInjection\XmlSerializerMvcOptionsSetupTest.cs (2)
24Assert.Equal("application/xml", mappedContentType); 40Assert.Equal("text/xml", mappedContentType);
ProblemDetailsWrapperTest.cs (5)
33Assert.Equal("Some title", problemDetails.Title); 34Assert.Equal("Some instance", problemDetails.Instance); 46Assert.Equal("[key2]", kvp.Key); 51Assert.Equal("key1", kvp.Key); 93Assert.Equal(expectedContent, res);
SerializableErrorWrapperTests.cs (5)
75Assert.Equal(string.Empty, kvp.Key); 80Assert.Equal("key1", kvp.Key); 85Assert.Equal("key2", kvp.Key); 90Assert.Equal("list[3].key3", kvp.Key); 123Assert.Equal(expectedContent, res);
ValidationProblemDetailsWrapperTest.cs (13)
37Assert.Equal("Some title", problemDetails.Title); 38Assert.Equal("Some instance", problemDetails.Instance); 45Assert.Equal("[key2]", kvp.Key); 50Assert.Equal("key1", kvp.Key); 63Assert.Equal("[error2]", kvp.Key); 68Assert.Equal("error1", kvp.Key); 93Assert.Equal("Some title", problemDetails.Title); 94Assert.Equal("Some instance", problemDetails.Instance); 101Assert.Equal("key1", kvp.Key); 106Assert.Equal("[key2]", kvp.Key); 131Assert.Equal("Some title", problemDetails.Title); 182Assert.Equal(expectedContent, res); 220Assert.Equal(expectedContent, res);
XmlDataContractSerializerInputFormatterTest.cs (11)
162Assert.Equal(expectedString, model.sampleString); 193Assert.Equal(expectedString, model.sampleString); 226Assert.Equal(expectedString, model.sampleString); 261Assert.Equal(expectedString, model.sampleString); 293Assert.Equal(expectedString, model.sampleString); 320Assert.Equal(expectedString, model.sampleString); 354Assert.Equal(expectedString, model.sampleString); 385Assert.Equal(expectedLevelTwoString, model.SampleString); 387Assert.Equal(expectedString, model.TestOne.sampleString); 595Assert.Equal(expectedString, model.sampleString); 713Assert.Equal(expectedString, model.SampleString);
XmlDataContractSerializerOutputFormatterTest.cs (2)
667Assert.Equal($"An error occurred while trying to create a DataContractSerializer for the type '{typeof(Customer).FullName}'.", 718Assert.Equal(expectedOutput, content);
XmlSerializerInputFormatterTest.cs (12)
67Assert.Equal(expectedString, model.sampleString); 104Assert.Equal(expectedString, model.sampleString); 140Assert.Equal(expectedString, model.sampleString); 176Assert.Equal(expectedString, model.sampleString); 220Assert.Equal(expectedString, model.sampleString); 356Assert.Equal(expectedString, model.sampleString); 389Assert.Equal(expectedLevelTwoString, model.SampleString); 391Assert.Equal(expectedString, model.TestOne.sampleString); 515Assert.Equal(expectedMessage, ex.Message); 545Assert.Equal(expectedMessage, ex.Message); 616Assert.Equal(expectedString, model.sampleString); 648Assert.Equal(expectedString, model.sampleString);
XmlSerializerOutputFormatterTest.cs (3)
102Assert.Equal(expectedOutput, content); 122Assert.Equal(expectedOutput, content); 484Assert.Equal(
Microsoft.AspNetCore.Mvc.FunctionalTests (1069)
AntiforgeryMiddlewareTest.cs (2)
65Assert.Equal("Cannot apply [ValidateAntiForgeryTokenAttribute] and [RequireAntiforgeryTokenAttribute] at the same time.", exception.Message); 135Assert.Equal("The maximum number of bytes have been read.", exception.Message);
AntiforgeryTests.cs (9)
39Assert.Equal("SAMEORIGIN", header); 49Assert.Equal("no-cache", pragmaValue.Name); 83Assert.Equal("OK", await response.Content.ReadAsStringAsync()); 94Assert.Equal("SAMEORIGIN", header); 101Assert.Equal("no-cache", pragmaValue.Name); 133Assert.Equal("OK", await response.Content.ReadAsStringAsync()); 173Assert.Equal("SAMEORIGIN", header); 183Assert.Equal("no-cache", pragmaValue.Name); 210Assert.Equal("http://example.com/antiforgery-redirect", response.Headers.Location.AbsoluteUri);
ApiBehaviorTest.cs (24)
62Assert.Equal("application/problem+json", response.Content.Headers.ContentType.MediaType); 70Assert.Equal("One or more validation errors occurred.", problemDetails.Title); 71Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.1", problemDetails.Type); 77Assert.Equal("Name", kvp.Key); 79Assert.Equal("The field Name must be a string with a minimum length of 5 and a maximum length of 30.", error); 83Assert.Equal("Zip", kvp.Key); 85Assert.Equal("The field Zip must match the regular expression '\\d{5}'.", error); 93Assert.Equal("traceId", kvp.Key); 132Assert.Equal("Unsupported Media Type", problemDetails.Title); 159Assert.Equal(input.Name, result.Name); 180Assert.Equal(input.Name, result.ContactInfo.Name); 213Assert.Equal(name, result.Name); 214Assert.Equal(email, result.Email); 234Assert.Equal(name, result.Name); 235Assert.Equal(email, result.Email); 255Assert.Equal(name, result.Name); 256Assert.Equal(email, result.Email); 271Assert.Equal(expected, result); 286Assert.Equal(expected, result); 311Assert.Equal("traceId", kvp.Key); 367Assert.Equal("Error", validationProblemDetails.Title); 373Assert.Equal("tracking-id", kvp.Key); 381Assert.Equal("Error1", kvp.Key); 451Assert.Equal("application/vnd.error+json", response.Content.Headers.ContentType.MediaType);
ApiExplorerTest.cs (137)
98Assert.Equal("ApiExplorerNameSetByConvention", description.GroupName); 112Assert.Equal("SetOnController", description.GroupName); 126Assert.Equal("SetOnAction", description.GroupName); 140Assert.Equal("GroupNameOnController", description.GroupName); 154Assert.Equal("GroupNameOnAction", description.GroupName); 168Assert.Equal("ApiExplorerRouteAndPathParametersInformation", description.RelativePath); 182Assert.Equal("ApiExplorerRouteAndPathParametersInformation/{id}", description.RelativePath); 185Assert.Equal("id", parameter.Name); 187Assert.Equal("Path", parameter.Source); 205Assert.Equal("ApiExplorerRouteAndPathParametersInformation/Constraint/{integer}", description.RelativePath); 208Assert.Equal("integer", parameter.Name); 210Assert.Equal("Path", parameter.Source); 211Assert.Equal("IntRouteConstraint", Assert.Single(parameter.RouteInfo.ConstraintTypes)); 228Assert.Equal("ApiExplorerRouteAndPathParametersInformation/CatchAll/{parameter}", description.RelativePath); 231Assert.Equal("parameter", parameter.Name); 233Assert.Equal("Path", parameter.Source); 250Assert.Equal( 255Assert.Equal("integer", parameter.Name); 257Assert.Equal("Path", parameter.Source); 258Assert.Equal("IntRouteConstraint", Assert.Single(parameter.RouteInfo.ConstraintTypes)); 279Assert.Equal(expectedRelativePath, description.RelativePath); 283Assert.Equal("Path", month.Source); 284Assert.Equal("RangeRouteConstraint", Assert.Single(month.RouteInfo.ConstraintTypes)); 288Assert.Equal("Path", day.Source); 289Assert.Equal("IntRouteConstraint", Assert.Single(day.RouteInfo.ConstraintTypes)); 293Assert.Equal("Path", year.Source); 294Assert.Equal("IntRouteConstraint", Assert.Single(year.RouteInfo.ConstraintTypes)); 315Assert.Equal(expectedRelativePath, description.RelativePath); 319Assert.Equal("Path", month.Source); 320Assert.Equal("RangeRouteConstraint", Assert.Single(month.RouteInfo.ConstraintTypes)); 324Assert.Equal("ModelBinding", day.Source); 325Assert.Equal("IntRouteConstraint", Assert.Single(day.RouteInfo.ConstraintTypes)); 329Assert.Equal("ModelBinding", year.Source); 330Assert.Equal("IntRouteConstraint", Assert.Single(year.RouteInfo.ConstraintTypes)); 350Assert.Equal(expectedRelativePath, description.RelativePath); 353Assert.Equal("Path", path.Source); 356Assert.Equal("Path", pathAndQuery.Source); 374Assert.Equal("ApiExplorerRouteAndPathParametersInformation/Optional/{id}", description.RelativePath); 378Assert.Equal("ModelBinding", id.Source); 406Assert.Equal("GET", description.HttpMethod); 470Assert.Equal(typeof(void).FullName, responseType.ResponseType); 490Assert.Equal(typeof(void).FullName, responseType.ResponseType); 536Assert.Equal(type, responseType.ResponseType); 558Assert.Equal(type, responseType.ResponseType); 580Assert.Equal(type, responseType.ResponseType); 600Assert.Equal(type, responseType.ResponseType); 603Assert.Equal("application/json", responseFormat.MediaType); 625Assert.Equal(type1, responseType.ResponseType); 631Assert.Equal(type2, responseType.ResponseType); 657Assert.Equal(type1, responseType.ResponseType); 663Assert.Equal(type2, responseType.ResponseType); 689Assert.Equal(type1, responseType.ResponseType); 695Assert.Equal(type2, responseType.ResponseType); 721Assert.Equal(type1, responseType.ResponseType); 727Assert.Equal(type2, responseType.ResponseType); 754Assert.Equal(type, responseType.ResponseType); 757Assert.Equal("application/json", responseFormat.MediaType); 761Assert.Equal(errorType, responseType.ResponseType); 764Assert.Equal("application/json", responseFormat.MediaType); 791Assert.Equal(type, responseType.ResponseType); 797Assert.Equal(errorType, responseType.ResponseType); 826Assert.Equal(type, responseType.ResponseType); 832Assert.Equal(errorType, responseType.ResponseType); 856Assert.Equal(typeof(XmlDataContractSerializerOutputFormatter).FullName, textXml.FormatterType); 858Assert.Equal(typeof(XmlDataContractSerializerOutputFormatter).FullName, applicationXml.FormatterType); 861Assert.Equal(typeof(NewtonsoftJsonOutputFormatter).FullName, textJson.FormatterType); 863Assert.Equal(typeof(NewtonsoftJsonOutputFormatter).FullName, applicationJson.FormatterType); 884Assert.Equal(typeof(NewtonsoftJsonOutputFormatter).FullName, applicationJson.FormatterType); 887Assert.Equal(typeof(NewtonsoftJsonOutputFormatter).FullName, textJson.FormatterType); 906Assert.Equal("application/hal+custom", responseFormat.MediaType); 911Assert.Equal("application/hal+json", responseFormat.MediaType); 912Assert.Equal(typeof(NewtonsoftJsonOutputFormatter).FullName, responseFormat.FormatterType); 932Assert.Equal(typeof(Product).FullName, responseType.ResponseType); 959Assert.Equal(contentType, responseFormat.MediaType); 960Assert.Equal(formatterType.FullName, responseFormat.FormatterType); 979Assert.Equal(BindingSource.ModelBinding.Id, i.Source); 980Assert.Equal(typeof(int).FullName, i.Type); 983Assert.Equal(BindingSource.ModelBinding.Id, s.Source); 984Assert.Equal(typeof(string).FullName, s.Type); 1004Assert.Equal(BindingSource.Query.Id, i.Source); 1005Assert.Equal(typeof(int).FullName, i.Type); 1008Assert.Equal(BindingSource.Path.Id, s.Source); 1009Assert.Equal(typeof(string).FullName, s.Type); 1028Assert.Equal(BindingSource.ModelBinding.Id, id.Source); 1029Assert.Equal(typeof(int).FullName, id.Type); 1032Assert.Equal(BindingSource.ModelBinding.Id, name.Source); 1033Assert.Equal(typeof(string).FullName, name.Type); 1052Assert.Equal(BindingSource.Path.Id, id.Source); 1053Assert.Equal(typeof(int).FullName, id.Type); 1056Assert.Equal(BindingSource.Body.Id, product.Source); 1057Assert.Equal(typeof(ApiExplorerWebSite.Product).FullName, product.Type); 1076Assert.Equal(BindingSource.Query.Id, customerId.Source); 1077Assert.Equal(typeof(string).FullName, customerId.Type); 1080Assert.Equal(BindingSource.Header.Id, referrer.Source); 1081Assert.Equal(typeof(string).FullName, referrer.Type); 1084Assert.Equal(BindingSource.Form.Id, quantity.Source); 1085Assert.Equal(typeof(int).FullName, quantity.Type); 1088Assert.Equal(BindingSource.Form.Id, productId.Source); 1089Assert.Equal(typeof(int).FullName, productId.Type); 1092Assert.Equal(BindingSource.Form.Id, productName.Source); 1093Assert.Equal(typeof(string).FullName, productName.Type); 1096Assert.Equal(BindingSource.Query.Id, shippingInstructions.Source); 1097Assert.Equal(typeof(string).FullName, shippingInstructions.Type); 1100Assert.Equal(BindingSource.Form.Id, feedback.Source); 1101Assert.Equal(typeof(string).FullName, feedback.Type); 1121Assert.Equal("searchTerm", parameter.Name); 1126Assert.Equal("top", parameter.Name); 1127Assert.Equal("10", parameter.DefaultValue); 1131Assert.Equal("searchDay", parameter.Name); 1132Assert.Equal(nameof(DayOfWeek.Wednesday), parameter.DefaultValue); 1153Assert.Equal("requiredParam", parameter.Name); 1158Assert.Equal("notRequiredParam", parameter.Name); 1163Assert.Equal("Id", parameter.Name); 1168Assert.Equal("Name", parameter.Name); 1183Assert.Equal("ApiExplorerReload/Index", description.RelativePath); 1204Assert.Equal("ApiExplorerReload/NewIndex", description.RelativePath); 1217Assert.Equal("ApiExplorerInboundOutbound/SuppressedForLinkGeneration", description.RelativePath); 1230Assert.Equal("multipart/form-data", requestFormat.MediaType); 1249Assert.Equal(typeof(Stream).FullName, responseType.ResponseType); 1282Assert.Equal(typeof(Product).FullName, responseType.ResponseType); 1288Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1312Assert.Equal(typeof(IEnumerable<Product>).FullName, responseType.ResponseType); 1338Assert.Equal(typeof(void).FullName, responseType.ResponseType); 1344Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1373Assert.Equal(typeof(void).FullName, responseType.ResponseType); 1379Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1408Assert.Equal(typeof(void).FullName, responseType.ResponseType); 1414Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1443Assert.Equal(typeof(void).FullName, responseType.ResponseType); 1449Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1455Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1483Assert.Equal(typeof(void).FullName, responseType.ResponseType); 1489Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1495Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1520Assert.Equal(typeof(void).FullName, responseType.ResponseType); 1526Assert.Equal(typeof(ProblemDetails).FullName, responseType.ResponseType); 1549Assert.Equal(type.FullName, responseType.ResponseType);
ApplicationModelTest.cs (11)
40Assert.Equal("CoolController", body); 53Assert.Equal("ActionName", body); 66Assert.Equal("CoolMetadata", body); 79Assert.Equal("Common Application Description", body); 92Assert.Equal("Common Controller Description", body); 105Assert.Equal("Specific Action Description", body); 118Assert.Equal(@"Licensed to the .NET Foundation under one or more agreements. 136Assert.Equal("From Header - HelloWorld", body); 156Assert.Equal("Hello world", response); 165Assert.Equal("No route matches the supplied values.", ex.Message); 175Assert.Equal("/Home/CannotBeRouted", response.Headers.Location.ToString());
AsyncActionsTests.cs (21)
62Assert.Equal("Action exception message: This is a custom exception.", responseBody); 74Assert.Equal("{\"text\":\"Alpha\"}", responseBody); 85Assert.Equal("Action exception message: This is a custom exception.", responseBody); 97Assert.Equal("Beta", responseBody); 108Assert.Equal("Action exception message: This is a custom exception.", responseBody); 120Assert.Equal("Gamma", responseBody); 131Assert.Equal("Action exception message: This is a custom exception.", responseBody); 143Assert.Equal("{\"text\":\"Delta\"}", responseBody); 154Assert.Equal("Action exception message: This is a custom exception.", responseBody); 166Assert.Equal("Epsilon", responseBody); 177Assert.Equal("Action exception message: This is a custom exception.", responseBody); 189Assert.Equal("Zeta", responseBody); 200Assert.Equal("Action exception message: This is a custom exception.", responseBody); 223Assert.Equal("Action exception message: This is a custom exception.", responseBody); 235Assert.Equal("{\"text\":\"Eta\"}", responseBody); 246Assert.Equal("Action exception message: This is a custom exception.", responseBody); 258Assert.Equal("Theta", responseBody); 269Assert.Equal("Action exception message: This is a custom exception.", responseBody); 281Assert.Equal("Iota", responseBody); 292Assert.Equal("Action exception message: This is a custom exception.", responseBody); 324Assert.Equal("Hello world!", content.Trim());
AsyncEnumerableTestBase.cs (4)
52Assert.Equal("Project0", projects[0].Name); 53Assert.Equal("Project9", projects[9].Name); 92Assert.Equal("Project0", GetName(projects.ElementAt(0))); 93Assert.Equal("Project9", GetName(projects.ElementAt(9)));
AuthMiddlewareAndFilterTestBase.cs (2)
268Assert.Equal("/Account/Login", response.Headers.Location.LocalPath); 274Assert.Equal("/Account/AccessDenied", response.Headers.Location.LocalPath);
AuthMiddlewareUsingRequireAuthTest.cs (1)
76Assert.Equal("/Home/Login", response.Headers.Location.LocalPath);
BasicTests.cs (27)
165Assert.Equal("Hello, World!", Assert.Single(response.Headers.GetValues("Message"))); 182Assert.Equal(expectedContent, responseContent); 195Assert.Equal("https://localhost/Home/HttpsOnlyAction", response.Headers.Location.ToString()); 246Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 269Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 292Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 355Assert.Equal("This is a basic website.", responseData); 378Assert.Equal(expected, response.Trim()); 391Assert.Equal(expected, response.Trim()); 409Assert.Equal("/Home/Product", response.Headers.Location.ToString()); 412Assert.Equal("Get Product", responseBody); 462Assert.Equal("true", response); 487Assert.Equal("BasicWebSite", assemblyParts[0]); 502Assert.Equal("Message set in action", message); 505Assert.Equal("Value set in OnActionExecuting", filterMessage); 508Assert.Equal("View Data Property Sample", title); 519Assert.Equal("Message set in action", message); 522Assert.Equal("View Data Property Sample", title); 543Assert.Equal("TestName", data.Name); 568Assert.Equal("CustomBoundValue", data.CustomBound); 606Assert.Equal("TestName", content); 618Assert.Equal("OnGetTestName", content); 635Assert.Equal("ConfirmPassword", kvp.Key); 636Assert.Equal("Password and confirm password do not match.", Assert.Single(kvp.Value)); 640Assert.Equal("UserName", kvp.Key); 641Assert.Equal("User name is required.", Assert.Single(kvp.Value)); 662Assert.Equal("Failed to read the request form. Form section has invalid Content-Disposition value: ", string.Join(" ", kvp.Value));
ClientValidationOptionsTests.cs (2)
40Assert.Equal("ClientValidationDisabled", view); 41Assert.Equal("ClientValidationDisabled", page);
ComponentRenderingFunctionalTests.cs (2)
76Assert.Equal("http://localhost/navigation-redirect", response.Headers.Location.ToString()); 179Assert.Equal(
ConsumesAttributeTestsBase.cs (7)
57Assert.Equal("CreateProduct_Product_Text", body); 74Assert.Equal("ConsumesAttribute_PassThrough_Product_Json", body); 110Assert.Equal(requestContentType, product.SampleString); 132Assert.Equal(expectedString, product.SampleString); 157Assert.Equal(expectedString, product.SampleString); 176Assert.Equal("Read from JSON: some input", product.SampleString); 199Assert.Equal("Read from XML: some input", product.SampleString);
ContentNegotiationTest.cs (22)
51Assert.Equal(expectedBody, body); 68Assert.Equal(expectedBody, body); 84Assert.Equal(expectedBody, body); 138Assert.Equal(expectedOutput, actual); 181Assert.Equal("100", actual); 223Assert.Equal(expectedMediaType, contentType.ToString()); 244Assert.Equal(expectedBody, body); 262Assert.Equal(expectedBody, body); 279Assert.Equal(expectedBody, body); 296Assert.Equal(expectedBody, body); 314Assert.Equal(expectedBody, body); 330Assert.Equal(expectedBody, body); 355Assert.Equal(expectedBody, body); 375Assert.Equal("text/plain; charset=utf-8", response.Content.Headers.ContentType.ToString()); 377Assert.Equal("Hello World!", actualBody); 393Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 395Assert.Equal("\"Hello World!\"", actualBody); 481Assert.Equal("MethodWithFormatFilter", body); 499Assert.Equal("Jason Ecsemelle", contact.Name); 518Assert.Equal("Jason Ecsemelle", contact.Name); 535Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString()); 537Assert.Equal(expectedBody, body);
ControllerEndpointFiltersTest.cs (3)
59Assert.Equal("Index", ((JsonElement)methodInfo).GetString()); 71Assert.Equal("Intercepted", content); 84Assert.Equal("foobar", ((JsonElement)argument).GetString());
ControllerFromServicesTests.cs (6)
43Assert.Equal(expected, responseText); 56Assert.Equal(expected, response); 69Assert.Equal(expected, response); 85Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 101Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 128Assert.Equal(expected, response);
CorsTestsBase.cs (10)
53Assert.Equal("[\"comment1\",\"comment2\",\"comment3\"]", content); 56Assert.Equal(CorsConstants.AccessControlAllowOrigin, header.Key); 72Assert.Equal("[\"Create\",\"Update\",\"Delete\"]", content); 90Assert.Equal("[\"Create\",\"Update\",\"Delete\"]", content); 136Assert.Equal(CorsConstants.AccessControlAllowMethods, h.Key); 141Assert.Equal(CorsConstants.AccessControlAllowOrigin, h.Key); 147Assert.Equal(string.Empty, content); 179Assert.Equal("abcd", content); 237Assert.Equal("[\"usercomment1\",\"usercomment2\",\"usercomment3\"]", content); 261Assert.Equal("exclusive", content);
CustomValueProviderTest.cs (8)
51Assert.Equal("text/plain", response.Content.Headers.ContentType.MediaType); 52Assert.Equal("BasicWebSite.Controllers.CustomValueProviderController.CustomValueProviderDisplayName (BasicWebSite)", content); 68Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 69Assert.Equal("[42,100,200]", content); 85Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 86Assert.Equal("[null,42,null,100,null,200]", content); 102Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 103Assert.Equal(@"[null,""foo"",null,""bar"",null,""baz""]", content);
DefaultValuesTest.cs (7)
40Assert.Equal(expected, response); 54Assert.Equal(expected, response); 68Assert.Equal(expected, response); 82Assert.Equal(expected, response); 96Assert.Equal(expected, response); 112Assert.Equal(expected, response); 126Assert.Equal(expected, response);
DirectivesTest.cs (2)
40Assert.Equal(expected, body.Trim()); 53Assert.Equal(expected, body.Trim());
DoNotRespectBrowserAcceptHeaderTests.cs (7)
53Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 55Assert.Equal("{\"id\":10,\"name\":\"John\"}", responseData); 81Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString()); 112Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 115Assert.Equal(expectedResponseData, responseData); 141Assert.Equal("application/xml; charset=utf-8", response.Content.Headers.ContentType.ToString()); 143Assert.Equal(requestData, responseData);
FileResultTests.cs (86)
45Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 49Assert.Equal("This is a sample text file", body); 68Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 71Assert.Equal(expectedBody, body); 90Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 92Assert.Equal("This is a sample text file", body); 110Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 132Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 135Assert.Equal(expectedBody, body); 154Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 156Assert.Equal("This is a sample text file", body); 174Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 192Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 196Assert.Equal("This is a sample text file", body); 200Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 218Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 220Assert.Equal(expectedBody, body); 237Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 240Assert.Equal("This is", body); 257Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 259Assert.Equal("This is a sample text file", body); 290Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 294Assert.Equal(string.Empty, body); 301Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 315Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 319Assert.Equal("This is a sample text file", body); 332Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 336Assert.Equal("This is sample text from a stream", body); 354Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 358Assert.Equal(expectedBody, body); 377Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 379Assert.Equal("This is sample text from a stream", body); 398Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 413Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 417Assert.Equal("This is sample text from a stream", body); 421Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 439Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 441Assert.Equal(expectedBody, body); 458Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 461Assert.Equal("This is", body); 478Assert.Equal("This is sample text from a stream", body); 509Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 513Assert.Equal(string.Empty, body); 520Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 533Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 537Assert.Equal("This is a sample text from a binary array", body); 556Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 559Assert.Equal(expectedBody, body); 578Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 580Assert.Equal("This is a sample text from a binary array", body); 598Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 602Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 617Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 621Assert.Equal("This is a sample text from a binary array", body); 625Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 643Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 645Assert.Equal(expectedBody, body); 662Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 665Assert.Equal("This is", body); 682Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 684Assert.Equal("This is a sample text from a binary array", body); 715Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 719Assert.Equal(string.Empty, body); 726Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 742Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 746Assert.Equal(expectedBody, body); 750Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 769Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 772Assert.Equal(expectedBody, body); 775Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 793Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 795Assert.Equal(expectedBody, body); 812Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 815Assert.Equal("Sample ", body); 818Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 835Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 837Assert.Equal("Sample text file as embedded resource.", body); 840Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 859Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 861Assert.Equal("Sample text file as embedded resource.", body); 864Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 882Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 888Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition); 919Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 923Assert.Equal(string.Empty, body); 930Assert.Equal("attachment; filename=downloadName.txt; filename*=UTF-8''downloadName.txt", contentDisposition);
FiltersTest.cs (6)
40Assert.Equal("Hello World!", await response.Content.ReadAsStringAsync()); 51Assert.Equal("Hello World!", await response.Content.ReadAsStringAsync()); 77Assert.Equal( 97Assert.Equal("Can't process this!", await response.Content.ReadAsStringAsync()); 110Assert.Equal("This value was set by TraceResourceFilter", response); 124Assert.Equal("Service filter content", await response.Content.ReadAsStringAsync());
FormFileUploadTest.cs (3)
49Assert.Equal("John", user.Name); 51Assert.Equal("John's biography content", user.Biography); 77Assert.Equal("Phone", product.Name);
GlobalAuthorizationFilterTestBase.cs (2)
43Assert.Equal( 57Assert.Equal("Administration.AllowAnonymousAction", body);
HtmlGenerationTest.cs (46)
207Assert.Equal(attribute.Value, imgElement.GetAttribute(attribute.Key)); 359Assert.Equal("true", numberInput.GetAttribute("data-val")); 360Assert.Equal("The field Number must be between 1 and 100.", numberInput.GetAttribute("data-val-range")); 361Assert.Equal("The Number field is required.", numberInput.GetAttribute("data-val-required")); 364Assert.Equal("true", passwordInput.GetAttribute("data-val")); 365Assert.Equal("The Password field is required.", passwordInput.GetAttribute("data-val-required")); 368Assert.Equal("true", addressInput.GetAttribute("data-val")); 369Assert.Equal("The Address field is required.", addressInput.GetAttribute("data-val-required")); 395Assert.Equal("The value '' is invalid.", validation.TextContent); 401Assert.Equal("field-validation-valid", validation.ClassName); 404Assert.Equal("The Password field is required.", validation.TextContent); 407Assert.Equal("The Address field is required.", validation.TextContent); 482Assert.Equal(expected1, response1.Trim()); 490Assert.Equal(expected2, response2.Trim()); 501Assert.Equal(expected1, response1.Trim()); 510Assert.Equal(expected2, response2.Trim()); 517Assert.Equal(expected1, response3.Trim()); 529Assert.Equal(expected1, response1.Trim()); 537Assert.Equal(expected2, response2.Trim()); 544Assert.Equal(expected3, response3.Trim()); 551Assert.Equal(expected4, response4.Trim()); 565Assert.Equal(expected1, response1.Trim()); 566Assert.Equal(expected2, response2.Trim()); 567Assert.Equal(expected3, response3.Trim()); 568Assert.Equal(expected4, response4.Trim()); 580Assert.Equal(expected1, response1.Trim()); 581Assert.Equal(expected1, response2.Trim()); 589Assert.Equal(expected2, response3.Trim()); 590Assert.Equal(expected2, response4.Trim()); 639Assert.Equal("Deal percentage is 20", response1.Trim()); 640Assert.Equal("Deal percentage is 20", response2.Trim()); 641Assert.Equal("Deal percentage is 30", response3.Trim()); 713Assert.Equal("Some status message", banner.TextContent); 742Assert.Equal("Hello from fallback", content.TextContent); 767Assert.Equal("true", firstName.GetAttribute("data-val")); 768Assert.Equal("The FirstName field is required.", firstName.GetAttribute("data-val-required")); 769Assert.Equal("The field FirstName must be a string with a maximum length of 5.", firstName.GetAttribute("data-val-length")); 770Assert.Equal("5", firstName.GetAttribute("data-val-length-max")); 771Assert.Equal("The field FirstName must match the regular expression '[A-Za-z]*'.", firstName.GetAttribute("data-val-regex")); 772Assert.Equal("[A-Za-z]*", firstName.GetAttribute("data-val-regex-pattern")); 775Assert.Equal("true", lastName.GetAttribute("data-val")); 776Assert.Equal("The LastName field is required.", lastName.GetAttribute("data-val-required")); 777Assert.Equal("The field LastName must be a string with a maximum length of 6.", lastName.GetAttribute("data-val-length")); 778Assert.Equal("6", lastName.GetAttribute("data-val-length-max")); 800item => Assert.Equal("The field FirstName must be a string with a maximum length of 5.", item.TextContent), 801item => Assert.Equal("The LastName field is required.", item.TextContent));
HtmlGenerationWithCultureTest.cs (30)
54Assert.Equal("fr-FR", culture); 55Assert.Equal("10", correlationId); 56Assert.Equal("10", cachedCorrelationId); 63Assert.Equal("en-GB", culture); 64Assert.Equal("11", correlationId); 65Assert.Equal("11", cachedCorrelationId); 72Assert.Equal("fr-FR", culture); 73Assert.Equal("14", correlationId); 75Assert.Equal("10", cachedCorrelationId); 99Assert.Equal("fr-FR", culture); 100Assert.Equal("fr-FR", uiCulture); 101Assert.Equal("10", correlationId); 102Assert.Equal("10", cachedCorrelationId); 109Assert.Equal("fr-FR", culture); 110Assert.Equal("fr-CA", uiCulture); 111Assert.Equal("11", correlationId); 112Assert.Equal("11", cachedCorrelationId); 119Assert.Equal("fr-FR", culture); 120Assert.Equal("fr-FR", uiCulture); 121Assert.Equal("14", correlationId); 123Assert.Equal("10", cachedCorrelationId); 153Assert.Equal("fr-FR", culture); 154Assert.Equal("10", correlationId); 155Assert.Equal("10", cachedCorrelationId); 163Assert.Equal("fr-FR", culture); 164Assert.Equal("11", correlationId); 165Assert.Equal("11", cachedCorrelationId); 172Assert.Equal("fr-FR", culture); 173Assert.Equal("14", correlationId); 182Assert.Equal("10", cachedCorrelationId);
InputFormatterTests.cs (11)
52Assert.Equal(sampleInputInt.ToString(CultureInfo.InvariantCulture), await response.Content.ReadAsStringAsync()); 69Assert.Equal("Test Content", responseBody); 96Assert.Equal("Test", result.DerivedProperty); 112Assert.Equal("DerivedProperty", p.Name); 128Assert.Equal(input, result.DerivedProperty); 144Assert.Equal("DerivedProperty", p.Name); 160Assert.Equal(input, result.DerivedProperty); 176Assert.Equal("DerivedProperty", p.Name); 196Assert.Equal("A non-empty request body is required.", Assert.Single(kvp.Value)); 214Assert.Equal("A non-empty request body is required.", Assert.Single(kvp.Value)); 219Assert.Equal("The dummy field is required.", Assert.Single(kvp.Value));
InputObjectValidationTests.cs (10)
82Assert.Equal("User has been registered : " + sampleName, 105Assert.Equal( 125Assert.Equal("No model validation for developer, even though developer.Name is empty.", 150Assert.Equal(expectedModelStateErrorMessage, errorMessage); 178Assert.Equal(expectedModelStateErrorMessage, errorMessage); 196Assert.Equal("xyz", await response.Content.ReadAsStringAsync()); 217Assert.Equal(expectedErrorMessage, actual: responseContent); 237Assert.Equal(expectedErrorMessage, actual: responseContent); 258Assert.Equal(expectedError, actual: responseContent); 335Assert.Equal("isbn", error.Key);
InputValidationTests.cs (10)
96Assert.Equal( 99Assert.Equal( 102Assert.Equal( 105Assert.Equal( 108Assert.Equal( 111Assert.Equal( 114Assert.Equal( 117Assert.Equal( 120Assert.Equal( 123Assert.Equal(
JsonInputFormatterTestBase.cs (17)
54Assert.Equal(sampleInputInt.ToString(CultureInfo.InvariantCulture), await response.Content.ReadAsStringAsync()); 74Assert.Equal(expectedSampleIntValue.ToString(CultureInfo.InvariantCulture), responseBody); 92Assert.Equal("0", responseBody); 108Assert.Equal(expected, responseBody); 129Assert.Equal(expected.Name, actual.Name); 130Assert.Equal(expected.StreetName, actual.StreetName); 146Assert.Equal(expected.Name, actual.Name); 147Assert.Equal(expected.StreetName, actual.StreetName); 166Assert.Equal("Id", kvp.Key); 167Assert.Equal("The field Id must be between 1 and 100.", Assert.Single(kvp.Value)); 171Assert.Equal("Name", kvp.Key); 172Assert.Equal("The field Name must be a string with a minimum length of 2 and a maximum length of 8.", Assert.Single(kvp.Value)); 176Assert.Equal("StreetName", kvp.Key); 177Assert.Equal("The StreetName field is required.", Assert.Single(kvp.Value)); 194Assert.Equal(expected.Name, actual.Name); 195Assert.Equal(expected.StreetName, actual.StreetName); 233Assert.Equal(expectedSampleIntValue.ToString(CultureInfo.InvariantCulture), responseBody);
JsonOutputFormatterTestBase.cs (15)
62Assert.Equal(expectedOutput, actualContent); 70Assert.Equal("The field Id must be between 10 and 100.", error); 74Assert.Equal("The field Name must be a string or array type with a minimum length of '15'.", error); 85Assert.Equal("2", await response.Content.ReadAsStringAsync()); 96Assert.Equal("\"Hello world\"", await response.Content.ReadAsStringAsync()); 107Assert.Equal("\"Hello Mr. 🦊\"", await response.Content.ReadAsStringAsync()); 118Assert.Equal("\"Une bête de cirque\"", await response.Content.ReadAsStringAsync()); 132Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 146Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 160Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 175Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 190Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.5", obj.Value<string>("type")); 191Assert.Equal("Not Found", obj.Value<string>("title")); 192Assert.Equal("404", obj.Value<string>("status")); 207Assert.Equal(expected, await response.Content.ReadAsStringAsync());
JsonResultWithNewtonsoftJsonTest.cs (11)
51Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 52Assert.Equal("{\"message\":\"hello\"}", content); 73Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 74Assert.Equal("{\"message\":\"hello\"}", content); 91Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 92Assert.Equal("null", content); 109Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 110Assert.Equal("\"hello\"", content); 126Assert.Equal("{\"message\":\"hello\"}", content); 142Assert.Equal("application/message+json", response.Content.Headers.ContentType.MediaType); 143Assert.Equal("{\"message\":\"hello\"}", content);
JsonResultWithSystemTextJsonTest.cs (11)
51Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 52Assert.Equal("{\"message\":\"hello\"}", content); 73Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 74Assert.Equal("{\"message\":\"hello\"}", content); 91Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 92Assert.Equal("null", content); 109Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 110Assert.Equal("\"hello\"", content); 126Assert.Equal("{\"Message\":\"hello\"}", content); 142Assert.Equal("application/message+json", response.Content.Headers.ContentType.MediaType); 143Assert.Equal("{\"message\":\"hello\"}", content);
KeyedServicesTests.cs (5)
43Assert.Equal("OK", await okResponse.Content.ReadAsStringAsync()); 44Assert.Equal("NOT OK", await notokResponse.Content.ReadAsStringAsync()); 58Assert.Equal("OK,NOT OK", await response.Content.ReadAsStringAsync()); 72Assert.Equal("DEFAULT", await response.Content.ReadAsStringAsync()); 86Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync());
LinkGeneratorTest.cs (18)
46Assert.Equal("/LG1/LinkToSelf", responseContent); 58Assert.Equal("/LG1/LinkToSelf/17?another-value=5", responseContent); 70Assert.Equal("/LG1/LinkToSelf?another-value=5", responseContent); 82Assert.Equal("/LG2/SomeAction?another-value=5", responseContent); 94Assert.Equal("/Admin/LG3/SomeAction?another-value=5", responseContent); 106Assert.Equal("/Admin/LG3/SomeAction", responseContent); 120Assert.Equal("/LG3/SomeAction", responseContent); 132Assert.Equal("/LG1/SomeAction", responseContent); 144Assert.Equal("/LG2/SomeAction", responseContent); 156Assert.Equal("/LGAnotherPage", responseContent); 168Assert.Equal("/LGPage?another-value=4", responseContent); 180Assert.Equal("/page-route-transformer/test-page/ExtraPath/HelloWorld", responseContent); 192Assert.Equal("/Admin/LGAreaPage?another-value=4&handler=a-handler", responseContent); 204Assert.Equal("http://localhost/LG1/LinkWithFullUri/17#hi", responseContent); 216Assert.Equal("https://www.example.com/LG1/LinkWithFullUri#hi", responseContent); 228Assert.Equal("http://localhost/LGPage", responseContent); 240Assert.Equal("https://www.example.com/Admin/LGAreaPage?handler=a-handler", responseContent); 252Assert.Equal("https://www.example.com/routewithnomvcparameters/17", responseContent);
LinkParserTest.cs (16)
50Assert.Equal("action", p.Name); 51Assert.Equal("Index", p.Value.Value<string>()); 55Assert.Equal("controller", p.Name); 56Assert.Equal("LinkParser", p.Value.Value<string>()); 60Assert.Equal("id", p.Name); 61Assert.Equal("18", p.Value.Value<string>()); 80Assert.Equal("action", p.Name); 81Assert.Equal("AnotherRoute", p.Value.Value<string>()); 85Assert.Equal("controller", p.Name); 86Assert.Equal("LinkParser", p.Value.Value<string>()); 90Assert.Equal("x", p.Name); 91Assert.Equal("a", p.Value.Value<string>()); 95Assert.Equal("y", p.Name); 96Assert.Equal("b", p.Value.Value<string>()); 100Assert.Equal("z", p.Name); 101Assert.Equal("c", p.Value.Value<string>());
NewtonsoftJsonInputFormatterTest.cs (1)
24Assert.Equal("{\"\":[\"Unexpected end when reading JSON. Path '', line 1, position 1.\"]}", responseBody);
NewtonsoftJsonOutputFormatterTest.cs (1)
36Assert.Equal(expectedBody, actualBody);
OutputFormatterTest.cs (1)
48Assert.Equal(expectedBody, body);
RazorBuildTest.cs (4)
61Assert.Equal("Hello from runtime-compiled rzc page!", responseBody.Trim()); 74Assert.Equal("Hello from fallback page!", responseBody.Trim()); 86Assert.Equal("Hello from runtime-compiled rzc view!", responseBody.Trim()); 99Assert.Equal("Hello from buildtime-compiled rzc view!", responseBody.Trim());
RazorPagesNamespaceTest.cs (3)
41Assert.Equal("AspNetCoreGeneratedDocument", content.Trim()); 51Assert.Equal("CustomNamespace.Nested.Folder", content.Trim()); 61Assert.Equal("Override", content.Trim());
RazorPagesTest.cs (55)
142Assert.Equal("CustomActionResult", content); 152Assert.Equal("Hello from Razor Page", element.TextContent); 162Assert.Equal("Hello from RenderPartialModel", element.TextContent); 172Assert.Equal("Hello from RenderPartialWithModel", element.TextContent); 182Assert.Equal("Hello default", element.TextContent); 192Assert.Equal("CustomActionResult", content); 255Assert.Equal("CustomActionResult", content); 265Assert.Equal("CustomActionResult", content); 294Assert.Equal("From RouteData: 5", content.Trim()); 308Assert.Equal("Path: /PathSet.cshtml", content.Trim()); 353Assert.Equal("Parameter cannot be null.", await response.Content.ReadAsStringAsync()); 371Assert.Equal("Hello, World!", content.Trim()); 387Assert.Equal("Hello, route!", content.Trim()); 403Assert.Equal("Hello, handler!", content.Trim()); 459Assert.Equal("Hello, DecoratedModel!", content.Trim()); 475Assert.Equal("", content); 491Assert.Equal("The message: From OnGet", content.Trim()); 516Assert.Equal("Hi1", content.Trim()); 541Assert.Equal("Hi2", content.Trim()); 618Assert.Equal("/Login?ReturnUrl=%2FHelloWorldWithAuth", response.Headers.Location.PathAndQuery); 634Assert.Equal("Login Page", content); 663Assert.Equal(expected, response.Trim()); 802Assert.Equal(expected, content); 831Assert.Equal("Age", p.Name); 833Assert.Equal("The field Age must be between 0 and 99.", value.First.ToString()); 899Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 915Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 961Assert.Equal(expected, response.Headers.Location.ToString()); 975Assert.Equal(expected, response.Headers.Location.ToString()); 997Assert.Equal(expected, response.Headers.Location.ToString()); 1011Assert.Equal(expected, response.Headers.Location.ToString()); 1025Assert.Equal(expected, response.Headers.Location.ToString()); 1039Assert.Equal(expected, response.Headers.Location.ToString()); 1053Assert.Equal(expected, response.Headers.Location.ToString()); 1065Assert.Equal(expected, response.Headers.Location.ToString()); 1077Assert.Equal(expected, response.Headers.Location.ToString()); 1089Assert.Equal(expected, response.Headers.Location.ToString()); 1103Assert.Equal(expected, response.Headers.Location.ToString()); 1115Assert.Equal(expected, response.Headers.Location.ToString()); 1214Assert.Equal("/Login?ReturnUrl=%2FPages%2FModelWithAuthFilter", response.Headers.Location.PathAndQuery); 1225Assert.Equal("/Login?ReturnUrl=%2FPages%2FAdmin%2FEdit", response.Headers.Location.PathAndQuery); 1238Assert.Equal(expected, response.Trim()); 1255Assert.Equal(expected, (await response.Content.ReadAsStringAsync()).Trim()); 1267Assert.Equal(expected, response.Trim()); 1280Assert.Equal(expected, response.Trim()); 1318Assert.Equal("Property-Value", content.Trim()); 1364Assert.Equal(expected, response.Trim()); 1377Assert.Equal(expected, response.Trim()); 1397Assert.Equal("<p>Hey, it's Mr. totally custom here!</p>", content.Trim()); 1414Assert.Equal(expected, content); 1426Assert.Equal("From ShortCircuitPageAtAuthFilter.cshtml", content); 1438Assert.Equal("From ShortCircuitPageAtPageFilter.cshtml", content); 1448Assert.Equal("ViewData: Bar", content); 1480Assert.Equal("Hello from OnGet!", content.Trim()); 1496Assert.Equal("Hello from OnOptions!", content.Trim());
RazorPagesViewSearchTest.cs (4)
41Assert.Equal("Hello from sibling", content.Trim()); 51Assert.Equal("Hello from parent", content.Trim()); 61Assert.Equal("Hello from root", content.Trim()); 71Assert.Equal("Hello from shared", content.Trim());
RazorPagesWithBasePathTest.cs (31)
51Assert.Equal("Hello from /Index", content.Trim()); 64Assert.Equal("Hello from /Index", content.Trim()); 77Assert.Equal("Hello from /Admin/Index", content.Trim()); 90Assert.Equal("Hello from /Admin/RouteTemplate 1", content.Trim()); 103Assert.Equal("Hello from /Admin/RouteTemplate my-user-id 4", content.Trim()); 114Assert.Equal("/Login?ReturnUrl=%2FConventions%2FAuth", response.Headers.Location.PathAndQuery); 125Assert.Equal("/Login?ReturnUrl=%2FConventions%2FAuthFolder", response.Headers.Location.PathAndQuery); 135Assert.Equal("Hello from Anonymous", response.Trim()); 179Assert.Equal(expected, response.Trim()); 260Assert.Equal(expected, response.Headers.Location.ToString()); 274Assert.Equal(expected, response.Headers.Location.ToString()); 287Assert.Equal(expected, response.Trim()); 300Assert.Equal(expected, response.Trim()); 313Assert.Equal(expected, response.Trim()); 326Assert.Equal(expected, response.Trim()); 393Assert.Equal("/Login?ReturnUrl=%2FAccounts%2FRequiresAuth", response.Headers.Location.PathAndQuery); 403Assert.Equal("Hello from AllowAnonymous", response.Trim()); 478Assert.Equal("/", response.Headers.Location.ToString()); 572Assert.Equal("Description set in handler", description.Value); 575Assert.Equal("Value set in filter", keywords.Value); 578Assert.Equal("Property with key", author.Value); 581Assert.Equal("Title with default value", title); 592Assert.Equal("Description set in page handler", description.Value); 595Assert.Equal("Default value", title); 606Assert.Equal("Message set in handler", message); 609Assert.Equal("View Data in Pages", title); 677Assert.Equal("Value from _ViewStart", valueSetInViewStart); 678Assert.Equal("Value from Page Model", valueSetInPageModel); 679Assert.Equal("Value from Page", valueSetInPage); 727Assert.Equal("/Login?ReturnUrl=%2FFilters%2FAuthFilterOnPage", response.Headers.Location.PathAndQuery); 738Assert.Equal("/Login?ReturnUrl=%2FFilters%2FAuthFilterOnPageWithModel", response.Headers.Location.PathAndQuery);
RazorPagesWithEndpointRoutingTest.cs (4)
38Assert.Equal("/Login?ReturnUrl=%2FConventions%2FAuthFolder", response.Headers.Location.PathAndQuery); 51Assert.Equal("Hello from Anonymous", content.Trim()); 62Assert.Equal("/Login?ReturnUrl=%2FModelWithAuthFilter", response.Headers.Location.PathAndQuery); 73Assert.Equal("/Login?ReturnUrl=%2FAuthorizedAction%2FIndex", response.Headers.Location.PathAndQuery);
RemoteAttributeValidationTest.cs (8)
49Assert.Equal("text/html", response.Content.Headers.ContentType.MediaType); 50Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet); 74Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 75Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet); 77Assert.Equal(expectedContent, responseContent); 103Assert.Equal("application/json", response.Content.Headers.ContentType.MediaType); 104Assert.Equal("utf-8", response.Content.Headers.ContentType.CharSet); 106Assert.Equal(expectedContent, responseContent);
RequestFormLimitsTest.cs (2)
76Assert.Equal(expected, result); 102Assert.Equal(expected, result);
RequestServicesTestBase.cs (3)
62Assert.Equal(requestId, body); 84Assert.Equal(expected, body); 102Assert.Equal(requestId1, body1);
RequestSizeLimitTest.cs (1)
92Assert.Equal(expected, actual);
RespectBrowserAcceptHeaderTests.cs (4)
53Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType.ToString()); 55Assert.Equal("\"Hello World!\"", responseData); 72Assert.Equal("text/plain; charset=utf-8", response.Content.Headers.ContentType.ToString()); 74Assert.Equal("Hello World!", responseData);
RoutingAcrossPipelineBranchesTest.cs (9)
59Assert.Equal("s", subdir); 63Assert.Equal("c", common); 67Assert.Equal("d", @default); 93Assert.Equal("/subdir/literal/Branches/Index/s", subdirContent.Link); 96Assert.Equal("/common/Branches/Index/c/literal", commonContent.Link); 99Assert.Equal("/Branches/literal/Index/d", defaultContent.Link); 128Assert.Equal("/subdir/Branches/Index/c/literal", subdirContent.Link); 131Assert.Equal("/literal/Branches/Index/s", defaultContent.Link); 175Assert.Equal("Index", action);
RoutingDynamicOrderTest.cs (5)
52Assert.Equal("AttributeRouteSlug", content.RouteName); 75Assert.Equal("slug", identifier); 120Assert.Equal("slug", identifier); 141Assert.Equal("Hello from dynamic page: /DynamicPagebefore", content); 164Assert.Equal("controller", identifier);
RoutingDynamicTest.cs (4)
78Assert.Equal("Hello from dynamic controller: /link_generation/dynamic/index", content); 108Assert.Equal("Hello from dynamic controller POST: /link_generation/dynamic/index", content); 124Assert.Equal("Hello from dynamic page: /DynamicPage", content); 156Assert.Equal("/Edit/10", editLink.GetAttribute("href"));
RoutingEndpointRoutingTest.cs (42)
25Assert.Equal("PageRoute", result.Controller); 26Assert.Equal("AttributeRoute", result.Action); 45Assert.Equal("ParameterTransformer", result.Controller); 46Assert.Equal("MyAction", result.Action); 71Assert.Equal("EndpointRouting", result.Controller); 72Assert.Equal("Index", result.Action); 87Assert.Equal("EndpointRouting", result.Controller); 88Assert.Equal("Index", result.Action); 103Assert.Equal("EndpointRouting", result.Controller); 104Assert.Equal("ParameterTransformer", result.Action); 131Assert.Equal("EndpointRouting", result.Controller); 132Assert.Equal("ParameterTransformer", result.Action); 134Assert.Equal("/endpoint-routing/ParameterTransformer", result.Link); 151Assert.Equal("EndpointRouting", result.Controller); 152Assert.Equal("ParameterTransformer", result.Action); 154Assert.Equal("/endpoint-routing/5", result.Link); 171Assert.Equal("EndpointRouting", result.Controller); 172Assert.Equal("ParameterTransformer", result.Action); 174Assert.Equal("/Blog/ShowPosts", result.Link); 191Assert.Equal("EndpointRouting", result.Controller); 192Assert.Equal("ParameterTransformer", result.Action); 194Assert.Equal("/", result.Link); 268Assert.Equal("ConventionalTransformer", result.Controller); 269Assert.Equal("Index", result.Action); 293Assert.Equal("ConventionalTransformer", result.Controller); 294Assert.Equal("Index", result.Action); 308Assert.Equal("ConventionalTransformer", result.Controller); 309Assert.Equal("Param", result.Action); 311Assert.Equal("/ConventionalTransformerRoute/conventional-transformer/Param/my-value", Assert.Single(result.ExpectedUrls)); 328Assert.Equal("ConventionalTransformer", result.Controller); 329Assert.Equal("Index", result.Action); 330Assert.Equal("/", result.Link); 347Assert.Equal("ConventionalTransformer", result.Controller); 348Assert.Equal("Index", result.Action); 349Assert.Equal("/ConventionalTransformerRoute/conventional-transformer/Param/my-value", result.Link); 366Assert.Equal("ConventionalTransformer", result.Controller); 367Assert.Equal("Index", result.Action); 368Assert.Equal("/ConventionalTransformerRoute/conventional-transformer", result.Link); 383Assert.Equal("/EndpointName/LinkToConventionalRouted", body); 398Assert.Equal("/EndpointName/LinkToConventionalRouted", body); 413Assert.Equal("/EndpointName/LinkToAttributeRouted", body); 428Assert.Equal("/EndpointName/LinkToAttributeRouted", body);
RoutingFallbackTest.cs (5)
64Assert.Equal("Hello from Edit page", content.Trim()); 80Assert.Equal("Hello from fallback controller: /link_generation/Admin/Fallback/Index", content); 96Assert.Equal("Hello from fallback controller POST: /link_generation/Admin/Fallback/Index", content); 112Assert.Equal("Hello from fallback controller POST: /link_generation/Admin/Fallback/Index", content); 128Assert.Equal("Hello from fallback page: /FallbackPage", content);
RoutingGroupsTest.cs (3)
47Assert.Equal("contoso", org); 61Assert.Equal("/pages/Edit/10", editLink.GetAttribute("href")); 62Assert.Equal("/controllers/contoso/Home/Contact", contactLink.GetAttribute("href"));
RoutingTestsBase.cs (146)
52Assert.Equal(controller, result.Controller); 53Assert.Equal(action, result.Action); 55Assert.Equal(expectedUrl, Assert.Single(result.ExpectedUrls)); 70Assert.Equal("NonParameterConstraint", result.Controller); 71Assert.Equal("Index", result.Action); 96Assert.Equal("PageRoute", result.Controller); 97Assert.Equal("ConventionalRoute", result.Action); 118Assert.Equal("Rail", result.Controller); 119Assert.Equal("Index", result.Action); 121Assert.Equal("/Travel/Home/Contact", result.Link); 138Assert.Equal("Flight", result.Controller); 139Assert.Equal("Index", result.Action); 141Assert.Equal("/Travel/Home/Contact", result.Link); 242Assert.Equal("Hello from World", body); 254Assert.Equal("Hello from World", body); 270Assert.Equal("Home", result.Controller); 271Assert.Equal("Index", result.Action); 294Assert.Equal("Home", result.Controller); 295Assert.Equal("Index", result.Action); 328Assert.Equal("Flight", result.Controller); 329Assert.Equal("Index", result.Action); 380Assert.Equal("Store", result.Controller); 381Assert.Equal("ListProducts", result.Action); 413Assert.Equal("Friends", result.Controller); 414Assert.Equal(method, result.Action); 477Assert.Equal("Maps", result.Controller); 478Assert.Equal("Get", result.Action); 504Assert.Equal("Maps", result.Controller); 505Assert.Equal("Post", result.Action); 546Assert.Equal("Maps", result.Controller); 547Assert.Equal("Update", result.Action); 574Assert.Equal("Banks", result.Controller); 575Assert.Equal("Get", result.Action); 641Assert.Equal("Store", result.Controller); 642Assert.Equal("About", result.Action); 658Assert.Equal("Blog", result.Controller); 659Assert.Equal("Edit", result.Action); 688Assert.Equal("Employee", result.Controller); 689Assert.Equal("List", result.Action); 715Assert.Equal("Store", result.Controller); 716Assert.Equal("Orders", result.Action); 740Assert.Equal("Employee", result.Controller); 741Assert.Equal("Salary", result.Action); 760Assert.Equal("Store", result.Controller); 761Assert.Equal("GetOrders", result.Action); 783Assert.Equal("Employee", result.Controller); 784Assert.Equal("UpdateEmployee", result.Action); 805Assert.Equal("Employee", result.Controller); 806Assert.Equal("UpdateManager", result.Action); 830Assert.Equal("Banks", result.Controller); 831Assert.Equal("UpdateBank", result.Action); 850Assert.Equal("Employee", result.Controller); 851Assert.Equal("MergeEmployee", result.Action); 873Assert.Equal("Employee", result.Controller); 874Assert.Equal(action, result.Action); 894Assert.Equal("Employee", result.Controller); 895Assert.Equal("GetManager", result.Action); 915Assert.Equal("Team", result.Controller); 916Assert.Equal("GetOrganization", result.Action); 936Assert.Equal("Team", result.Controller); 937Assert.Equal("GetOrganizations", result.Action); 948Assert.Equal("/Club/5", response); 959Assert.Equal("/Teams/AllOrganizations", response); 990Assert.Equal("Employee", result.Controller); 991Assert.Equal("List", result.Action); 993Assert.Equal("/api/Employee", result.Link); 1010Assert.Equal("Employee", result.Controller); 1011Assert.Equal("List", result.Action); 1013Assert.Equal("/api/Employee/5", result.Link); 1030Assert.Equal("Employee", result.Controller); 1031Assert.Equal("List", result.Action); 1033Assert.Equal("/Blog/ShowPosts", result.Link); 1050Assert.Equal("Employee", result.Controller); 1051Assert.Equal("List", result.Action); 1053Assert.Equal("/", result.Link); 1074Assert.Equal("Company", result.Controller); 1075Assert.Equal(actionName, result.Action); 1077Assert.Equal("/api/Company/5", result.ExpectedUrls.Single()); 1078Assert.Equal("Company", result.RouteName); 1092Assert.Equal("Company", result.Controller); 1093Assert.Equal("Delete", result.Action); 1095Assert.Equal("/api/Company/5", result.ExpectedUrls.Single()); 1096Assert.Equal("RemoveCompany", result.RouteName); 1114Assert.Equal("Company", result.Controller); 1115Assert.Equal("GetEmployees", result.Action); 1117Assert.Equal("/api/Company/5/Employees", result.ExpectedUrls.Single()); 1132Assert.Equal("Company", result.Controller); 1133Assert.Equal("GetDepartments", result.Action); 1135Assert.Equal("/api/Company/5/Departments", result.ExpectedUrls.Single()); 1136Assert.Equal("Departments", result.RouteName); 1154Assert.Equal("DefaultValues", result.Controller); 1155Assert.Equal("OptionalParameter", result.Action); 1157Assert.Equal("/DefaultValuesRoute/Optional", result.Link); 1175Assert.Equal("DefaultValues", result.Controller); 1176Assert.Equal("OptionalParameter", result.Action); 1178Assert.Equal("/DefaultValuesRoute/Optional/DEFAULTVALUES/OPTIONALPARAMETER/123", result.Link); 1196Assert.Equal("DefaultValues", result.Controller); 1197Assert.Equal("DefaultParameter", result.Action); 1200Assert.Equal("/DefaultValuesRoute/Default", result.Link); 1218Assert.Equal("DefaultValues", result.Controller); 1219Assert.Equal("DefaultParameter", result.Action); 1222Assert.Equal("/DefaultValuesRoute/Default/DEFAULTVALUES/DEFAULTPARAMETER/17/CatchAll", result.Link); 1240Assert.Equal("DefaultValues", result.Controller); 1241Assert.Equal("DefaultParameter", result.Action); 1244Assert.Equal("/DefaultValuesRoute/Default/DEFAULTVALUES/DEFAULTPARAMETER/123", result.Link); 1262Assert.Equal("DefaultValues", result.Controller); 1263Assert.Equal("DefaultParameter", result.Action); 1266Assert.Equal("/DefaultValuesRoute/Default", result.Link); 1284Assert.Equal("Home", result.Controller); 1285Assert.Equal("Index", result.Action); 1287Assert.Equal("/Travel/Flight/BuyTickets", result.Link); 1304Assert.Equal("Flight", result.Controller); 1305Assert.Equal("Index", result.Action); 1307Assert.Equal("/Travel/Flight/BuyTickets", result.Link); 1325Assert.Equal("Flight", result.Controller); 1326Assert.Equal("Index", result.Action); 1328Assert.Equal("/", result.Link); 1346Assert.Equal("Employee", result.Controller); 1347Assert.Equal("List", result.Action); 1349Assert.Equal("/ContosoCorp/Trains/CheckSchedule", result.Link); 1366Assert.Equal("Rail", result.Controller); 1367Assert.Equal("Schedule", result.Action); 1369Assert.Equal("/ContosoCorp/Trains", result.Link); 1387Assert.Equal("Rail", result.Controller); 1388Assert.Equal("Schedule", result.Action); 1390Assert.Equal("/", result.Link); 1408Assert.Equal("Rail", result.Controller); 1409Assert.Equal("Index", result.Action); 1411Assert.Equal("/Travel/Flight", result.Link); 1429Assert.Equal("Flight", result.Controller); 1430Assert.Equal("Index", result.Action); 1432Assert.Equal("/ContosoCorp/Trains", result.Link); 1450Assert.Equal("Flight", result.Controller); 1451Assert.Equal("Index", result.Action); 1453Assert.Equal("/Admin/Users/All", result.Link); 1471Assert.Equal("Rail", result.Controller); 1472Assert.Equal("Index", result.Action); 1474Assert.Equal("/Admin/Users/All", result.Link); 1498Assert.Equal("Banks", result.Controller); 1499Assert.Equal(actionName, result.Action); 1550Assert.Equal("Order", result.Controller); 1551Assert.Equal(actionName, result.Action); 1566Assert.Equal("/Edit/10", editLink.GetAttribute("href")); 1569Assert.Equal("/Home/Contact?org=contoso", contactLink.GetAttribute("href")); 1581Assert.Equal("Hello from middleware after routing", content); 1593Assert.Equal("/PageParameter/PageParameter?page=17", content);
RoutingWithoutRazorPagesTestsBase.cs (4)
49Assert.Equal("PageRoute", result.Controller); 50Assert.Equal("AttributeRoute", result.Action); 69Assert.Equal("PageRoute", result.Controller); 70Assert.Equal("ConventionalRoute", result.Action);
SerializableErrorTests.cs (2)
61Assert.Equal(acceptHeader, response.Content.Headers.ContentType.MediaType); 85Assert.Equal(acceptHeader, response.Content.Headers.ContentType.MediaType);
SimpleTests.cs (1)
42Assert.Equal(expected, content);
SimpleWithWebApplicationBuilderExceptionTests.cs (1)
30Assert.Equal("This application failed to start", ex.Message);
SimpleWithWebApplicationBuilderTests.cs (12)
49Assert.Equal(expected, content); 64Assert.Equal(expected, content); 79Assert.Equal(expected, content); 93Assert.Equal("/ok-object", response.Headers.Location.ToString()); 95Assert.Equal(expected, content); 120Assert.Equal("/json", response.Headers.Location.ToString()); 134Assert.Equal("Hello human", content); 148Assert.Equal(expected, content); 175Assert.Equal(expected, content); 194Assert.Equal(expected, content); 215Assert.Equal(expectedWebRoot, content); 278Assert.Equal(expected, actual);
StreamOutputFormatterTest.cs (2)
42Assert.Equal(contentType, response.Content.Headers.ContentType?.ToString()); 44Assert.Equal("Sample text from a stream", body);
SystemTextJsonOutputFormatterTest.cs (5)
24Assert.Equal("\"Hello Mr. \\uD83E\\uDD8A\"", await response.Content.ReadAsStringAsync()); 43Assert.Equal("\"Une b\\u00EAte de cirque\"", await response.Content.ReadAsStringAsync()); 66Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 81Assert.Equal(expected, await response.Content.ReadAsStringAsync()); 83Assert.Equal("t", headerValue);
TagHelpersFromServicesTest.cs (1)
41Assert.Equal(expected, responseText.Trim());
TagHelpersTest.cs (1)
81Assert.Equal("Should be visible", exception.InnerException.InnerException.Message);
TempDataInCookiesTest.cs (2)
94Assert.Equal(expected, body); 150Assert.Equal("Foo", body);
TempDataInCookiesUsingCookieConsentTest.cs (1)
60Assert.Equal("Foo", body);
TempDataPropertyTest.cs (5)
56Assert.Equal(expected, body.ToString().Trim()); 84Assert.Equal(expected, body); 113Assert.Equal(tempDataContent, body); 121Assert.Equal(tempDataContent, body); 150Assert.Equal(tempDataContent, body);
TempDataTestBase.cs (7)
57Assert.Equal("Foo", body); 82Assert.Equal("Foo", body); 113Assert.Equal("Foo", body); 138Assert.Equal("Foo", body); 146Assert.Equal("Foo", body); 178Assert.Equal($"Foo 10 3 10/10/2010 00:00:00 {testGuid.ToString()}", body); 217Assert.Equal("Michael", body);
TestingInfrastructureTests.cs (9)
40Assert.Equal("Test", response); 48Assert.Equal($"The provided Type '{typeof(RazorPagesClassLibrary.ClassLibraryStartup).Name}' does not belong to an assembly with an entry point. A common cause for this error is providing a Type from a class library.", 66Assert.Equal("Some-Value", xPassThruValue); 89Assert.Equal("Some-Value", xPassThruValue); 109Assert.Equal("false", modifiedHeaderWasSent); 123Assert.Equal("/Testing/Builder", response.Headers.Location?.OriginalString); 150Assert.Equal("Test", await response.Content.ReadAsStringAsync()); 168Assert.Equal("Value-4", handlerResponse.CookieValue); 191Assert.Equal("GenericTest", response);
VersioningEndpointRoutingTests.cs (4)
42Assert.Equal("Customers", result.Controller); 43Assert.Equal("Delete", result.Action); 64Assert.Equal("Customers", result.Controller); 65Assert.Equal("Post", result.Action);
VersioningTestsBase.cs (45)
57Assert.Equal("Address", result.Controller); 58Assert.Equal("GetV" + version, result.Action); 81Assert.Equal("Address", result.Controller); 82Assert.Equal("GetAllV" + version, result.Action); 100Assert.Equal("Tickets", result.Controller); 101Assert.Equal("Get", result.Action); 121Assert.Equal("Tickets", result.Controller); 122Assert.Equal("Get", result.Action); 140Assert.Equal("Tickets", result.Controller); 141Assert.Equal("GetById", result.Action); 159Assert.Equal("Tickets", result.Controller); 160Assert.Equal("GetById", result.Action); 186Assert.Equal("Tickets", result.Controller); 187Assert.Equal("Post", result.Action); 235Assert.Equal("Tickets", result.Controller); 236Assert.Equal(action, result.Action); 280Assert.Equal("Books", result.Controller); 281Assert.Equal("GetBreakingChange", result.Action); 302Assert.Equal("Books", result.Controller); 303Assert.Equal("Get", result.Action); 323Assert.Equal("Movies", result.Controller); 324Assert.Equal(action, result.Action); 344Assert.Equal("Movies", result.Controller); 345Assert.Equal(action, result.Action); 366Assert.Equal("Movies", result.Controller); 367Assert.Equal(action, result.Action); 387Assert.Equal("Movies", result.Controller); 388Assert.Equal(action, result.Action); 406Assert.Equal("MoviesV2", result.Controller); 407Assert.Equal("Put", result.Action); 428Assert.Equal("Pets", result.Controller); 429Assert.Equal("Get", result.Action); 449Assert.Equal("Pets", result.Controller); 450Assert.Equal("Get" + version, result.Action); 470Assert.Equal("Pets", result.Controller); 471Assert.Equal("Post" + version, result.Action); 494Assert.Equal("Customers", result.Controller); 495Assert.Equal(actionName, result.Action); 513Assert.Equal("Customers", result.Controller); 514Assert.Equal("AnyV2OrHigher", result.Action); 532Assert.Equal("Customers", result.Controller); 533Assert.Equal("Delete", result.Action); 554Assert.Equal("Vouchers", result.Controller); 555Assert.Equal("GetVouchersMultipleVersions", result.Action); 558Assert.Equal(path, actualUrl);
ViewComponentFromServicesTests.cs (1)
42Assert.Equal(expected, responseText);
ViewEngineTests.cs (5)
117Assert.Equal(expected, body.Trim()); 201Assert.Equal(expected, body.Trim()); 386Assert.Equal(expected, body.Trim()); 399Assert.Equal(expected, body.Trim()); 478Assert.Equal(expected, responseContent.Trim());
XmlDataContractSerializerFormattersWrappingTest.cs (6)
238Assert.Equal("404", root.Element(root.Name.Namespace.GetName("status"))?.Value); 239Assert.Equal("Not Found", root.Element(root.Name.Namespace.GetName("title"))?.Value); 240Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.5", root.Element(root.Name.Namespace.GetName("type"))?.Value); 281Assert.Equal("400", root.Element(root.Name.Namespace.GetName("status"))?.Value); 282Assert.Equal("One or more validation errors occurred.", root.Element(root.Name.Namespace.GetName("title"))?.Value); 285Assert.Equal("The State field is required.", mvcErrors.Element(root.Name.Namespace.GetName("State"))?.Value);
XmlDataContractSerializerInputFormatterTest.cs (1)
74Assert.Equal("WA", modelBindingInfo.Store.Address.State);
XmlSerializerFormattersWrappingTest.cs (6)
221Assert.Equal("404", root.Element(root.Name.Namespace.GetName("status"))?.Value); 222Assert.Equal("Not Found", root.Element(root.Name.Namespace.GetName("title"))?.Value); 223Assert.Equal("https://tools.ietf.org/html/rfc9110#section-15.5.5", root.Element(root.Name.Namespace.GetName("type"))?.Value); 263Assert.Equal("400", root.Element(root.Name.Namespace.GetName("status"))?.Value); 264Assert.Equal("One or more validation errors occurred.", root.Element(root.Name.Namespace.GetName("title"))?.Value); 267Assert.Equal("The State field is required.", mvcErrors.Element(root.Name.Namespace.GetName("State"))?.Value);
XmlSerializerInputFormatterTests.cs (1)
48Assert.Equal(sampleInputInt.ToString(CultureInfo.InvariantCulture), await response.Content.ReadAsStringAsync());
Microsoft.AspNetCore.Mvc.IntegrationTests (966)
ActionParametersIntegrationTest.cs (28)
62Assert.Equal("SomeStreet", boundModel.Address[0].Street); 68Assert.Equal("Address[0].Street", key); 69Assert.Equal("SomeStreet", modelState[key].AttemptedValue); 113Assert.Equal("Address[0].Street", entry.Key); 118Assert.Equal("SomeStreet", state.AttemptedValue); 156Assert.Equal("SomeStreet", boundModel.Address[0].Street); 162Assert.Equal("Address[0].Street", key); 163Assert.Equal("SomeStreet", modelState[key].AttemptedValue); 242Assert.Equal("SomeStreet", boundModel.Address[0].Street); 248Assert.Equal("prefix.Address[0].Street", key); 249Assert.Equal("SomeStreet", modelState[key].AttemptedValue); 293Assert.Equal("prefix.Address[0].Street", entry.Key); 297Assert.Equal("SomeStreet", state.AttemptedValue); 333Assert.Equal("SomeStreet", boundModel.Address[0].Street); 339Assert.Equal("prefix.Address[0].Street", key); 340Assert.Equal("SomeStreet", modelState[key].AttemptedValue); 405Assert.Equal( 443Assert.Equal("James", model.Name); 472Assert.Equal( 496Assert.Equal( 519Assert.Equal( 558Assert.Equal( 591Assert.Equal( 695Assert.Equal("TestName", model.FirstName); 839Assert.Equal("Not valid.", message); 844Assert.Equal("FirstName Not valid.", message); 884Assert.Equal("Not valid.", message); 889Assert.Equal("FirstName Not valid.", message);
ArrayModelBinderIntegrationTest.cs (22)
45Assert.Equal("10", entry.AttemptedValue); 49Assert.Equal("11", entry.AttemptedValue); 89Assert.Equal("10", entry.AttemptedValue); 93Assert.Equal("11", entry.AttemptedValue); 129Assert.Equal("10", entry.AttemptedValue); 133Assert.Equal("11", entry.AttemptedValue); 197Assert.Equal("bill", model[0].Name); 198Assert.Equal("lang", model[1].Name); 205Assert.Equal("bill", entry.AttemptedValue); 209Assert.Equal("lang", entry.AttemptedValue); 242Assert.Equal("bill", model[0].Name); 243Assert.Equal("lang", model[1].Name); 250Assert.Equal("bill", entry.AttemptedValue); 254Assert.Equal("lang", entry.AttemptedValue); 283Assert.Equal("bill", model[0].Name); 284Assert.Equal("lang", model[1].Name); 291Assert.Equal("bill", entry.AttemptedValue); 295Assert.Equal("lang", entry.AttemptedValue); 363Assert.Equal("James", model.Name); 367(e) => Assert.Equal("Alias1", e), 368(e) => Assert.Equal("Alias2", e)); 401Assert.Equal(expectedMessage, exception.Message);
BinderTypeBasedModelBinderIntegrationTest.cs (9)
117Assert.Equal("CustomParameter", key); 177Assert.Equal("SomeStreet", address.Street); 182Assert.Equal("Street", kvp.Key); 229Assert.Equal("SomeStreet", person.Address.Street); 234Assert.Equal("Address.Street", kvp.Key); 267Assert.Equal("SomeStreet", boundPerson.Address.Street); 272Assert.Equal("Address.Street", key); 306Assert.Equal("SomeStreet", boundPerson.Address.Street); 311Assert.Equal("CustomParameter.Address.Street", key);
BindingSourceMetadataProviderIntegrationTest.cs (3)
55Assert.Equal("Fred", boundPerson.Name); 107Assert.Equal("Fred", boundPerson.Name); 108Assert.Equal("text.txt", boundPerson.File.FileName);
BindPropertyIntegrationTest.cs (2)
47Assert.Equal("Joey", Assert.IsType<Person>(result.Model).Name); 74Assert.Equal("Joey", Assert.IsType<Person>(result.Model).Name);
BodyValidationIntegrationTests.cs (18)
133Assert.Equal("CompanyName cannot be null or empty.", modelStateErrors["CompanyName"]); 134Assert.Equal(priceRange, modelStateErrors["Price"]); 135Assert.Equal(categoryRequired, modelStateErrors["Category"]); 136Assert.Equal(contactUsRequired, modelStateErrors["Contact"]); 137Assert.Equal(detail2Required, modelStateErrors["ProductDetails.Detail2"]); 138Assert.Equal(detail3Required, modelStateErrors["ProductDetails.Detail3"]); 178Assert.Equal(productDetailsRequired, modelStateErrors["ProductDetails"]); 218Assert.Equal("Product must be made in the USA if it is not named.", modelStateErrors[""]); 298Assert.Equal(priceRange, modelStateErrors["Price"]); 299Assert.Equal(contactLength, modelStateErrors["Contact"]); 339Assert.Equal("Product must be made in the USA if it is not named.", modelStateErrors[""]); 389Assert.Equal("CustomParameter.Address", key); 392Assert.Equal(addressRequired, error.ErrorMessage); 478Assert.Equal("CustomParameter.Address", entry.Key); 483Assert.Equal("A non-empty request body is required.", error.ErrorMessage); 638Assert.Equal("CustomParameter.Address", entry.Key); 735Assert.Equal("CustomParameter.Address.Street", entry.Key); 739Assert.Equal(streetRequired, error.ErrorMessage);
ByteArrayModelBinderIntegrationTest.cs (4)
62Assert.Equal(queryStringKey, entry.Key); 65Assert.Equal(value, entry.Value.AttemptedValue); 143Assert.Equal("CustomParameter", entry.Key); 145Assert.Equal(value, entry.Value.AttemptedValue);
CollectionModelBinderIntegrationTest.cs (29)
51Assert.Equal("10", entry.AttemptedValue); 55Assert.Equal("11", entry.AttemptedValue); 321Assert.Equal("10", entry.AttemptedValue); 325Assert.Equal("11", entry.AttemptedValue); 332Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 338Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 380Assert.Equal("10", entry.AttemptedValue); 384Assert.Equal("11", entry.AttemptedValue); 431Assert.Equal("10", entry.AttemptedValue); 435Assert.Equal("11", entry.AttemptedValue); 481Assert.Equal("10", entry.AttemptedValue); 486Assert.Equal("11", entry.AttemptedValue); 526Assert.Equal("10", entry.AttemptedValue); 530Assert.Equal("11", entry.AttemptedValue); 621Assert.Equal("Street1", entry.AttemptedValue); 625Assert.Equal("Street2", entry.AttemptedValue); 677Assert.Equal("Addresses[Key1].Street", kvp.Key); 680Assert.Equal(ValidationAttributeUtil.GetStringLengthErrorMessage(null, 3, "Street"), error.ErrorMessage); 714Assert.Equal("LongStreet", address.Street); 720Assert.Equal(ValidationAttributeUtil.GetStringLengthErrorMessage(null, 3, "Street"), error.ErrorMessage); 998Assert.Equal(expectedMessage, exception.Message); 1084Assert.Equal(expectedMessage, exception.Message); 1122Assert.Equal(expectedMessage, exception.Message); 1158item => Assert.Equal("hello", item), 1165Assert.Equal("[0]", kvp.Key); 1170Assert.Equal("[1]", kvp.Key); 1207item => Assert.Equal("hello", item), 1214Assert.Equal("[0]", kvp.Key); 1219Assert.Equal("[1]", kvp.Key);
ComplexRecordIntegrationTest.cs (199)
68Assert.Equal("bill", model.Customer.Name); 70Assert.Equal(AddressStreetContent, model.Customer.Address.Street); 77Assert.Equal("bill", entry.AttemptedValue); 118Assert.Equal("bill", model.Customer.Name); 120Assert.Equal(AddressStreetContent, model.Customer.Address.Street); 127Assert.Equal("bill", entry.AttemptedValue); 170Assert.Equal("bill", model.Customer.Name); 178Assert.Equal("bill", entry.AttemptedValue); 224Assert.Equal("bill", model.Customer.Name); 232Assert.Equal("bill", entry.AttemptedValue); 273Assert.Equal("1 Microsoft Way", model.Customer.Address.Street); 281Assert.Equal("10", entry.AttemptedValue); 322Assert.Equal("1 Microsoft Way", model.Customer.Address.Street); 370Assert.Equal("bill", model.Customer.Name); 378Assert.Equal("bill", entry.AttemptedValue); 382Assert.Equal(ByteArrayEncoded, entry.AttemptedValue); 422Assert.Equal("bill", model.Customer.Name); 430Assert.Equal("bill", entry.AttemptedValue); 434Assert.Equal(ByteArrayEncoded, entry.AttemptedValue); 474Assert.Equal("bill", model.Customer.Name); 482Assert.Equal("bill", entry.AttemptedValue); 527Assert.Equal("bill", model.Customer.Name); 535Assert.Equal("bill", entry.AttemptedValue); 580Assert.Equal("bill", model.Customer.Name); 588Assert.Equal("bill", entry.AttemptedValue); 634Assert.Equal("bill", model.Customer.Name); 641Assert.Equal("parameter.Customer.Name", kvp.Key); 643Assert.Equal("bill", entry.AttemptedValue); 686Assert.Equal("text.txt", document.FileName); 689Assert.Equal("Hello, World!", await reader.ReadToEndAsync()); 700Assert.Equal("10", entry.AttemptedValue); 743Assert.Equal("text.txt", document.FileName); 746Assert.Equal("Hello, World!", await reader.ReadToEndAsync()); 753Assert.Equal("Customer.Documents", entry.Key); 794Assert.Equal("bill", model.Name); 802Assert.Equal("bill", entry.AttemptedValue); 806Assert.Equal("10", entry.AttemptedValue); 810Assert.Equal("11", entry.AttemptedValue); 849Assert.Equal("bill", model.Name); 857Assert.Equal("bill", entry.AttemptedValue); 861Assert.Equal("10", entry.AttemptedValue); 865Assert.Equal("11", entry.AttemptedValue); 904Assert.Equal("bill", model.Name); 912Assert.Equal("bill", entry.AttemptedValue); 997Assert.Equal("bill", model.Name); 1005Assert.Equal("bill", entry.AttemptedValue); 1009Assert.Equal("10", entry.AttemptedValue); 1013Assert.Equal("11", entry.AttemptedValue); 1052Assert.Equal("bill", model.Name); 1060Assert.Equal("bill", entry.AttemptedValue); 1064Assert.Equal("10", entry.AttemptedValue); 1068Assert.Equal("11", entry.AttemptedValue); 1107Assert.Equal("bill", model.Name); 1115Assert.Equal("bill", entry.AttemptedValue); 1200Assert.Equal("bill", model.Name); 1208Assert.Equal("bill", entry.AttemptedValue); 1212Assert.Equal("key0", entry.AttemptedValue); 1216Assert.Equal("10", entry.AttemptedValue); 1255Assert.Equal("bill", model.Name); 1263Assert.Equal("bill", entry.AttemptedValue); 1267Assert.Equal("key0", entry.AttemptedValue); 1271Assert.Equal("10", entry.AttemptedValue); 1310Assert.Equal("bill", model.Name); 1318Assert.Equal("bill", entry.AttemptedValue); 1416Assert.Equal("Accord", model.Name); 1422Assert.Equal("camera_specs", e.Key); 1427Assert.Equal("camera_spec1.txt", s.Name); 1431Assert.Equal("camera_spec2.txt", s.Name); 1436Assert.Equal("tyre_specs", e.Key); 1441Assert.Equal("tyre_spec1.txt", s.Name); 1445Assert.Equal("tyre_spec2.txt", s.Name); 1454Assert.Equal("Accord", entry.AttemptedValue); 1458Assert.Equal("camera_specs", entry.AttemptedValue); 1462Assert.Equal("camera_spec1.txt", entry.AttemptedValue); 1466Assert.Equal("camera_spec2.txt", entry.AttemptedValue); 1470Assert.Equal("tyre_specs", entry.AttemptedValue); 1474Assert.Equal("tyre_spec1.txt", entry.AttemptedValue); 1478Assert.Equal("tyre_spec2.txt", entry.AttemptedValue); 1523Assert.Equal("Accord", model.Name); 1529Assert.Equal("camera_specs", e.Key); 1534Assert.Equal("camera_spec1.txt", s.Name); 1538Assert.Equal("camera_spec2.txt", s.Name); 1543Assert.Equal("tyre_specs", e.Key); 1548Assert.Equal("tyre_spec1.txt", s.Name); 1552Assert.Equal("tyre_spec2.txt", s.Name); 1561Assert.Equal("Accord", entry.AttemptedValue); 1565Assert.Equal("camera_specs", entry.AttemptedValue); 1569Assert.Equal("camera_spec1.txt", entry.AttemptedValue); 1573Assert.Equal("camera_spec2.txt", entry.AttemptedValue); 1577Assert.Equal("tyre_specs", entry.AttemptedValue); 1581Assert.Equal("tyre_spec1.txt", entry.AttemptedValue); 1585Assert.Equal("tyre_spec2.txt", entry.AttemptedValue); 1630Assert.Equal("Accord", model.Name); 1636Assert.Equal("camera_specs", e.Key); 1641Assert.Equal("camera_spec1.txt", s.Name); 1645Assert.Equal("camera_spec2.txt", s.Name); 1650Assert.Equal("tyre_specs", e.Key); 1655Assert.Equal("tyre_spec1.txt", s.Name); 1659Assert.Equal("tyre_spec2.txt", s.Name); 1668Assert.Equal("Accord", entry.AttemptedValue); 1672Assert.Equal("camera_specs", entry.AttemptedValue); 1676Assert.Equal("camera_spec1.txt", entry.AttemptedValue); 1680Assert.Equal("camera_spec2.txt", entry.AttemptedValue); 1684Assert.Equal("tyre_specs", entry.AttemptedValue); 1688Assert.Equal("tyre_spec1.txt", entry.AttemptedValue); 1692Assert.Equal("tyre_spec2.txt", entry.AttemptedValue); 1734Assert.Equal("bill", model.Name); 1742Assert.Equal("bill", entry.AttemptedValue); 1746Assert.Equal("key0", entry.AttemptedValue); 1750Assert.Equal("10", entry.AttemptedValue); 1789Assert.Equal("bill", model.Name); 1797Assert.Equal("bill", entry.AttemptedValue); 1801Assert.Equal("key0", entry.AttemptedValue); 1805Assert.Equal("10", entry.AttemptedValue); 1853Assert.Equal("Accord", model.Name); 1859Assert.Equal("spec1", e.Key); 1860Assert.Equal("spec1.txt", e.Value); 1864Assert.Equal("spec2", e.Key); 1865Assert.Equal("spec2.txt", e.Value); 1873Assert.Equal("Accord", entry.AttemptedValue); 1877Assert.Equal("camera_specs", entry.AttemptedValue); 1881Assert.Equal("spec1", entry.AttemptedValue); 1885Assert.Equal("spec1.txt", entry.AttemptedValue); 1889Assert.Equal("spec2", entry.AttemptedValue); 1893Assert.Equal("spec2.txt", entry.AttemptedValue); 1942Assert.Equal(AddressStreetContent, model.Customer.Address.Street); 1995Assert.Equal("A value for the 'Customer' parameter or property was not provided.", error.ErrorMessage); 2051Assert.Equal("Hurts when 'Customer' is not provided.", error.ErrorMessage); 2103Assert.Equal("123", entry.AttemptedValue); 2109Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 2157Assert.Equal("123", entry.AttemptedValue); 2163Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 2215Assert.Equal("123", entry.AttemptedValue); 2221Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 2271Assert.Equal("A value for the 'ProductName' parameter or property was not provided.", error.ErrorMessage); 2323Assert.Equal("A value for the 'ProductName' parameter or property was not provided.", error.ErrorMessage); 2361Assert.Equal("abc", model.ProductName); 2369Assert.Equal("abc", entry.AttemptedValue); 2419Assert.Equal("A value for the 'OrderIds' parameter or property was not provided.", error.ErrorMessage); 2471Assert.Equal("A value for the 'OrderIds' parameter or property was not provided.", error.ErrorMessage); 2516Assert.Equal("123", entry.AttemptedValue); 2566Assert.Equal(string.Empty, entry.AttemptedValue); 2570Assert.Equal("The value '' is invalid.", error.ErrorMessage); 2616Assert.Equal("parameter.ProductId", entry.Key); 2617Assert.Equal(string.Empty, entry.Value.AttemptedValue); 2675Assert.Equal("HomeAddress.Street", kvp.Key); 2723Assert.Equal("HomeAddress.Street", kvp.Key); 2783Assert.Equal("Address.Street", kvp.Key); 2836Assert.Equal("Street", kvp.Key); 2935Assert.Equal("1", model.Id); 2936Assert.Equal("location1", model.Info.Key); 2938Assert.Equal("10,20", model.Info.Value.GpsCoordinates); 2947Assert.Equal("1", entry.AttemptedValue); 2951Assert.Equal("location1", entry.AttemptedValue); 2955Assert.Equal("98052", entry.AttemptedValue); 2959Assert.Equal("10,20", entry.AttemptedValue); 3008Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3013Assert.Equal("[0].Photo", state.Key); 3086Assert.Equal("parameter.InnerModels[0].Rate", kvp.Key); 3087Assert.Equal("1,000.00", kvp.Value.AttemptedValue); 3094Assert.Equal("parameter.InnerModels[1].Rate", kvp.Key); 3095Assert.Equal("2000", kvp.Value.AttemptedValue); 3144Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3149Assert.Equal("Photo", state.Key); 3196Assert.Equal("Hello Mom!", await reader.ReadToEndAsync()); 3203Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3211Assert.Equal("Photo", kvp.Key); 3218Assert.Equal("Mother.Photo", kvp.Key); 3272Assert.Equal("Fred", item.Name); 3275Assert.Equal("Hello Fred!", reader.ReadToEnd()); 3281Assert.Equal("Ginger", item.Name); 3284Assert.Equal("Hello Ginger!", reader.ReadToEnd()); 3292Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3326Assert.Equal(expectedMessage, exception.Message); 3396Assert.Equal(expectedMessage, exception.Message); 3430Assert.Equal(expectedMessage, exception.Message); 3515Assert.Equal("TestName", model.Name); 3519Assert.Equal("Name", entry.Key); 3562Assert.Equal("Age", entry.Key); 3601Assert.Equal("test", model.Name); 3653Assert.Equal("test", model.Name); 3656Assert.Equal("Name", entry.Key); 3699Assert.Equal("test", model.Name); 3702Assert.Equal("Name", entry.Key); 3751Assert.Equal("testId", model.Id); 3752Assert.Equal("test", model.Name); 3794Assert.Equal("test", model.Name); 3797Assert.Equal("Name", entry.Key); 3839Assert.Equal("test", model.Id); 3881Assert.Equal("test", model.Id); 3926Assert.Equal("test", model.Id); 3972Assert.Equal("test", model.Id); 4015Assert.Equal("default-id", model.Id); 4056Assert.Equal("default-id", model.Id); 4061Assert.Equal("Tags[0]", entry.Key); 4099Assert.Equal("default-id", model.Id); 4104Assert.Equal("parameter.Tags[0]", entry.Key); 4144Assert.Equal("test", model.Name); 4200Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage);
ComplexTypeIntegrationTestBase.cs (176)
105Assert.Equal("bill", model.Customer.Name); 107Assert.Equal(AddressStreetContent, model.Customer.Address.Street); 114Assert.Equal("bill", entry.AttemptedValue); 155Assert.Equal("bill", model.Customer.Name); 157Assert.Equal(AddressStreetContent, model.Customer.Address.Street); 164Assert.Equal("bill", entry.AttemptedValue); 207Assert.Equal("bill", model.Customer.Name); 215Assert.Equal("bill", entry.AttemptedValue); 256Assert.Equal("1 Microsoft Way", model.Customer.Address.Street); 264Assert.Equal("10", entry.AttemptedValue); 305Assert.Equal("1 Microsoft Way", model.Customer.Address.Street); 363Assert.Equal("bill", model.Customer.Name); 371Assert.Equal("bill", entry.AttemptedValue); 375Assert.Equal(ByteArrayEncoded, entry.AttemptedValue); 415Assert.Equal("bill", model.Customer.Name); 423Assert.Equal("bill", entry.AttemptedValue); 427Assert.Equal(ByteArrayEncoded, entry.AttemptedValue); 467Assert.Equal("bill", model.Customer.Name); 475Assert.Equal("bill", entry.AttemptedValue); 530Assert.Equal("bill", model.Customer.Name); 538Assert.Equal("bill", entry.AttemptedValue); 583Assert.Equal("bill", model.Customer.Name); 591Assert.Equal("bill", entry.AttemptedValue); 637Assert.Equal("bill", model.Customer.Name); 644Assert.Equal("parameter.Customer.Name", kvp.Key); 646Assert.Equal("bill", entry.AttemptedValue); 689Assert.Equal("text.txt", document.FileName); 692Assert.Equal("Hello, World!", await reader.ReadToEndAsync()); 703Assert.Equal("10", entry.AttemptedValue); 746Assert.Equal("text.txt", document.FileName); 749Assert.Equal("Hello, World!", await reader.ReadToEndAsync()); 756Assert.Equal("Customer.Documents", entry.Key); 802Assert.Equal("bill", model.Name); 810Assert.Equal("bill", entry.AttemptedValue); 814Assert.Equal("10", entry.AttemptedValue); 818Assert.Equal("11", entry.AttemptedValue); 857Assert.Equal("bill", model.Name); 865Assert.Equal("bill", entry.AttemptedValue); 869Assert.Equal("10", entry.AttemptedValue); 873Assert.Equal("11", entry.AttemptedValue); 912Assert.Equal("bill", model.Name); 920Assert.Equal("bill", entry.AttemptedValue); 1010Assert.Equal("bill", model.Name); 1018Assert.Equal("bill", entry.AttemptedValue); 1022Assert.Equal("10", entry.AttemptedValue); 1026Assert.Equal("11", entry.AttemptedValue); 1065Assert.Equal("bill", model.Name); 1073Assert.Equal("bill", entry.AttemptedValue); 1077Assert.Equal("10", entry.AttemptedValue); 1081Assert.Equal("11", entry.AttemptedValue); 1120Assert.Equal("bill", model.Name); 1128Assert.Equal("bill", entry.AttemptedValue); 1218Assert.Equal("bill", model.Name); 1226Assert.Equal("bill", entry.AttemptedValue); 1230Assert.Equal("key0", entry.AttemptedValue); 1234Assert.Equal("10", entry.AttemptedValue); 1273Assert.Equal("bill", model.Name); 1281Assert.Equal("bill", entry.AttemptedValue); 1285Assert.Equal("key0", entry.AttemptedValue); 1289Assert.Equal("10", entry.AttemptedValue); 1328Assert.Equal("bill", model.Name); 1336Assert.Equal("bill", entry.AttemptedValue); 1452Assert.Equal("Accord", model.Name); 1458Assert.Equal("camera_specs", e.Key); 1463Assert.Equal("camera_spec1.txt", s.Name); 1467Assert.Equal("camera_spec2.txt", s.Name); 1472Assert.Equal("tyre_specs", e.Key); 1477Assert.Equal("tyre_spec1.txt", s.Name); 1481Assert.Equal("tyre_spec2.txt", s.Name); 1490Assert.Equal("Accord", entry.AttemptedValue); 1494Assert.Equal("camera_specs", entry.AttemptedValue); 1498Assert.Equal("camera_spec1.txt", entry.AttemptedValue); 1502Assert.Equal("camera_spec2.txt", entry.AttemptedValue); 1506Assert.Equal("tyre_specs", entry.AttemptedValue); 1510Assert.Equal("tyre_spec1.txt", entry.AttemptedValue); 1514Assert.Equal("tyre_spec2.txt", entry.AttemptedValue); 1559Assert.Equal("Accord", model.Name); 1565Assert.Equal("camera_specs", e.Key); 1570Assert.Equal("camera_spec1.txt", s.Name); 1574Assert.Equal("camera_spec2.txt", s.Name); 1579Assert.Equal("tyre_specs", e.Key); 1584Assert.Equal("tyre_spec1.txt", s.Name); 1588Assert.Equal("tyre_spec2.txt", s.Name); 1597Assert.Equal("Accord", entry.AttemptedValue); 1601Assert.Equal("camera_specs", entry.AttemptedValue); 1605Assert.Equal("camera_spec1.txt", entry.AttemptedValue); 1609Assert.Equal("camera_spec2.txt", entry.AttemptedValue); 1613Assert.Equal("tyre_specs", entry.AttemptedValue); 1617Assert.Equal("tyre_spec1.txt", entry.AttemptedValue); 1621Assert.Equal("tyre_spec2.txt", entry.AttemptedValue); 1666Assert.Equal("Accord", model.Name); 1672Assert.Equal("camera_specs", e.Key); 1677Assert.Equal("camera_spec1.txt", s.Name); 1681Assert.Equal("camera_spec2.txt", s.Name); 1686Assert.Equal("tyre_specs", e.Key); 1691Assert.Equal("tyre_spec1.txt", s.Name); 1695Assert.Equal("tyre_spec2.txt", s.Name); 1704Assert.Equal("Accord", entry.AttemptedValue); 1708Assert.Equal("camera_specs", entry.AttemptedValue); 1712Assert.Equal("camera_spec1.txt", entry.AttemptedValue); 1716Assert.Equal("camera_spec2.txt", entry.AttemptedValue); 1720Assert.Equal("tyre_specs", entry.AttemptedValue); 1724Assert.Equal("tyre_spec1.txt", entry.AttemptedValue); 1728Assert.Equal("tyre_spec2.txt", entry.AttemptedValue); 1775Assert.Equal("bill", model.Name); 1783Assert.Equal("bill", entry.AttemptedValue); 1787Assert.Equal("key0", entry.AttemptedValue); 1791Assert.Equal("10", entry.AttemptedValue); 1830Assert.Equal("bill", model.Name); 1838Assert.Equal("bill", entry.AttemptedValue); 1842Assert.Equal("key0", entry.AttemptedValue); 1846Assert.Equal("10", entry.AttemptedValue); 1885Assert.Equal("bill", model.Name); 1892Assert.Equal("bill", entry.AttemptedValue); 1993Assert.Equal("Accord", model.Name); 1999Assert.Equal("spec1", e.Key); 2000Assert.Equal("spec1.txt", e.Value); 2004Assert.Equal("spec2", e.Key); 2005Assert.Equal("spec2.txt", e.Value); 2013Assert.Equal("Accord", entry.AttemptedValue); 2017Assert.Equal("camera_specs", entry.AttemptedValue); 2021Assert.Equal("spec1", entry.AttemptedValue); 2025Assert.Equal("spec1.txt", entry.AttemptedValue); 2029Assert.Equal("spec2", entry.AttemptedValue); 2033Assert.Equal("spec2.txt", entry.AttemptedValue); 2089Assert.Equal(AddressStreetContent, model.Customer.Address.Street); 2149Assert.Equal("A value for the 'Customer' parameter or property was not provided.", error.ErrorMessage); 2204Assert.Equal("Hurts when 'Customer' is not provided.", error.ErrorMessage); 2265Assert.Equal("123", entry.AttemptedValue); 2271Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 2319Assert.Equal("123", entry.AttemptedValue); 2325Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 2377Assert.Equal("123", entry.AttemptedValue); 2383Assert.Equal("A value for the 'Name' parameter or property was not provided.", error.ErrorMessage); 2437Assert.Equal("A value for the 'ProductName' parameter or property was not provided.", error.ErrorMessage); 2489Assert.Equal("A value for the 'ProductName' parameter or property was not provided.", error.ErrorMessage); 2527Assert.Equal("abc", model.ProductName); 2535Assert.Equal("abc", entry.AttemptedValue); 2589Assert.Equal("A value for the 'OrderIds' parameter or property was not provided.", error.ErrorMessage); 2641Assert.Equal("A value for the 'OrderIds' parameter or property was not provided.", error.ErrorMessage); 2686Assert.Equal("123", entry.AttemptedValue); 2739Assert.Equal(string.Empty, entry.AttemptedValue); 2743Assert.Equal("The value '' is invalid.", error.ErrorMessage); 2789Assert.Equal("parameter.ProductId", entry.Key); 2790Assert.Equal(string.Empty, entry.Value.AttemptedValue); 2854Assert.Equal("HomeAddress.Street", kvp.Key); 2902Assert.Equal("HomeAddress.Street", kvp.Key); 2974Assert.Equal("Address.Street", kvp.Key); 3027Assert.Equal("Street", kvp.Key); 3139Assert.Equal("1", model.Id); 3140Assert.Equal("location1", model.Info.Key); 3142Assert.Equal("10,20", model.Info.Value.GpsCoordinates); 3151Assert.Equal("1", entry.AttemptedValue); 3155Assert.Equal("location1", entry.AttemptedValue); 3159Assert.Equal("98052", entry.AttemptedValue); 3163Assert.Equal("10,20", entry.AttemptedValue); 3216Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3221Assert.Equal("[0].Photo", state.Key); 3301Assert.Equal("parameter.InnerModels[0].Rate", kvp.Key); 3302Assert.Equal("1,000.00", kvp.Value.AttemptedValue); 3309Assert.Equal("parameter.InnerModels[1].Rate", kvp.Key); 3310Assert.Equal("2000", kvp.Value.AttemptedValue); 3366Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3371Assert.Equal("Photo", state.Key); 3418Assert.Equal("Hello Mom!", await reader.ReadToEndAsync()); 3425Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3433Assert.Equal("Photo", kvp.Key); 3440Assert.Equal("Mother.Photo", kvp.Key); 3501Assert.Equal("Fred", item.Name); 3504Assert.Equal("Hello Fred!", reader.ReadToEnd()); 3510Assert.Equal("Ginger", item.Name); 3513Assert.Equal("Hello Ginger!", reader.ReadToEnd()); 3521Assert.Equal("Hello world!", await reader.ReadToEndAsync()); 3561Assert.Equal(expectedMessage, exception.Message); 3647Assert.Equal(expectedMessage, exception.Message); 3699Assert.Equal(expectedMessage, exception.Message);
DictionaryModelBinderIntegrationTest.cs (30)
49Assert.Equal("key0", entry.AttemptedValue); 53Assert.Equal("10", entry.AttemptedValue); 88Assert.Equal("parameter[key0]", kvp.Key); 90Assert.Equal("10", entry.AttemptedValue); 128Assert.Equal("key0", entry.AttemptedValue); 133Assert.Equal("10", entry.AttemptedValue); 816Assert.Equal("You're out of range.", error.ErrorMessage); 1227Assert.Equal(expectedMessage, exception.Message); 1260Assert.Equal("key0", kvp.Key); 1268Assert.Equal("parameter[key0]", kvp.Key); 1314Assert.Equal("key0", kvp.Key); 1317Assert.Equal("name0", person.Name); 1321Assert.Equal("key1", kvp.Key); 1331Assert.Equal("parameter[key0].Age", kvp.Key); 1333Assert.Equal("The value '' is invalid.", Assert.Single(kvp.Value.Errors).ErrorMessage); 1337Assert.Equal("parameter[key0].Name", kvp.Key); 1342Assert.Equal("parameter[key1].Age", kvp.Key); 1347Assert.Equal("parameter[key1].Name", kvp.Key); 1349Assert.Equal("The Name field is required.", Assert.Single(kvp.Value.Errors).ErrorMessage); 1387Assert.Equal("Invalid is not a valid value for DayOfWeek.", modelState["parameter"].Errors[0].ErrorMessage); 1425Assert.Equal("The value 'BadEnumValue' is not valid for Value.", modelState["parameter[exclamation]"].Errors[0].ErrorMessage); 1467Assert.Equal("key0", kvp.Key); 1470Assert.Equal("name0", person.Name); 1474Assert.Equal("key1", kvp.Key); 1484Assert.Equal("parameter[key0].Age", kvp.Key); 1486Assert.Equal("The value '' is invalid.", Assert.Single(kvp.Value.Errors).ErrorMessage); 1490Assert.Equal("parameter[key0].Name", kvp.Key); 1495Assert.Equal("parameter[key1].Age", kvp.Key); 1500Assert.Equal("parameter[key1].Name", kvp.Key); 1502Assert.Equal("The Name field is required.", Assert.Single(kvp.Value.Errors).ErrorMessage);
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
54Assert.Equal("Fred", boundPerson.Name); 113Assert.Equal("Fred", boundPerson.Name);
FormCollectionModelBindingIntegrationTest.cs (5)
61Assert.Equal("form-data; name=Address.File; filename=text.txt", file.ContentDisposition); 63Assert.Equal(data, reader.ReadToEnd()); 68Assert.Equal("Address.Zip", entry.Key); 109Assert.Equal("form-data; name=CustomParameter; filename=text.txt", file.ContentDisposition); 111Assert.Equal(data, reader.ReadToEnd());
FormFileModelBindingIntegrationTest.cs (57)
60Assert.Equal("form-data; name=Address.File; filename=text.txt", file.ContentDisposition); 62Assert.Equal(data, reader.ReadToEnd()); 107Assert.Equal("form-data; name=Address.File; filename=text.txt", file.ContentDisposition); 109Assert.Equal(data, reader.ReadToEnd()); 118Assert.Equal("Address.File", kvp.Key); 158Assert.Equal("form-data; name=Parameter1.Address.File; filename=text.txt", file.ContentDisposition); 160Assert.Equal(data, reader.ReadToEnd()); 169Assert.Equal("Parameter1.Address.File", kvp.Key); 220Assert.Equal("form-data; name=Person.Address.File; filename=text.txt", file.ContentDisposition); 222Assert.Equal(data, reader.ReadToEnd()); 232Assert.Equal("Person.Address.File", kvp.Key); 240Assert.Equal("Person.Address.Zip", kvp.Key); 311Assert.Equal(data, reader.ReadToEnd()); 322Assert.Equal("fleet.Garage.Name", kvp.Key); 330Assert.Equal("fleet.Garage.Vehicles[0].Spec", kvp.Key); 378Assert.Equal(data, reader.ReadToEnd()); 388Assert.Equal("fleet.Garage.Name", kvp.Key); 396Assert.Equal("fleet.Garage.Vehicles[0].BackupVehicle.Spec", kvp.Key); 433Assert.Equal("TestGroup", group.GroupName); 438Assert.Equal("form-data; name=Person.Address.File; filename=text.txt", file.ContentDisposition); 440Assert.Equal(data, reader.ReadToEnd()); 450Assert.Equal("GroupName", kvp.Key); 458Assert.Equal("Person.Address.File", kvp.Key); 499Assert.Equal("form-data; name=files; filename=text.txt", file.ContentDisposition); 502Assert.Equal(data, reader.ReadToEnd()); 508Assert.Equal("files", kvp.Key); 588Assert.Equal("form-data; name=files; filename=text.txt", file.ContentDisposition); 591Assert.Equal(data, reader.ReadToEnd()); 597Assert.Equal("files", kvp.Key); 641Assert.Equal("form-data; name=CustomParameter; filename=text.txt", file.ContentDisposition); 643Assert.Equal(data, reader.ReadToEnd()); 648Assert.Equal("CustomParameter", entry.Key); 729Assert.Equal("form-data; name=p.Specs; filename=text.txt", file.ContentDisposition); 731Assert.Equal(data, reader.ReadToEnd()); 738Assert.Equal("Accord", entry.AttemptedValue); 793Assert.Equal("Accord", car.Name); 797Assert.Equal(data + 1, reader.ReadToEnd()); 805Assert.Equal(data + 2, reader.ReadToEnd()); 813Assert.Equal("Accord", entry.AttemptedValue); 862Assert.Equal(data + 1, reader.ReadToEnd()); 870Assert.Equal(data + 2, reader.ReadToEnd()); 964Assert.Equal(data + 1, reader.ReadToEnd()); 970Assert.Equal(data + 2, reader.ReadToEnd()); 979Assert.Equal("house.Garage.Cars[0].Specs", kvp.Key); 1016Assert.Equal("form-data; name=p.Specs; filename=text.txt", file.ContentDisposition); 1018Assert.Equal(data, reader.ReadToEnd()); 1025Assert.Equal("Accord", entry.AttemptedValue); 1076file => Assert.Equal(data + 1, ReadFormFile(file))); 1082file => Assert.Equal(data + 2, ReadFormFile(file)), 1083file => Assert.Equal(data + 3, ReadFormFile(file))); 1175file => Assert.Equal(data + 1, ReadFormFile(file))); 1181file => Assert.Equal(data + 2, ReadFormFile(file)), 1182file => Assert.Equal(data + 3, ReadFormFile(file))); 1234Assert.Equal("key0", kvp.Key); 1235Assert.Equal(data + 1, ReadFormFile(kvp.Value)); 1239Assert.Equal("key1", kvp.Key); 1240Assert.Equal(data + 2, ReadFormFile(kvp.Value));
GenericModelBinderIntegrationTest.cs (20)
285Assert.Equal("key0", kvp.Key); 293Assert.Equal("key0", entry.AttemptedValue); 297Assert.Equal("10", entry.AttemptedValue); 330Assert.Equal("key0", kvp.Key); 338Assert.Equal("key0", entry.AttemptedValue); 342Assert.Equal("10", entry.AttemptedValue); 409Assert.Equal("key0", kvp.Key); 417Assert.Equal("key0", entry.AttemptedValue); 421Assert.Equal("10", entry.AttemptedValue); 453Assert.Equal("key0", kvp.Key); 461Assert.Equal("key0", entry.AttemptedValue); 465Assert.Equal("10", entry.AttemptedValue); 533Assert.Equal("key0", kvp.Key); 541Assert.Equal("key0", entry.AttemptedValue); 545Assert.Equal("10", entry.AttemptedValue); 549Assert.Equal("11", entry.AttemptedValue); 581Assert.Equal("key0", kvp.Key); 589Assert.Equal("key0", entry.AttemptedValue); 593Assert.Equal("10", entry.AttemptedValue); 597Assert.Equal("11", entry.AttemptedValue);
HeaderModelBinderIntegrationTest.cs (34)
61Assert.Equal("CustomParameter.Address.Header", key); 63Assert.Equal(expected, error.ErrorMessage); 97Assert.Equal("someValue", boundPerson.Address.Street); 102Assert.Equal("prefix.Address.Header", entry.Key); 105Assert.Equal("someValue", entry.Value.AttemptedValue); 139Assert.Equal("someValue", boundPerson.Address.Street); 144Assert.Equal("Address.Header", entry.Key); 147Assert.Equal("someValue", entry.Value.AttemptedValue); 184Assert.Equal("someValue", entry); 189Assert.Equal("Header", kvp.Key); 194Assert.Equal("someValue", modelStateEntry.AttemptedValue); 231Assert.Equal("someValue", entry); 236Assert.Equal("Header", kvp.Key); 241Assert.Equal("someValue", modelStateEntry.AttemptedValue); 298Assert.Equal("CustomParameter", entry.Key); 301Assert.Equal(expectedAttemptedValue, entry.Value.AttemptedValue); 346Assert.Equal("someValue", product.Manufacturer.NoCommaString); 347Assert.Equal("one, two, three", product.Manufacturer.OneCommaSeparatedStringProperty); 363Assert.Equal("prefix.Manufacturer.ArrayOfString", kvp.Key); 367Assert.Equal("first,second", entry.AttemptedValue); 372Assert.Equal("prefix.Manufacturer.EnumerableOfDouble", kvp.Key); 376Assert.Equal("10.51,45.44", entry.AttemptedValue); 381Assert.Equal("prefix.Manufacturer.IntProperty", kvp.Key); 385Assert.Equal("10", entry.AttemptedValue); 390Assert.Equal("prefix.Manufacturer.ListOfEnum", kvp.Key); 394Assert.Equal("Sedan,Coupe", entry.AttemptedValue); 399Assert.Equal("prefix.Manufacturer.ListOfOrderWithTypeConverter", kvp.Key); 403Assert.Equal("10", entry.AttemptedValue); 408Assert.Equal("prefix.Manufacturer.NoCommaString", kvp.Key); 412Assert.Equal("someValue", entry.AttemptedValue); 417Assert.Equal("prefix.Manufacturer.NullableIntProperty", kvp.Key); 421Assert.Equal("300", entry.AttemptedValue); 426Assert.Equal("prefix.Manufacturer.OneCommaSeparatedString", kvp.Key); 430Assert.Equal("one, two, three", entry.AttemptedValue);
JQueryFormatModelBindingIntegrationTest.cs (8)
44Assert.Equal("James", model.Name); 47Assert.Equal("Redmond", address.City); 49Assert.Equal("WA", address.State.ShortName); 50Assert.Equal("Washington", address.State.LongName); 82Assert.Equal("James", model.Name); 85Assert.Equal("Redmond", address.City); 87Assert.Equal("WA", address.State.ShortName); 88Assert.Equal("Washington", address.State.LongName);
KeyValuePairModelBinderIntegrationTest.cs (27)
45Assert.Equal("key0", entry.AttemptedValue); 49Assert.Equal("10", entry.AttemptedValue); 82Assert.Equal("A value is required.", error.ErrorMessage); 86Assert.Equal("10", entry.AttemptedValue); 132Assert.Equal("Hurts when nothing is provided.", error.ErrorMessage); 136Assert.Equal("10", entry.AttemptedValue); 168Assert.Equal("10", entry.AttemptedValue); 174Assert.Equal("A value is required.", error.ErrorMessage); 218Assert.Equal("10", entry.AttemptedValue); 224Assert.Equal("Hurts when nothing is provided.", error.ErrorMessage); 263Assert.Equal("key0", entry.AttemptedValue); 267Assert.Equal("10", entry.AttemptedValue); 303Assert.Equal("key0", entry.AttemptedValue); 307Assert.Equal("10", entry.AttemptedValue); 374Assert.Equal("key0", model.Key); 382Assert.Equal("key0", entry.AttemptedValue); 386Assert.Equal("10", entry.AttemptedValue); 419Assert.Equal("key0", model.Key); 427Assert.Equal("key0", entry.AttemptedValue); 431Assert.Equal("10", entry.AttemptedValue); 460Assert.Equal("key0", model.Key); 468Assert.Equal("key0", entry.AttemptedValue); 472Assert.Equal("10", entry.AttemptedValue); 536Assert.Equal("key1", model.Key); 544Assert.Equal("key1", entry.AttemptedValue); 548Assert.Equal("value1", entry.AttemptedValue); 552Assert.Equal("value2", entry.AttemptedValue);
NullableReferenceTypeIntegrationTest.cs (4)
53Assert.Equal("FirstName", kvp.Key); 140Assert.Equal("FirstName", kvp.Key); 144Assert.Equal("Test", error.ErrorMessage); 195Assert.Equal("param1", kvp.Key);
SimpleTypeModelBinderIntegrationTest.cs (34)
60Assert.Equal("1", modelState[key].AttemptedValue); 104Assert.Equal("1", modelState[key].AttemptedValue); 140Assert.Equal("someValue", model); 147Assert.Equal("Parameter1", key); 148Assert.Equal("someValue", modelState[key].AttemptedValue); 224Assert.Equal("Parameter1", key); 225Assert.Equal("32,000.99", modelState[key].AttemptedValue); 268Assert.Equal("Parameter1", key); 269Assert.Equal("2020-02-01", modelState[key].AttemptedValue); 346Assert.Equal("someValue", model); 353Assert.Equal("Parameter1", key); 354Assert.Equal("someValue,otherValue", modelState[key].AttemptedValue); 397Assert.Equal("Parameter1", key); 401Assert.Equal("abcd", entry.AttemptedValue); 406Assert.Equal("The value 'abcd' is not valid.", error.ErrorMessage); 457Assert.Equal("Parameter1", key); 461Assert.Equal("abcd", entry.AttemptedValue); 466Assert.Equal($"Hmm, 'abcd' is not a valid value.", error.ErrorMessage); 503Assert.Equal("Parameter1", key); 504Assert.Equal("", modelState[key].AttemptedValue); 557Assert.Equal("Parameter1", key); 558Assert.Equal(string.Empty, modelState[key].AttemptedValue); 600Assert.Equal("Parameter1", key); 601Assert.Equal(string.Empty, modelState[key].AttemptedValue); 688Assert.Equal("Fred", boundPerson.Name); 701Assert.Equal("line 1,line 2", entry.AttemptedValue); 734Assert.Equal("someValue", model.Value); 735Assert.Equal("Converter", model.Source); 742Assert.Equal("Parameter1", key); 743Assert.Equal("someValue", modelState[key].AttemptedValue); 778Assert.Equal("someValue", model.Value); 779Assert.Equal("TryParse", model.Source); 786Assert.Equal("Parameter1", key); 787Assert.Equal("someValue", modelState[key].AttemptedValue);
TryUpdateModelIntegrationTest.cs (84)
45Assert.Equal("SomeStreet", model.Street); 46Assert.Equal("Toronto", model.City); 52Assert.Equal("Street", entry.Key); 54Assert.Equal("SomeStreet", state.AttemptedValue); 79Assert.Equal("SomeStreet", model.Street); 86Assert.Equal("Street", entry.Key); 88Assert.Equal("SomeStreet", state.AttemptedValue); 141Assert.Equal("One Name", element.Name); 148Assert.Equal("Two Street", element.Address.Street); 188Assert.Equal("Joe", model.Name); 189Assert.Equal("SomeStreet", model.Address.Street); 190Assert.Equal("Toronto", model.Address.City); 196Assert.Equal("Address.Street", entry.Key); 198Assert.Equal("SomeStreet", state.AttemptedValue); 230Assert.Equal("SomeStreet", model.Address[0].Street); 237Assert.Equal("Address[0].Street", entry.Key); 239Assert.Equal("SomeStreet", state.AttemptedValue); 271Assert.Equal("SomeStreet", model.Address[0].Street); 278Assert.Equal("Address[0].Street", entry.Key); 280Assert.Equal("SomeStreet", state.AttemptedValue); 332Assert.Equal("SomeStreet", model.Address[0].Street); 339Assert.Equal("Address[0].Street", entry.Key); 341Assert.Equal("SomeStreet", state.AttemptedValue); 373Assert.Equal("Address[0].Street", entry.Key); 378Assert.Equal("SomeStreet", state.AttemptedValue); 402Assert.Equal("prefix.Address[0].Street", entry.Key); 407Assert.Equal("SomeStreet", state.AttemptedValue); 436Assert.Equal("SomeStreet", model.Address[0].Street); 443Assert.Equal("Address[0].Street", entry.Key); 445Assert.Equal("SomeStreet", state.AttemptedValue); 484Assert.Equal("SomeStreet", model.Address[0].Street); 491Assert.Equal("Address[0].Street", entry.Key); 493Assert.Equal("SomeStreet", state.AttemptedValue); 572Assert.Equal("Redmond", a.City); 573Assert.Equal("One Microsoft Way", a.Street); 619Assert.Equal("Redmond", a.City); 620Assert.Equal("One Microsoft Way", a.Street); 652Assert.Equal("SomeStreet", model.Street); 653Assert.Equal("Toronto", model.City); 659Assert.Equal("prefix.Street", entry.Key); 661Assert.Equal("SomeStreet", state.AttemptedValue); 686Assert.Equal("SomeStreet", model.Street); 693Assert.Equal("prefix.Street", entry.Key); 695Assert.Equal("SomeStreet", state.AttemptedValue); 741Assert.Equal("One Name", element.Name); 748Assert.Equal("Two Street", element.Address.Street); 788Assert.Equal("Joe", model.Name); 789Assert.Equal("SomeStreet", model.Address.Street); 790Assert.Equal("Toronto", model.Address.City); 796Assert.Equal("prefix.Address.Street", entry.Key); 798Assert.Equal("SomeStreet", state.AttemptedValue); 825Assert.Equal("SomeStreet", model.Address[0].Street); 832Assert.Equal("prefix.Address[0].Street", entry.Key); 834Assert.Equal("SomeStreet", state.AttemptedValue); 866Assert.Equal("SomeStreet", model.Address[0].Street); 873Assert.Equal("prefix.Address[0].Street", entry.Key); 875Assert.Equal("SomeStreet", state.AttemptedValue); 917Assert.Equal("SomeStreet", model.Address[0].Street); 924Assert.Equal("prefix.Address[0].Street", entry.Key); 926Assert.Equal("SomeStreet", state.AttemptedValue); 953Assert.Equal("SomeStreet", model.Address[0].Street); 960Assert.Equal("prefix.Address[0].Street", entry.Key); 962Assert.Equal("SomeStreet", state.AttemptedValue); 1001Assert.Equal("SomeStreet", model.Address[0].Street); 1008Assert.Equal("prefix.Address[0].Street", entry.Key); 1010Assert.Equal("SomeStreet", state.AttemptedValue); 1068Assert.Equal("form-data; name=files; filename=text.txt", file.ContentDisposition); 1071Assert.Equal(data, reader.ReadToEnd()); 1077Assert.Equal("files", kvp.Key); 1122Assert.Equal("SomeStreet", model.Street); 1123Assert.Equal("Toronto", model.City); 1129Assert.Equal("Street", entry.Key); 1131Assert.Equal("SomeStreet", state.AttemptedValue); 1160Assert.Equal($"TryUpdateModelAsync cannot update a record type model. If a '{model.GetType()}' must be updated, include it in an object type.", ex.Message); 1192Assert.Equal("SomeStreet", address.Street); 1194Assert.Equal("98007", address.ZipCode); 1202Assert.Equal("98007", state.AttemptedValue); 1209Assert.Equal("SomeStreet", state.AttemptedValue); 1244Assert.Equal("SomeStreet", address.Street); 1246Assert.Equal("98007", address.ZipCode); 1255Assert.Equal("Address.Street", kvp.Key); 1257Assert.Equal("SomeStreet", state.AttemptedValue); 1264Assert.Equal("Address.ZipCode", kvp.Key); 1266Assert.Equal("98007", state.AttemptedValue);
TryValidateModelIntegrationTest.cs (7)
42Assert.Equal("Product must be made in the USA if it is not named.", modelStateErrors["software"]); 122Assert.Equal("CompanyName cannot be null or empty.", modelStateErrors["[0].CompanyName"]); 123Assert.Equal(priceRange, modelStateErrors["[0].Price"]); 124Assert.Equal(categoryRequired, modelStateErrors["[0].Category"]); 126Assert.Equal("CompanyName cannot be null or empty.", modelStateErrors["[1].CompanyName"]); 127Assert.Equal(priceRange, modelStateErrors["[1].Price"]); 128Assert.Equal(categoryRequired, modelStateErrors["[1].Category"]);
ValidationIntegrationTests.cs (81)
118Assert.Equal(ValidationAttributeUtil.GetRangeErrorMessage(25, 50, "AccountId"), error.ErrorMessage); 188Assert.Equal("bill", model.CustomerName); 195Assert.Equal("bill", entry.AttemptedValue); 277Assert.Equal("bill", model.Customer.Name); 284Assert.Equal("bill", entry.AttemptedValue); 368Assert.Equal("bill", model.Customer.Name); 375Assert.Equal("bill", entry.AttemptedValue); 467Assert.Equal("17", entry.AttemptedValue); 553Assert.Equal("17", entry.AttemptedValue); 586Assert.Equal("bill", item.Name); 704Assert.Equal("bill", model.Name); 711Assert.Equal("bill", entry.AttemptedValue); 741Assert.Equal("billybob", model.Name); 748Assert.Equal("billybob", entry.AttemptedValue); 752Assert.Equal("Too Long.", error.ErrorMessage); 792Assert.Equal("bill", model.Customer.Name); 799Assert.Equal("bill", entry.AttemptedValue); 829Assert.Equal("billybob", model.Customer.Name); 836Assert.Equal("billybob", entry.AttemptedValue); 840Assert.Equal("Too Long.", error.ErrorMessage); 927Assert.Equal("bill", model.Customer.Name); 934Assert.Equal("bill", entry.AttemptedValue); 964Assert.Equal("billybob", model.Customer.Name); 971Assert.Equal("billybob", entry.AttemptedValue); 979Assert.Equal("Invalid Person.", error.ErrorMessage); 1034Assert.Equal("bill", Assert.Single(model.Products).Name); 1041Assert.Equal("bill", entry.AttemptedValue); 1071Assert.Equal("billybob", Assert.Single(model.Products).Name); 1078Assert.Equal("billybob", entry.AttemptedValue); 1087Assert.Equal("Invalid Product.", error.ErrorMessage); 1122Assert.Equal("bill", Assert.Single(model).Name); 1129Assert.Equal("bill", entry.AttemptedValue); 1159Assert.Equal("billybob", Assert.Single(model).Name); 1166Assert.Equal("billybob", entry.AttemptedValue); 1170Assert.Equal("Too Long.", error.ErrorMessage); 1244Assert.Equal("Id", state.Key); 1246Assert.Equal("bill", entry.AttemptedValue); 1251Assert.Equal("The value 'bill' is not valid for Id.", error.ErrorMessage); 1284Assert.Equal("Zip", state.Key); 1286Assert.Equal("-123", entry.AttemptedValue); 1291Assert.Equal("The value '-123' is not valid for Zip.", error.ErrorMessage); 1369Assert.Equal("1", model.NeverValidBecauseType.NeverValidProperty); 1377Assert.Equal(nameof(ValidateSomeProperties.NeverValidBecauseType), state.Key); 1381Assert.Equal( 1388Assert.Equal( 1418Assert.Equal("1", model.NeverValidBecauseAttribute); 1423Assert.Equal(nameof(ValidateSomeProperties.NeverValidBecauseAttribute), kvp.Key); 1428Assert.Equal( 1457Assert.Equal("1", model.ValidateNever); 1461Assert.Equal(nameof(ValidateSomeProperties.ValidateNever), kvp.Key); 1523Assert.Equal(propertyName, kvp.Key); 1600Assert.Equal(nameof(ValidateSomePropertiesSometimes.ControlLength), kvp.Key); 1633Assert.Equal("1", model.Control); 1639state => Assert.Equal(nameof(ValidateSomePropertiesSometimes.Control), state.Key), 1642Assert.Equal(nameof(ValidateSomePropertiesSometimes.ControlLength), state.Key); 1690Assert.Equal(nameof(ValidateSomePropertiesSometimesWithoutValidation.ControlLength), kvp.Key); 1756Assert.Equal("US", entry.AttemptedValue); 1761Assert.Equal("45", entry.AttemptedValue); 1766Assert.Equal("46", entry.AttemptedValue); 1810Assert.Equal("Hello", message); 1898Assert.Equal("Hello", message); 1945Assert.Equal("Hello There", message); 2056Assert.Equal("1", entry.AttemptedValue); 2061Assert.Equal("2", entry.AttemptedValue); 2111Assert.Equal("1", entry.AttemptedValue); 2116Assert.Equal("2", entry.AttemptedValue); 2179Assert.Equal("1", entry.AttemptedValue); 2187Assert.Equal("2", entry.AttemptedValue); 2236Assert.Equal("key0", kvp.Key); 2244Assert.Equal("key0", entry.AttemptedValue); 2249Assert.Equal("10", entry.AttemptedValue); 2283Assert.Equal("key0", kvp.Key); 2284Assert.Equal("value0", kvp.Value.NeverValidProperty); 2291Assert.Equal("key0", entry.AttemptedValue); 2296Assert.Equal("value0", entry.AttemptedValue); 2344Assert.Equal("12", entry.AttemptedValue); 2398Assert.Equal("12", entry.AttemptedValue); 2448Assert.Equal("8", entry.AttemptedValue); 2500Assert.Equal("8", entry.AttemptedValue); 2544Assert.Equal("CoolName", model.Name); 2572Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage(key), error.ErrorMessage);
ValidationWithRecordIntegrationTests.cs (83)
110Assert.Equal(ValidationAttributeUtil.GetRangeErrorMessage(25, 50, "AccountId"), error.ErrorMessage); 176Assert.Equal("bill", model.CustomerName); 183Assert.Equal("bill", entry.AttemptedValue); 258Assert.Equal("bill", model.Customer.Name); 265Assert.Equal("bill", entry.AttemptedValue); 340Assert.Equal("bill", model.Customer.Name); 347Assert.Equal("bill", entry.AttemptedValue); 432Assert.Equal("17", entry.AttemptedValue); 512Assert.Equal("17", entry.AttemptedValue); 545Assert.Equal("bill", item.Name); 587Assert.Equal("bill", model.Name); 594Assert.Equal("bill", entry.AttemptedValue); 624Assert.Equal("billybob", model.Name); 631Assert.Equal("billybob", entry.AttemptedValue); 635Assert.Equal("Too Long.", error.ErrorMessage); 668Assert.Equal("bill", model.Customer.Name); 675Assert.Equal("bill", entry.AttemptedValue); 705Assert.Equal("billybob", model.Customer.Name); 712Assert.Equal("billybob", entry.AttemptedValue); 716Assert.Equal("Too Long.", error.ErrorMessage); 796Assert.Equal("bill", model.Customer.Name); 803Assert.Equal("bill", entry.AttemptedValue); 833Assert.Equal("billybob", model.Customer.Name); 840Assert.Equal("billybob", entry.AttemptedValue); 848Assert.Equal("Invalid Person.", error.ErrorMessage); 896Assert.Equal("bill", Assert.Single(model.Products).Name); 903Assert.Equal("bill", entry.AttemptedValue); 933Assert.Equal("billybob", Assert.Single(model.Products).Name); 940Assert.Equal("billybob", entry.AttemptedValue); 949Assert.Equal("Invalid Product.", error.ErrorMessage); 980Assert.Equal("bill", Assert.Single(model).Name); 987Assert.Equal("bill", entry.AttemptedValue); 1017Assert.Equal("billybob", Assert.Single(model).Name); 1024Assert.Equal("billybob", entry.AttemptedValue); 1028Assert.Equal("Too Long.", error.ErrorMessage); 1096Assert.Equal("Id", state.Key); 1098Assert.Equal("bill", entry.AttemptedValue); 1103Assert.Equal("The value 'bill' is not valid.", error.ErrorMessage); 1136Assert.Equal("Zip", state.Key); 1138Assert.Equal("-123", entry.AttemptedValue); 1143Assert.Equal("The value '-123' is not valid.", error.ErrorMessage); 1213Assert.Equal("1", model.NeverValidBecauseType.NeverValidProperty); 1221Assert.Equal(nameof(ValidateSomeProperties.NeverValidBecauseType), state.Key); 1225Assert.Equal( 1232Assert.Equal( 1262Assert.Equal("1", model.NeverValidBecauseAttribute); 1267Assert.Equal(nameof(ValidateSomeProperties.NeverValidBecauseAttribute), kvp.Key); 1272Assert.Equal( 1301Assert.Equal("1", model.ValidateNever); 1305Assert.Equal(nameof(ValidateSomeProperties.ValidateNever), kvp.Key); 1408Assert.Equal(nameof(ValidateSomePropertiesSometimes.ControlLength), kvp.Key); 1441Assert.Equal("1", model.Control); 1447state => Assert.Equal(nameof(ValidateSomePropertiesSometimes.Control), state.Key), 1450Assert.Equal(nameof(ValidateSomePropertiesSometimes.ControlLength), state.Key); 1496Assert.Equal(nameof(ValidateSomePropertiesSometimesWithoutValidation.ControlLength), kvp.Key); 1559Assert.Equal("US", entry.AttemptedValue); 1564Assert.Equal("45", entry.AttemptedValue); 1569Assert.Equal("46", entry.AttemptedValue); 1613Assert.Equal("Hello", message); 1701Assert.Equal("Hello", message); 1748Assert.Equal("Hello There", message); 1847Assert.Equal("1", entry.AttemptedValue); 1852Assert.Equal("2", entry.AttemptedValue); 1902Assert.Equal("1", entry.AttemptedValue); 1907Assert.Equal("2", entry.AttemptedValue); 1970Assert.Equal("1", entry.AttemptedValue); 1978Assert.Equal("2", entry.AttemptedValue); 2027Assert.Equal("key0", kvp.Key); 2035Assert.Equal("key0", entry.AttemptedValue); 2040Assert.Equal("10", entry.AttemptedValue); 2074Assert.Equal("key0", kvp.Key); 2075Assert.Equal("value0", kvp.Value.NeverValidProperty); 2082Assert.Equal("key0", entry.AttemptedValue); 2087Assert.Equal("value0", entry.AttemptedValue); 2135Assert.Equal("12", entry.AttemptedValue); 2186Assert.Equal("12", entry.AttemptedValue); 2236Assert.Equal("8", entry.AttemptedValue); 2286Assert.Equal("8", entry.AttemptedValue); 2329Assert.Equal(expected, ex.Message); 2368Assert.Equal(expected, ex.Message); 2409Assert.Equal(expected, ex.Message); 2448Assert.Equal("SomeValue", entry.AttemptedValue); 2458Assert.Equal(ValidationAttributeUtil.GetRequiredErrorMessage(key), error.ErrorMessage);
Microsoft.AspNetCore.Mvc.Localization.Test (23)
HtmlLocalizerTest.cs (13)
28Assert.Equal(localizedString.Name, actualLocalizedHtmlString.Name); 29Assert.Equal(localizedString.Value, actualLocalizedHtmlString.Value); 47Assert.Equal(localizedString.Name, actualLocalizedHtmlString.Name); 48Assert.Equal(localizedString.Value, actualLocalizedHtmlString.Value); 113Assert.Equal(format, localizedHtmlString.Value); 117Assert.Equal(expectedText, writer.ToString()); 168Assert.Equal("Hello John", actualLocalizedString.Value); 183Assert.Equal("Hello John Doe", actualLocalizedString.Value); 198Assert.Equal("Hello John", actualLocalizedHtmlString.Value); 213Assert.Equal("Bonjour John", actualLocalizedHtmlString.Value); 229Assert.Equal("World", allLocalizedStrings.First().Value); 245Assert.Equal("World", allLocalizedStrings[0].Value); 246Assert.Equal("Bar", allLocalizedStrings[1].Value);
MvcLocalizationMvcBuilderExtensionsTest.cs (1)
98Assert.Equal("TestResources", actualOptions.Value.ResourcesPath);
MvcLocalizationMvcCoreBuilderExtensionsTest.cs (1)
98Assert.Equal("TestResources", actualOptions.Value.ResourcesPath);
ViewLocalizerTest.cs (8)
136Assert.Equal("World", allLocalizedStrings.First().Value); 161Assert.Equal("World", allLocalizedStrings[0].Value); 162Assert.Equal("Bar", allLocalizedStrings[1].Value); 186Assert.Equal("Hello John", actualLocalizedString.Value); 210Assert.Equal("Hello John Doe", actualLocalizedString.Value); 234Assert.Equal("Hello John", actualLocalizedString.Value); 258Assert.Equal("Hello John Doe", actualLocalizedString.Value); 282Assert.Equal("Bonjour John", actualLocalizedString.Value);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (93)
BsonTempDataSerializerTest.cs (1)
223Assert.Equal(value.ToString(), roundTripValue);
DependencyInjection\MvcNewtonsoftJsonOptionsExtensionsTest.cs (11)
49Assert.Equal(expected, actual); 64Assert.Equal(expected, actual); 79Assert.Equal(expected, actual); 98Assert.Equal(expected, actual); 117Assert.Equal(expected, actual); 136Assert.Equal(expected, actual); 154Assert.Equal(expected, actual); 189Assert.Equal(expected, actual); 209Assert.Equal(expected, actual); 223Assert.Equal(expectedMessage, actual: exception.Message); 237Assert.Equal(expectedMessage, actual: exception.Message);
JsonPatchExtensionsTest.cs (5)
27Assert.Equal("The target location specified by path segment 'CustomerId' was not found.", error.ErrorMessage); 45Assert.Equal("The target location specified by path segment 'CustomerId' was not found.", error.ErrorMessage); 62Assert.Equal("James", model.CustomerName); 87Assert.Equal(nameof(Customer), modelState.First().Key); 89Assert.Equal(error, modelState.First().Value.Errors.First().ErrorMessage);
JsonResultTest.cs (1)
36Assert.Equal("application/json; charset=utf-8", context.HttpContext.Response.ContentType);
NewtonsoftJsonHelperTest.cs (3)
38Assert.Equal(expectedOutput, htmlString.ToString()); 66Assert.Equal(expectedOutput, htmlString.ToString()); 85Assert.Equal(expectedOutput, htmlString.ToString());
NewtonsoftJsonInputFormatterTest.cs (10)
53Assert.Equal("Person Name", userModel.Name); 89Assert.Equal("Person Name", userModel.Name); 127Assert.Equal("Person Name", userModel.Name); 251Assert.Equal(expectedMessage, modelError.ErrorMessage); 275Assert.Equal("[1]", kvp.Key); 281Assert.Equal("[3]", kvp.Key); 371Assert.Equal("The supplied value is invalid.", modelError.ErrorMessage); 402Assert.Equal("The supplied value is invalid for ShortValue.", modelError.ErrorMessage); 433Assert.Equal("The supplied value is invalid for ShortValue.", modelError.ErrorMessage); 560Assert.Equal("test location", location?.Name);
NewtonsoftJsonOutputFormatterTest.cs (8)
145Assert.Equal(expectedOutput, content); 177Assert.Equal(expectedOutput, content); 220Assert.Equal(expected, content); 272Assert.Equal(expected, content); 308Assert.Equal(expected, content); 343Assert.Equal(expected, content); 367Assert.Equal(beforeMessage, afterMessage); 430Assert.Equal(expected, content);
NewtonsoftJsonPatchInputFormatterTest.cs (10)
51Assert.Equal("add", patchDocument.Operations[0].op); 52Assert.Equal("Customer/Name", patchDocument.Operations[0].path); 91Assert.Equal("add", patchDocument.Operations[0].op); 92Assert.Equal("Customer/Name", patchDocument.Operations[0].path); 121Assert.Equal("add", patchDocument.Operations[0].op); 122Assert.Equal("Customer/Name", patchDocument.Operations[0].path); 145Assert.Equal("add", patchDocument.Operations[0].op); 146Assert.Equal("Customer/Name", patchDocument.Operations[0].path); 148Assert.Equal("remove", patchDocument.Operations[1].op); 149Assert.Equal("Customer/Name", patchDocument.Operations[1].path);
NewtonsoftJsonResultExecutorTest.cs (1)
49Assert.Equal(expected, Encoding.UTF8.GetString(written));
NewtonsoftJsonValidationMetadataProviderTest.cs (3)
28Assert.Equal(propertyName, context.ValidationMetadata.ValidationModelName); 46Assert.Equal(new CamelCaseNamingStrategy().GetPropertyName(propertyName, false), context.ValidationMetadata.ValidationModelName); 65Assert.Equal(namingStrategy.GetPropertyName(propertyName, false), context.ValidationMetadata.ValidationModelName);
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (18)
60Assert.Equal("application/json", mediaType.ToString()); 102Assert.Equal("abcd", stringValue); 123Assert.Equal(content, stringValue); 151Assert.Equal(expectedKey, kvp.Key); 178Assert.Equal(expectedKey, kvp.Key); 206Assert.Equal(expectedKey, kvp.Key); 250Assert.Equal("Person Name", userModel.Name); 329Assert.Equal(expectedKey, kvp.Key); 355Assert.Equal(expectedKey, kvp.Key); 382Assert.Equal(expectedValue, kvp.Key); 408Assert.Equal(expectedKey, kvp.Key); 489Assert.Equal(expectedKey, kvp.Key); 514Assert.Equal(ReadAsync_NestedParseError_Expected, kvp.Key); 556Assert.Equal("Test", userModel.Name); 578Assert.Equal("Test", userModel.Name); 581Assert.Equal(content, new StreamReader(requestBody).ReadToEnd()); 604Assert.Equal("Test", userModel.Name); 606Assert.Equal(content, new StreamReader(requestBody).ReadToEnd());
src\Mvc\Mvc.Core\test\Formatters\JsonOutputFormatterTestBase.cs (1)
137Assert.Equal(expectedContent, actualContent);
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (1)
186Assert.Equal(expected, ex.Message);
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (13)
39Assert.Equal("application/json; charset=utf-8", context.HttpContext.Response.ContentType); 60Assert.Equal("text/json", context.HttpContext.Response.ContentType); 84Assert.Equal("text/json; charset=utf-16", context.HttpContext.Response.ContentType); 104Assert.Equal("text/json; charset=utf-16", context.HttpContext.Response.ContentType); 128Assert.Equal("text/json; charset=us-ascii", context.HttpContext.Response.ContentType); 150Assert.Equal(expectedContentType, context.HttpContext.Response.ContentType); 175Assert.Equal(expectedContentType, context.HttpContext.Response.ContentType); 199Assert.Equal("application/json; charset=utf-8", context.HttpContext.Response.ContentType); 219Assert.Equal("Property Age has not been implemented", ex.Message); 224Assert.Equal("Property Age has not been implemented", expectedException.Message); 247Assert.Equal(expected, write.State.ToString()); 265Assert.Equal(expected, write.State.ToString()); 342Assert.Equal(expected, Encoding.UTF8.GetString(written));
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (3)
108Assert.Equal(value, roundTripValue); 193Assert.Equal(value.ToString(CultureInfo.InvariantCulture), roundTripValue); 215Assert.Equal(value.ToString("N"), roundTripValue);
src\Mvc\Mvc.ViewFeatures\test\Rendering\JsonHelperTestBase.cs (4)
43Assert.Equal(expectedOutput, htmlString.ToString()); 62Assert.Equal(expectedOutput, htmlString.ToString()); 100Assert.Equal(expectedOutput, htmlString.ToString()); 119Assert.Equal(expectedOutput, htmlString.ToString());
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (78)
AssemblyPartExtensionTest.cs (1)
41Assert.Equal(assembly.Location, actual);
CompilerFailedExceptionFactoryTest.cs (30)
34Assert.Equal(viewPath, failure.SourceFilePath); 65failure => Assert.Equal(expected, failure.FailureSummary)); 85Assert.Equal(physicalPath, failure.SourceFilePath); 110Assert.Equal(fileContent, failure.SourceFileContent); 135Assert.Equal(viewPath, failure.SourceFilePath); 139Assert.Equal(@"A space or line break was encountered after the ""@"" character. Only valid identifiers, keywords, comments, ""("" and ""{"" are valid at the start of a code block and they must occur immediately following ""@"" with no space in between.", 145Assert.Equal(importsPath, failure.SourceFilePath); 149Assert.Equal(@"The explicit expression block is missing a closing "")"" character. Make sure you have a matching "")"" character for all the ""("" characters within this block, and that none of the "")"" characters are being interpreted as markup.", 179Assert.Equal(viewPath, failure.SourceFilePath); 180Assert.Equal("View Content", failure.SourceFileContent); 184Assert.Equal(diagnostics[0].GetMessage(CultureInfo.CurrentCulture), message.Message); 185Assert.Equal(viewPath, message.SourceFilePath); 193Assert.Equal(diagnostics[1].GetMessage(CultureInfo.CurrentCulture), message.Message); 194Assert.Equal(viewPath, message.SourceFilePath); 202Assert.Equal(diagnostics[2].GetMessage(CultureInfo.CurrentCulture), message.Message); 203Assert.Equal(viewPath, message.SourceFilePath); 212Assert.Equal(viewImportsPath, failure.SourceFilePath); 213Assert.Equal("Global Import Content", failure.SourceFileContent); 217Assert.Equal(diagnostics[3].GetMessage(CultureInfo.CurrentCulture), message.Message); 218Assert.Equal(viewImportsPath, message.SourceFilePath); 269Assert.Equal(viewPath, failure.SourceFilePath); 270Assert.Equal("view-content", failure.SourceFileContent); 274Assert.Equal("message-1", message.Message); 275Assert.Equal(viewPath, message.SourceFilePath); 283Assert.Equal("message-3", message.Message); 284Assert.Equal(viewPath, message.SourceFilePath); 293Assert.Equal(generatedCodeFileName, failure.SourceFilePath); 294Assert.Equal("compilation-content", failure.SourceFileContent); 298Assert.Equal("message-2", message.Message); 299Assert.Equal(assemblyName, message.SourceFilePath);
CSharpCompilerTest.cs (3)
101Assert.Equal("CS1701", item.Key); 106Assert.Equal("CS1702", item.Key); 111Assert.Equal("CS1705", item.Key);
FileProviderRazorProjectFileSystemTest.cs (39)
51Assert.Equal("/File1.cshtml", file.FilePath); 52Assert.Equal("/", file.BasePath); 53Assert.Equal(Path.Combine("BasePath", "File1.cshtml"), file.PhysicalPath); 54Assert.Equal("File1.cshtml", file.RelativePhysicalPath); 58Assert.Equal("/File3.cshtml", file.FilePath); 59Assert.Equal("/", file.BasePath); 60Assert.Equal(Path.Combine("BasePath", "File3.cshtml"), file.PhysicalPath); 61Assert.Equal("File3.cshtml", file.RelativePhysicalPath); 102Assert.Equal("/File1.cshtml", file.FilePath); 103Assert.Equal("/", file.BasePath); 104Assert.Equal(Path.Combine("BasePath", "File1.cshtml"), file.PhysicalPath); 105Assert.Equal("File1.cshtml", file.RelativePhysicalPath); 109Assert.Equal("/Level1-Dir1/File2.cshtml", file.FilePath); 110Assert.Equal("/", file.BasePath); 111Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File2.cshtml"), file.PhysicalPath); 112Assert.Equal(Path.Combine("Level1-Dir1", "File2.cshtml"), file.RelativePhysicalPath); 116Assert.Equal("/Level1-Dir1/File3.cshtml", file.FilePath); 117Assert.Equal("/", file.BasePath); 118Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File3.cshtml"), file.PhysicalPath); 119Assert.Equal(Path.Combine("Level1-Dir1", "File3.cshtml"), file.RelativePhysicalPath); 123Assert.Equal("/Level1-Dir2/File5.cshtml", file.FilePath); 124Assert.Equal("/", file.BasePath); 125Assert.Equal(Path.Combine("BasePath", "Level1-Dir2", "File5.cshtml"), file.PhysicalPath); 126Assert.Equal(Path.Combine("Level1-Dir2", "File5.cshtml"), file.RelativePhysicalPath); 167Assert.Equal("/File2.cshtml", file.FilePath); 168Assert.Equal("/Level1-Dir1", file.BasePath); 169Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File2.cshtml"), file.PhysicalPath); 170Assert.Equal(Path.Combine("Level1-Dir1", "File2.cshtml"), file.RelativePhysicalPath); 174Assert.Equal("/File3.cshtml", file.FilePath); 175Assert.Equal("/Level1-Dir1", file.BasePath); 176Assert.Equal(Path.Combine("BasePath", "Level1-Dir1", "File3.cshtml"), file.PhysicalPath); 177Assert.Equal(Path.Combine("Level1-Dir1", "File3.cshtml"), file.RelativePhysicalPath); 197Assert.Equal("/File3.cshtml", item.FilePath); 198Assert.Equal(string.Empty, item.BasePath); 199Assert.Equal(Path.Combine("BasePath", "File3.cshtml"), item.PhysicalPath); 200Assert.Equal("File3.cshtml", item.RelativePhysicalPath); 219Assert.Equal("/File3.cshtml", item.FilePath); 220Assert.Equal(string.Empty, item.BasePath); 221Assert.Equal(Path.Combine("BasePath2", "File3.cshtml"), item.PhysicalPath);
RuntimeCompilationFileProviderTest.cs (1)
26Assert.Equal(expected, exception.Message);
RuntimeViewCompilerTest.cs (4)
757Assert.Equal(viewPath, compilationFailure.SourceFilePath); 758Assert.Equal(fileContent, compilationFailure.SourceFileContent); 776Assert.Equal("Generated Code", compilationFailure.SourceFilePath); 777Assert.Equal(content, compilationFailure.SourceFileContent);
Microsoft.AspNetCore.Mvc.Razor.Test (112)
ApplicationParts\RazorCompiledItemFeatureProviderTest.cs (2)
108Assert.Equal(expected, ex.Message); 147Assert.Equal("mvc.1.0.razor-page", item.Item.Kind);
Compilation\DefaultRazorPageFactoryProviderTest.cs (1)
97Assert.Equal("/file-exists", actual.Path);
DefaultTagHelperFactoryTest.cs (4)
44Assert.Equal(name, helper.Name); 91Assert.Equal("Test 1, Test 2", helper.Name); 130Assert.Equal("Test 1", testTagHelper.Name); 132Assert.Equal("Test 2", anotherTestTagHelper.Name);
RazorPageCreateModelExpressionTest.cs (9)
119Assert.Equal(expectedName, modelExpression.Name); 143Assert.Equal(expected, result.Name); 161Assert.Equal(expected, result.Name); 179Assert.Equal(expected, result.Name); 197Assert.Equal(expected, result.Name); 216Assert.Equal(expectedName, result.Name); 234Assert.Equal(expectedName, result.Name); 252Assert.Equal(expectedName, result.Name); 270Assert.Equal(expectedName, result.Name);
RazorPageTest.cs (29)
52Assert.Equal( 79Assert.Equal("HtmlEncode[[Hello Prefix]]HtmlEncode[[From Scope: ]]HtmlEncode[[Hello In Scope]]", pageOutput); 111Assert.Equal( 131Assert.Equal( 184Assert.Equal("There is no active writing scope to end.", ex.Message); 201Assert.Equal("HtmlEncode[[Hello World!]]", content.GetContent()); 242Assert.Equal("HtmlEncode[[Hello World!]]", content); 263Assert.Equal("Nesting of TagHelper attribute writing scopes is not supported.", ex.Message); 381Assert.Equal( 411Assert.Equal("Section 'qux' is already defined.", ex.Message); 433Assert.Equal(expected, page.RenderedContent); 449Assert.Equal("RenderSection invocation in '/Views/TestPath/Test.cshtml' is invalid. " + 473Assert.Equal(message, ex.Message); 579Assert.Equal( 603Assert.Equal( 627Assert.Equal( 646Assert.Equal( 666Assert.Equal($"RenderBody has not been called for the page at '{path}'. To ignore call IgnoreBody().", ex.Message); 705Assert.Equal( 755Assert.Equal("not-ignored-section-content", page.RenderedContent); 825Assert.Equal(expected, actual); 858Assert.Equal($"HtmlEncode[[{expected}]]", actual); 897Assert.Equal(expected, ex.Message); 1224Assert.Equal(expectedOutput, writer.ToString()); 1261Assert.Equal(expectedOutput, writer.ToString()); 1335Assert.Equal("Not buffered", defaultWriter.ToString()); 1336Assert.Equal("This should be buffered", bufferWriter.ToString()); 1352Assert.Equal("HtmlEncode[[This should be encoded]]", bufferWriter.ToString()); 1372Assert.Equal("Hello world", HtmlContentUtilities.HtmlContentToString(buffer));
RazorViewEngineTest.cs (32)
159Assert.Equal("test-view", result.ViewName); 191Assert.Equal("test-view", result1.ViewName); 324Assert.Equal("test-view", result.ViewName); 383Assert.Equal(viewName, result.ViewName); 409Assert.Equal(viewName, result.ViewName); 435Assert.Equal(viewName, result.ViewName); 463Assert.Equal(viewName, result.ViewName); 491Assert.Equal(viewName, result.ViewName); 519Assert.Equal(viewName, result.ViewName); 1174Assert.Equal(expander.ToString(), c.Values["expander-key"]); 1189Assert.Equal("layout", result.Name); 1233Assert.Equal(expander.ToString(), c.Values["expander-key"]); 1248Assert.Equal("layout", result.Name); 1272Assert.Equal("layout", result.Name); 1308Assert.Equal("details", result.Name); 1342Assert.Equal("foo", result.Name); 1378Assert.Equal("foo", result.Name); 1407Assert.Equal("bar", result.Name); 1436Assert.Equal(pageName, result.Name); 1464Assert.Equal(pageName, result.Name); 1492Assert.Equal(pageName, result.Name); 1534Assert.Equal("/Views/Shared/_Partial.cshtml", result); 1550Assert.Equal(expected, result); 1586Assert.Equal(expectedPagePath, result); 1603Assert.Equal(expectedPagePath, result); 1626Assert.Equal("Route-Value", result); 1650Assert.Equal("10/31/2018 07:37:38 -07:00", result); 1673Assert.Equal("route-value", result); 1696Assert.Equal("route-value", result); 1723Assert.Equal("43", result); 1845Assert.Equal("MyController", c.ControllerName); 1881Assert.Equal("MyPage", c.PageName);
RazorViewTest.cs (31)
54Assert.Equal("HtmlEncode[[Hello world]]", viewContext.Writer.ToString()); 153Assert.Equal(pagePath, v.ViewContext.View.Path); 163Assert.Equal(pagePath, v.ViewContext.View.Path); 173Assert.Equal(pagePath, v.ViewContext.View.Path); 276Assert.Equal(expected, viewContext.Writer.ToString()); 328Assert.Equal("Hello world", original.ToString()); 552Assert.Equal(expected, ex.Message); 595Assert.Equal(expected, ex.Message); 640Assert.Equal(expected, ex.Message); 710Assert.Equal(expected, viewContext.Writer.ToString()); 747Assert.Equal("The following sections have been defined but have not been rendered by the page " 816Assert.Equal(expected, viewContext.Writer.ToString()); 885Assert.Equal(expected, viewContext.Writer.ToString()); 946Assert.Equal("The following sections have been defined but have not been rendered by the page at " 1015Assert.Equal("The following sections have been defined but have not been rendered by the page at " + 1050Assert.Equal($"RenderBody has not been called for the page at '{LayoutPath}'. To ignore call IgnoreBody().", 1120Assert.Equal(expected, viewContext.Writer.ToString()); 1194Assert.Equal(expected, viewContext.Writer.ToString()); 1235Assert.Equal(expectedMessage, exception.Message); 1289Assert.Equal(expectedMessage, exception.Message); 1359Assert.Equal(expected, viewContext.Writer.ToString()); 1417Assert.Equal(expected, viewContext.Writer.ToString()); 1472Assert.Equal(expected, viewContext.Writer.ToString()); 1501Assert.Equal(expected, ex.Message); 1548Assert.Equal(expected, ex.Message); 1595Assert.Equal(expectedViewStart, actualViewStart); 1596Assert.Equal(expectedPage, actualPage); 1653Assert.Equal(expectedViewStart, actualViewStart); 1654Assert.Equal(expectedPage, actualPage); 1698Assert.Equal(expected, actual); 1740Assert.Equal(expected, viewContext.Writer.ToString());
TagHelpers\TagHelperComponentTagHelperTest.cs (2)
181Assert.Equal("Processed1", output.PostContent.GetContent()); 214Assert.Equal("Processed0Processed1Processed2", output.PostContent.GetContent());
ViewPathTest.cs (2)
19Assert.Equal("/Views/Home/Index.cshtml", normalizedPath); 31Assert.Equal("/Views/Home/Index.cshtml", normalizedPath);
Microsoft.AspNetCore.Mvc.RazorPages.Test (508)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (3)
236Assert.Equal(handlerModel.HttpMethod, d.HttpMethod); 237Assert.Equal(handlerModel.HandlerName, d.Name); 290Assert.Equal(parameterModel1.ParameterName, p.Name);
ApplicationModels\CompiledPageRouteModelProviderTest.cs (81)
40Assert.Equal("/Pages/About.cshtml", result.RelativePath); 41Assert.Equal("/About", result.ViewEnginePath); 44selector => Assert.Equal("About", selector.AttributeRouteModel.Template)); 49Assert.Equal("page", kvp.Key); 50Assert.Equal("/About", kvp.Value); 55Assert.Equal("/Pages/Home.cshtml", result.RelativePath); 56Assert.Equal("/Home", result.ViewEnginePath); 59selector => Assert.Equal("Home/some-prefix", selector.AttributeRouteModel.Template)); 64Assert.Equal("page", kvp.Key); 65Assert.Equal("/Home", kvp.Value); 102Assert.Equal("/Areas/Products/Pages/About.cshtml", result.RelativePath); 103Assert.Equal("/About", result.ViewEnginePath); 106selector => Assert.Equal("Products/About", selector.AttributeRouteModel.Template)); 111Assert.Equal("area", kvp.Key); 112Assert.Equal("Products", kvp.Value); 116Assert.Equal("page", kvp.Key); 117Assert.Equal("/About", kvp.Value); 122Assert.Equal("/Areas/Products/Pages/Manage/Index.cshtml", result.RelativePath); 123Assert.Equal("/Manage/Index", result.ViewEnginePath); 125selector => Assert.Equal("Products/Manage/Index", selector.AttributeRouteModel.Template), 126selector => Assert.Equal("Products/Manage", selector.AttributeRouteModel.Template)); 131Assert.Equal("area", kvp.Key); 132Assert.Equal("Products", kvp.Value); 136Assert.Equal("page", kvp.Key); 137Assert.Equal("/Manage/Index", kvp.Value); 142Assert.Equal("/Areas/Products/Pages/Manage/Edit.cshtml", result.RelativePath); 143Assert.Equal("/Manage/Edit", result.ViewEnginePath); 146selector => Assert.Equal("Products/Manage/Edit/{id}", selector.AttributeRouteModel.Template)); 151Assert.Equal("area", kvp.Key); 152Assert.Equal("Products", kvp.Value); 156Assert.Equal("page", kvp.Key); 157Assert.Equal("/Manage/Edit", kvp.Value); 190Assert.Equal("/Areas/Accounts/Pages/Manage/Home.cshtml", result.RelativePath); 191Assert.Equal("/Manage/Home", result.ViewEnginePath); 194selector => Assert.Equal("Accounts/Manage/Home", selector.AttributeRouteModel.Template)); 199Assert.Equal("area", kvp.Key); 200Assert.Equal("Accounts", kvp.Value); 204Assert.Equal("page", kvp.Key); 205Assert.Equal("/Manage/Home", kvp.Value); 210Assert.Equal("/Contact.cshtml", result.RelativePath); 211Assert.Equal("/Contact", result.ViewEnginePath); 214selector => Assert.Equal("Contact", selector.AttributeRouteModel.Template)); 219Assert.Equal("page", kvp.Key); 220Assert.Equal("/Contact", kvp.Value); 250Assert.Equal("/Pages/Index.cshtml", result.RelativePath); 251Assert.Equal("/Pages/Index", result.ViewEnginePath); 254selector => Assert.Equal("Pages/Index", selector.AttributeRouteModel.Template), 255selector => Assert.Equal("Pages", selector.AttributeRouteModel.Template)); 259Assert.Equal("/Pages/Admin/Index.cshtml", result.RelativePath); 260Assert.Equal("/Pages/Admin/Index", result.ViewEnginePath); 263selector => Assert.Equal("Pages/Admin/Index/some-template", selector.AttributeRouteModel.Template), 264selector => Assert.Equal("Pages/Admin/some-template", selector.AttributeRouteModel.Template)); 292Assert.Equal("/Pages/Index.cshtml", result.RelativePath); 293Assert.Equal("/Index", result.ViewEnginePath); 296selector => Assert.Equal("Index", selector.AttributeRouteModel.Template), 297selector => Assert.Equal("", selector.AttributeRouteModel.Template)); 301Assert.Equal("/Pages/Admin/Index.cshtml", result.RelativePath); 302Assert.Equal("/Admin/Index", result.ViewEnginePath); 305selector => Assert.Equal("Admin/Index/some-template", selector.AttributeRouteModel.Template), 306selector => Assert.Equal("Admin/some-template", selector.AttributeRouteModel.Template)); 337Assert.Equal("/Pages/Index.cshtml", result.RelativePath); 338Assert.Equal("/Index", result.ViewEnginePath); 341selector => Assert.Equal("some-other-prefix", selector.AttributeRouteModel.Template)); 345Assert.Equal("/Pages/Home.cshtml", result.RelativePath); 346Assert.Equal("/Home", result.ViewEnginePath); 349selector => Assert.Equal("some-prefix", selector.AttributeRouteModel.Template)); 381Assert.Equal("/Pages/About.cshtml", result.RelativePath); 382Assert.Equal("/About", result.ViewEnginePath); 386Assert.Equal("/Pages/Home.cshtml", result.RelativePath); 387Assert.Equal("/Home", result.ViewEnginePath); 412Assert.Equal("/Pages/_About.cshtml", result.RelativePath); 413Assert.Equal("/_About", result.ViewEnginePath); 416selector => Assert.Equal("_About", selector.AttributeRouteModel.Template)); 421Assert.Equal("page", kvp.Key); 422Assert.Equal("/_About", kvp.Value); 427Assert.Equal("/Pages/Home.cshtml", result.RelativePath); 428Assert.Equal("/Home", result.ViewEnginePath); 431selector => Assert.Equal("Home", selector.AttributeRouteModel.Template)); 436Assert.Equal("page", kvp.Key); 437Assert.Equal("/Home", kvp.Value); 456Assert.Equal(expected, result);
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (35)
30Assert.Equal( 71Assert.Equal( 94Assert.Equal( 119Assert.Equal( 152Assert.Equal(nameof(PageWithModelWithoutPageModelAttribute.Model), property.PropertyName); 158Assert.Equal(nameof(PageWithModelWithoutPageModelAttribute.Property1), property.PropertyName); 163Assert.Equal(nameof(PageWithModelWithoutPageModelAttribute.Property2), property.PropertyName); 205Assert.Equal(nameof(ModelWithPageModelAttribute.Property), property.PropertyName); 249Assert.Equal(name, property.PropertyName); 256Assert.Equal(name, property.PropertyName); 303Assert.Equal(name, handler.Name); 304Assert.Equal("Get", handler.HttpMethod); 311Assert.Equal(name, handler.Name); 312Assert.Equal("Post", handler.HttpMethod); 319Assert.Equal(name, handler.Name); 320Assert.Equal("Post", handler.HttpMethod); 321Assert.Equal("DeleteCustomer", handler.HandlerName); 347Assert.Equal(name, property.PropertyName); 353Assert.Equal(name, property.PropertyName); 361Assert.Equal(name, property.PropertyName); 386Assert.Equal(nameof(ModelWithBindProperty.Property1), property.PropertyName); 391Assert.Equal(nameof(ModelWithBindProperty.Property2), property.PropertyName); 435Assert.Equal(name, handler.Name); 436Assert.Equal("Get", handler.HttpMethod); 437Assert.Equal("User", handler.HandlerName); 685Assert.Equal(nameof(InheritsMethods.OnGet), handler.MethodInfo.Name); 690Assert.Equal(nameof(TestSetPageModel.OnGet), handler.MethodInfo.Name); 695Assert.Equal(nameof(TestSetPageModel.OnPost), handler.MethodInfo.Name); 876Assert.Equal("Put", handler.HttpMethod); 877Assert.Equal("Delete", handler.HandlerName); 914Assert.Equal("name", p.ParameterName); 920Assert.Equal("id", p.ParameterName); 921Assert.Equal("personId", p.BindingInfo.BinderModelName); 1041Assert.Equal(expectedHttpMethod, httpMethod); 1042Assert.Equal(expectedHandler, handler);
ApplicationModels\PageRouteModelFactoryTest.cs (35)
23Assert.Equal(relativePath, routeModel.RelativePath); 24Assert.Equal("/Users/Profile", routeModel.ViewEnginePath); 29selector => Assert.Equal("Users/Profile/{id?}", selector.AttributeRouteModel.Template)); 35Assert.Equal("page", kvp.Key); 36Assert.Equal("/Users/Profile", kvp.Value); 52Assert.Equal(relativePath, routeModel.RelativePath); 53Assert.Equal("/Users/Profile/Index", routeModel.ViewEnginePath); 57selector => Assert.Equal("Users/Profile/Index/{id?}", selector.AttributeRouteModel.Template), 58selector => Assert.Equal("Users/Profile/{id?}", selector.AttributeRouteModel.Template)); 64Assert.Equal("page", kvp.Key); 65Assert.Equal("/Users/Profile/Index", kvp.Value); 81Assert.Equal(relativePath, routeModel.RelativePath); 82Assert.Equal("/Users/Profile/Index", routeModel.ViewEnginePath); 86selector => Assert.Equal("my-override", selector.AttributeRouteModel.Template)); 92Assert.Equal("page", kvp.Key); 93Assert.Equal("/Users/Profile/Index", kvp.Value); 109Assert.Equal(relativePath, routeModel.RelativePath); 110Assert.Equal("/Users/Profile", routeModel.ViewEnginePath); 111Assert.Equal("TestArea", routeModel.AreaName); 115selector => Assert.Equal("TestArea/Users/Profile/{id?}", selector.AttributeRouteModel.Template)); 121Assert.Equal("area", kvp.Key); 122Assert.Equal("TestArea", kvp.Value); 126Assert.Equal("page", kvp.Key); 127Assert.Equal("/Users/Profile", kvp.Value); 143Assert.Equal(relativePath, routeModel.RelativePath); 144Assert.Equal("/Users/Profile/Index", routeModel.ViewEnginePath); 145Assert.Equal("TestArea", routeModel.AreaName); 149selector => Assert.Equal("TestArea/Users/Profile/Index/{id?}", selector.AttributeRouteModel.Template), 150selector => Assert.Equal("TestArea/Users/Profile/{id?}", selector.AttributeRouteModel.Template)); 156Assert.Equal("area", kvp.Key); 157Assert.Equal("TestArea", kvp.Value); 161Assert.Equal("page", kvp.Key); 162Assert.Equal("/Users/Profile/Index", kvp.Value); 216Assert.Equal(expectedArea, result.areaName); 217Assert.Equal(expectedViewEnginePath, result.viewEnginePath);
ApplicationModels\ResponseCacheFilterApplicationModelProviderTest.cs (1)
73Assert.Equal("Abc", filter.VaryByHeader);
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (3)
41Assert.Equal(expected, ex.Message); 94Assert.Equal("Test2", property.Key); 116Assert.Equal("Test2", property.Key);
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (5)
79Assert.Equal("named.css", list[0].Url); 101Assert.Equal("default.css", list[0].Url); 124Assert.Equal("default.css", list[0].Url); 147Assert.Equal("named.css", list[0].Url); 173Assert.Equal("named.css", list[0].Url);
DependencyInjection\PageConventionCollectionExtensionsTest.cs (67)
64Assert.Equal("/Users/Account", model.ViewEnginePath); 70Assert.Equal("/Users/Contact", model.ViewEnginePath); 99Assert.Equal("/Users/Account", model.ViewEnginePath); 104Assert.Equal("/Users/Contact", model.ViewEnginePath); 130Assert.Equal("/Areas/Accounts/Pages/Profile.cshtml", model.RelativePath); 156Assert.Equal("/Areas/Accounts/Pages/Profile.cshtml", model.RelativePath); 184Assert.Equal("/Index", model.ViewEnginePath); 191Assert.Equal("/Users/Account", model.ViewEnginePath); 199Assert.Equal("/Users/Contact", model.ViewEnginePath); 229Assert.Equal("/Index", model.ViewEnginePath); 234Assert.Equal("/Users/Account", model.ViewEnginePath); 240Assert.Equal("/Users/Contact", model.ViewEnginePath); 269Assert.Equal("/Index", model.ViewEnginePath); 276Assert.Equal("/Users/Account", model.ViewEnginePath); 284Assert.Equal("/Users/Contact", model.ViewEnginePath); 315Assert.Equal("/Index", model.ViewEnginePath); 320Assert.Equal("/Users/Account", model.ViewEnginePath); 326Assert.Equal("/Users/Contact", model.ViewEnginePath); 356Assert.Equal("/Areas/Accounts/Pages/Manage/Profile.cshtml", model.RelativePath); 362Assert.Equal("/Areas/Accounts/Pages/Manage/2FA.cshtml", model.RelativePath); 393Assert.Equal("/Areas/Accounts/Pages/Manage/Profile.cshtml", model.RelativePath); 398Assert.Equal("/Areas/Accounts/Pages/Manage/2FA.cshtml", model.RelativePath); 425Assert.Equal("/Users/Account", model.ViewEnginePath); 428Assert.Equal("Manage-Accounts", authorizeData.Policy); 454Assert.Equal("/Users/Account", model.ViewEnginePath); 457Assert.Equal("Manage-Accounts", authorizeData.Policy); 482Assert.Equal("/Areas/Accounts/Pages/Profile.cshtml", model.RelativePath); 509Assert.Equal("/Areas/Accounts/Pages/Profile.cshtml", model.RelativePath); 536Assert.Equal("/Areas/Accounts/Pages/Profile.cshtml", model.RelativePath); 539Assert.Equal("custom", authorizeAttribute.Policy); 563Assert.Equal("/Areas/Accounts/Pages/Profile.cshtml", model.RelativePath); 566Assert.Equal("custom", authorizeAttribute.Policy); 591Assert.Equal("/Users/Account", model.ViewEnginePath); 594Assert.Equal(string.Empty, authorizeData.Policy); 620Assert.Equal("/Users/Account", model.ViewEnginePath); 623Assert.Equal(string.Empty, authorizeData.Policy); 651Assert.Equal("/Users/Account", model.ViewEnginePath); 654Assert.Equal("Manage-Accounts", authorizeData.Policy); 658Assert.Equal("/Users/Contact", model.ViewEnginePath); 661Assert.Equal("Manage-Accounts", authorizeData.Policy); 688Assert.Equal("/Users/Account", model.ViewEnginePath); 691Assert.Equal(string.Empty, authorizeData.Policy); 695Assert.Equal("/Users/Contact", model.ViewEnginePath); 698Assert.Equal(string.Empty, authorizeData.Policy); 726Assert.Equal("/Areas/Accounts/Pages/Manage/Profile.cshtml", model.RelativePath); 733Assert.Equal("/Areas/Accounts/Pages/Manage/2FA.cshtml", model.RelativePath); 765Assert.Equal("/Areas/Accounts/Pages/Manage/Profile.cshtml", model.RelativePath); 772Assert.Equal("/Areas/Accounts/Pages/Manage/2FA.cshtml", model.RelativePath); 804Assert.Equal("/Areas/Accounts/Pages/Manage/Profile.cshtml", model.RelativePath); 807Assert.Equal("custom", authorizeData.Policy); 811Assert.Equal("/Areas/Accounts/Pages/Manage/2FA.cshtml", model.RelativePath); 814Assert.Equal("custom", authorizeData.Policy); 843Assert.Equal("/Areas/Accounts/Pages/Manage/Profile.cshtml", model.RelativePath); 846Assert.Equal("custom", authorizeData.Policy); 850Assert.Equal("/Areas/Accounts/Pages/Manage/2FA.cshtml", model.RelativePath); 853Assert.Equal("custom", authorizeData.Policy); 890Assert.Equal("/Index", model.ViewEnginePath); 894Assert.Equal("Index", selector.AttributeRouteModel.Template); 899Assert.Equal("", selector.AttributeRouteModel.Template); 904Assert.Equal("Different-Route", selector.AttributeRouteModel.Template); 910Assert.Equal("/About", model.ViewEnginePath); 914Assert.Equal("About", selector.AttributeRouteModel.Template); 951Assert.Equal("/Pages/Profile.cshtml", model.RelativePath); 955Assert.Equal("Profile", selector.AttributeRouteModel.Template); 961Assert.Equal("/Areas/Accounts/Pages/Profile.cshtml", model.RelativePath); 965Assert.Equal("Accounts/Profile", selector.AttributeRouteModel.Template); 970Assert.Equal("Different-Route", selector.AttributeRouteModel.Template);
Filters\PageSaveTempDataPropertyFilterTest.cs (3)
74Assert.Equal("Value", pageModel.Test); 155Assert.Equal("Value", model.Test); 185Assert.Equal("Test", item.Key);
Filters\PageViewDataAttributeFilterTest.cs (2)
82Assert.Equal("Prop1", kvp.Key); 87Assert.Equal("Prop2", kvp.Key);
Infrastructure\DefaultPageFactoryProviderTest.cs (2)
36Assert.Equal( 128Assert.Equal("/this/is/a/path.cshtml", testPage.Path);
Infrastructure\DefaultPageHandlerMethodSelectorTest.cs (2)
666Assert.Equal(message, ex.Message); 726Assert.Equal(message, ex.Message);
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (8)
210Assert.Equal("page", kvp.Key); 251Assert.Equal("page", kvp.Key); 256Assert.Equal("slug", kvp.Key); 261Assert.Equal("state", kvp.Key); 378Assert.Equal("page", kvp.Key); 383Assert.Equal("slug", kvp.Key); 388Assert.Equal("state", kvp.Key); 391Assert.Equal("ReplacedLoaded", candidates[0].Endpoint.DisplayName);
Infrastructure\ExecutorFactoryTest.cs (3)
71Assert.Equal("Hello 0", contentResult.Content); 160Assert.Equal("value", contentResult.Content); 179Assert.Equal($"Unsupported handler method return type '{methodInfo.ReturnType}'.", ex.Message);
Infrastructure\PageActionDescriptorProviderTest.cs (29)
62Assert.Equal("/Test.cshtml", descriptor.RelativePath); 63Assert.Equal("/Test", descriptor.RouteValues["page"]); 64Assert.Equal("/Test/{id:int?}", descriptor.AttributeRouteInfo.Template); 101Assert.Equal(model.RelativePath, descriptor.RelativePath); 106Assert.Equal("custom-key", kvp.Key); 107Assert.Equal("custom-value", kvp.Value); 111Assert.Equal("page", kvp.Key); 112Assert.Equal("/Test", kvp.Value); 151Assert.Equal(model.RelativePath, descriptor.RelativePath); 156Assert.Equal("area", kvp.Key); 157Assert.Equal("Accounts", kvp.Value); 161Assert.Equal("page", kvp.Key); 162Assert.Equal("/Test", kvp.Value); 164Assert.Equal("Accounts", descriptor.AreaName); 165Assert.Equal("Accounts/Test/{id:int?}", descriptor.AttributeRouteInfo.Template); 197Assert.Equal(model.RelativePath, descriptor.RelativePath); 231Assert.Equal(model.RelativePath, descriptor.RelativePath); 284result => Assert.Equal("base-path/Test/Home", result.AttributeRouteInfo.Template), 285result => Assert.Equal("base-path/Index", result.AttributeRouteInfo.Template), 286result => Assert.Equal("base-path/", result.AttributeRouteInfo.Template), 287result => Assert.Equal("base-path/Admin/Index", result.AttributeRouteInfo.Template), 288result => Assert.Equal("base-path/Admin", result.AttributeRouteInfo.Template), 289result => Assert.Equal("base-path/Admin/User", result.AttributeRouteInfo.Template)); 331Assert.Equal("/Catalog/Details/Index.cshtml", descriptor.RelativePath); 332Assert.Equal("/Catalog/Details/Index", descriptor.RouteValues["page"]); 333Assert.Equal("/Catalog/Details/Index/{id:int?}", descriptor.AttributeRouteInfo.Template); 338Assert.Equal("/Catalog/Details/Index.cshtml", descriptor.RelativePath); 339Assert.Equal("/Catalog/Details/Index", descriptor.RouteValues["page"]); 340Assert.Equal("/Catalog/Details/{id:int?}", descriptor.AttributeRouteInfo.Template);
Infrastructure\PageActionEndpointDataSourceTest.cs (6)
87Assert.Equal("/test", e.RoutePattern.RawText); 89Assert.Equal("Hi there", e.Metadata.GetMetadata<string>()); 157Assert.Equal("/group1/test", e.RoutePattern.RawText); 164Assert.Equal("/group1/test2", e.RoutePattern.RawText); 207Assert.Equal("/test", e.RoutePattern.RawText); 255Assert.Equal("/test", e.RoutePattern.RawText);
Infrastructure\PageActionInvokerProviderTest.cs (1)
132Assert.Equal(descriptor.RelativePath, compiledPageActionDescriptor.RelativePath);
Infrastructure\PageActionInvokerTest.cs (13)
349Assert.Equal(relativePath, page.ViewContext.ExecutingFilePath); 1420m => Assert.Equal($"Route matched with {{page = \"foo\"}}. Executing page {pagePath}", m), 1421m => Assert.Equal("Execution plan of authorization filters (in the following order): None", m), 1422m => Assert.Equal("Execution plan of resource filters (in the following order): None", m), 1423m => Assert.Equal("Execution plan of action filters (in the following order): None", m), 1424m => Assert.Equal("Execution plan of exception filters (in the following order): None", m), 1425m => Assert.Equal("Execution plan of result filters (in the following order): None", m), 1426m => Assert.Equal($"Executing {factoryType} factory for page {pageName}", m), 1427m => Assert.Equal($"Executed {factoryType} factory for page {pageName}", m), 1428m => Assert.Equal($"Executing handler method {methodFullName} - ModelState is Valid", m), 1429m => Assert.Equal($"Executed handler method {methodName}, returned result {resultName}.", m), 1430m => Assert.Equal($"Before executing action result {resultName}.", m), 1431m => Assert.Equal($"After executing action result {resultName}.", m),
Infrastructure\PageBinderFactoryTest.cs (11)
230Assert.Equal("route-value", page.RouteDifferentValue); 296Assert.Equal("route-value", model.RouteDifferentValue); 342Assert.Equal(defaultValue, model.PropertyWithDefaultValue); 404Assert.Equal("value", model.SupportsGet); 405Assert.Equal("set", model.Default); 465Assert.Equal("value", model.SupportsGet); 466Assert.Equal("value", model.Default); 571Assert.Equal(nameof(PageModelWithValidation.Validated), kvp.Key); 613Assert.Equal("id", kvp.Key); 701Assert.Equal("name", kvp.Key); 751Assert.Equal("Some error", error.ErrorMessage);
Infrastructure\ServiceBasedPageModelActivatorProviderTest.cs (1)
118Assert.Equal(expected, ex.Message);
PageLoggerExtensionsTest.cs (6)
35Assert.Equal( 63Assert.Equal( 91Assert.Equal( 119Assert.Equal( 152Assert.Equal( 183Assert.Equal(
PageModelTest.cs (94)
285Assert.Equal("SampleAction", resultTemporary.ActionName); 301Assert.Equal("SampleAction", resultTemporary.ActionName); 317Assert.Equal("SampleAction", resultPermanent.ActionName); 333Assert.Equal("SampleAction", resultPermanent.ActionName); 352Assert.Equal("SampleAction", resultTemporary.ActionName); 353Assert.Equal(controllerName, resultTemporary.ControllerName); 372Assert.Equal("SampleAction", resultTemporary.ActionName); 373Assert.Equal(controllerName, resultTemporary.ControllerName); 392Assert.Equal("SampleAction", resultPermanent.ActionName); 393Assert.Equal(controllerName, resultPermanent.ControllerName); 412Assert.Equal("SampleAction", resultPermanent.ActionName); 413Assert.Equal(controllerName, resultPermanent.ControllerName); 432Assert.Equal("SampleAction", resultTemporary.ActionName); 433Assert.Equal("SampleController", resultTemporary.ControllerName); 456Assert.Equal("SampleAction", resultTemporary.ActionName); 457Assert.Equal("SampleController", resultTemporary.ControllerName); 480Assert.Equal("SampleAction", resultPermanent.ActionName); 481Assert.Equal("SampleController", resultPermanent.ControllerName); 504Assert.Equal("SampleAction", resultPermanent.ActionName); 505Assert.Equal("SampleController", resultPermanent.ControllerName); 568Assert.Equal(expectedAction, result.ActionName); 570Assert.Equal(expectedController, result.ControllerName); 571Assert.Equal(expectedFragment, result.Fragment); 593Assert.Equal(expectedAction, result.ActionName); 595Assert.Equal(expectedController, result.ControllerName); 596Assert.Equal(expectedFragment, result.Fragment); 658Assert.Equal(expectedAction, result.ActionName); 660Assert.Equal(expectedController, result.ControllerName); 661Assert.Equal(expectedFragment, result.Fragment); 687Assert.Equal(expectedAction, result.ActionName); 689Assert.Equal(expectedController, result.ControllerName); 690Assert.Equal(expectedFragment, result.Fragment); 749Assert.Equal(expectedRoute, result.RouteName); 751Assert.Equal(expectedFragment, result.Fragment); 772Assert.Equal(expectedRoute, result.RouteName); 774Assert.Equal(expectedFragment, result.Fragment); 833Assert.Equal(expectedRoute, result.RouteName); 835Assert.Equal(expectedFragment, result.Fragment); 856Assert.Equal(expectedRoute, result.RouteName); 858Assert.Equal(expectedFragment, result.Fragment); 985Assert.Equal(pageName, result.PageName); 1005Assert.Equal("key", item.Key); 1023Assert.Equal(pageName, result.PageName); 1024Assert.Equal(pageHandler, result.PageHandler); 1040Assert.Equal(pageName, result.PageName); 1045Assert.Equal("key", item.Key); 1064Assert.Equal(pageName, result.PageName); 1065Assert.Equal(pageHandler, result.PageHandler); 1066Assert.Equal(fragment, result.Fragment); 1084Assert.Equal(pageName, result.PageName); 1085Assert.Equal(pageHandler, result.PageHandler); 1090Assert.Equal("key", item.Key); 1093Assert.Equal(fragment, result.Fragment); 1108Assert.Equal(pageName, result.PageName); 1125Assert.Equal(pageName, result.PageName); 1126Assert.Equal(pageHandler, result.PageHandler); 1143Assert.Equal(pageName, result.PageName); 1148Assert.Equal("key", item.Key); 1168Assert.Equal(pageName, result.PageName); 1169Assert.Equal(pageHandler, result.PageHandler); 1174Assert.Equal("key", item.Key); 1194Assert.Equal(pageName, result.PageName); 1195Assert.Equal(pageHandler, result.PageHandler); 1196Assert.Equal(fragment, result.Fragment); 1215Assert.Equal(pageName, result.PageName); 1216Assert.Equal(pageHandler, result.PageHandler); 1221Assert.Equal("key", item.Key); 1224Assert.Equal(fragment, result.Fragment); 1384Assert.Equal("application/pdf", result.ContentType.ToString()); 1385Assert.Equal(string.Empty, result.FileDownloadName); 1401Assert.Equal("application/pdf", result.ContentType.ToString()); 1402Assert.Equal("someDownloadName", result.FileDownloadName); 1417Assert.Equal(path, result.FileName); 1418Assert.Equal("application/pdf", result.ContentType.ToString()); 1419Assert.Equal(string.Empty, result.FileDownloadName); 1434Assert.Equal(path, result.FileName); 1435Assert.Equal("application/pdf", result.ContentType.ToString()); 1436Assert.Equal("someDownloadName", result.FileDownloadName); 1462Assert.Equal("application/pdf", result.ContentType.ToString()); 1463Assert.Equal(string.Empty, result.FileDownloadName); 1488Assert.Equal("application/pdf", result.ContentType.ToString()); 1489Assert.Equal("someDownloadName", result.FileDownloadName); 1575Assert.Equal("TestContent", actualContentResult.Content); 1590Assert.Equal("TestContent", actualContentResult.Content); 1592Assert.Equal("text/plain", actualContentResult.ContentType.ToString()); 1606Assert.Equal("TestContent", actualContentResult.Content); 1608Assert.Equal("text/plain; charset=utf-8", actualContentResult.ContentType.ToString()); 1637Assert.Equal(contentType, contentResult.ContentType.ToString()); 1667Assert.Equal(contentType, contentResult.ContentType); 1777Assert.Equal("some error", error.ErrorMessage); 1821Assert.Equal("test-url", redirectResult.Url); 1955Assert.Equal("LoginStatus", result.ViewName); 1980Assert.Equal("LoginStatus", result.ViewName); 2002Assert.Equal("TagCloud", result.ViewComponentName);
PageTest.cs (93)
305Assert.Equal("SampleAction", resultTemporary.ActionName); 321Assert.Equal("SampleAction", resultTemporary.ActionName); 337Assert.Equal("SampleAction", resultPermanent.ActionName); 353Assert.Equal("SampleAction", resultPermanent.ActionName); 372Assert.Equal("SampleAction", resultTemporary.ActionName); 373Assert.Equal(controllerName, resultTemporary.ControllerName); 392Assert.Equal("SampleAction", resultTemporary.ActionName); 393Assert.Equal(controllerName, resultTemporary.ControllerName); 412Assert.Equal("SampleAction", resultPermanent.ActionName); 413Assert.Equal(controllerName, resultPermanent.ControllerName); 432Assert.Equal("SampleAction", resultPermanent.ActionName); 433Assert.Equal(controllerName, resultPermanent.ControllerName); 452Assert.Equal("SampleAction", resultTemporary.ActionName); 453Assert.Equal("SampleController", resultTemporary.ControllerName); 476Assert.Equal("SampleAction", resultTemporary.ActionName); 477Assert.Equal("SampleController", resultTemporary.ControllerName); 500Assert.Equal("SampleAction", resultPermanent.ActionName); 501Assert.Equal("SampleController", resultPermanent.ControllerName); 524Assert.Equal("SampleAction", resultPermanent.ActionName); 525Assert.Equal("SampleController", resultPermanent.ControllerName); 588Assert.Equal(expectedAction, result.ActionName); 590Assert.Equal(expectedController, result.ControllerName); 591Assert.Equal(expectedFragment, result.Fragment); 613Assert.Equal(expectedAction, result.ActionName); 615Assert.Equal(expectedController, result.ControllerName); 616Assert.Equal(expectedFragment, result.Fragment); 678Assert.Equal(expectedAction, result.ActionName); 680Assert.Equal(expectedController, result.ControllerName); 681Assert.Equal(expectedFragment, result.Fragment); 707Assert.Equal(expectedAction, result.ActionName); 709Assert.Equal(expectedController, result.ControllerName); 710Assert.Equal(expectedFragment, result.Fragment); 769Assert.Equal(expectedRoute, result.RouteName); 771Assert.Equal(expectedFragment, result.Fragment); 792Assert.Equal(expectedRoute, result.RouteName); 794Assert.Equal(expectedFragment, result.Fragment); 853Assert.Equal(expectedRoute, result.RouteName); 855Assert.Equal(expectedFragment, result.Fragment); 876Assert.Equal(expectedRoute, result.RouteName); 878Assert.Equal(expectedFragment, result.Fragment); 1059Assert.Equal(pageName, result.PageName); 1079Assert.Equal("key", item.Key); 1097Assert.Equal(pageName, result.PageName); 1098Assert.Equal(pageHandler, result.PageHandler); 1114Assert.Equal(pageName, result.PageName); 1119Assert.Equal("key", item.Key); 1138Assert.Equal(pageName, result.PageName); 1139Assert.Equal(pageHandler, result.PageHandler); 1140Assert.Equal(fragment, result.Fragment); 1158Assert.Equal(pageName, result.PageName); 1159Assert.Equal(pageHandler, result.PageHandler); 1164Assert.Equal("key", item.Key); 1167Assert.Equal(fragment, result.Fragment); 1182Assert.Equal(pageName, result.PageName); 1199Assert.Equal(pageName, result.PageName); 1200Assert.Equal(pageHandler, result.PageHandler); 1217Assert.Equal(pageName, result.PageName); 1222Assert.Equal("key", item.Key); 1242Assert.Equal(pageName, result.PageName); 1243Assert.Equal(pageHandler, result.PageHandler); 1248Assert.Equal("key", item.Key); 1268Assert.Equal(pageName, result.PageName); 1269Assert.Equal(pageHandler, result.PageHandler); 1270Assert.Equal(fragment, result.Fragment); 1289Assert.Equal(pageName, result.PageName); 1290Assert.Equal(pageHandler, result.PageHandler); 1295Assert.Equal("key", item.Key); 1298Assert.Equal(fragment, result.Fragment); 1374Assert.Equal("application/pdf", result.ContentType.ToString()); 1375Assert.Equal(string.Empty, result.FileDownloadName); 1391Assert.Equal("application/pdf", result.ContentType.ToString()); 1392Assert.Equal("someDownloadName", result.FileDownloadName); 1407Assert.Equal(path, result.FileName); 1408Assert.Equal("application/pdf", result.ContentType.ToString()); 1409Assert.Equal(string.Empty, result.FileDownloadName); 1424Assert.Equal(path, result.FileName); 1425Assert.Equal("application/pdf", result.ContentType.ToString()); 1426Assert.Equal("someDownloadName", result.FileDownloadName); 1452Assert.Equal("application/pdf", result.ContentType.ToString()); 1453Assert.Equal(string.Empty, result.FileDownloadName); 1478Assert.Equal("application/pdf", result.ContentType.ToString()); 1479Assert.Equal("someDownloadName", result.FileDownloadName); 1565Assert.Equal("TestContent", actualContentResult.Content); 1580Assert.Equal("TestContent", actualContentResult.Content); 1582Assert.Equal("text/plain", actualContentResult.ContentType.ToString()); 1596Assert.Equal("TestContent", actualContentResult.Content); 1598Assert.Equal("text/plain; charset=utf-8", actualContentResult.ContentType.ToString()); 1627Assert.Equal(contentType, contentResult.ContentType.ToString()); 1657Assert.Equal(contentType, contentResult.ContentType); 1729Assert.Equal("LoginStatus", result.ViewName); 1755Assert.Equal("LoginStatus", result.ViewName); 1777Assert.Equal("TagCloud", result.ViewComponentName); 1855Assert.Equal("some error", error.ErrorMessage);
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (4)
37Assert.Equal("/Template!", endpoint.RoutePattern.RawText); 61(e) => Assert.Equal("/test", Assert.IsType<RouteEndpoint>(e).RoutePattern.RawText)); 99Assert.Equal("/test", routePattern.RawText); 121Assert.Equal("/test", routePattern.RawText);
Microsoft.AspNetCore.Mvc.Routing.Abstractions.Tests (2)
VirtualPathDataTests.cs (2)
22Assert.Equal(path, pathData.VirtualPath); 41Assert.Equal(path, pathData.VirtualPath);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (375)
AnchorTagHelperTest.cs (12)
83Assert.Equal("Something", output.Content.GetContent()); 84Assert.Equal(expectedTagName, output.TagName); 132Assert.Equal("a", output.TagName); 184Assert.Equal("a", output.TagName); 242Assert.Equal("a", output.TagName); 301Assert.Equal("a", output.TagName); 359Assert.Equal("a", output.TagName); 454Assert.Equal("area", item.Key); 527Assert.Equal(expectedErrorMessage, ex.Message); 567Assert.Equal(expectedErrorMessage, ex.Message); 605Assert.Equal(expectedErrorMessage, ex.Message); 643Assert.Equal(expectedErrorMessage, ex.Message);
CacheTagHelperTest.cs (23)
56Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 86Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 115Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 137Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 165Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 187Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 248Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 350Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 372Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 403Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 425Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 456Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 478Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 525Assert.Equal("HtmlEncode[[some-content]]", tagHelperOutput.Content.GetContent()); 612Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 617Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 700Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 783Assert.Equal(childContent, tagHelperOutput3.Content.GetContent()); 795Assert.Equal(childContent, tagHelperOutput4.Content.GetContent()); 842Assert.Equal(encoder.Encode(expected), tagHelperOutput1.Content.GetContent()); 925Assert.Equal(encoder.Encode(expected), tagHelperOutput1.Content.GetContent()); 926Assert.Equal(encoder.Encode(expected), tagHelperOutput2.Content.GetContent()); 1010Assert.Equal(Key1, cacheKey.Key);
CacheTagKeyTest.cs (13)
40Assert.Equal(expected, key); 166Assert.Equal(expected, key); 189Assert.Equal(expected, key); 219Assert.Equal(expected, key); 247Assert.Equal(expected, key); 273Assert.Equal(expected, key); 299Assert.Equal(expected, key); 324Assert.Equal(expected, key); 344Assert.Equal(expected, key); 366Assert.Equal(expected, key); 387Assert.Equal(expected, key); 413Assert.Equal(expected, key); 438Assert.Equal(expected, key);
ComponentTagHelperTest.cs (2)
41Assert.Equal("Hello from the component", content); 58Assert.Equal("A value for the 'render-mode' attribute must be supplied to the 'component' tag helper.", ex.Message);
DefaultFileVersionProviderTest.cs (15)
34Assert.Equal(expected, result); 54Assert.Equal(path, result); 62Assert.Equal(path, result); 84Assert.Equal($"{path}?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", result); 92Assert.Equal($"{path}?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", result); 109Assert.Equal("file.txt", result); 117Assert.Equal("file.txt?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", result); 133Assert.Equal("file.txt?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", result); 141Assert.Equal("file.txt", result); 157Assert.Equal("/wwwroot/file.txt?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", result); 165Assert.Equal("/wwwroot/file.txt", result); 210Assert.Equal(filePath + "?v=f4OxZX_x_FO5LcGBSKHWXfwtSx-j1ncoSt3SABJtkGk", result); 226Assert.Equal("http://contoso.com/hello/world", result); 245Assert.Equal("FromCache", result); 280Assert.Equal(expected, result);
DistributedCacheTagHelperTest.cs (16)
63Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 109Assert.Equal(childContent, tagHelperOutput.Content.GetContent()); 158Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 183Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 217Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 241Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 380Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 404Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 442Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 466Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 504Assert.Equal(childContent1, tagHelperOutput1.Content.GetContent()); 528Assert.Equal(childContent2, tagHelperOutput2.Content.GetContent()); 615Assert.Equal(childContent, tagHelperOutput1.Content.GetContent()); 620Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 712Assert.Equal(childContent, tagHelperOutput2.Content.GetContent()); 733Assert.Equal(deserialized.ToString(), content);
FormActionTagHelperTest.cs (17)
87Assert.Equal(expectedTagName, output.TagName); 161Assert.Equal(expectedTagName, output.TagName); 247Assert.Equal("button", output.TagName); 249Assert.Equal("formaction", attribute.Name); 305Assert.Equal("button", output.TagName); 307Assert.Equal("formaction", attribute.Name); 378Assert.Equal("submit", output.TagName); 380Assert.Equal("formaction", attribute.Name); 431Assert.Equal("submit", output.TagName); 433Assert.Equal("formaction", attribute.Name); 465Assert.Equal("area", item.Key); 470Assert.Equal("page", item.Key); 549Assert.Equal(expectedErrorMessage, ex.Message); 589Assert.Equal(expectedErrorMessage, ex.Message); 627Assert.Equal(expectedErrorMessage, ex.Message); 665Assert.Equal(expectedErrorMessage, ex.Message); 703Assert.Equal(expectedErrorMessage, ex.Message);
FormTagHelperTest.cs (26)
121Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 122Assert.Equal(expectedTagName, output.TagName); 175Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 176Assert.Equal(expectedTagName, output.TagName); 232Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 234Assert.Equal(expectedTagName, output.TagName); 290Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 292Assert.Equal(expectedTagName, output.TagName); 365Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 366Assert.Equal(expectedTagName, output.TagName); 423Assert.Equal("form", output.TagName); 429Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 494Assert.Equal("form", output.TagName); 547Assert.Equal("form", output.TagName); 617Assert.Equal("form", output.TagName); 671Assert.Equal("form", output.TagName); 728Assert.Equal("form", output.TagName); 786Assert.Equal("form", output.TagName); 840Assert.Equal("form", output.TagName); 933Assert.Equal("area", item.Key); 997Assert.Equal("form", output.TagName); 1003Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 1047Assert.Equal(expectedErrorMessage, ex.Message); 1083Assert.Equal(expectedErrorMessage, ex.Message); 1117Assert.Equal(expectedErrorMessage, ex.Message); 1151Assert.Equal(expectedErrorMessage, ex.Message);
GlobbingUrlBuilderTest.cs (14)
29Assert.Collection(urlList, url => Assert.Equal("/site.css", url)); 46url => Assert.Equal("/site.css", url), 47url => Assert.Equal("/blank.css", url)); 218actual => Assert.Equal(expected, actual)); 241url => Assert.Equal($"{pathBase}/blank.css", url), 242url => Assert.Equal($"{pathBase}/site.css", url)); 263url => Assert.Equal("/blank.css", url), 264url => Assert.Equal("/site.css", url)); 293url => Assert.Equal("/blank.css", url), 294url => Assert.Equal("/site.css", url)); 378Assert.Collection(includePatterns, pattern => Assert.Equal("**/*.css", pattern)); 379Assert.Collection(excludePatterns, pattern => Assert.Equal("**/*.min.css", pattern)); 406Assert.Collection(includePatterns, pattern => Assert.Equal($"{prefix}**/*.css", pattern)); 407Assert.Collection(excludePatterns, pattern => Assert.Equal($"{prefix}**/*.min.css", pattern));
ImageTagHelperTest.cs (7)
119Assert.Equal(expectedOutput.TagName, output.TagName); 126Assert.Equal(expectedAttribute.Name, actualAttribute.Name); 127Assert.Equal(expectedAttribute.Value.ToString(), actualAttribute.Value.ToString()); 158Assert.Equal("img", output.TagName); 210Assert.Equal("img", output.TagName); 253Assert.Equal("img", output.TagName); 285Assert.Equal("img", output.TagName);
InputTagHelperTest.cs (62)
106Assert.Equal(originalContent, HtmlContentUtilities.HtmlContentToString(output.Content)); 107Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output)); 150Assert.Equal(expected, ex.Message); 197Assert.Equal(expected, ex.Message); 243Assert.Equal(content, HtmlContentUtilities.HtmlContentToString(output.Content)); 244Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output)); 245Assert.Equal(expectedPostElement, output.PostElement.GetContent()); 393Assert.Equal(expectedTagName, output.TagName); 449Assert.Equal(expectedTagName, output.TagName); 452Assert.Equal(expectedPostElementContent, HtmlContentUtilities.HtmlContentToString(output.PostElement)); 500Assert.Equal(expectedTagName, output.TagName); 556Assert.Equal(expectedTagName, output.TagName); 687Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 688Assert.Equal(expectedContent, output.Content.GetContent()); 689Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 691Assert.Equal(expectedTagName, output.TagName); 762Assert.Equal(expectedTagName, output.TagName); 833Assert.Equal(expectedTagName, output.TagName); 902Assert.Equal(expectedPostElement, output.PostElement.GetContent()); 956Assert.Equal(expectedTagName, output.TagName); 1016Assert.Equal(expectedTagName, output.TagName); 1019Assert.Equal(expectedPostElementContent, HtmlContentUtilities.HtmlContentToString(output.PostElement)); 1076Assert.Equal(expectedTagName, output.TagName); 1078Assert.Equal(expectedEndOfFormContent, string.Join("", viewContext.FormContext.EndOfFormContent.Select(html => HtmlContentUtilities.HtmlContentToString(html)))); 1136Assert.Equal(expectedTagName, output.TagName); 1139Assert.Equal(expectedPostElementContent, HtmlContentUtilities.HtmlContentToString(output.PostElement)); 1210Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 1211Assert.Equal(originalContent, HtmlContentUtilities.HtmlContentToString(output.Content)); 1212Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output)); 1213Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 1214Assert.Equal(expectedPostElement, output.PostElement.GetContent()); 1316Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 1317Assert.Equal(expectedContent, output.Content.GetContent()); 1318Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 1319Assert.Equal(expectedTagName, output.TagName); 1379Assert.Equal(expectedTagName, output.TagName); 1381Assert.Equal(expectedEndOfFormContent, string.Join("", viewContext.FormContext.EndOfFormContent.Select(html => HtmlContentUtilities.HtmlContentToString(html)))); 1481Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 1482Assert.Equal(expectedContent, output.Content.GetContent()); 1483Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 1484Assert.Equal(expectedTagName, output.TagName); 1576Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 1577Assert.Equal(expectedContent, output.Content.GetContent()); 1578Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 1579Assert.Equal(expectedTagName, output.TagName); 1694Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 1695Assert.Equal(expectedContent, output.Content.GetContent()); 1696Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 1697Assert.Equal(expectedTagName, output.TagName); 1811Assert.Equal(string.Empty, output.Content.GetContent()); 1813Assert.Equal(expectedTagName, output.TagName); 1880Assert.Equal(string.Empty, output.Content.GetContent()); 1882Assert.Equal(expectedTagName, output.TagName); 1949Assert.Equal(string.Empty, output.Content.GetContent()); 1951Assert.Equal(expectedTagName, output.TagName); 2043Assert.Equal(string.Empty, output.Content.GetContent()); 2045Assert.Equal(expectedTagName, output.TagName); 2111Assert.Equal(expectedType, output.TagName); 2168Assert.Equal(expectedType, output.TagName); 2243Assert.Equal(expectedType, output.TagName); 2304Assert.Equal(expectedType, output.TagName); 2367Assert.Equal(expectedType, output.TagName);
JavaScriptResourcesTest.cs (4)
25Assert.Equal(expected, result); 44Assert.Equal("test.js", kvp.Key); 45Assert.Equal(expected, kvp.Value); 87Assert.Equal(expected, result);
LabelTagHelperTest.cs (5)
219Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 220Assert.Equal( 223Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 225Assert.Equal(expectedTagName, output.TagName); 328Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output.Content));
LinkTagHelperTest.cs (23)
443Assert.Equal("rel", output.Attributes[0].Name); 444Assert.Equal("href", output.Attributes[1].Name); 445Assert.Equal("data-extra", output.Attributes[2].Name); 599Assert.Equal("link", output.TagName); 602Assert.Equal(expectedContent, content); 640Assert.Equal("link", output.TagName); 643Assert.Equal(expectedContent, content); 693Assert.Equal("link", output.TagName); 696Assert.Equal(expectedContent, content); 724Assert.Equal("link", output.TagName); 758Assert.Equal("link", output.TagName); 800Assert.Equal("link", output.TagName); 830Assert.Equal("link", output.TagName); 883Assert.Equal("link", output.TagName); 885Assert.Equal(expectedPostElement, output.PostElement.GetContent()); 938Assert.Equal("link", output.TagName); 940Assert.Equal(expectedPostElement, output.PostElement.GetContent()); 1008Assert.Equal("link", output.TagName); 1011Assert.Equal(expectedContent, content); 1048Assert.Equal("link", output.TagName); 1051Assert.Equal( 1090Assert.Equal("link", output.TagName); 1093Assert.Equal(
OptionTagHelperTest.cs (2)
436Assert.Equal(expectedTagHelperOutput.TagName, output.TagName); 437Assert.Equal(expectedTagHelperOutput.Content.GetContent(), output.Content.GetContent());
PartialTagHelperTest.cs (14)
123Assert.Equal(expectedMessage, exception.Message); 145Assert.Equal(expectedMessage, exception.Message); 183Assert.Equal(expected, content); 224Assert.Equal(expected, content); 265Assert.Equal(expected, content); 307Assert.Equal(expected, content); 426Assert.Equal(expected, v.ViewData.TemplateInfo.HtmlFieldPrefix); 449Assert.Equal("order.items[0]", viewContext.ViewData.TemplateInfo.HtmlFieldPrefix); 506Assert.Equal(expected, v.ViewData.TemplateInfo.HtmlFieldPrefix); 602Assert.Equal(expected, exception.Message); 693Assert.Equal(expected, content); 745Assert.Equal(expected, exception.Message); 789Assert.Equal(expected, content); 835Assert.Equal(expected, content);
PrerenderComponentApplicationStoreTest.cs (1)
26Assert.Equal(expected, store.PersistedState);
ProtectedPrerenderComponentApplicationStateTest.cs (1)
33Assert.Equal(expected, _protector.Unprotect(store.PersistedState));
RenderAtEndOfFormTagHelperTest.cs (2)
77Assert.Equal(expectedOutput, tagHelperOutput.PostContent.GetContent()); 117Assert.Equal(expectedOutput, tagHelperExecutionContext.Output.PostContent.GetContent());
ScriptTagHelperTest.cs (27)
488Assert.Equal("script", output.TagName); 524Assert.Equal("data-extra", output.Attributes[0].Name); 525Assert.Equal("src", output.Attributes[1].Name); 526Assert.Equal("data-more", output.Attributes[2].Name); 558Assert.Equal("script", output.TagName); 561Assert.Equal(expectedContent, content); 611Assert.Equal("script", output.TagName); 614Assert.Equal(expectedContent, content); 637Assert.Equal("script", output.TagName); 667Assert.Equal("script", output.TagName); 705Assert.Equal("script", output.TagName); 750Assert.Equal("script", output.TagName); 751Assert.Equal(importMap.ToJson(), output.Content.GetContent()); 793Assert.Equal("script", output.TagName); 794Assert.Equal(importMap.ToJson(), output.Content.GetContent()); 832Assert.Equal("script", output.TagName); 860Assert.Equal("script", output.TagName); 862Assert.Equal(Environment.NewLine + "<script>(isavailable()||document.write(\"JavaScriptEncode[[<script " + 892Assert.Equal("script", output.TagName); 894Assert.Equal(Environment.NewLine + "<script>(isavailable()||document.write(\"JavaScriptEncode[[<script " + 945Assert.Equal("script", output.TagName); 948Assert.Equal(expectedContent, content); 983Assert.Equal("script", output.TagName); 986Assert.Equal(expectedContent, content); 1022Assert.Equal("script", output.TagName); 1025Assert.Equal(expectedContent, content); 1061Assert.Equal("script", output.TagName);
SelectTagHelperTest.cs (20)
241Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 242Assert.Equal(expectedContent, output.Content.GetContent()); 243Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 244Assert.Equal(expectedTagName, output.TagName); 340Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 341Assert.Equal(expectedContent, output.Content.GetContent()); 342Assert.Equal(expectedPostContent, HtmlContentUtilities.HtmlContentToString(output.PostContent)); 343Assert.Equal(expectedTagName, output.TagName); 421Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 422Assert.Equal(expectedContent, output.Content.GetContent()); 423Assert.Equal(expectedPostContent, HtmlContentUtilities.HtmlContentToString(output.PostContent)); 424Assert.Equal(expectedTagName, output.TagName); 520Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 521Assert.Equal(expectedContent, output.Content.GetContent()); 522Assert.Equal(expectedPostContent, HtmlContentUtilities.HtmlContentToString(output.PostContent)); 523Assert.Equal(expectedTagName, output.TagName); 771Assert.Equal(expectedTagName, output.TagName); 775Assert.Equal("name", attribute.Name); 822Assert.Equal(expectedTagName, output.TagName); 824Assert.Equal("name", attribute.Name);
TagHelperOutputExtensionsTest.cs (7)
987Assert.Equal(expectedValue, HtmlContentUtilities.HtmlContentToString(classAttribute)); 1009Assert.Equal(expectedValue, HtmlContentUtilities.HtmlContentToString(classAttribute)); 1035Assert.Equal(expectedValue, HtmlContentUtilities.HtmlContentToString(classAttribute)); 1055Assert.Equal(expected, exceptionAdd.Message); 1056Assert.Equal(expected, exceptionRemove.Message); 1101Assert.Equal(expectedValue, HtmlContentUtilities.HtmlContentToString(classAttribute)); 1145Assert.Equal(expectedValue, HtmlContentUtilities.HtmlContentToString(classAttribute));
TextAreaTagHelperTest.cs (5)
153Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output.Content)); 154Assert.Equal(expectedTagName, output.TagName); 227Assert.Equal(expectedTagName, output.TagName); 228Assert.Equal(expectedContent, HtmlContentUtilities.HtmlContentToString(output.Content)); 231Assert.Equal("name", attribute.Name);
ValidationMessageTagHelperTest.cs (22)
82Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 83Assert.Equal(expectedContent, output.Content.GetContent()); 84Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 85Assert.Equal(expectedTagName, output.TagName); 176Assert.Equal(expectedTagName, output.TagName); 180Assert.Equal("data-valmsg-for", attribute.Name); 185Assert.Equal("class", attribute.Name); 190Assert.Equal("data-valmsg-replace", attribute.Name); 227Assert.Equal(expectedTagName, output.TagName); 229Assert.Equal("data-valmsg-for", attribute.Name); 283Assert.Equal("span", output.TagName); 285Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 286Assert.Equal(expectedContent, output.Content.GetContent()); 287Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 345Assert.Equal("span", output.TagName); 351Assert.Equal(expectedOutputContent, output.Content.GetContent()); 407Assert.Equal("span", output.TagName); 413Assert.Equal(expectedOutputContent, output.Content.GetContent()); 448Assert.Equal("span", output.TagName); 450Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 451Assert.Equal(expectedContent, output.Content.GetContent()); 452Assert.Equal(expectedPostContent, output.PostContent.GetContent());
ValidationSummaryTagHelperTest.cs (35)
87Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 88Assert.Equal(expectedContent, output.Content.GetContent()); 89Assert.Equal( 92Assert.Equal(expectedTagName, output.TagName); 261Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 262Assert.Equal(expectedContent, output.Content.GetContent()); 263Assert.Equal( 266Assert.Equal(expectedTagName, output.TagName); 326Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 327Assert.Equal(expectedContent, output.Content.GetContent()); 328Assert.Equal( 332Assert.Equal(expectedTagName, output.TagName); 385Assert.Equal("div", output.TagName); 387Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 388Assert.Equal(expectedContent, output.Content.GetContent()); 389Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 441Assert.Equal("div", output.TagName); 446Assert.Equal("anything", attribute.Name); 451Assert.Equal("data-foo", attribute.Name); 456Assert.Equal("data-hello", attribute.Name); 459Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 460Assert.Equal(expectedContent, output.Content.GetContent()); 461Assert.Equal("Content of validation summaryNew HTML", output.PostContent.GetContent()); 500Assert.Equal("div", output.TagName); 502Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 503Assert.Equal(expectedContent, output.Content.GetContent()); 504Assert.Equal(expectedPostContent, output.PostContent.GetContent()); 556Assert.Equal("div", output.TagName); 558Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 559Assert.Equal(expectedContent, output.Content.GetContent()); 560Assert.Equal("Content of validation messageNew HTML", output.PostContent.GetContent()); 639Assert.Equal(expectedPreContent, output.PreContent.GetContent()); 640Assert.Equal(expectedContent, output.Content.GetContent()); 641Assert.Equal( 644Assert.Equal(expectedTagName, output.TagName);
Microsoft.AspNetCore.Mvc.Test (3)
MvcOptionsSetupTest.cs (3)
118Assert.Equal("application/json", mapping); 267Assert.Equal(typeof(XObject).FullName, excludeFilter.FullTypeName); 272Assert.Equal(typeof(XmlNode).FullName, excludeFilter.FullTypeName);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (855)
AntiforgeryExtensionsTest.cs (1)
29Assert.Equal(
AttributeDictionaryTest.cs (8)
202key => Assert.Equal("one", key), 203key => Assert.Equal("two", key), 204key => Assert.Equal("zero", key)); 314Assert.Equal("2", value); 354key => Assert.Equal("1", key), 355key => Assert.Equal("2", key), 356key => Assert.Equal("0", key)); 373Assert.Equal("2", value);
Buffers\PagedBufferedTextWriterTest.cs (3)
201Assert.Equal("abcdefghi", inner.ToString()); 220Assert.Equal("abcdefg", inner.ToString()); 239Assert.Equal("abcdefghi", inner.ToString());
Buffers\ViewBufferTest.cs (8)
59Assert.Equal("Hello world", Assert.IsType<string>(page.Buffer[0].Value)); 178Assert.Equal("HtmlEncode[[Hello]] world 123", writer.ToString()); 201Assert.Equal(expected, writer.ToString()); 219Assert.Equal("HtmlEncode[[Hello]] world 123", writer.ToString()); 243Assert.Equal(expected, writer.ToString()); 265Assert.Equal("Hello", Assert.IsType<HtmlString>(nestedItems[0]).Value); 266Assert.Equal("Hello", Assert.IsType<HtmlString>(destinationItems[0]).Value); 289Assert.Equal("Hello", Assert.IsType<HtmlString>(destinationItems[0]).Value);
Builder\ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (5)
106Assert.Equal("named.css", list[0].Url); 137Assert.Equal("default.css", list[0].Url); 169Assert.Equal("default.css", list[0].Url); 201Assert.Equal("named.css", list[0].Url); 236Assert.Equal("named.css", list[0].Url);
ControllerTest.cs (4)
123Assert.Equal("CustomViewName", actualViewResult.ViewName); 167Assert.Equal("CustomViewName", actualViewResult.ViewName); 236Assert.Equal("CustomViewName", actualViewResult.ViewName); 280Assert.Equal("CustomViewName", actualViewResult.ViewName);
ControllerUnitTestabilityTests.cs (26)
30Assert.Equal(viewName, viewResult.ViewName); 52Assert.Equal(viewName, viewResult.ViewName); 76Assert.Equal(content, contentResult.Content); 77Assert.Equal("text/asp; charset=us-ascii", contentResult.ContentType.ToString()); 97Assert.Equal(uri, createdResult.Location); 117Assert.Equal(uri, acceptedResult.Location); 138Assert.Equal(contentType, fileContentResult.ContentType.ToString()); 139Assert.Equal(fileName ?? string.Empty, fileContentResult.FileDownloadName); 147Assert.Equal(content, Encoding.UTF8.GetString(fileContentResult.FileContents)); 171Assert.Equal(contentType, fileStreamResult.ContentType.ToString()); 172Assert.Equal(fileName ?? string.Empty, fileStreamResult.FileDownloadName); 182Assert.Equal(content, stream.ReadToEnd()); 334Assert.Equal(routeName, createdAtRouteResult.RouteName); 370Assert.Equal(routeName, acceptedAtRouteResult.RouteName); 407Assert.Equal(actionName, createdAtActionResult.ActionName); 408Assert.Equal(controllerName, createdAtActionResult.ControllerName); 446Assert.Equal(actionName, acceptedAtActionResult.ActionName); 447Assert.Equal(controllerName, acceptedAtActionResult.ControllerName); 483Assert.Equal(routeName, redirectToRouteResult.RouteName); 517Assert.Equal(actionName, redirectToActionResult.ActionName); 518Assert.Equal(controllerName, redirectToActionResult.ControllerName); 551Assert.Equal(url, redirectResult.Url); 648Assert.Equal("TagCloud", result.ViewComponentName); 695Assert.Equal(detail, problemDetails.Detail); 712Assert.Equal(detail, validationProblemDetails.Detail); 714Assert.Equal("some-key", error.Key);
CookieTempDataProviderTest.cs (12)
49Assert.Equal(expectedDataInCookie, cookieInfo.Value); 50Assert.Equal("/", cookieInfo.Options.Path); 91Assert.Equal(CookieTempDataProvider.CookieName, setCookieHeader.Name.ToString()); 92Assert.Equal(string.Empty, setCookieHeader.Value.ToString()); 136Assert.Equal(expectedDataInCookie, cookieInfo.Value); 172Assert.Equal(expectedDataInCookie, cookieInfo.Value); 174Assert.Equal("/", cookieInfo.Options.Path); 207Assert.Equal(expectedDataInCookie, cookieInfo.Value); 209Assert.Equal(expectedCookiePath, cookieInfo.Options.Path); 256Assert.Equal(expectedDataInCookie, cookieInfo.Value); 258Assert.Equal(expectedCookiePath, cookieInfo.Options.Path); 259Assert.Equal(expectedDomain, cookieInfo.Options.Domain);
DefaultDisplayTemplatesTest.cs (12)
62Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 81Assert.Equal("(null value)", HtmlContentUtilities.HtmlContentToString(result)); 111Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 137Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 164Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 206Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 225Assert.Equal("HtmlEncode[[Formatted string]]", HtmlContentUtilities.HtmlContentToString(result)); 273Assert.Equal("HtmlEncode[[ViewData string]]", HtmlContentUtilities.HtmlContentToString(result)); 295Assert.Equal("HtmlEncode[[Model string]]", HtmlContentUtilities.HtmlContentToString(result)); 316Assert.Equal("HtmlEncode[[Model string]]", HtmlContentUtilities.HtmlContentToString(result)); 340Assert.Equal(string.Empty, HtmlContentUtilities.HtmlContentToString(result)); 367Assert.Equal(expectedMessage, ex.Message);
DefaultEditorTemplatesTest.cs (30)
199Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 236Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 278Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 301Assert.Equal(html.ViewData.ModelMetadata.NullDisplayText, HtmlContentUtilities.HtmlContentToString(result)); 334Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 367Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 397Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 441Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 463Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 490Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 514Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 542Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 563Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 596Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 628Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 671Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 713Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 756Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 798Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(result)); 820Assert.Equal( 867Assert.Equal(expectedInput, HtmlContentUtilities.HtmlContentToString(result)); 937Assert.Equal(expectedInput, HtmlContentUtilities.HtmlContentToString(result)); 1009Assert.Equal(expectedInput, HtmlContentUtilities.HtmlContentToString(result)); 1078Assert.Equal(expectedInput, HtmlContentUtilities.HtmlContentToString(result)); 1148Assert.Equal(expectedInput, HtmlContentUtilities.HtmlContentToString(result)); 1215Assert.Equal(expectedInput, HtmlContentUtilities.HtmlContentToString(result)); 1237Assert.Equal( 1260Assert.Equal( 1286Assert.Equal( 1315Assert.Equal(expectedMessage, ex.Message);
DefaultHtmlGeneratorTest.cs (6)
133Assert.Equal(expected, attribute.Value); 187Assert.Equal(expected, attribute.Value); 487Assert.Equal(expected, attribute.Value); 530Assert.Equal( 974Assert.Equal(expectedAntiforgeryHtmlField, antiforgeryField); 998Assert.Equal(expected, antiforgeryField);
DefaultValidationHtmlAttributeProviderTest.cs (12)
45Assert.Equal("data-val", kvp.Key); 46Assert.Equal("true", kvp.Value); 50Assert.Equal("data-val-number", kvp.Key); 51Assert.Equal(expectedMessage, kvp.Value); 81Assert.Equal("data-val", kvp.Key); 82Assert.Equal("true", kvp.Value); 86Assert.Equal("data-val-number", kvp.Key); 87Assert.Equal(expectedMessage, kvp.Value); 180Assert.Equal("data-val", kvp.Key); 181Assert.Equal("true", kvp.Value); 185Assert.Equal("data-val-number", kvp.Key); 186Assert.Equal(expectedMessage, kvp.Value);
ExpressionHelperTest.cs (2)
373Assert.Equal(expressionText, text); 452Assert.Equal(expectedText, result);
Filters\AntiforgeryApplicationModelProviderTest.cs (6)
30Assert.Equal(nameof(TestController.WithAntiforgeryMetadata), model.ActionName); 35Assert.Equal(nameof(TestController.WithMvcAttribute), model.ActionName); 40Assert.Equal(nameof(TestController.NoAttributes), model.ActionName); 115Assert.Equal(nameof(AntiforgeryMetadataWithActionsController.Post), model.ActionName); 120Assert.Equal(nameof(AntiforgeryMetadataWithActionsController.Post2), model.ActionName); 137Assert.Equal(
Filters\ControllerSaveTempDataPropertyFilterTest.cs (5)
55Assert.Equal("SecondValue", controller.Test); 99Assert.Equal("FirstValue", controller.Test); 142Assert.Equal("Value", controller.Test); 189Assert.Equal(nameof(TestController.Test), item.Key); 194Assert.Equal(nameof(TestController.Test2), item.Key);
Filters\ControllerViewDataAttributeFilterTest.cs (2)
77Assert.Equal("Prop1", kvp.Key); 82Assert.Equal("Prop2", kvp.Key);
Filters\LifecyclePropertyTest.cs (1)
35Assert.Equal("new-value", subject.TestProperty);
Filters\TempDataApplicationModelProviderTest.cs (1)
43Assert.Equal(expected, ex.Message);
FormatWeekHelperTest.cs (1)
39Assert.Equal(expectedOutput, formattedValue);
HtmlAttributePropertyHelperTest.cs (7)
22Assert.Equal("bar_baz", property.Name); 23Assert.Equal("bar-baz", helper.Name); 37Assert.Equal("foo", property.Name); 38Assert.Equal("foo", helper.Name); 52Assert.Equal("bar", helper.Name); 67Assert.Equal("foo", helper.Name); 107Assert.Equal("bar-baz1", helpers1[0].Name);
Infrastructure\DefaultTempDataSerializerTest.cs (2)
31Assert.Equal(value.ToString("r"), roundTripValue); 52Assert.Equal($"The '{testProvider.GetType()}' cannot serialize an object of type '{value.GetType()}'.", ex.Message);
Infrastructure\TempDataSerializerTestBase.cs (3)
108Assert.Equal(value, roundTripValue); 193Assert.Equal(value.ToString(CultureInfo.InvariantCulture), roundTripValue); 215Assert.Equal(value.ToString("N"), roundTripValue);
ModelExplorerExtensionsTest.cs (1)
58Assert.Equal(expectedResult, result);
ModelStateDictionaryExtensionsTest.cs (21)
21Assert.Equal("Text", modelState.Key); 22Assert.Equal("Message", modelError.ErrorMessage); 38Assert.Equal("Child.Text", modelState.Key); 39Assert.Equal("Message", modelError.ErrorMessage); 55Assert.Equal("Child.Value", modelState.Key); 56Assert.Equal("Message", modelError.ErrorMessage); 73Assert.Equal("variable", modelState.Key); 74Assert.Equal("Message", modelError.ErrorMessage); 91Assert.Equal("Text", modelState.Key); 111Assert.Equal("Text", modelState.Key); 129Assert.Equal("Child.Text", modelState.Key); 149Assert.Equal("Child.Text", modelState.Key); 167Assert.Equal("Child.Value", modelState.Key); 187Assert.Equal("Child.Value", modelState.Key); 206Assert.Equal("variable", modelState.Key); 227Assert.Equal("variable", modelState.Key); 305Assert.Equal("Key", modelState.Key); 325Assert.Equal("Key", modelState.Key); 344Assert.Equal("Child", modelState.Key); 367Assert.Equal("Key", modelState.Key); 389Assert.Equal("Key", modelState.Key);
PageRemoteAttributeTest.cs (4)
57Assert.Equal("/Foo", routeDictionary["page"] as string); 58Assert.Equal("Bar", routeDictionary["handler"] as string); 124Assert.Equal("/Page?handler=Handler", actualUrl); 155Assert.Equal("/Page?handler=Handler", actualUrl);
PartialViewResultExecutorTest.cs (7)
51Assert.Equal(viewName, viewEngineResult.ViewName); 73Assert.Equal(viewName, viewEngineResult.ViewName); 97Assert.Equal(viewName, viewEngineResult.ViewName); 228Assert.Equal(viewName, viewEngineResult.ViewName); 235Assert.Equal("myview", listener.ViewFound.ViewName); 277Assert.Equal("myview", listener.ViewNotFound.ViewName); 301Assert.Equal("application/x-my-content-type", context.HttpContext.Response.ContentType);
PartialViewResultTest.cs (4)
57Assert.Equal(expected, ex.Message); 94Assert.Equal(expected, ex.Message); 132Assert.Equal(expected, ex.Message); 172Assert.Equal(expected, ex.Message);
RemoteAttributeBaseTest.cs (84)
57Assert.Equal(expected, message); 74Assert.Equal(expected, message); 93Assert.Equal(expected, message); 125Assert.Equal(expected, actual); 159kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 162Assert.Equal("data-val-remote", kvp.Key); 163Assert.Equal(expected, kvp.Value); 167Assert.Equal("data-val-remote-additionalfields", kvp.Key); 168Assert.Equal("*.Length", kvp.Value); 170kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 171kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); }); 194kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 198Assert.Equal("data-val-remote", kvp.Key); 199Assert.Equal(expected, kvp.Value); 203Assert.Equal("data-val-remote-additionalfields", kvp.Key); 204Assert.Equal("*.Length", kvp.Value); 206kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 207kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); }); 234kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 238Assert.Equal("data-val-remote", kvp.Key); 239Assert.Equal(expected, kvp.Value); 243Assert.Equal("data-val-remote-additionalfields", kvp.Key); 244Assert.Equal("*.Length", kvp.Value); 246kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 247kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); }); 282kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 285Assert.Equal("data-val-remote", kvp.Key); 286Assert.Equal(expected, kvp.Value); 290Assert.Equal("data-val-remote-additionalfields", kvp.Key); 291Assert.Equal("*.Length", kvp.Value); 293kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 294kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); }); 325kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 329Assert.Equal("data-val-remote", kvp.Key); 330Assert.Equal(expected, kvp.Value); 334Assert.Equal("data-val-remote-additionalfields", kvp.Key); 335Assert.Equal("*.Length", kvp.Value); 337kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 338kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); }); 366kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 369Assert.Equal("data-val-remote", kvp.Key); 370Assert.Equal(expected, kvp.Value); 374Assert.Equal("data-val-remote-additionalfields", kvp.Key); 375Assert.Equal("*.Length", kvp.Value); 377kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 378kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); }); 419kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 422Assert.Equal("data-val-remote", kvp.Key); 423Assert.Equal(expected, kvp.Value); 427Assert.Equal("data-val-remote-additionalfields", kvp.Key); 428Assert.Equal("*.Length", kvp.Value); 430kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 431kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); }); 453kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("true", kvp.Value); }, 454kvp => { Assert.Equal("data-val-remote", kvp.Key); Assert.Equal("Error", kvp.Value); }, 457Assert.Equal("data-val-remote-additionalfields", kvp.Key); 458Assert.Equal("*.Length,*.Password,*.ConfirmPassword", kvp.Value); 460kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("POST", kvp.Value); }, 461kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal(url, kvp.Value); });
RemoteAttributeTest.cs (30)
57Assert.Equal("controller", keyValuePair.Key); 68Assert.Equal("action", keyValuePair.Key); 82Assert.Equal(routeName, attribute.RouteName); 150Assert.Equal("No URL for remote validation could be found.", exception.Message); 167Assert.Equal(url, actualUrl); 186Assert.Equal(url, actualUrl); 190Assert.Equal("Action", routeDictionary["action"] as string); 191Assert.Equal("Controller", routeDictionary["controller"] as string); 207Assert.Equal(url, actualUrl); 211Assert.Equal("Action", routeDictionary["action"] as string); 212Assert.Equal("Controller", routeDictionary["controller"] as string); 213Assert.Equal("Test", routeDictionary["area"] as string); 228Assert.Equal("/Controller/Action", actualUrl); 243Assert.Equal("/Test/Controller/Action", actualUrl); 259Assert.Equal("/Controller/Action", actualUrl); 275Assert.Equal("/Controller/Action", actualUrl); 290Assert.Equal("/Test/Controller/Action", actualUrl); 305Assert.Equal("/Test/Controller/Action", actualUrl); 320Assert.Equal("/AnotherArea/Controller/Action", actualUrl); 347kvp => { Assert.Equal("data-val", kvp.Key); Assert.Equal("original", kvp.Value); }, 348kvp => { Assert.Equal("data-val-remote", kvp.Key); Assert.Equal("original", kvp.Value); }, 349kvp => { Assert.Equal("data-val-remote-additionalfields", kvp.Key); Assert.Equal("original", kvp.Value); }, 350kvp => { Assert.Equal("data-val-remote-type", kvp.Key); Assert.Equal("original", kvp.Value); }, 351kvp => { Assert.Equal("data-val-remote-url", kvp.Key); Assert.Equal("original", kvp.Value); }); 536Assert.Equal(_routeName, routeContext.RouteName);
Rendering\HtmlHelperCheckboxTest.cs (40)
33Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 54Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 71Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 123Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 141Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 161Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 165Assert.Equal("<input name=\"HtmlEncode[[Property1]]\" type=\"HtmlEncode[[hidden]]\" value=\"HtmlEncode[[false]]\" />", 186Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 206Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 227Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 231Assert.Equal("<input name=\"HtmlEncode[[Property1]]\" type=\"HtmlEncode[[hidden]]\" value=\"HtmlEncode[[false]]\" />", 253Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 272Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 291Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 313Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 334Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 356Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 376Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 397Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 416Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 436Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 454Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 474Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 492Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 512Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 538Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 557Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 577Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 606Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 625Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 648Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 672Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 692Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 717Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 738Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 757Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 770Assert.Equal( 786Assert.Equal( 805Assert.Equal( 821Assert.Equal(
Rendering\HtmlHelperDisplayExtensionsTest.cs (17)
39Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(displayResult)); 40Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(displayNullResult)); 41Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(displayForResult)); 42Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(displayForModelResult)); 67Assert.Equal("ViewDataValue", HtmlContentUtilities.HtmlContentToString(displayResult)); 151Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(displayResult)); 177Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(displayResult)); 205Assert.Equal("ViewDataValue", HtmlContentUtilities.HtmlContentToString(displayResult)); 233Assert.Equal("SomeField", HtmlContentUtilities.HtmlContentToString(displayResult)); 258Assert.Equal("ViewDataValue", HtmlContentUtilities.HtmlContentToString(displayResult)); 308Assert.Equal("ViewDataValue", HtmlContentUtilities.HtmlContentToString(displayResult)); 349Assert.Equal("created from IStringLocalizer", HtmlContentUtilities.HtmlContentToString(displayResult)); 377Assert.Equal("Faulted from ResourceType", HtmlContentUtilities.HtmlContentToString(displayResult)); 405Assert.Equal("SomeField", HtmlContentUtilities.HtmlContentToString(displayResult)); 430Assert.Equal("ViewDataValue", HtmlContentUtilities.HtmlContentToString(displayResult)); 479Assert.Equal("ViewDataValue", HtmlContentUtilities.HtmlContentToString(displayResult)); 506Assert.Equal("SomeField", HtmlContentUtilities.HtmlContentToString(displayResult));
Rendering\HtmlHelperDisplayNameExtensionsTest.cs (19)
49Assert.Equal("Property1", displayNameResult); 50Assert.Equal("Property1", displayNameForResult); 51Assert.Equal("Property1", displayNameForEnumerableResult); 66Assert.Equal("value", displayNameResult); 82Assert.Equal("Id", displayNameResult); 83Assert.Equal("Id", displayNameForResult); 84Assert.Equal("Id", displayNameForEnumerableResult); 108Assert.Equal(displayName, displayNameResult); 109Assert.Equal(displayName, displayNameForResult); 110Assert.Equal(displayName, displayNameForEnumerableResult); 111Assert.Equal(displayName, displayNameForModelResult); 134Assert.Equal(displayName, displayNameResult); 135Assert.Equal(displayName, displayNameForResult); 136Assert.Equal(displayName, displayNameForEnumerableResult); 156Assert.Equal(expectedResult, result); 168Assert.Equal( 183Assert.Equal( 199Assert.Equal("unknownKey", result); 214Assert.Equal("unknownKey", result);
Rendering\HtmlHelperDisplayTextTest.cs (19)
57Assert.Equal("Null display Text", result); 76Assert.Equal("Null display Text", result); 91Assert.Equal("Model value", result); 92Assert.Equal("Model value", nullResult); 120Assert.Equal("Model value", result); 144Assert.Equal("Simple display text", result); 168Assert.Equal("Simple display text", result); 193Assert.Equal("Property value", result); 210Assert.Equal("Property value", result); 228Assert.Equal("View data dictionary value", result); 246Assert.Equal("Property value", result); 271Assert.Equal("View data dictionary value", result); 296Assert.Equal("Property value", result); 311Assert.Equal("Value One", result); 312Assert.Equal("Value One", forResult); 327Assert.Equal("Value One", result); 328Assert.Equal("Value One", forResult); 343Assert.Equal("Value1", result); 344Assert.Equal("Value1", forResult);
Rendering\HtmlHelperDropDownListExtensionsTest.cs (9)
40Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListResult)); 64Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListResult)); 89Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListResult)); 115Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListResult)); 141Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListResult)); 164Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListForResult)); 190Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListForResult)); 215Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListForResult)); 241Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(dropDownListForResult));
Rendering\HtmlHelperEditorExtensionsTest.cs (2)
35Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(displayResult)); 61Assert.Equal(expectedResult, HtmlContentUtilities.HtmlContentToString(displayResult));
Rendering\HtmlHelperFormExtensionsTest.cs (27)
306Assert.Equal("<form>", builder.ToString()); 343Assert.Equal("<form>", builder.ToString()); 376Assert.Equal("<form>", builder.ToString()); 418Assert.Equal("<form>", builder.ToString()); 462Assert.Equal("<form>", builder.ToString()); 502Assert.Equal("<form>", builder.ToString()); 538Assert.Equal("<form>", builder.ToString()); 576Assert.Equal("<form>", builder.ToString()); 616Assert.Equal("<form>", builder.ToString()); 657Assert.Equal("<form>", builder.ToString()); 702Assert.Equal("<form>", builder.ToString()); 748Assert.Equal("<form>", builder.ToString()); 794Assert.Equal("<form>", builder.ToString()); 842Assert.Equal("<form>", builder.ToString()); 886Assert.Equal("<form>", builder.ToString()); 923Assert.Equal("<form>", builder.ToString()); 961Assert.Equal("<form>", builder.ToString()); 995Assert.Equal("<form>", builder.ToString()); 1032Assert.Equal("<form>", builder.ToString()); 1070Assert.Equal("<form>", builder.ToString()); 1104Assert.Equal("<form>", builder.ToString()); 1143Assert.Equal("<form>", builder.ToString()); 1186Assert.Equal("<form>", builder.ToString()); 1230Assert.Equal("<form>", builder.ToString()); 1274Assert.Equal("<form>", builder.ToString()); 1319Assert.Equal("<form>", builder.ToString()); 1360Assert.Equal("<form>", builder.ToString());
Rendering\HtmlHelperFormTest.cs (20)
154Assert.Equal(expectedStartTag, builder.ToString()); 159Assert.Equal("</form>", builder.ToString()); 204Assert.Equal(expectedStartTag, builder.ToString()); 209Assert.Equal("</form>", builder.ToString()); 258Assert.Equal(expectedStartTag, builder.ToString()); 307Assert.Equal(expectedStartTag, builder.ToString()); 329Assert.Equal("</form>", builder.ToString()); 359Assert.Equal( 398Assert.Equal( 436Assert.Equal( 475Assert.Equal( 513Assert.Equal( 553Assert.Equal( 591Assert.Equal("antiforgery", Assert.IsType<TagBuilder>(htmlHelper.AntiForgeryToken()).TagName); 594Assert.Equal( 632Assert.Equal( 674Assert.Equal( 717Assert.Equal( 759Assert.Equal( 803Assert.Equal(
Rendering\HtmlHelperHiddenTest.cs (43)
58Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 73Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 90Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 108Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 125Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 143Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 159Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 175Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 191Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 206Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 222Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 238Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 253Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 270Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 284Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 300Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 316Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 332Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(html)); 348Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 363Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 394Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 417Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 457Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 477Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 494Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 540Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 579Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 594Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 609Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 624Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 640Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 656Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 671Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 689Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 721Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 741Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 758Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 819Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 867Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 885Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 901Assert.Equal( 919Assert.Equal( 937Assert.Equal(
Rendering\HtmlHelperLabelExtensionsTest.cs (51)
48Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 49Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelNullResult)); 50Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 51Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 69Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 70Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelNullResult)); 71Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 72Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 87Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 88Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 103Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 104Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 128Assert.Equal("<label for=\"\">HtmlEncode[[" + propertyName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelResult)); 129Assert.Equal("<label for=\"\">HtmlEncode[[" + propertyName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelForResult)); 130Assert.Equal("<label for=\"\">HtmlEncode[[" + propertyName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 145Assert.Equal("<label for=\"HtmlEncode[[value]]\">HtmlEncode[[value]]</label>", HtmlContentUtilities.HtmlContentToString(labelResult)); 197Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 198Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelNullResult)); 199Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 200Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 222Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 223Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelNullResult)); 224Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 225Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 248Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 249Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelNullResult)); 250Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 251Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 273Assert.Equal("<label for=\"\">HtmlEncode[[" + displayName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelResult)); 274Assert.Equal("<label for=\"\">HtmlEncode[[" + displayName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelForResult)); 275Assert.Equal("<label for=\"\">HtmlEncode[[" + displayName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 304Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 305Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelNullResult)); 306Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 307Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 328Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 329Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 351Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 352Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 375Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelResult)); 376Assert.Equal(expectedLabel, HtmlContentUtilities.HtmlContentToString(labelForResult)); 397Assert.Equal("<label for=\"HtmlEncode[[Property1]]\">HtmlEncode[[" + displayName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelResult)); 398Assert.Equal("<label for=\"HtmlEncode[[Property1]]\">HtmlEncode[[" + displayName + "]]</label>", HtmlContentUtilities.HtmlContentToString(labelForResult)); 419Assert.Equal("<label for=\"HtmlEncode[[" + expectedId + "]]\">HtmlEncode[[" + expectedText + "]]</label>", HtmlContentUtilities.HtmlContentToString(result)); 431Assert.Equal( 447Assert.Equal("<label for=\"HtmlEncode[[unknownKey]]\">HtmlEncode[[unknownKey]]</label>", HtmlContentUtilities.HtmlContentToString(result)); 460Assert.Equal("<label for=\"HtmlEncode[[Property1]]\">HtmlEncode[[Hello]]</label>", HtmlContentUtilities.HtmlContentToString(labelResult)); 473Assert.Equal("<label for=\"HtmlEncode[[Property1]]\">HtmlEncode[[Hello]]</label>", HtmlContentUtilities.HtmlContentToString(labelForResult)); 486Assert.Equal("<label for=\"\">HtmlEncode[[Hello]]</label>", HtmlContentUtilities.HtmlContentToString(labelForModelResult)); 499Assert.Equal("<label attr=\"HtmlEncode[[value]]\" for=\"HtmlEncode[[Property1]]\">HtmlEncode[[Property1]]</label>", HtmlContentUtilities.HtmlContentToString(labelForResult)); 512Assert.Equal("<label attr=\"HtmlEncode[[value]]\" for=\"\">HtmlEncode[[Hello]]</label>", HtmlContentUtilities.HtmlContentToString(labelForModelResult));
Rendering\HtmlHelperLinkGenerationTest.cs (2)
87Assert.Equal(expectedLink, HtmlContentUtilities.HtmlContentToString(actualLink)); 154Assert.Equal(expectedLink, HtmlContentUtilities.HtmlContentToString(actualLink));
Rendering\HtmlHelperListBoxExtensionsTest.cs (6)
40Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(listBoxResult)); 65Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(listBoxResult)); 90Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(listBoxResult)); 112Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(listBoxForResult)); 137Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(listBoxForResult)); 162Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(listBoxForResult));
Rendering\HtmlHelperNameExtensionsTest.cs (22)
86Assert.Equal(expectedId, idResult); 87Assert.Equal(expectedId, idForResult); 88Assert.Equal(expectedId, idForModelResult); 89Assert.Equal(prefix, nameResult); 90Assert.Equal(prefix, nameForResult); 91Assert.Equal(prefix, nameForModelResult); 107Assert.Equal("Property1", idResult); 108Assert.Equal("Property1", idForResult); 109Assert.Equal("Property1", nameResult); 110Assert.Equal("Property1", nameForResult); 133Assert.Equal(expectedId, idResult); 134Assert.Equal(expectedId, idForResult); 135Assert.Equal(expectedName, nameResult); 136Assert.Equal(expectedName, nameForResult); 152Assert.Equal("Inner_Id", idResult); 153Assert.Equal("Inner_Id", idForResult); 154Assert.Equal("Inner.Id", nameResult); 155Assert.Equal("Inner.Id", nameForResult); 228Assert.Equal(expectedId, idResult); 229Assert.Equal(expression, nameResult); 320Assert.Equal(expectedId, idResult); 321Assert.Equal(expectedName, nameResult);
Rendering\HtmlHelperPartialExtensionsTest.cs (9)
362Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(actual)); 377Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(actual)); 393Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(actual)); 422Assert.Equal(expected, exception.Message); 451Assert.Equal(expected, exception.Message); 482Assert.Equal(expected, exception.Message); 511Assert.Equal(expected, exception.Message); 540Assert.Equal(expected, exception.Message); 571Assert.Equal(expected, exception.Message);
Rendering\HtmlHelperPasswordTest.cs (19)
71Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 90Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 106Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 124Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 140Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 173Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 195Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 212Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 248Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 266Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 281Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 303Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 320Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 374Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 390Assert.Equal( 408Assert.Equal( 426Assert.Equal( 443Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 523Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result));
Rendering\HtmlHelperRadioButtonExtensionsTest.cs (9)
26Assert.Equal( 41Assert.Equal( 61Assert.Equal( 81Assert.Equal( 96Assert.Equal( 114Assert.Equal( 134Assert.Equal( 155Assert.Equal( 197Assert.Equal(
Rendering\HtmlHelperSelectTest.cs (41)
337Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 361Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 401Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 437Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 475Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 500Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 528Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 555Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 571Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 588Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 610Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 634Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 658Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 683Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 711Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 734Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 758Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 783Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 804Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 840Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 878Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 903Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 931Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 958Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 974Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 991Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1010Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1031Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1055Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1076Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1104Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1132Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1152Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1172Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1197Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1223Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1244Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1266Assert.Equal(expectedHtml, HtmlContentUtilities.HtmlContentToString(html)); 1321Assert.Equal("cero en-US", zeroSelect.Text); 1565Assert.Equal(expectedItem.Text, actualItem.Text); 1566Assert.Equal(expectedItem.Value, actualItem.Value);
Rendering\HtmlHelperTest.cs (7)
198Assert.Equal(expectedString, result); 215Assert.Equal(expectedString, result); 267Assert.Equal(expectedString, result.ToString()); 284Assert.Equal(expectedString, result.ToString()); 376Assert.Equal(expected, result); 389Assert.Equal(expected, result); 406Assert.Equal(expected, result);
Rendering\HtmlHelperTextAreaExtensionsTest.cs (7)
28Assert.Equal( 47Assert.Equal( 66Assert.Equal( 85Assert.Equal( 105Assert.Equal( 122Assert.Equal( 139Assert.Equal(
Rendering\HtmlHelperTextAreaTest.cs (2)
85Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 136Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result));
Rendering\HtmlHelperTextBoxExtensionsTest.cs (8)
29Assert.Equal( 47Assert.Equal( 65Assert.Equal( 83Assert.Equal( 101Assert.Equal( 128Assert.Equal( 156Assert.Equal( 202Assert.Equal(
Rendering\HtmlHelperTextBoxTest.cs (2)
103Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 154Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result));
Rendering\HtmlHelperValidationMessageExtensionsTest.cs (8)
23Assert.Equal( 38Assert.Equal( 53Assert.Equal( 68Assert.Equal( 83Assert.Equal( 98Assert.Equal( 113Assert.Equal( 128Assert.Equal(
Rendering\HtmlHelperValidationSummaryTest.cs (19)
147Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 219Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 245Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 270Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 294Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 324Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 360Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 390Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 420Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 454Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 487Assert.Equal(expected, HtmlContentUtilities.HtmlContentToString(result)); 501Assert.Equal( 533Assert.Equal( 552Assert.Equal( 572Assert.Equal( 591Assert.Equal( 610Assert.Equal( 630Assert.Equal( 653Assert.Equal(
Rendering\HtmlHelperValueExtensionsTest.cs (4)
21Assert.Equal("ModelValue", result); 35Assert.Equal("ModelValue", result); 49Assert.Equal("{ SomeProperty = ModelValue }", result); 63Assert.Equal("-{ SomeProperty = ModelValue }-", result);
Rendering\HtmlHelperValueTest.cs (21)
27Assert.Equal("ViewDataValue", html); 42Assert.Equal("PrefixedViewDataValue", html); 56Assert.Equal("ContainedViewDataValue", html); 71Assert.Equal("ContainedViewDataValue", html); 85Assert.Equal("ModelStringPropertyValue", html); 100Assert.Equal("ModelStringPropertyValue", html); 144Assert.Equal("ModelStringPropertyValue", html); 174Assert.Equal("StringPropertyRawValue", helper.Value("StringProperty", format: null)); 175Assert.Equal("StringPropertyRawValue", helper.ValueFor(m => m.StringProperty, format: null)); 176Assert.Equal("ModelRawValue", helper.ValueForModel(format: null)); 189Assert.Equal(expectedModelValue, helper.Value(expression: string.Empty, format: null)); 190Assert.Equal(expectedModelValue, helper.Value(expression: null, format: null)); // null is another alias for current model 191Assert.Equal(expectedModelValue, helper.ValueFor(m => m, format: null)); 192Assert.Equal(expectedModelValue, helper.ValueForModel(format: null)); 206Assert.Equal(expectedModelValue, helper.ValueForModel("-{0}-")); 207Assert.Equal(expectedObjectPropertyValue, helper.Value("ObjectProperty", "-{0}-")); 208Assert.Equal(expectedObjectPropertyValue, helper.ValueFor(m => m.ObjectProperty, "-{0}-")); 226Assert.Equal( 229Assert.Equal("<ViewDataValue <\"\">>", helper.Value("StringProperty", "<{0}>")); 230Assert.Equal("<ModelStringPropertyValue <\"\">>", helper.ValueFor(m => m.StringProperty, "<{0}>")); 231Assert.Equal("ObjectPropertyRawValue <\"\">", helper.ValueFor(m => m.ObjectProperty, format: null));
Rendering\HtmlStringTest.cs (4)
23Assert.Equal(expectedText, writer.ToString()); 37Assert.Equal(expectedText, content.ToString()); 47Assert.Equal(string.Empty, content.ToString()); 61Assert.Equal(expectedText, result);
Rendering\JsonHelperTestBase.cs (4)
43Assert.Equal(expectedOutput, htmlString.ToString()); 62Assert.Equal(expectedOutput, htmlString.ToString()); 100Assert.Equal(expectedOutput, htmlString.ToString()); 119Assert.Equal(expectedOutput, htmlString.ToString());
Rendering\SystemTextJsonHelperTest.cs (2)
35Assert.Equal(expectedOutput, htmlString.ToString()); 54Assert.Equal(expectedOutput, htmlString.ToString());
Rendering\TagBuilderTest.cs (16)
87Assert.Equal(expectedOutput, writer.ToString()); 120Assert.Equal(output, result); 131Assert.Equal($"a{c}", result); 135Assert.Equal("az", result); 159Assert.Equal(expectedOutput, writer.ToString()); 177Assert.Equal("<p><span>Hello</span>HtmlEncode[[, World!]]</p>", writer.ToString()); 207Assert.Equal("<p>", HtmlContentUtilities.HtmlContentToString(tag)); 221Assert.Equal("<p>", HtmlContentUtilities.HtmlContentToString(tag)); 222Assert.Equal("</p>", HtmlContentUtilities.HtmlContentToString(tagBuilder)); 235Assert.Equal("</p>", HtmlContentUtilities.HtmlContentToString(tag)); 249Assert.Equal("</p>", HtmlContentUtilities.HtmlContentToString(tag)); 250Assert.Equal("<p></p>", HtmlContentUtilities.HtmlContentToString(tagBuilder)); 263Assert.Equal("<p />", HtmlContentUtilities.HtmlContentToString(tag)); 277Assert.Equal("<span>Hello</span>", HtmlContentUtilities.HtmlContentToString(tag)); 306Assert.Equal(HtmlContentUtilities.HtmlContentToString(originalTagBuilder.RenderBody()), HtmlContentUtilities.HtmlContentToString(clonedTagBuilder.RenderBody())); 335Assert.Equal(originalTagBuilder.TagName, clonedTagBuilder.TagName);
StringHtmlContentTest.cs (1)
21Assert.Equal("HtmlEncode[[Hello World]]", writer.ToString());
TemplateRendererTest.cs (1)
57actual => Assert.Equal(expected, actual));
ViewComponentResultTest.cs (15)
66Assert.Equal(expected, ex.Message); 116Assert.Equal(expected, exception.Message); 139Assert.Equal(expected, exception.Message); 164Assert.Equal(expected, exception.Message); 195Assert.Equal("Hello, World!", body); 226Assert.Equal("Hello, World!", body); 257Assert.Equal("Hello-Async, World!", body); 290Assert.Equal("Hello, World!", body); 329Assert.Equal("Hello, World!", body); 360Assert.Equal("Hello, World!", body); 391Assert.Equal("Hello, World!", body); 433Assert.Equal(expected, body); 475Assert.Equal(expected, body); 609Assert.Equal(expectedContentType, actionContext.HttpContext.Response.ContentType); 646Assert.Equal(expectedContentType, actionContext.HttpContext.Response.ContentType);
ViewComponents\ContentViewComponentResultTest.cs (1)
34Assert.Equal("HtmlEncode[[<Test />]]", new StreamReader(buffer).ReadToEnd());
ViewComponents\DefaultViewComponentDescriptorProviderTest.cs (5)
23Assert.Equal(expected, ex.Message); 39Assert.Equal(expected, ex.Message); 54Assert.Equal(expected, ex.Message); 68Assert.Equal(expected, ex.Message); 81Assert.Equal(expected, ex.Message);
ViewComponents\DefaultViewComponentHelperTest.cs (6)
43Assert.Equal("a", item.Key); 63Assert.Equal("a", item.Key); 83Assert.Equal("a", item1.Key); 89Assert.Equal("b", item2.Key); 110Assert.Equal("o", item.Key); 134Assert.Equal("a", item.Key);
ViewComponents\DefaultViewComponentSelectorTest.cs (2)
107Assert.Equal(expected, ex.Message); 128Assert.Equal(expected, ex.Message);
ViewComponents\HtmlContentViewComponentResultTest.cs (1)
35Assert.Equal("<Test />", new StreamReader(buffer).ReadToEnd());
ViewComponents\ViewComponentConventionsTest.cs (2)
71Assert.Equal(expected, result); 90Assert.Equal(expected, result);
ViewComponents\ViewViewComponentResultTest.cs (5)
176Assert.Equal(expected, ex.Message); 214Assert.Equal(expected, ex.Message); 254Assert.Equal(expected, ex.Message); 415Assert.Equal(expected, ex.Message); 444Assert.Equal(expected, ex.Message);
ViewComponentTests.cs (4)
116Assert.Equal("CustomViewName", actualResult.ViewName); 175Assert.Equal("CustomViewName", actualResult.ViewName); 194Assert.Equal("CustomViewName", actualResult.ViewName); 214Assert.Equal("CustomViewName", actualResult.ViewName);
ViewDataDictionaryOfTModelTest.cs (15)
49Assert.Equal("prefix", viewData1.TemplateInfo.HtmlFieldPrefix); 61Assert.Equal("prefix", viewData2.TemplateInfo.HtmlFieldPrefix); 88Assert.Equal("prefix", viewData1.TemplateInfo.HtmlFieldPrefix); 100Assert.Equal("prefix", viewData2.TemplateInfo.HtmlFieldPrefix); 168Assert.Equal("prefix", viewData.TemplateInfo.HtmlFieldPrefix); 217Assert.Equal(expectedMessage, exception.Message); 220Assert.Equal(expectedMessage, exception.Message); 386Assert.Equal(expectedMessage, exception.Message); 389Assert.Equal(expectedMessage, exception.Message); 392Assert.Equal(expectedMessage, exception.Message); 396Assert.Equal(expectedMessage, exception.Message); 413Assert.Equal(expectedMessage, exception.Message); 416Assert.Equal(expectedMessage, exception.Message); 419Assert.Equal(expectedMessage, exception.Message); 423Assert.Equal(expectedMessage, exception.Message);
ViewDataDictionaryTest.cs (5)
142Assert.Equal( 203Assert.Equal("prefix", viewData.TemplateInfo.HtmlFieldPrefix); 403Assert.Equal( 741Assert.Equal("value", formattedValue); 755Assert.Equal("forvaluemat", formattedValue);
ViewDataOfTTest.cs (4)
19Assert.Equal("The model item passed is null, but this ViewDataDictionary instance requires a non-null model item of type 'System.Int32'.", ex.Message); 31Assert.Equal("The model item passed into the ViewDataDictionary is of type 'System.DateTime', but this ViewDataDictionary instance requires a model item of type 'System.String'.", ex.Message); 70Assert.Equal(string.Empty, viewData.TemplateInfo.HtmlFieldPrefix); 88Assert.Equal(string.Empty, viewData.TemplateInfo.HtmlFieldPrefix);
ViewEngines\CompositeViewEngineTest.cs (6)
46Assert.Equal(expected, exception.Message); 124Assert.Equal(viewName, result.ViewName); 174Assert.Equal(expected, exception.Message); 262Assert.Equal(expectedViewName, result.ViewName); 313Assert.Equal(expected, exception.Message); 391Assert.Equal(viewName, result.ViewName);
ViewExecutorTest.cs (4)
115Assert.Equal("This should be raw!", exception.Message); 156Assert.Equal("abcd", Encoding.UTF8.GetString(memoryStream.ToArray())); 247Assert.Equal("abcd", Encoding.UTF8.GetString(memoryStream.ToArray())); 286Assert.Equal("abcd", Encoding.UTF8.GetString(memoryStream.ToArray()));
ViewResultExecutorTest.cs (7)
50Assert.Equal(viewName, viewEngineResult.ViewName); 72Assert.Equal(viewName, viewEngineResult.ViewName); 96Assert.Equal(viewName, viewEngineResult.ViewName); 224Assert.Equal(viewName, viewEngineResult.ViewName); 231Assert.Equal("myview", listener.ViewFound.ViewName); 272Assert.Equal("myview", listener.ViewNotFound.ViewName); 296Assert.Equal("application/x-my-content-type", context.HttpContext.Response.ContentType);
ViewResultTest.cs (4)
67Assert.Equal(expected, ex.Message); 104Assert.Equal(expected, ex.Message); 144Assert.Equal(expected, ex.Message); 184Assert.Equal(expected, ex.Message);
Microsoft.AspNetCore.OpenApi.Tests (637)
Extensions\ApiDescriptionExtensionsTests.cs (1)
72Assert.Equal($"Unsupported HTTP method: {methodName}", exception.Message);
Extensions\OpenApiEndpointRouteBuilderExtensionsTests.cs (8)
45Assert.Equal(expectedPath, generatedEndpoint.RoutePattern.RawText); 70Assert.Equal("OpenApiEndpointRouteBuilderExtensionsTests | v1", document.Info.Title); 71Assert.Equal("1.0.0", document.Info.Version); 96Assert.Equal("OpenApiEndpointRouteBuilderExtensionsTests | v1", document.Info.Title); 97Assert.Equal("1.0.0", document.Info.Version); 121Assert.Equal("No OpenAPI document with the name 'v2' was found.", Encoding.UTF8.GetString(responseBodyStream.ToArray())); 149Assert.Equal($"OpenApiEndpointRouteBuilderExtensionsTests | {documentName}", document.Info.Title); 150Assert.Equal("1.0.0", document.Info.Version);
Extensions\OpenApiRouteHandlerBuilderExtensionTests.cs (2)
87Assert.Equal("number", parameter.Schema.Type); 178Assert.Equal("Set from outer group", operation.Summary);
Extensions\OpenApiServiceCollectionExtensionsTests.cs (6)
43Assert.Equal(documentName, namedOption.DocumentName); 77Assert.Equal(documentName, namedOption.DocumentName); 110Assert.Equal(documentName, namedOption.DocumentName); 143Assert.Equal(documentName, namedOption.DocumentName); 165Assert.Equal(documentName, namedOption.DocumentName); 189Assert.Equal(documentName, namedOption.DocumentName);
Services\CreateSchemaReferenceIdTests.cs (58)
41Assert.Equal("$type", schema.Discriminator.PropertyName); 44item => Assert.Equal("triangle", item.Key), 45item => Assert.Equal("square", item.Key) 48item => Assert.Equal("#/components/schemas/MyShapeMyTriangle", item.Value), 49item => Assert.Equal("#/components/schemas/MyShapeMySquare", item.Value) 54Assert.Equal("triangle", ((OpenApiString)triangleSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 56Assert.Equal("square", ((OpenApiString)squareSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 78Assert.Equal("application/json", content.Key); 80Assert.Equal("TodoSchema", content.Value.Schema.Reference.Id); 82Assert.Equal("object", schema.Type); 86Assert.Equal("id", property.Key); 87Assert.Equal("integer", property.Value.Type); 91Assert.Equal("title", property.Key); 92Assert.Equal("string", property.Value.Type); 96Assert.Equal("completed", property.Key); 97Assert.Equal("boolean", property.Value.Type); 101Assert.Equal("createdAt", property.Key); 102Assert.Equal("string", property.Value.Type); 103Assert.Equal("date-time", property.Value.Format); 127Assert.Equal("application/json", content.Key); 132Assert.Equal("object", schema.Type); 136Assert.Equal("id", property.Key); 137Assert.Equal("integer", property.Value.Type); 141Assert.Equal("title", property.Key); 142Assert.Equal("string", property.Value.Type); 146Assert.Equal("completed", property.Key); 147Assert.Equal("boolean", property.Value.Type); 151Assert.Equal("createdAt", property.Key); 152Assert.Equal("string", property.Value.Type); 153Assert.Equal("date-time", property.Value.Format); 186Assert.Equal("application/json", content.Key); 194Assert.Equal("application/json", responseContent.Key); 198Assert.Equal("TodoWithDueDate", responseSchema.Reference.Id); 229Assert.Equal("application/json", content.Key); 237Assert.Equal("application/json", responseContent.Key); 247Assert.Equal("object", effectiveResponseSchema.Type); 251Assert.Equal("dueDate", property.Key); 252Assert.Equal("string", property.Value.Type); 253Assert.Equal("date-time", property.Value.Format); 257Assert.Equal("id", property.Key); 258Assert.Equal("integer", property.Value.Type); 262Assert.Equal("title", property.Key); 263Assert.Equal("string", property.Value.Type); 267Assert.Equal("completed", property.Key); 268Assert.Equal("boolean", property.Value.Type); 272Assert.Equal("createdAt", property.Key); 273Assert.Equal("string", property.Value.Type); 274Assert.Equal("date-time", property.Value.Format); 278Assert.Equal("object", effectiveRequestSchema.Type); 282Assert.Equal("id", property.Key); 283Assert.Equal("integer", property.Value.Type); 287Assert.Equal("title", property.Key); 288Assert.Equal("string", property.Value.Type); 292Assert.Equal("completed", property.Key); 293Assert.Equal("boolean", property.Value.Type); 297Assert.Equal("createdAt", property.Key); 298Assert.Equal("string", property.Value.Type); 299Assert.Equal("date-time", property.Value.Format);
Services\OpenApiDocumentProviderTests.cs (6)
28Assert.Equal($"{nameof(OpenApiDocumentProviderTests)} | {documentName}", document.Info.Title); 29Assert.Equal("1.0.0", document.Info.Version); 46x => Assert.Equal("v2", x), 47x => Assert.Equal("internal", x), 48x => Assert.Equal("public", x), 49x => Assert.Equal("v1", x));
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Info.cs (2)
33Assert.Equal("TestApplication | v1", info.Title); 56Assert.Equal("TestApplication | v2", info.Title);
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Operations.cs (16)
26Assert.Equal(summary, operation.Summary); 44Assert.Equal(summary + "1", operation.Summary); 62Assert.Equal(description, operation.Description); 80Assert.Equal(description + "1", operation.Description); 99Assert.Equal("todos", tag.Name); 103Assert.Equal("v1", tag.Name); 123Assert.Equal("todos", tag.Name); 127Assert.Equal("v2", tag.Name); 147Assert.Equal(nameof(OpenApiDocumentServiceTests), tag.Name); 151Assert.Equal(nameof(OpenApiDocumentServiceTests), tag.Name); 171Assert.Equal("todos", tag.Name); 175Assert.Equal("v1", tag.Name); 179Assert.Equal("users", tag.Name); 197Assert.Equal("GetTodos", operation.OperationId); 215Assert.Equal("GetTodos", operation.OperationId); 230Assert.Equal("GetTodos", operation.OperationId);
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Parameters.cs (15)
26Assert.Equal("id", pathParameter.Name); 30Assert.Equal("id", queryParameter.Name); 34Assert.Equal("X-Header", headerParameter.Name); 55Assert.Equal("id", pathParameter.Name); 58Assert.Equal("guid", guidParameter.Name); 61Assert.Equal("isCompleted", isCompletedParameter.Name); 81Assert.Equal("id", queryParameter.Name); 84Assert.Equal("id", nullableQueryParameter.Name); 87Assert.Equal("id", defaultQueryParameter.Name); 107Assert.Equal("X-Header", headerParameter.Name); 110Assert.Equal("X-Header", nullableHeaderParameter.Name); 113Assert.Equal("X-Header", defaultHeaderParameter.Name); 136Assert.Equal("id", pathParameter.Name); 139Assert.Equal("guid", guidParameter.Name); 142Assert.Equal("isCompleted", isCompletedParameter.Name);
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Paths.cs (6)
26Assert.Equal("/api/todos", path.Key); 35Assert.Equal("/api/users", path.Key); 64Assert.Equal("/api/todos", path.Key); 86Assert.Equal("/api/todos", path.Key); 118Assert.Equal("/api/todos/{id}", path.Key); 157Assert.Equal("/api/todos/{id}", path.Key);
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.RequestBody.cs (107)
40Assert.Equal("multipart/form-data", content.Key); 41Assert.Equal("object", content.Value.Schema.Type); 45Assert.Equal("string", formFileProperty.Type); 46Assert.Equal("binary", formFileProperty.Format); 116Assert.Equal("multipart/form-data", content.Key); 117Assert.Equal("object", content.Value.Schema.Type); 121Assert.Equal("array", formFileProperty.Type); 122Assert.Equal("string", formFileProperty.Items.Type); 123Assert.Equal("binary", formFileProperty.Items.Format); 183Assert.Equal("multipart/form-data", content.Key); 184Assert.Equal("object", content.Value.Schema.Type); 192Assert.Equal("string", formFile1Property.Type); 193Assert.Equal("binary", formFile1Property.Format); 200Assert.Equal("string", formFile2Property.Type); 201Assert.Equal("binary", formFile2Property.Format); 223Assert.Equal("application/magic-foo-content-type", content.Key); 224Assert.Equal("object", content.Value.Schema.Type); 228Assert.Equal("string", formFileProperty.Type); 229Assert.Equal("binary", formFileProperty.Format); 250Assert.Equal("application/magic-foo-content-type", content.Key); 251Assert.Equal("object", content.Value.Schema.Type); 255Assert.Equal("string", formFileProperty.Type); 256Assert.Equal("binary", formFileProperty.Format); 278Assert.Equal("application/json", content.Key); 331Assert.Equal("application/json", content.Key); 352Assert.Equal("application/magic-foo-content-type", content.Key); 373Assert.Equal("application/magic-foo-content-type", content.Key); 420Assert.Equal("object", item.Schema.Type); 429Assert.Equal("id", property.Key); 430Assert.Equal("integer", property.Value.Type); 434Assert.Equal("title", property.Key); 435Assert.Equal("string", property.Value.Type); 439Assert.Equal("completed", property.Key); 440Assert.Equal("boolean", property.Value.Type); 444Assert.Equal("createdAt", property.Key); 445Assert.Equal("string", property.Value.Type); 446Assert.Equal("date-time", property.Value.Format); 476Assert.Equal("object", item.Schema.Type); 486Assert.Equal("integer", subSchema.Properties["id"].Type); 491Assert.Equal("string", subSchema.Properties["date"].Type); 492Assert.Equal("date-time", subSchema.Properties["date"].Format); 497Assert.Equal("integer", subSchema.Properties["value"].Type); 523Assert.Equal("object", item.Schema.Type); 528Assert.Equal("Id", property.Key); 529Assert.Equal("integer", property.Value.Type); 533Assert.Equal("Title", property.Key); 534Assert.Equal("string", property.Value.Type); 538Assert.Equal("Completed", property.Key); 539Assert.Equal("boolean", property.Value.Type); 543Assert.Equal("CreatedAt", property.Key); 544Assert.Equal("string", property.Value.Type); 545Assert.Equal("date-time", property.Value.Format); 579Assert.Equal("object", item.Schema.Type); 586Assert.Equal("id", property.Key); 587Assert.Equal("integer", property.Value.GetEffective(document).Type); 591Assert.Equal("title", property.Key); 592Assert.Equal("string", property.Value.GetEffective(document).Type); 596Assert.Equal("completed", property.Key); 597Assert.Equal("boolean", property.Value.Type); 601Assert.Equal("createdAt", property.Key); 602Assert.Equal("string", property.Value.Type); 603Assert.Equal("date-time", property.Value.Format); 611Assert.Equal("code", property.Key); 612Assert.Equal("integer", property.Value.GetEffective(document).Type); 616Assert.Equal("message", property.Key); 617Assert.Equal("string", property.Value.GetEffective(document).Type); 644Assert.Equal("object", item.Schema.Type); 651Assert.Equal("Id", property.Key); 652Assert.Equal("integer", property.Value.GetEffective(document).Type); 656Assert.Equal("Title", property.Key); 657Assert.Equal("string", property.Value.GetEffective(document).Type); 661Assert.Equal("Completed", property.Key); 662Assert.Equal("boolean", property.Value.Type); 666Assert.Equal("CreatedAt", property.Key); 667Assert.Equal("string", property.Value.Type); 668Assert.Equal("date-time", property.Value.Format); 676Assert.Equal("Code", property.Key); 677Assert.Equal("integer", property.Value.GetEffective(document).Type); 681Assert.Equal("Message", property.Key); 682Assert.Equal("string", property.Value.GetEffective(document).Type); 712Assert.Equal("object", item.Schema.Type); 717Assert.Equal("Name", property.Key); 718Assert.Equal("string", property.Value.Type); 752Assert.Equal("object", item.Schema.Type); 789Assert.Equal("object", item.Schema.Type); 793Assert.Equal("Name", property.Key); 794Assert.Equal("string", property.Value.GetEffective(document).Type); 798Assert.Equal("Description", property.Key); 799Assert.Equal("string", property.Value.GetEffective(document).Type); 803Assert.Equal("Resume", property.Key); 804Assert.Equal("string", property.Value.GetEffective(document).Type); 805Assert.Equal("binary", property.Value.GetEffective(document).Format); 832Assert.Equal("object", item.Schema.Type); 836Assert.Equal("name", property.Key); 837Assert.Equal("string", property.Value.GetEffective(document).Type); 841Assert.Equal("description", property.Key); 842Assert.Equal("string", property.Value.GetEffective(document).Type); 846Assert.Equal("resume", property.Key); 847Assert.Equal("string", property.Value.Type); 848Assert.Equal("binary", property.Value.Format); 872Assert.Equal("object", item.Schema.Type); 876Assert.Equal("model", property.Key); 877Assert.Equal(type, property.Value.Type); 878Assert.Equal(format, property.Value.Format); 1121Assert.Equal("application/octet-stream", content.Key); 1123Assert.Equal("string", content.Value.Schema.Type); 1124Assert.Equal("binary", content.Value.Schema.Format);
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Responses.cs (48)
31Assert.Equal("201", response.Key); 32Assert.Equal("Created", response.Value.Description); 36Assert.Equal("400", response.Key); 37Assert.Equal("Bad Request", response.Value.Description); 57Assert.Equal("400", response.Key); 58Assert.Equal("Bad Request", response.Value.Description); 59Assert.Equal("application/json+problem", response.Value.Content.Keys.Single()); 81Assert.Equal("200", response.Key); 82Assert.Equal("OK", response.Value.Description); 84Assert.Equal("text/plain", content.Key); 106Assert.Equal("200", response.Key); 107Assert.Equal("OK", response.Value.Description); 109Assert.Equal("application/json", content.Key); 129Assert.Equal("200", response.Key); 130Assert.Equal("OK", response.Value.Description); 134Assert.Equal("application/json", content.Key); 138Assert.Equal("application/xml", content.Key); 159Assert.Equal("200", response.Key); 160Assert.Equal("OK", response.Value.Description); 164Assert.Equal("application/xml", content.Key); 183Assert.Equal("200", response.Key); 184Assert.Equal("OK", response.Value.Description); 202Assert.Equal("200", response.Key); 203Assert.Equal("OK", response.Value.Description); 207Assert.Equal("application/json", content.Key); 211Assert.Equal("application/xml", content.Key); 233Assert.Equal("application/json", mediaTypeEntry.Key); 235Assert.Equal("object", schema.Type); 238Assert.Equal("code", property.Key); 239Assert.Equal("integer", property.Value.Type); 242Assert.Equal("message", property.Key); 243Assert.Equal("string", property.Value.Type); 271Assert.Equal("code", property.Key); 272Assert.Equal("integer", property.Value.GetEffective(document).Type); 276Assert.Equal("message", property.Key); 277Assert.Equal("string", property.Value.GetEffective(document).Type); 282Assert.Equal("OK", okResponse.Description); 284Assert.Equal("application/json", okContent.Key); 286Assert.Equal("object", schema.Type); 289Assert.Equal("id", property.Key); 290Assert.Equal("integer", property.Value.GetEffective(document).Type); 293Assert.Equal("title", property.Key); 294Assert.Equal("string", property.Value.GetEffective(document).Type); 297Assert.Equal("completed", property.Key); 298Assert.Equal("boolean", property.Value.Type); 301Assert.Equal("createdAt", property.Key); 302Assert.Equal("string", property.Value.Type); 303Assert.Equal("date-time", property.Value.Format);
Services\OpenApiGeneratorTests.cs (71)
40Assert.Equal(declaringTypeName, tag.Name); 52Assert.Equal(declaringTypeName, tag.Name); 68tag => Assert.Equal("A", tag.Name), 69tag => Assert.Equal("B", tag.Name)); 78Assert.Equal("Encountered a parameter of type 'System.Runtime.CompilerServices.Closure' without a name. Parameters must have a name.", ex.Message); 88Assert.Equal("application/custom", content); 121Assert.Equal("application/custom0", request.Content.First().Key); 122Assert.Equal("application/custom1", request.Content.Last().Key); 137Assert.Equal("application/custom0", request.Content.First().Key); 138Assert.Equal("application/custom1", request.Content.Last().Key); 151Assert.Equal("200", response.Key); 154Assert.Equal("application/json", formats.Key); 173Assert.Equal("200", response.Key); 175Assert.Equal("text/plain", formats.Key); 184Assert.Equal("200", response.Key); 212Assert.Equal("application/json", content.Key); 218Assert.Equal("application/json", badRequestContent.Key); 235Assert.Equal("application/json", createdResponseContent.Key); 254Assert.Equal("Created", successResponse.Description); 257Assert.Equal("Bad Request", clientErrorResponse.Description); 271Assert.Equal("Continue", continueResponse.Description); 274Assert.Equal("Switching Protocols", switchingProtocolsResponse.Description); 291Assert.Equal("Continue", continueResponse.Description); 294Assert.Equal("Created", createdResponse.Description); 297Assert.Equal("Multiple Choices", multipleChoicesResponse.Description); 300Assert.Equal("Bad Request", badRequestResponse.Description); 303Assert.Equal("Internal Server Error", InternalServerErrorResponse.Description); 318Assert.Equal("", unregisteredResponse1.Description); 321Assert.Equal("", unregisteredResponse2.Description); 324Assert.Equal("", unregisteredResponse3.Description); 429Assert.Equal("application/json", content.Key); 446Assert.Equal("foo", fooParam.Name); 452Assert.Equal("bar", barParam.Name); 459Assert.Equal("application/json", fromBodyContent.Key); 473Assert.Equal(capturedName, param.Name); 480Assert.Equal("Bar", param.Name); 505Assert.Equal("foo", fooParam.Name); 511Assert.Equal("bar", barParam.Name); 546Assert.Equal("application/json+problem", content.Key); 563Assert.Equal("application/json", content.Key); 600Assert.Equal("200", responseType.Key); 601Assert.Equal("application/json", content.Key); 606Assert.Equal("400", responseType.Key); 607Assert.Equal("application/problem+json", content.Key); 612Assert.Equal("404", responseType.Key); 613Assert.Equal("application/problem+json", content.Key); 618Assert.Equal("409", responseType.Key); 619Assert.Equal("application/problem+json", content.Key); 642Assert.Equal("200", responseType.Key); 643Assert.Equal("application/json", content.Key); 648Assert.Equal("201", responseType.Key); 649Assert.Equal("application/json", content.Key); 671Assert.Equal("application/json", parameter.Key); 675Assert.Equal("application/xml", parameter.Key); 707Assert.Equal("application/json", content.Key); 721Assert.Equal("application/json", content.Key); 735Assert.Equal("application/xml", content.Key); 749Assert.Equal("multipart/form-data", content.Key); 763Assert.Equal("multipart/form-data", content.Key); 777Assert.Equal("multipart/form-data", content.Key); 812Assert.Equal("multipart/form-data", fromFileParam0.Content.Keys.SingleOrDefault()); 817Assert.Equal("multipart/form-data", fromFileParam1.Content.Keys.SingleOrDefault()); 828Assert.Equal("multipart/form-data", content.Key); 850Assert.Equal("multipart/form-data", content.Key); 865Assert.Equal("A description", operation.Description); 866Assert.Equal("A summary", operation.Summary); 884Assert.Equal("200", response.Key); 885Assert.Equal("application/json", content.Key); 906Assert.Equal(expectedName, param.Name); 933Assert.Equal(expectedName, parameter.Name); 989Assert.Equal("names", parameter.Name);
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (18)
160[(string id = "test") => { }, (IOpenApiAny defaultValue) => Assert.Equal("test", ((OpenApiString)defaultValue).Value)], 164[(Status status = Status.Pending) => { }, (IOpenApiAny defaultValue) => Assert.Equal("Pending", ((OpenApiString)defaultValue).Value)], 167[([DefaultValue("test")] string id) => { }, (IOpenApiAny defaultValue) => Assert.Equal("test", ((OpenApiString)defaultValue).Value)], 170[([DefaultValue(Status.Pending)] Status status) => { }, (IOpenApiAny defaultValue) => Assert.Equal("Pending", ((OpenApiString)defaultValue).Value)], 174[([DefaultValue("foo")] string? id) => { }, (IOpenApiAny defaultValue) => Assert.Equal("foo", ((OpenApiString)defaultValue).Value)], 240Assert.Equal("Pending", openApiString.Value); 245Assert.Equal("Approved", openApiString.Value); 250Assert.Equal("Rejected", openApiString.Value); 343[([Url] string url) => {}, (OpenApiSchema schema) => { Assert.Equal("string", schema.Type); Assert.Equal("uri", schema.Format); }], 345[([Url][StringLength(10)] string url) => {}, (OpenApiSchema schema) => { Assert.Equal("string", schema.Type); Assert.Equal("uri", schema.Format); Assert.Equal(10, schema.MaxLength); }], 346[([Base64String] string base64string) => {}, (OpenApiSchema schema) => { Assert.Equal("string", schema.Type); Assert.Equal("byte", schema.Format); }], 564Assert.Equal(parameter.Schema.Reference.Id, response.Reference.Id); 570Assert.Equal("Pending", openApiString.Value); 575Assert.Equal("Approved", openApiString.Value); 580Assert.Equal("Rejected", openApiString.Value);
Services\OpenApiSchemaService\OpenApiSchemaService.PolymorphicSchemas.cs (53)
28Assert.Equal("$type", schema.Discriminator.PropertyName); 31item => Assert.Equal("triangle", item.Key), 32item => Assert.Equal("square", item.Key) 35item => Assert.Equal("#/components/schemas/ShapeTriangle", item.Value), 36item => Assert.Equal("#/components/schemas/ShapeSquare", item.Value) 41Assert.Equal("triangle", ((OpenApiString)triangleSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 43Assert.Equal("square", ((OpenApiString)squareSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 65Assert.Equal("$type", schema.Discriminator.PropertyName); 68item => Assert.Equal("0", item.Key), 69item => Assert.Equal("1", item.Key), 70item => Assert.Equal("2", item.Key) 73item => Assert.Equal("#/components/schemas/WeatherForecastBaseWeatherForecastWithCity", item.Value), 74item => Assert.Equal("#/components/schemas/WeatherForecastBaseWeatherForecastWithTimeSeries", item.Value), 75item => Assert.Equal("#/components/schemas/WeatherForecastBaseWeatherForecastWithLocalNews", item.Value) 110Assert.Equal("discriminator", schema.Discriminator.PropertyName); 113item => Assert.Equal("student", item.Key), 114item => Assert.Equal("teacher", item.Key) 117item => Assert.Equal("#/components/schemas/PersonStudent", item.Value), 118item => Assert.Equal("#/components/schemas/PersonTeacher", item.Value) 123Assert.Equal("student", ((OpenApiString)citySchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 127Assert.Equal("teacher", ((OpenApiString)timeSeriesSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 153schema => Assert.Equal("ColorPaintColor", schema.Reference.Id), 154schema => Assert.Equal("ColorFabricColor", schema.Reference.Id), 155schema => Assert.Equal("ColorBase", schema.Reference.Id)); 159Assert.Equal("paint", ((OpenApiString)paintSchema.Properties["$type"].Enum.First()).Value); 163Assert.Equal("fabric", ((OpenApiString)fabricSchema.Properties["$type"].Enum.First()).Value); 188Assert.Equal("$type", schema.Discriminator.PropertyName); 190item => Assert.Equal("cat", item.Key), 191item => Assert.Equal("dog", item.Key), 192item => Assert.Equal("pet", item.Key) 195item => Assert.Equal("#/components/schemas/PetCat", item.Value), 196item => Assert.Equal("#/components/schemas/PetDog", item.Value), 197item => Assert.Equal("#/components/schemas/PetPet", item.Value) 205schema => Assert.Equal("PetCat", schema.Reference.Id), 206schema => Assert.Equal("PetDog", schema.Reference.Id), 207schema => Assert.Equal("PetPet", schema.Reference.Id)); 211Assert.Equal("dog", ((OpenApiString)dogSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 215Assert.Equal("cat", ((OpenApiString)catSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 219Assert.Equal("pet", ((OpenApiString)petSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 245schema => Assert.Equal("OrganismAnimal", schema.Reference.Id), 246schema => Assert.Equal("OrganismPlant", schema.Reference.Id), 247schema => Assert.Equal("OrganismBase", schema.Reference.Id)); 274Assert.Equal("Employee", mediaType.Schema.Reference.Id); 277Assert.Equal("$type", schema.Discriminator.PropertyName); 279item => Assert.Equal("manager", item.Key), 280item => Assert.Equal("employee", item.Key) 283item => Assert.Equal("#/components/schemas/EmployeeManager", item.Value), 284item => Assert.Equal("#/components/schemas/EmployeeEmployee", item.Value) 288schema => Assert.Equal("EmployeeManager", schema.Reference.Id), 289schema => Assert.Equal("EmployeeEmployee", schema.Reference.Id)); 292Assert.Equal("manager", ((OpenApiString)managerSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 294Assert.Equal("employee", ((OpenApiString)employeeSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value); 296Assert.Equal("Employee", employeeSchema.Properties["manager"].Reference.Id);
Services\OpenApiSchemaService\OpenApiSchemaService.RequestBodySchemas.cs (103)
34Assert.Equal("application/json", content.Key); 37Assert.Equal("object", schema.Type); 41Assert.Equal("id", property.Key); 42Assert.Equal("integer", property.Value.Type); 46Assert.Equal("title", property.Key); 47Assert.Equal("string", property.Value.Type); 51Assert.Equal("completed", property.Key); 52Assert.Equal("boolean", property.Value.Type); 56Assert.Equal("createdAt", property.Key); 57Assert.Equal("string", property.Value.Type); 58Assert.Equal("date-time", property.Value.Format); 93Assert.Equal("object", effectiveSchema.Type); 97Assert.Equal("id", property.Key); 98Assert.Equal("integer", property.Value.Type); 105Assert.Equal("name", property.Key); 106Assert.Equal("string", property.Value.Type); 112Assert.Equal("isPrivate", property.Key); 113Assert.Equal("boolean", property.Value.Type); 169property => Assert.Equal("title", property), 170property => Assert.Equal("completed", property)); 196Assert.Equal("string", effectiveSchema.Type); 197Assert.Equal("binary", effectiveSchema.Format); 217Assert.Equal("Proposal", schema.Reference.Id); 221Assert.Equal("proposalElement", property.Key); 222Assert.Equal("Proposal", property.Value.Reference.Id); 225Assert.Equal("stream", property.Key); 227Assert.Equal("string", targetSchema.Type); 228Assert.Equal("binary", targetSchema.Format); 258Assert.Equal(enumerableTodoSchema.Items.Reference.Id, arrayTodoSchema.Items.Reference.Id); 260Assert.Equal("array", enumerableTodoSchema.Type); 261Assert.Equal("array", arrayTodoSchema.Type); 263Assert.Equal("array", parameter.Schema.Type); 264Assert.Equal("string", parameter.Schema.Items.Type); 265Assert.Equal("uuid", parameter.Schema.Items.Format); 273Assert.Equal("id", property.Key); 274Assert.Equal("integer", property.Value.Type); 278Assert.Equal("title", property.Key); 279Assert.Equal("string", property.Value.Type); 283Assert.Equal("completed", property.Key); 284Assert.Equal("boolean", property.Value.Type); 288Assert.Equal("createdAt", property.Key); 289Assert.Equal("string", property.Value.Type); 290Assert.Equal("date-time", property.Value.Format); 313Assert.Equal("object", schema.Type); 318Assert.Equal("length", property.Key); 319Assert.Equal("number", property.Value.Type); 320Assert.Equal("double", property.Value.Format); 324Assert.Equal("wheels", property.Key); 325Assert.Equal("integer", property.Value.Type); 326Assert.Equal("int32", property.Value.Format); 330Assert.Equal("make", property.Key); 331Assert.Equal("string", property.Value.Type); 353Assert.Equal("object", schema.Type); 357Assert.Equal("id", property.Key); 358Assert.Equal("integer", property.Value.Type); 359Assert.Equal("int32", property.Value.Format); 360Assert.Equal("The unique identifier for a todo item.", property.Value.Description); 364Assert.Equal("title", property.Key); 365Assert.Equal("string", property.Value.Type); 366Assert.Equal("The title of the todo item.", property.Value.Description); 370Assert.Equal("completed", property.Key); 371Assert.Equal("boolean", property.Value.Type); 372Assert.Equal("The completion status of the todo item.", property.Value.Description); 376Assert.Equal("createdAt", property.Key); 377Assert.Equal("string", property.Value.Type); 378Assert.Equal("date-time", property.Value.Format); 379Assert.Equal("The date and time the todo item was created.", property.Value.Description); 398Assert.Equal("The todo item to create.", operation.RequestBody.Description); 421Assert.Equal("nullableInt", property.Key); 422Assert.Equal("integer", property.Value.Type); 427Assert.Equal("nullableString", property.Key); 428Assert.Equal("string", property.Value.Type); 433Assert.Equal("nullableBool", property.Key); 434Assert.Equal("boolean", property.Value.Type); 439Assert.Equal("nullableDateTime", property.Key); 440Assert.Equal("string", property.Value.Type); 441Assert.Equal("date-time", property.Value.Format); 446Assert.Equal("nullableUri", property.Key); 447Assert.Equal("string", property.Value.Type); 448Assert.Equal("uri", property.Value.Format); 469Assert.Equal("NestedType", content.Value.Schema.Reference.Id); 474Assert.Equal("name", property.Key); 475Assert.Equal("string", property.Value.Type); 479Assert.Equal("nested", property.Key); 480Assert.Equal("NestedType", property.Value.Reference.Id); 514Assert.Equal("NestedType", content.Value.Schema.Reference.Id); 519Assert.Equal("name", property.Key); 520Assert.Equal("string", property.Value.Type); 524Assert.Equal("nested", property.Key); 525Assert.Equal("NestedType", property.Value.Reference.Id); 581Assert.Equal("string", property.Type); 587Assert.Equal("integer", property.Type); 593Assert.Equal("array", property.Type); 618Assert.Equal("number", property.Key); 619Assert.Equal("integer", property.Value.Type); 644Assert.Equal("number", property.Key); 645Assert.Equal("integer", property.Value.Type); 682Assert.Equal("selfReferenceList", property.Key); 683Assert.Equal("array", property.Value.Type); 684Assert.Equal("Parent", property.Value.Items.Reference.Id); 688Assert.Equal("selfReferenceDictionary", property.Key); 689Assert.Equal("object", property.Value.Type); 690Assert.Equal("Parent", property.Value.AdditionalProperties.Reference.Id);
Transformers\DocumentTransformerTests.cs (7)
28Assert.Equal("1", document.Info.Description); 35Assert.Equal("2", document.Info.Description); 52Assert.Equal("Info Description", document.Info.Description); 69Assert.Equal("Info Description", document.Info.Description); 94Assert.Equal(description, document.Info.Description); 139Assert.Equal("Info Description", document.Info.Description); 158Assert.Equal("Info Description", document.Info.Description);
Transformers\Implementations\OpenApiSchemaReferenceTransformerTests.cs (32)
58Assert.Equal("object", effectiveSchema.Type); 61Assert.Equal("string", effectivePropertySchema.Type); 62Assert.Equal("binary", effectivePropertySchema.Format); 103Assert.Equal(requestBodySchema.Reference.Id, responseSchema.Reference.Id); 106Assert.Equal("object", effectiveSchema.Type); 109Assert.Equal("integer", effectiveIdSchema.Type); 111Assert.Equal("string", effectiveTitleSchema.Type); 113Assert.Equal("boolean", effectiveCompletedSchema.Type); 115Assert.Equal("string", effectiveCreatedAtSchema.Type); 169Assert.Equal("array", requestBodySchema.Type); 170Assert.Equal("object", requestBodySchema2.Type); 172Assert.Equal(requestBodySchema.Items.Reference.Id, requestBodySchema2.AdditionalProperties.Reference.Id); 198Assert.Equal(requestBodySchema.AllOf[1].Reference.Id, requestBodySchema2.AllOf[1].Reference.Id); 201Assert.Equal("object", requestBodySchema.AllOf[0].Type); 202Assert.Equal("string", requestBodySchema.AllOf[0].Properties["resume"].Type); 203Assert.Equal("binary", requestBodySchema.AllOf[0].Properties["resume"].Format); 206Assert.Equal("object", requestBodySchema2.AllOf[0].Type); 260Assert.Equal("array", requestBodySchema.Type); 262Assert.Equal("Todo", requestBodySchema.Items.Reference.Id); 263Assert.Equal(requestBodySchema.Items.Reference.Id, requestBodySchema2.Items.Reference.Id); 295Assert.Equal("todo", ((OpenApiString)requestSchema.GetEffective(document).Extensions["x-my-extension"]).Value); 347Assert.Equal("TodoListContainer", requestBodySchema.Reference.Id); 348Assert.Equal(requestBodySchema.Reference.Id, requestBodySchema2.Reference.Id); 352Assert.Equal("array", todosProperty.Type); 354Assert.Equal("Todo", itemsSchema.Reference.Id); 378Assert.Equal("Level1", requestSchema.Reference.Id); 382Assert.Equal("Level2", level1Schema.Properties["item2"].Reference.Id); 386Assert.Equal("Level3", level2Schema.Properties["item3"].Reference.Id); 419Assert.Equal("The depth of the generated JSON schema exceeds the JsonSerializerOptions.MaxDepth setting.", exception.Message); 442Assert.Equal("DeeplyNestedLevel1", requestSchema.Reference.Id); 448Assert.Equal($"DeeplyNestedLevel{level}", levelSchema.Properties[$"item{level}"].Reference.Id); 476Assert.Equal("#", responseSchema.Reference.Id);
Transformers\OperationTransformerTests.cs (46)
33Assert.Equal("/todo", path.Key); 35Assert.Equal("todo", operation.Description); 39Assert.Equal("/user", path.Key); 41Assert.Equal("user", operation.Description); 60Assert.All(document.Paths.Values.SelectMany(p => p.Operations).Select(p => p.Value), o => Assert.Equal("6", o.Description)); 73Assert.Equal("1", operation.Description); 81Assert.Equal("4", operation.Description); 87Assert.Equal("5", operation.Description); 97Assert.Equal("/todo", path.Key); 99Assert.Equal("6", operation.Description); 103Assert.Equal("/user", path.Key); 105Assert.Equal("6", operation.Description); 114Assert.All(document.Paths.Values.SelectMany(p => p.Operations).Select(p => p.Value), o => Assert.Equal("6", o.Description)); 123Assert.Equal("2", operation.Description); 133Assert.Equal("3", operation.Description); 165Assert.Equal("/todo", path.Key); 167Assert.Equal("3", operation.Description); 171Assert.Equal("/user", path.Key); 173Assert.Equal("3", operation.Description); 198Assert.Equal("/todo", path.Key); 200Assert.Equal("3", operation.Description); 204Assert.Equal("/user", path.Key); 206Assert.Equal("3", operation.Description); 227Assert.Equal("/todo", path.Key); 229Assert.Equal("Operation Description", operation.Description); 233Assert.Equal("/user", path.Key); 235Assert.Equal("Operation Description", operation.Description); 256Assert.Equal("/todo", path.Key); 258Assert.Equal("Operation Description", operation.Description); 262Assert.Equal("/user", path.Key); 264Assert.Equal("Operation Description", operation.Description); 289Assert.Equal("/todo", path.Key); 296Assert.Equal("/user", path.Key); 298Assert.Equal(description, operation.Description); 306Assert.Equal("/todo", path.Key); 308Assert.Equal(description, operation.Description); 312Assert.Equal("/user", path.Key); 314Assert.Equal(description, operation.Description); 356Assert.Equal("/todo", path.Key); 358Assert.Equal("Operation Description", operation.Description); 362Assert.Equal("/user", path.Key); 364Assert.Equal("Operation Description", operation.Description); 387Assert.Equal("/todo", path.Key); 389Assert.Equal("Operation Description", operation.Description); 393Assert.Equal("/user", path.Key); 395Assert.Equal("Operation Description", operation.Description);
Transformers\SchemaTransformerTests.cs (32)
48Assert.Equal("todo", context.ParameterDescription.Name); 160Assert.Equal("1", ((OpenApiString)schema.Extensions["x-my-extension"]).Value); 169Assert.Equal("2", ((OpenApiString)schema.Extensions["x-my-extension"]).Value); 196Assert.Equal("1", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); 199Assert.Equal("1", ((OpenApiString)responseSchema.Extensions["x-my-extension"]).Value); 226Assert.Equal("todo", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); 249Assert.Equal("1", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); 252Assert.Equal("1", ((OpenApiString)responseSchema.Extensions["x-my-extension"]).Value); 272Assert.Equal("1", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); 275Assert.Equal("1", ((OpenApiString)responseSchema.Extensions["x-my-extension"]).Value); 303Assert.Equal(value, ((OpenApiString)responseSchema.Extensions["x-my-extension"]).Value); 310Assert.Equal(value, ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); 313Assert.Equal(value, ((OpenApiString)responseSchema.Extensions["x-my-extension"]).Value); 372Assert.Equal("Schema Description", requestSchema.Description); 375Assert.Equal("Schema Description", responseSchema.Description); 398Assert.Equal("Schema Description", requestSchema.Description); 401Assert.Equal("Schema Description", responseSchema.Description); 431Assert.Equal("modified-number-format", responseSchema.Format); 436Assert.Equal("modified-number-format", requestSchema.GetEffective(document).Properties["id"].Format); 465Assert.Equal("modified-number-format", responseSchema.Items.Format); 471Assert.Equal("modified-number-format", responseSchema.Format); 506Assert.Equal("this-is-a-triangle", ((OpenApiString)requestSchema.Extensions["x-my-extension"]).Value); 535Assert.Equal("modified-number-format", itemSchema.Properties["id"].Format); 542Assert.Equal("modified-number-format", otherItemSchema.Format); 577Assert.Equal("this-is-a-triangle", ((OpenApiString)triangleExtension).Value); 583Assert.Equal("this-is-a-square", ((OpenApiString)squareExtension).Value); 618Assert.Equal("this-is-a-triangle", ((OpenApiString)triangleExtension).Value); 624Assert.Equal("this-is-a-square", ((OpenApiString)squareExtension).Value); 659Assert.Equal("this-is-a-triangle", ((OpenApiString)triangleExtension).Value); 665Assert.Equal("this-is-a-square", ((OpenApiString)squareExtension).Value); 698Assert.Equal("modified-number-format", todoSchema.Properties["id"].Format); 699Assert.Equal("modified-number-format", errorSchema.Properties["code"].Format);
Microsoft.AspNetCore.OutputCaching.Tests (39)
OutputCacheEntryFormatterTests.cs (1)
77Assert.Equal(KnownV2Payload, hex);
OutputCacheKeyProviderTests.cs (19)
27Assert.Equal($"HEAD{KeyDelimiter}HTTPS{KeyDelimiter}EXAMPLE.COM:80/PATHBASE/PATH/SUBPATH", cacheKeyProvider.CreateStorageKey(context)); 44Assert.Equal($"HEAD{KeyDelimiter}HTTPS{KeyDelimiter}*:*/PATHBASE/PATH/SUBPATH", cacheKeyProvider.CreateStorageKey(context)); 59Assert.Equal($"{HttpMethods.Get}{KeyDelimiter}{KeyDelimiter}/PATH", cacheKeyProvider.CreateStorageKey(context)); 73Assert.Equal($"{HttpMethods.Get}{KeyDelimiter}{KeyDelimiter}/Path", cacheKeyProvider.CreateStorageKey(context)); 91Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}", cacheKeyProvider.CreateStorageKey(context)); 103Assert.Equal($"{EmptyBaseKey}{KeyDelimiter}R{KeyDelimiter}RouteA=ValueA{KeyDelimiter}RouteC=", 119Assert.Equal($"{EmptyBaseKey}{KeyDelimiter}R{KeyDelimiter}RouteA=123.456{KeyDelimiter}RouteC=", 136Assert.Equal($"{EmptyBaseKey}{KeyDelimiter}V{KeyDelimiter}a=ValueA{KeyDelimiter}b=ValueB", 149Assert.Equal($"{EmptyBaseKey}{KeyDelimiter}H{KeyDelimiter}HeaderA=ValueA{KeyDelimiter}HeaderC=", 161Assert.Equal($"{EmptyBaseKey}{KeyDelimiter}H{KeyDelimiter}HEADERA=ValueA", 174Assert.Equal($"{EmptyBaseKey}{KeyDelimiter}H{KeyDelimiter}HeaderA=ValueAValueB{KeyDelimiter}HeaderC=", 187Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC=", 200Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC=", 213Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA", 228Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeyDelimiter}QUERYB=ValueB", 243Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeySubDelimiter}ValueB", 258Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeySubDelimiter}ValueB", 277Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}H{KeyDelimiter}HeaderA=ValueA{KeyDelimiter}HeaderC={KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC={KeyDelimiter}R{KeyDelimiter}RouteA=ValueA{KeyDelimiter}RouteC=", 423Assert.Equal($"{context.CacheVaryByRules.CacheKeyPrefix}{KeyDelimiter}{EmptyBaseKey}{KeyDelimiter}R{KeyDelimiter}ROUTEA=ValueA",
OutputCacheMiddlewareTests.cs (8)
119Assert.Equal("NewValue", context.HttpContext.Response.Headers["MyHeader"]); 547Assert.Equal(HeaderUtilities.FormatDate(utcNow), context.HttpContext.Response.Headers.Date); 565Assert.Equal(HeaderUtilities.FormatDate(utcNow), context.HttpContext.Response.Headers.Date); 569Assert.Equal(HeaderUtilities.FormatDate(responseTime), context.HttpContext.Response.Headers.Date); 911Assert.Equal("Hello1", Encoding.UTF8.GetString(memoryStream1.ToArray())); 912Assert.Equal("Hello2", Encoding.UTF8.GetString(memoryStream2.ToArray())); 1036Assert.Equal(initialResponse, cachedResponse); 1038Assert.Equal(refreshedResponse, cachedResponseAfterRefresh);
OutputCachePoliciesTests.cs (4)
51Assert.Equal("*", context.CacheVaryByRules.QueryKeys); 204Assert.Equal(header, context.CacheVaryByRules.HeaderNames); 242Assert.Equal(query, context.CacheVaryByRules.QueryKeys); 281Assert.Equal(value, context.CacheVaryByRules.CacheKeyPrefix);
OutputCachePolicyBuilderTests.cs (6)
211Assert.Equal("tenant1", context1.CacheVaryByRules.CacheKeyPrefix); 212Assert.Equal("tenant2", context2.CacheVaryByRules.CacheKeyPrefix); 213Assert.Equal("tenant3", context3.CacheVaryByRules.CacheKeyPrefix); 231Assert.Equal("circle", context.CacheVaryByRules.VaryByValues["shape"]); 232Assert.Equal("blue", context.CacheVaryByRules.VaryByValues["color"]); 233Assert.Equal("1m", context.CacheVaryByRules.VaryByValues["size"]);
OutputCacheTests.cs (1)
1059Assert.Equal(await initialResponse.Content.ReadAsStringAsync(), await subsequentResponse.Content.ReadAsStringAsync());
Microsoft.AspNetCore.Owin.Tests (28)
OwinEnvironmentTests.cs (20)
36Assert.Equal("SomeMethod", Get<string>(env, "owin.RequestMethod")); 38Assert.Equal("Foo", Get<ClaimsPrincipal>(env, "server.User").Identity.AuthenticationType); 39Assert.Equal("Foo", Get<ClaimsPrincipal>(env, "owin.RequestUser").Identity.AuthenticationType); 43Assert.Equal("CustomRequestValue", requestHeaders["CustomRequestHeader"].First()); 44Assert.Equal("/path", Get<string>(env, "owin.RequestPath")); 45Assert.Equal("/pathBase", Get<string>(env, "owin.RequestPathBase")); 46Assert.Equal("http/1.0", Get<string>(env, "owin.RequestProtocol")); 47Assert.Equal("key=value", Get<string>(env, "owin.RequestQueryString")); 48Assert.Equal("http", Get<string>(env, "owin.RequestScheme")); 53Assert.Equal("CustomResponseValue", responseHeaders["CustomResponseHeader"].First()); 65Assert.Equal("Foo", context.User.Identity.AuthenticationType); 68Assert.Equal("Bar", context.User.Identity.AuthenticationType); 84Assert.Equal("SomeMethod", context.Request.Method); 86Assert.Equal("CustomRequestValue", context.Request.Headers["CustomRequestHeader"]); 87Assert.Equal("/path", context.Request.Path.Value); 88Assert.Equal("/pathBase", context.Request.PathBase.Value); 89Assert.Equal("http/1.0", context.Request.Protocol); 90Assert.Equal("?key=value", context.Request.QueryString.Value); 91Assert.Equal("http", context.Request.Scheme); 94Assert.Equal("CustomResponseValue", context.Response.Headers["CustomResponseHeader"]);
OwinFeatureCollectionTests.cs (8)
35Assert.Equal(requestFeature.Method, HttpMethods.Post); 36Assert.Equal("/path", requestFeature.Path); 37Assert.Equal("/pathBase", requestFeature.PathBase); 38Assert.Equal("?name=value", requestFeature.QueryString); 59Assert.Equal(HttpMethods.Get, Get<string>(env, "owin.RequestMethod")); 60Assert.Equal("/path2", Get<string>(env, "owin.RequestPath")); 61Assert.Equal("/pathBase2", Get<string>(env, "owin.RequestPathBase")); 62Assert.Equal("name=value2", Get<string>(env, "owin.RequestQueryString"));
Microsoft.AspNetCore.RateLimiting.Tests (6)
RateLimiterEndpointConventionBuilderExtensionsTests.cs (1)
31Assert.Equal("TestPolicyName", metadata.PolicyName);
RateLimitingApplicationBuilderExtensionsTests.cs (1)
35Assert.Equal("Unable to find the required services. Please add all the required services by calling 'IServiceCollection.AddRateLimiter' in the application startup code.", ex.Message);
RateLimitingMetricsTests.cs (3)
58Assert.Equal("global_limiter", (string)m.Tags["aspnetcore.rate_limiting.result"]); 117Assert.Equal("acquired", (string)m.Tags["aspnetcore.rate_limiting.result"]); 238Assert.Equal("acquired", (string)m.Tags["aspnetcore.rate_limiting.result"]);
RateLimitingMiddlewareTests.cs (1)
162Assert.Equal("The request was canceled.", message.State.ToString());
Microsoft.AspNetCore.Razor.Runtime.Test (11)
Runtime\TagHelpers\TagHelperExecutionContextTest.cs (6)
84Assert.Equal(content, executionContext.Output.Content.GetContent()); 130Assert.Equal(updatedTagName, output.TagName); 133Assert.Equal("Another attribute", attribute.Name); 183Assert.Equal(tagName, context.TagName); 184Assert.Equal("Another attribute", attribute.Name); 185Assert.Equal(updatedUniqueId, context.UniqueId);
Runtime\TagHelpers\TagHelperRunnerTest.cs (1)
166Assert.Equal("foo", output.TagName);
Runtime\TagHelpers\TagHelperScopeManagerTest.cs (4)
135Assert.Equal("p", output.TagName); 150Assert.Equal("div", output.TagName); 183Assert.Equal("p", output.TagName); 220Assert.Equal(expectedError, ex.Message);
Microsoft.AspNetCore.Razor.Test (55)
TagHelpers\DefaultTagHelperContentTest.cs (36)
24Assert.Equal(string.Empty, tagHelperContent.GetContent()); 38Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 53Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 66Assert.Equal("Hi", tagHelperContent.GetContent(new HtmlTestEncoder())); 80Assert.Equal("Hello World!", tagHelperContent.GetContent(new HtmlTestEncoder())); 97Assert.Equal(expected, copiedTagHelperContent.GetContent(new HtmlTestEncoder())); 118Assert.Equal("some-content", Assert.IsType<string>(items[0])); 119Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 120Assert.Equal("Test", Assert.IsType<string>(items[2])); 144Assert.Equal("some-content", Assert.IsType<string>(items[0])); 145Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 146Assert.Equal("Test", Assert.IsType<string>(items[2])); 165Assert.Equal(string.Empty, source.GetContent()); 168Assert.Equal("some-content", Assert.IsType<string>(items[0])); 169Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 170Assert.Equal("Test", Assert.IsType<string>(items[2])); 192Assert.Equal(string.Empty, source.GetContent()); 193Assert.Equal(string.Empty, nested.GetContent()); 196Assert.Equal("some-content", Assert.IsType<string>(items[0])); 197Assert.Equal("hello", Assert.IsType<HtmlString>(items[1]).Value); 198Assert.Equal("Test", Assert.IsType<string>(items[2])); 214Assert.Equal(expected, actual); 228Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 241Assert.Equal( 262Assert.Equal( 281Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 300Assert.Equal(expected, copiedTagHelperContent.GetContent(new HtmlTestEncoder())); 623Assert.Equal(string.Empty, tagHelperContent.GetContent()); 693Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 707Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 724Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 739Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 754Assert.Equal(expected, tagHelperContent.GetContent(new HtmlTestEncoder())); 770Assert.Equal("HtmlEncode[[Hello ]]HtmlEncode[[World]]", writer.ToString()); 786Assert.Equal("HtmlEncode[[Hi]]", writer.ToString()); 802Assert.Equal("Hi", writer.ToString());
TagHelpers\NullHtmlEncoderTest.cs (4)
34Assert.Equal(value, result); 55Assert.Equal(value, result); 92Assert.Equal(expectedResult, result); 130Assert.Equal(expectedResult, result);
TagHelpers\TagHelperContextTest.cs (3)
37Assert.Equal(tagName, context.TagName); 39Assert.Equal(expectedUniqueId, context.UniqueId); 60Assert.Equal("test", context.TagName);
TagHelpers\TagHelperOutputTest.cs (12)
46Assert.Equal(expectedTagName, output.TagName); 55Assert.Equal(expectedGetChildContentContent, content); 219Assert.Equal( 237Assert.Equal( 278Assert.Equal( 296Assert.Equal( 314Assert.Equal( 1081Assert.Equal(string.Empty, output.PreElement.GetContent()); 1082Assert.Equal(string.Empty, output.PreContent.GetContent()); 1083Assert.Equal(string.Empty, output.Content.GetContent()); 1084Assert.Equal(string.Empty, output.PostContent.GetContent()); 1085Assert.Equal(string.Empty, output.PostElement.GetContent());
Microsoft.AspNetCore.RequestDecompression.Tests (7)
DefaultRequestDecompressionProviderTests.cs (2)
100Assert.Equal(contentEncoding, contentEncodingHeader); 174Assert.Equal(message, log.State.ToString());
RequestDecompressionMiddlewareTests.cs (4)
329Assert.Equal(contentEncoding, contentEncodingHeader); 503Assert.Equal("The maximum number of bytes have been read.", exception.Message); 587Assert.Equal("The maximum number of bytes have been read.", exception.Message); 663Assert.Equal(message, log.State.ToString());
SizeLimitedStreamTests.cs (1)
100Assert.Equal("The maximum number of bytes have been read.", exception.Message);
Microsoft.AspNetCore.ResponseCaching.Tests (13)
ResponseCachingKeyProviderTests.cs (12)
25Assert.Equal($"HEAD{KeyDelimiter}HTTPS{KeyDelimiter}EXAMPLE.COM:80/PATHBASE/PATH/SUBPATH", cacheKeyProvider.CreateBaseKey(context)); 39Assert.Equal($"{HttpMethods.Get}{KeyDelimiter}{KeyDelimiter}/PATH", cacheKeyProvider.CreateBaseKey(context)); 53Assert.Equal($"{HttpMethods.Get}{KeyDelimiter}{KeyDelimiter}/Path", cacheKeyProvider.CreateBaseKey(context)); 75Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}", cacheKeyProvider.CreateStorageVaryByKey(context)); 90Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}H{KeyDelimiter}HeaderA=ValueA{KeyDelimiter}HeaderC=", 106Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}H{KeyDelimiter}HeaderA=ValueAValueB{KeyDelimiter}HeaderC=", 122Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC=", 138Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC=", 156Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeyDelimiter}QUERYB=ValueB", 174Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeySubDelimiter}ValueB", 192Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}Q{KeyDelimiter}QUERYA=ValueA{KeySubDelimiter}ValueB", 211Assert.Equal($"{context.CachedVaryByRules.VaryByKeyPrefix}{KeyDelimiter}H{KeyDelimiter}HeaderA=ValueA{KeyDelimiter}HeaderC={KeyDelimiter}Q{KeyDelimiter}QueryA=ValueA{KeyDelimiter}QueryC=",
ResponseCachingTests.cs (1)
963Assert.Equal(await initialResponse.Content.ReadAsStringAsync(), await subsequentResponse.Content.ReadAsStringAsync());
Microsoft.AspNetCore.ResponseCompression.Tests (3)
ResponseCompressionBodyTest.cs (1)
25Assert.Equal(expectedVaryHeader, httpContext.Response.Headers.Vary);
ResponseCompressionMiddlewareTest.cs (2)
1006Assert.Equal("MD5", md5.SingleOrDefault()); 1333Assert.Equal(message, log.State.ToString());
Microsoft.AspNetCore.Rewrite.Tests (137)
ApacheModRewrite\ConditionPatternParserTest.cs (1)
98Assert.Equal(expected, ex.Message);
ApacheModRewrite\CookieActionFactoryTest.cs (17)
15Assert.Equal("NAME", cookie.Name); 16Assert.Equal("VALUE", cookie.Value); 17Assert.Equal("DOMAIN", cookie.Domain); 19Assert.Equal("path", cookie.Path); 29Assert.Equal("NAME", action.Name); 30Assert.Equal("VALUE:WithColon", action.Value); 31Assert.Equal("DOMAIN", action.Domain); 33Assert.Equal("path", action.Path); 43Assert.Equal("NAME", action.Name); 44Assert.Equal("VALUE", action.Value); 45Assert.Equal("DOMAIN", action.Domain); 47Assert.Equal(string.Empty, action.Path); 62Assert.Equal("NAME", action.Name); 64Assert.Equal(value, action.Value); 65Assert.Equal(domain, action.Domain); 77Assert.Equal(Resources.FormatError_InvalidChangeCookieFlag(flagValue), ex.Message); 88Assert.Equal(Resources.FormatError_CouldNotParseInteger(badInt), ex.Message);
ApacheModRewrite\FlagParserTest.cs (2)
55Assert.Equal(expected, ex.Message); 74Assert.Equal(expected, value);
ApacheModRewrite\FormatExceptionTests.cs (1)
32Assert.Equal(expected, ex.Message);
ApacheModRewrite\ModRewriteMiddlewareTest.cs (17)
37Assert.Equal("/hello", response); 63Assert.Equal("/hello", response); 89Assert.Equal("/what", response); 114Assert.Equal("/hey/hello", response); 139Assert.Equal("/homepage.html", response); 164Assert.Equal("/homepage.html", response); 189Assert.Equal("/", response); 216Assert.Equal(expected, response); 247Assert.Equal(expected, response); 273Assert.Equal(@"/blog/2016-jun/", response); 299Assert.Equal(@"http://www.example.com/blog/2016-jun/", response); 325Assert.Equal(@"http://www.example.com/blog/2016-jun/", response); 353Assert.Equal(@"https://www.example.com/foo/", response.Headers.Location.AbsoluteUri); 381Assert.Equal("/", response.Headers.Location.OriginalString); 407Assert.Equal("/", response); 435Assert.Equal("/foo", response.Headers.Location.OriginalString); 464Assert.Equal("http://localhost:80/home/report/123", response.Headers.Location.OriginalString);
ApacheModRewrite\RewriteTokenizerTest.cs (2)
82Assert.Equal(@"Invalid escaper character in string: \", ex.Message); 89Assert.Equal("Mismatched number of quotes: \"", ex.Message);
ApacheModRewrite\RuleBuilderTest.cs (1)
21Assert.Equal(Resources.Error_ChangeEnvironmentNotSupported, ex.Message);
ApacheModRewrite\RuleRegexParserTest.cs (1)
27Assert.Equal("(.*)", results.Operand);
ApacheModRewrite\TestStringParserTests.cs (1)
121Assert.Equal(expected, ex.Message);
IISUrlRewrite\FileParserTests.cs (1)
205Assert.Equal(r1.Name, r2.Name);
IISUrlRewrite\FormatExceptionHandlingTests.cs (1)
64Assert.Equal(expected, ex.Message);
IISUrlRewrite\InputParserTests.cs (6)
50Assert.Equal(expected, result); 63Assert.Equal(expected, result); 73Assert.Equal(expected, result); 82Assert.Equal(expected, result); 101Assert.Equal(expected, result); 156Assert.Equal(expectedValue, result);
IISUrlRewrite\InvalidUrlRewriteFormatExceptionHandlingTests.cs (1)
216Assert.Equal(expected, ex.Message);
IISUrlRewrite\MiddleWareTests.cs (21)
47Assert.Equal("/article.aspx?id=10&title=hey", response.Headers.Location.OriginalString); 79Assert.Equal("/article.aspx?id=10&title=hey", response); 115Assert.Equal("/newpage.aspx?param1=123&param2=321", response); 147Assert.Equal("/hello", response.Headers.Location.OriginalString); 182Assert.Equal("/hey/hello", response.Headers.Location.OriginalString); 217Assert.Equal("/hey/hello/", response.Headers.Location.OriginalString); 251Assert.Equal("https://example.com/", response.Headers.Location.OriginalString); 291Assert.Equal("https://example.com/", response); 328Assert.Equal("http://internalserver/", response); 365Assert.Equal("/", response.Headers.Location.OriginalString); 399Assert.Equal("/", response); 434Assert.Equal("/foo", response.Headers.Location.OriginalString); 472Assert.Equal("/hey/hello/", response.Headers.Location.OriginalString); 508Assert.Equal("/blogposts/article/abc?p1=123&p2=abc", response.Headers.Location.OriginalString); 544Assert.Equal("/blog/article/23/abc?p1=123&p2=abc", response.Headers.Location.OriginalString); 581Assert.Equal("Cannot access back reference at index 9. Only 5 back references were captured.", ex.Message); 620Assert.Equal("http://www.test.com/foo/bar", response); 663Assert.Equal(expectedRewrittenUri, response); 696Assert.Equal("reason", response.ReasonPhrase); 697Assert.Equal("description", content); 752Assert.Equal(expectedResult, response);
IISUrlRewrite\ServerVariableTests.cs (4)
37Assert.Equal(expected, lookup); 85Assert.Equal(expected, lookup); 132Assert.Equal(expected, lookup); 180Assert.Equal(string.Empty, lookup);
MiddlewareTests.cs (33)
43Assert.Equal("http://example.com/foo", response); 73Assert.Equal("http://example.com/foo", response); 105Assert.Equal("http://example.com/foo", response); 137Assert.Equal("http://example.com/foos/42", response); 174Assert.Equal(expectedUrl, response.Headers.Location.OriginalString); 204Assert.Equal("http://example.com/foo", response.Headers.Location.OriginalString); 228Assert.Equal("http://example.com/foo?bar=1", response.Headers.Location.OriginalString); 256Assert.Equal("https://example.com/", response.Headers.Location.OriginalString); 285Assert.Equal($"https://example.com:{sslPort.GetValueOrDefault().ToString(CultureInfo.InvariantCulture)}/", response.Headers.Location.OriginalString); 289Assert.Equal("https://example.com/", response.Headers.Location.OriginalString); 329Assert.Equal("https://" + expectedHostPathAndQuery, response.Headers.Location.OriginalString); 359Assert.Equal(redirectReplacement, response.Headers.Location.OriginalString); 383Assert.Equal("https://example.com/", response.Headers.Location.OriginalString); 410Assert.Equal(expected, response.Headers.Location.OriginalString); 439Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString); 468Assert.Equal(redirectUri, response.Headers.Location.OriginalString); 493Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString); 556Assert.Equal("https://example.com/", response.Headers.Location.OriginalString); 585Assert.Equal(redirectUri, response.Headers.Location.OriginalString); 610Assert.Equal("https://example.com/", response.Headers.Location.OriginalString); 634Assert.Equal("/", response.Headers.Location.OriginalString); 671Assert.Equal("HTTP: GET /foo from /foos", response); 698Assert.Equal("/", response); 726Assert.Equal("/foo", response.Headers.Location.OriginalString); 783Assert.Equal(redirectUri, response.Headers.Location.OriginalString); 808Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString); 837Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString); 874Assert.Equal(output, response); 912Assert.Equal(output, response); 948Assert.Equal("http://example.com/g", response); 985Assert.Equal("http://example.com/g/h", response); 1022Assert.Equal("http://example.com/g", response); 1054Assert.Equal("http://example.com/g", response);
PatternSegments\ConditionMatchSegmentTests.cs (1)
26Assert.Equal(expected, results);
PatternSegments\DateTimeSegmentTests.cs (1)
38Assert.Equal(expected, ex.Message);
PatternSegments\IsHttpsModSegmentTests.cs (1)
25Assert.Equal(expected, results);
PatternSegments\IsHttpsSegmentTests.cs (1)
25Assert.Equal(expected, results);
PatternSegments\IsIPV6SegmentTests.cs (3)
24Assert.Equal("off", results); 39Assert.Equal("on", results); 54Assert.Equal("off", results);
PatternSegments\LIteralSegmentTests.cs (1)
20Assert.Equal("foo", results);
PatternSegments\LocalAddressSegmentTests.cs (1)
23Assert.Equal("20.30.40.50", results);
PatternSegments\LocalPortSegmentTests.cs (1)
22Assert.Equal("800", results);
PatternSegments\QueryStringSegmentTests.cs (1)
20Assert.Equal("hey=1", results);
PatternSegments\RemoteAddressSegmentTests.cs (1)
23Assert.Equal("20.30.40.50", results);
PatternSegments\RemotePortSegmentTests.cs (1)
22Assert.Equal("800", results);
PatternSegments\RequestFilenameSegmentTests.cs (1)
22Assert.Equal("/foo/bar", results);
PatternSegments\RequestMethodSegmentTests.cs (1)
22Assert.Equal(HttpMethods.Get, results);
PatternSegments\RuleMatchSegmentTests.cs (1)
25Assert.Equal(expected, results);
PatternSegments\SchemeSegmentTests.cs (1)
22Assert.Equal("http", results);
PatternSegments\ServerNameSegmentTests.cs (1)
32Assert.Equal(expectedResult, results);
PatternSegments\ServerProtocolSegmentTests.cs (1)
24Assert.Equal("http", results);
PatternSegments\ToLowerSegmentTests.cs (1)
26Assert.Equal(expected, results);
PatternSegments\UrlDecodeSegmentTests.cs (1)
26Assert.Equal(expected, results);
PatternSegments\UrlEncodeSegmentTests.cs (1)
26Assert.Equal(expected, results);
PatternSegments\UrlSegmentTests.cs (1)
41Assert.Equal(expectedResult, results);
UrlActions\ChangeCookieActionTests.cs (3)
31Assert.Equal($"Cookie=Chocolate%20Chip; expires={HeaderUtilities.FormatDate(now.AddMinutes(1440))}; domain=contoso.com; path=/recipes; secure; httponly", header); 47Assert.Equal($"Cookie=Chocolate%20Chip", header); 60Assert.Equal($"Cookie=", header);
UrlMatches\IntegerMatchTests.cs (1)
15Assert.Equal(ex.Message, Resources.Error_IntegerMatch_FormatExceptionMessage);
Microsoft.AspNetCore.Routing.FunctionalTests (46)
Benchmarks\EndpointRoutingBenchmarkTest.cs (3)
30Assert.Equal(nameof(Benchmarks.StartupUsingEndpointRouting), startupName); 52Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType); 54Assert.Equal(expectedContent, actualContent);
Benchmarks\RouterBenchmarkTest.cs (3)
31Assert.Equal(nameof(Benchmarks.StartupUsingRouter), startupName); 53Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType); 55Assert.Equal(expectedContent, actualContent);
EndpointRoutingIntegrationTest.cs (4)
153Assert.Equal(AuthErrorMessage, ex.Message); 214Assert.Equal(AuthErrorMessage, ex.Message); 245Assert.Equal(AuthErrorMessage, ex.Message); 344Assert.Equal(CORSErrorMessage, ex.Message);
EndpointRoutingSampleTest.cs (13)
43Assert.Equal($"{branch} - API Get 5", await response.Content.ReadAsStringAsync()); 59Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType); 76Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType); 78Assert.Equal(expectedContent, actualContent); 95Assert.Equal(expectedContentType, response.Content.Headers.ContentType.MediaType); 97Assert.Equal(expectedContent, actualContent); 113Assert.Equal(expectedContent, actualContent); 139Assert.Equal(expectedContent, actualContent); 155Assert.Equal(expectedContent, actualContent); 182Assert.Equal(expected, actualContent); 200Assert.Equal(expected, actualContent); 213Assert.Equal("Link: /WithDoubleAsteriskCatchAll/a/b%20b1/c%20c1", actualContent); 226Assert.Equal("Has metadata", actualContent);
HostMatchingTests.cs (5)
41Assert.Equal("*:*", responseContent); 59Assert.Equal("*.0.0.1:*", responseContent); 77Assert.Equal("127.0.0.1:*", responseContent); 95Assert.Equal("*.0.0.1:5000,*.0.0.1:5001", responseContent); 113Assert.Equal("contoso.com:*,*.contoso.com:*", responseContent);
MapFallbackTest.cs (3)
33Assert.Equal("Hello World", responseContent); 67Assert.Equal("FallbackCustomPattern", responseContent); 101Assert.Equal("FallbackDefaultPattern", responseContent);
MinimalFormTests.cs (9)
69Assert.Equal("Test task", result.Name); 129Assert.Equal("Test task", result.Name); 210Assert.Equal( 245Assert.Equal( 290Assert.Equal("Test task", result.Name); 337Assert.Equal("Test task", result.Name); 430Assert.Equal("This form is being accessed with an invalid anti-forgery token. Validate the `IAntiforgeryValidationFeature` on the request before reading from the form.", exception.Message); 489Assert.Equal("The maximum number of bytes have been read.", exception.Message); 497Assert.Equal("Test task", result.Name);
RouteHandlerTest.cs (1)
58Assert.Equal(todo.Name, echoedTodo?.Name);
RouterSampleTest.cs (4)
41Assert.Equal($"{branch} - API Get 5", await response.Content.ReadAsStringAsync()); 55Assert.Equal($"API Get 5", await response.Content.ReadAsStringAsync()); 69Assert.Equal($"Middleware!", await response.Content.ReadAsStringAsync()); 93Assert.Equal(expectedBody, body);
WebHostBuilderExtensionsTest.cs (1)
102Assert.Equal(expected, actual);
Microsoft.AspNetCore.Routing.Tests (906)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (21)
31Assert.Equal( 48Assert.Equal( 121Assert.Equal( 143Assert.Equal( 214e => Assert.Equal("Test endpoint 1", e.DisplayName), 215e => Assert.Equal("Test endpoint 2", e.DisplayName)); 218e => Assert.Equal("Test endpoint 3", e.DisplayName), 219e => Assert.Equal("Test endpoint 4", e.DisplayName)); 225e => Assert.Equal("Test endpoint 1", e.DisplayName), 226e => Assert.Equal("Test endpoint 2", e.DisplayName), 227e => Assert.Equal("Test endpoint 3", e.DisplayName), 228e => Assert.Equal("Test endpoint 4", e.DisplayName)); 280e => Assert.Equal("Test endpoint 1", e.DisplayName), 281e => Assert.Equal("Test endpoint 2", e.DisplayName)); 284e => Assert.Equal("Test endpoint 3", e.DisplayName), 285e => Assert.Equal("Test endpoint 4", e.DisplayName)); 291e => Assert.Equal("Test endpoint 1", e.DisplayName), 292e => Assert.Equal("Test endpoint 2", e.DisplayName), 293e => Assert.Equal("Test endpoint 3", e.DisplayName), 294e => Assert.Equal("Test endpoint 4", e.DisplayName)); 321e => Assert.Equal("Test endpoint 1", e.DisplayName));
Builder\GroupTest.cs (25)
40Assert.Equal("GET", method); 42Assert.Equal("HTTP: GET /{id}", endpoint.DisplayName); 43Assert.Equal("/{id}", routeEndpoint.RoutePattern.RawText); 72Assert.Equal("GET", method); 74Assert.Equal("HTTP: GET /{org}/{id}", endpoint.DisplayName); 75Assert.Equal("/{org}/{id}", routeEndpoint.RoutePattern.RawText); 106Assert.Equal("GET", method); 108Assert.Equal("HTTP: GET /{org}/{id}/", endpoint.DisplayName); 109Assert.Equal("/{org}/{id}/", routeEndpoint.RoutePattern.RawText); 129Assert.Equal("/{ID}/{id}", ex.Pattern); 130Assert.Equal("The route parameter name 'id' appears more than one time in the route template.", ex.Message); 139Assert.Equal("prefix", ex.ParamName); 141Assert.Equal("prefix", ex.ParamName); 146Assert.Equal("endpoints", ex.ParamName); 148Assert.Equal("endpoints", ex.ParamName); 175Assert.Equal("/outer/inner/foo", outerPattern?.RawText); 176Assert.Equal("/outer/inner/foo", innerPattern?.RawText); 253Assert.Equal("/bar", routeEndpoint.RoutePattern.RawText); 294Assert.Equal("Prefixed! HTTP: GET /group/", endpoint.DisplayName); 310Assert.Equal( 349Assert.Equal("/group/foo", routeEndpoint.RoutePattern.RawText); 351Assert.Equal("/group", routeEndpoint.Metadata.GetMetadata<string>()); 355Assert.Equal("/group/bar", routeEndpoint.RoutePattern.RawText); 357Assert.Equal("/group", routeEndpoint.Metadata.GetMetadata<string>()); 383Assert.Equal("/group/foo", prefixedEndpoint.RoutePattern.RawText);
Builder\OpenApiRouteHandlerBuilderExtensionsTest.cs (9)
35tag => Assert.Equal("a", tag), 36tag => Assert.Equal("b", tag), 37tag => Assert.Equal("c", tag)); 54Assert.Equal("application/json", Assert.Single(metadata.ContentTypes)); 82Assert.Equal("application/problem+json", Assert.Single(metadata.ContentTypes)); 100Assert.Equal("application/problem+json", Assert.Single(metadata.ContentTypes)); 117Assert.Equal("text/plain", Assert.Single(metadata.ContentTypes)); 128Assert.Equal("test description", metadata.Description); 138Assert.Equal("test summary", metadata.Summary);
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (16)
74Assert.Equal("/", endpointBuilder1.DisplayName); 75Assert.Equal("/", endpointBuilder1.RoutePattern.RawText); 107Assert.Equal("Response string text", responseBody); 143Assert.Equal("filtered!", responseBody); 171Assert.Equal("filtered!", responseBody); 286Assert.Equal(@"{""name"":""你好""}", responseBody); 361Assert.Equal("/", endpointBuilder1.DisplayName); 362Assert.Equal("/", endpointBuilder1.RoutePattern.RawText); 376Assert.Equal("/", endpointBuilder1.RoutePattern.RawText); 395Assert.Equal("/", endpointBuilder1.RoutePattern.RawText); 415Assert.Equal("METHOD", GetMethod(endpoint.Metadata[0])); 416Assert.Equal("ATTRIBUTE", GetMethod(endpoint.Metadata[1])); 417Assert.Equal("BUILDER", GetMethod(endpoint.Metadata[2])); 420Assert.Equal("BUILDER", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 502m => Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute", m.ToString()), 521Assert.Equal("/", endpointBuilder1.RoutePattern.RawText);
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (73)
85Assert.Equal("METHOD", GetMethod(metadataArray[0])); 86Assert.Equal("ATTRIBUTE", GetMethod(metadataArray[1])); 87Assert.Equal("BUILDER", GetMethod(metadataArray[2])); 89Assert.Equal("BUILDER", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()!.HttpMethods.Single()); 105Assert.Equal("GET", method); 108Assert.Equal("HTTP: GET /", routeEndpointBuilder.DisplayName); 109Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 125Assert.Equal("PATCH", method); 128Assert.Equal("HTTP: PATCH /", routeEndpointBuilder.DisplayName); 129Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 151Assert.Equal("GET", method); 154Assert.Equal("HTTP: GET /{id}", routeEndpointBuilder.DisplayName); 155Assert.Equal("/{id}", routeEndpointBuilder.RoutePattern.RawText); 189Assert.Equal("GET", method); 192Assert.Equal("HTTP: GET /", routeEndpointBuilder.DisplayName); 193Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 273Assert.Equal("GET", method); 276Assert.Equal("HTTP: GET /", routeEndpointBuilder.DisplayName); 277Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 293Assert.Equal("DELETE", method); 296Assert.Equal("HTTP: DELETE /", routeEndpointBuilder.DisplayName); 297Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 313Assert.Equal("PATCH", method); 316Assert.Equal("HTTP: PATCH /", routeEndpointBuilder.DisplayName); 317Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 337Assert.Equal("GET", method); 340Assert.Equal("HTTP: GET /", routeEndpointBuilder.DisplayName); 341Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 357Assert.Equal("DELETE", method); 360Assert.Equal("HTTP: DELETE /", routeEndpointBuilder.DisplayName); 361Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 377Assert.Equal("PATCH", method); 380Assert.Equal("HTTP: PATCH /", routeEndpointBuilder.DisplayName); 381Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 401Assert.Equal("GET", method); 404Assert.Equal("HTTP: GET /", routeEndpointBuilder.DisplayName); 405Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 421Assert.Equal("DELETE", method); 424Assert.Equal("HTTP: DELETE /", routeEndpointBuilder.DisplayName); 425Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 441Assert.Equal("PATCH", method); 444Assert.Equal("HTTP: PATCH /", routeEndpointBuilder.DisplayName); 445Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 467Assert.Equal("Foo", endpointNameMetadata.EndpointName); 468Assert.Equal("Foo", routeNameMetadata.RouteName); 475Assert.Equal(expectedMethod, method); 496Assert.Equal(expectedMethod, method); 526Assert.Equal(expectedMethod, method); 532Assert.Equal($"HTTP: {expectedMethod} /{{ID}}", routeEndpointBuilder.DisplayName); 534Assert.Equal($"/{{ID}}", routeEndpointBuilder.RoutePattern.RawText); 567Assert.Equal(expectedMethod, method); 573Assert.Equal($"HTTP: {expectedMethod} /{{ID}}", routeEndpointBuilder.DisplayName); 575Assert.Equal($"/{{ID}}", routeEndpointBuilder.RoutePattern.RawText); 597Assert.Equal("'id' is not a route parameter.", ex.Message); 655Assert.Equal("'value' is not a route parameter.", ex.Message); 671Assert.Equal("POST", method); 674Assert.Equal("HTTP: POST /", routeEndpointBuilder.DisplayName); 675Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 709Assert.Equal("PUT", method); 712Assert.Equal("HTTP: PUT /", routeEndpointBuilder.DisplayName); 713Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 729Assert.Equal("DELETE", method); 732Assert.Equal("HTTP: DELETE /", routeEndpointBuilder.DisplayName); 733Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 747Assert.Equal("Fallback /", routeEndpointBuilder.DisplayName); 748Assert.Equal("/", routeEndpointBuilder.RoutePattern.RawText); 763Assert.Equal("Fallback {*path:nonfile}", routeEndpointBuilder.DisplayName); 764Assert.Equal("{*path:nonfile}", routeEndpointBuilder.RoutePattern.RawText); 802Assert.Equal("HTTP: DELETE / => GetString", routeEndpointBuilder.DisplayName); 878Assert.Equal("RouteHandlerEndpointRouteBuilderExtensionsTest", routeHandlerContext.MethodInfo.DeclaringType?.Name); 893Assert.Equal(expectedPattern, routeEndpoint.RoutePattern.RawText); 909Assert.Equal($"ID: {expectedId}", body); 984Assert.Equal("loggerErrorIsEnabled: True, parentName: RouteHandlerEndpointRouteBuilderExtensionsTest", body);
Builder\RoutingBuilderExtensionsTest.cs (3)
28Assert.Equal( 45Assert.Equal( 62Assert.Equal(
Builder\RoutingEndpointConventionBuilderExtensionsTest.cs (7)
29Assert.Equal("contoso.com:8080", hostMetadata.Hosts.Single()); 73Assert.Equal("test", endpoint.DisplayName); 100Assert.Equal("test", endpoint.DisplayName); 120Assert.Equal("test", @string); 150Assert.Equal(name, endpointName.EndpointName); 153Assert.Equal(name, routeName.RouteName); 169Assert.Equal("SomeEndpointGroupName", endpointGroupName.EndpointGroupName);
CompositeEndpointDataSourceTest.cs (11)
310Assert.Equal("/prefix/a", resolvedEndpoint.RoutePattern.RawText); 359Assert.Equal("/prefix/a", endpoint.RoutePattern.RawText); 361Assert.Equal("initial-metadata", endpoint.Metadata.GetMetadata<string>()); 366Assert.Equal("/prefix/b", endpoint.RoutePattern.RawText); 368Assert.Equal("initial-metadata", endpoint.Metadata.GetMetadata<string>()); 414Assert.Equal("/prefix/a", endpoint.RoutePattern.RawText); 416Assert.Equal("initial-metadata", endpoint.Metadata.GetMetadata<string>()); 421Assert.Equal("/prefix/b", endpoint.RoutePattern.RawText); 423Assert.Equal("initial-metadata", endpoint.Metadata.GetMetadata<string>()); 480Assert.Equal("/prefix/a", endpoint.RoutePattern.RawText); 487Assert.Equal("/prefix/b", endpoint.RoutePattern.RawText);
ConstraintMatcherTest.cs (2)
62Assert.Equal(expectedMessage, write.State?.ToString()); 230Assert.Equal(_expectedKey, routeKey);
DefaultEndpointDataSourceTests.cs (6)
21endpoint => Assert.Equal("1", endpoint.DisplayName), 22endpoint => Assert.Equal("2", endpoint.DisplayName)); 50Assert.Equal("endpoints", actual.ParamName); 65endpoint => Assert.Equal("1", endpoint.DisplayName), 66endpoint => Assert.Equal("2", endpoint.DisplayName)); 94Assert.Equal("endpoints", actual.ParamName);
DefaultInlineConstraintResolverTest.cs (5)
51Assert.Equal("Could not find a constructor for constraint type 'IntRouteConstraint'" + 292Assert.Equal("System.String must implement Microsoft.AspNetCore.Routing.IParameterPolicy", ex.Message); 320Assert.Equal("The constraint type 'System.String' which is mapped to constraint key 'custom'" + 335Assert.Equal("The constructor to use for activating the constraint type 'MultiConstructorRouteConstraint' is ambiguous." + 361Assert.Equal("Could not find a constructor for constraint type 'IntRouteConstraint'" +
DefaultLinkGeneratorProcessTemplateTest.cs (95)
33Assert.Equal("/Home/a%20b/bar", result.path.ToUriComponent()); 34Assert.Equal(string.Empty, result.query.ToUriComponent()); 58Assert.Equal(expected, result.path.ToUriComponent()); 59Assert.Equal(string.Empty, result.query.ToUriComponent()); 90Assert.Equal(expected, result.path.ToUriComponent()); 91Assert.Equal(string.Empty, result.query.ToUriComponent()); 113Assert.Equal("/Home/Index/a/b%20b1/c%20c1", result.path.ToUriComponent()); 114Assert.Equal(string.Empty, result.query.ToUriComponent()); 136Assert.Equal("/Home/Index", result.path.ToUriComponent()); 137Assert.Equal("?name=name%20with%20%25special%20%23characters", result.query.ToUriComponent()); 159Assert.Equal("/Home/Index", result.path.ToUriComponent()); 160Assert.Equal("?color=red&color=green&color=blue", result.query.ToUriComponent()); 182Assert.Equal("/Home/Index", result.path.ToUriComponent()); 183Assert.Equal("?items=10&items=20&items=30", result.query.ToUriComponent()); 205Assert.Equal("/Home/Index", result.path.ToUriComponent()); 206Assert.Equal(string.Empty, result.query.ToUriComponent()); 228Assert.Equal("/Home/Index", result.path.ToUriComponent()); 229Assert.Equal("?page=1&color=red&color=green&color=blue&message=textfortest", result.query.ToUriComponent()); 251Assert.Equal("/Home/Index", result.path.ToUriComponent()); 252Assert.Equal(string.Empty, result.query.ToUriComponent()); 279Assert.Equal("/home/index", result.path.ToUriComponent()); 280Assert.Equal(string.Empty, result.query.ToUriComponent()); 308Assert.Equal("/foo/bar/18", result.path.ToUriComponent()); 309Assert.Equal(string.Empty, result.query.ToUriComponent()); 332Assert.Equal("/Foo/my-bar/18", result.path.ToUriComponent()); 333Assert.Equal(string.Empty, result.query.ToUriComponent()); 364Assert.Equal("/home/%D0%BF", result.path.ToUriComponent()); 365Assert.Equal(string.Empty, result.query.ToUriComponent()); 370Assert.Equal("/home/п", PathString.FromUriComponent(result.path.ToUriComponent()).Value); 403Assert.Equal("/home/index", result.path.ToUriComponent()); 404Assert.Equal("?showstatus=true&info=detailed", result.query.ToUriComponent()); 433Assert.Equal("/Home/Index/", result.path.ToUriComponent()); 434Assert.Equal(string.Empty, result.query.ToUriComponent()); 468Assert.Equal("/home/index/", result.path.ToUriComponent()); 469Assert.Equal("?showstatus=true&info=detailed", result.query.ToUriComponent()); 501Assert.Equal("/HoMe/InDex", result.path.ToUriComponent()); 502Assert.Equal(string.Empty, result.query.ToUriComponent()); 534Assert.Equal("/home/index", result.path.ToUriComponent()); 535Assert.Equal(string.Empty, result.query.ToUriComponent()); 572Assert.Equal("/Home/Index", result.path.ToUriComponent()); 573Assert.Equal("?ShowStatus=True&INFO=DETAILED", result.query.ToUriComponent()); 610Assert.Equal("/home/index", result.path.ToUriComponent()); 611Assert.Equal("?showstatus=true&info=detailed", result.query.ToUriComponent()); 640Assert.Equal("/Home/Index/", result.path.ToUriComponent()); 641Assert.Equal(string.Empty, result.query.ToUriComponent()); 690Assert.Equal("/hello/1234", result.path.ToUriComponent()); 691Assert.Equal(string.Empty, result.query.ToUriComponent()); 740Assert.Equal("/hello/1234", result.path.ToUriComponent()); 741Assert.Equal(string.Empty, result.query.ToUriComponent()); 777Assert.Equal("/hello/1234", result.path.ToUriComponent()); 778Assert.Equal(string.Empty, result.query.ToUriComponent()); 811Assert.Equal("/slug/Home/Store", result.path.ToUriComponent()); 812Assert.Equal(string.Empty, result.query.ToUriComponent()); 844Assert.Equal("/slug/Home/Store", result.path.ToUriComponent()); 845Assert.Equal(string.Empty, result.query.ToUriComponent()); 876Assert.Equal("/slug/Shopping", result.path.ToUriComponent()); 877Assert.Equal(string.Empty, result.query.ToUriComponent()); 910Assert.Equal("/slug/Home/Store", result.path.ToUriComponent()); 911Assert.Equal(string.Empty, result.query.ToUriComponent()); 940Assert.Equal("/Home/Index/4", result.path.ToUriComponent()); 941Assert.Equal(string.Empty, result.query.ToUriComponent()); 992Assert.Equal("/Home/Index/98", result.path.ToUriComponent()); 993Assert.Equal(string.Empty, result.query.ToUriComponent()); 1018Assert.Equal("/Home/Index", result.path.ToUriComponent()); 1019Assert.Equal(string.Empty, result.query.ToUriComponent()); 1070Assert.Equal("/Home/Index/14", result.path.ToUriComponent()); 1071Assert.Equal(string.Empty, result.query.ToUriComponent()); 1123Assert.Equal("/Home/Index/products", result.path.ToUriComponent()); 1124Assert.Equal(string.Empty, result.query.ToUriComponent()); 1146Assert.Equal("/Home/Index/products", result.path.ToUriComponent()); 1147Assert.Equal(string.Empty, result.query.ToUriComponent()); 1169Assert.Equal("/Home/Index", result.path.ToUriComponent()); 1170Assert.Equal(string.Empty, result.query.ToUriComponent()); 1194Assert.Equal("/Home/Index/products", result.path.ToUriComponent()); 1195Assert.Equal(string.Empty, result.query.ToUriComponent()); 1219Assert.Equal("/Home/Index", result.path.ToUriComponent()); 1220Assert.Equal(string.Empty, result.query.ToUriComponent()); 1242Assert.Equal("/Home/Index/products", result.path.ToUriComponent()); 1243Assert.Equal("?format=json", result.query.ToUriComponent()); 1266Assert.Equal("/Home/Index/.products", result.path.ToUriComponent()); 1267Assert.Equal(string.Empty, result.query.ToUriComponent()); 1288Assert.Equal("/Home/Index/", result.path.ToUriComponent()); 1289Assert.Equal(string.Empty, result.query.ToUriComponent()); 1311Assert.Equal("/Home/Index", result.path.ToUriComponent()); 1312Assert.Equal(string.Empty, result.query.ToUriComponent()); 1334Assert.Equal("/a/15/17", result.path.ToUriComponent()); 1335Assert.Equal(string.Empty, result.query.ToUriComponent()); 1357Assert.Equal("/a/15/17", result.path.ToUriComponent()); 1358Assert.Equal(string.Empty, result.query.ToUriComponent()); 1380Assert.Equal("/a", result.path.ToUriComponent()); 1381Assert.Equal(string.Empty, result.query.ToUriComponent()); 1484Assert.Equal("/Products/Edit/10", result.path.ToUriComponent()); 1485Assert.Equal(string.Empty, result.query.ToUriComponent()); 1512Assert.Equal("/Products/Edit/10", result.path.ToUriComponent()); 1513Assert.Equal(string.Empty, result.query.ToUriComponent());
DefaultLinkGeneratorTest.cs (24)
90Assert.Equal("/Home/Index", path); 106Assert.Equal("/Home/Index", path); 126Assert.Equal("http://example.com/Home/Index", path); 146Assert.Equal("http://example.com/Home/Index", uri); 165Assert.Equal("/Home/Index/", path); 191Assert.Equal("/test-controller/Index", path); 218Assert.Equal("/test-controller/index", path); 238Assert.Equal("/Home/Index/", path); 259Assert.Equal("http://example.com/Home/Index/", path); 283Assert.Equal("http://example.com/Home/Index/", uri); 304Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/In%3Fdex?query=some%3Fquery#Fragment?", path); 327Assert.Equal("/HOME/Test", link); 353Assert.Equal("/HOME/Test?c=HITHERE", link); 377Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/In%3Fdex?query=some%3Fquery#Fragment?", path); 400Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Home/In%3Fdex?query=some%3Fquery#Fragment?", path); 426Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Home/In%3Fdex?query=some%3Fquery#Fragment?", uri); 450Assert.Equal("/Home/Index", uri); 474Assert.Equal("http://example.com/Home/Index", uri); 497Assert.Equal("/Home/Index", uri); 524Assert.Equal("ftp://example.com:5000/Home/Index", uri); 548Assert.Equal("/Home/Index", uri); 649Assert.Equal(expectedPath, generatedPath); 688Assert.Equal(expectedPath, generatedPath); 726Assert.Equal(expectedPath, generatedPath);
DefaultLinkParserTest.cs (5)
37w => Assert.Equal("No endpoints found for address 0", w.Message)); 59w => Assert.Equal("Found the endpoints Test2 for address 0", w.Message), 60w => Assert.Equal("Path parsing failed for endpoints Test2 and URI path /", w.Message)); 83w => Assert.Equal("Found the endpoints Test1, Test2, Test3 for address 0", w.Message), 84w => Assert.Equal("Path parsing succeeded for endpoint Test2 and URI path /Home/Index/17", w.Message));
DefaultParameterPolicyFactoryTest.cs (5)
25Assert.Equal( 47Assert.Equal( 335Assert.Equal($"The constructor to use for activating the constraint type '{nameof(CustomParameterPolicyWithAmbiguousMultipleCtors)}' is ambiguous. " 357Assert.Equal("\\\\d{1,2}", constraint.Constraint.ToString()); 377Assert.Equal($"No service for type '{typeof(ITestService).FullName}' has been registered.", inner.Message);
EndpointNameAddressSchemeTest.cs (1)
173Assert.Equal(String.Join(Environment.NewLine, @"The following endpoints with a duplicate endpoint name were found.",
EndpointRoutingMiddlewareTest.cs (12)
55Assert.Equal("myapp", endpoint.DisplayName); 73Assert.Equal("Microsoft.AspNetCore.Routing.EndpointMatched", pair.Key); 88Assert.Equal(expectedMessage, write.State?.ToString()); 107Assert.Equal("Home", (string)routeValue); 130Assert.Equal("Home", (string)routeValue); 260Assert.Equal("Matched endpoint 'myapp' is a fallback endpoint.", write.Message); 294Assert.Equal($"A request body size limit could not be applied. The {nameof(IHttpMaxRequestBodySizeFeature)} for the server is read-only.", write.Message); 323Assert.Equal($"A request body size limit could not be applied. This server does not support the {nameof(IHttpMaxRequestBodySizeFeature)}.", write.Message); 351Assert.Equal($"The endpoint does not specify the {nameof(IRequestSizeLimitMetadata)}.", write.Message); 385Assert.Equal("The maximum request body size has been disabled.", write.Message); 390Assert.Equal($"The maximum request body size has been set to {expectedRequestSizeLimit}.", write.Message); 451Assert.Equal(message, log.State.ToString());
InlineRouteParameterParserTests.cs (129)
22Assert.Equal(parameterName, templatePart.Name); 34Assert.Equal("param", templatePart.Name); 46Assert.Equal("param", templatePart.Name); 59Assert.Equal("param", templatePart.Name); 72Assert.Equal("param", templatePart.Name); 84Assert.Equal("param", templatePart.Name); 88Assert.Equal("int", constraint.Constraint); 98Assert.Equal("param", templatePart.Name); 102Assert.Equal(@"test(\d+)", constraint.Constraint); 112Assert.Equal("param", templatePart.Name); 116Assert.Equal("int", constraint.Constraint); 126Assert.Equal("param", templatePart.Name); 131Assert.Equal("int", constraint.Constraint); 141Assert.Equal("param", templatePart.Name); 146Assert.Equal("int", constraint.Constraint); 156Assert.Equal("param", templatePart.Name); 160Assert.Equal(@"test(\d+)", constraint.Constraint); 170Assert.Equal("param", templatePart.Name); 176Assert.Equal(@"test(\d+)", constraint.Constraint); 186Assert.Equal("param", templatePart.Name); 189constraint => Assert.Equal(@"test(d+)", constraint.Constraint), 190constraint => Assert.Equal(@"test(w+)", constraint.Constraint)); 200Assert.Equal("param", templatePart.Name); 204constraint => Assert.Equal(@"test(d+)", constraint.Constraint), 206constraint => Assert.Equal(@"test(w+)", constraint.Constraint)); 216Assert.Equal("param", templatePart.Name); 219constraint => Assert.Equal(@"test(\d+)", constraint.Constraint), 220constraint => Assert.Equal(@"test(\w:+)", constraint.Constraint)); 230Assert.Equal("param", templatePart.Name); 235constraint => Assert.Equal(@"test(\d+)", constraint.Constraint), 236constraint => Assert.Equal(@"test(\w+)", constraint.Constraint)); 246Assert.Equal("param", templatePart.Name); 251constraint => Assert.Equal(@"test(\d+)", constraint.Constraint), 253constraint => Assert.Equal(@"test(\w+)", constraint.Constraint)); 266Assert.Equal("comparison-operator", templatePart.Name); 270Assert.Equal("length(6)", constraint.Constraint); 283Assert.Equal("p1", param1.Name); 288constraint => Assert.Equal("int", constraint.Constraint), 289constraint => Assert.Equal("test(3)", constraint.Constraint) 293Assert.Equal("p2", param2.Name); 298Assert.Equal("p3", param3.Name); 309Assert.Equal("world", templatePart.Name); 319Assert.Equal("param", templatePart.Name); 330Assert.Equal("param", templatePart.Name); 333Assert.Equal(@"test(\})", constraint.Constraint); 343Assert.Equal("param", templatePart.Name); 348Assert.Equal(@"test(\})", constraint.Constraint); 358Assert.Equal("param", templatePart.Name); 361Assert.Equal(@"test(\))", constraint.Constraint); 371Assert.Equal("param", templatePart.Name); 376Assert.Equal(@"test(\))", constraint.Constraint); 386Assert.Equal("param", templatePart.Name); 389Assert.Equal(@"test(:)", constraint.Constraint); 399Assert.Equal("param", templatePart.Name); 404Assert.Equal(@"test(:)", constraint.Constraint); 414Assert.Equal("param", templatePart.Name); 417Assert.Equal(@"test(a:b:c)", constraint.Constraint); 427Assert.Equal(":param", templatePart.Name); 432Assert.Equal("test", constraint.Constraint); 442Assert.Equal(":param", templatePart.Name); 448constraint => Assert.Equal("test", constraint.Constraint)); 458Assert.Equal(":param", templatePart.Name); 461constraint => Assert.Equal("test", constraint.Constraint), 472Assert.Equal("param", templatePart.Name); 475Assert.Equal(@"test(\w,\w)", constraint.Constraint); 485Assert.Equal("par,am", templatePart.Name); 488Assert.Equal(@"test(\w)", constraint.Constraint); 498Assert.Equal("param", templatePart.Name); 503Assert.Equal(@"test(\w,\w)", constraint.Constraint); 513Assert.Equal("param", templatePart.Name); 519Assert.Equal("int", constraint.Constraint); 529Assert.Equal("param", templatePart.Name); 533Assert.Equal("test(=)", constraint.Constraint); 543Assert.Equal("param", templatePart.Name); 554Assert.Equal("param", templatePart.Name); 558Assert.Equal("test(a==b)", constraint.Constraint); 568Assert.Equal("param", templatePart.Name); 572Assert.Equal("test(a==b)", constraint.Constraint); 582Assert.Equal("par", templatePart.Name); 593Assert.Equal("param", templatePart.Name); 604Assert.Equal("par", templatePart.Name); 615Assert.Equal("par", templatePart.Name); 626Assert.Equal("param", templatePart.Name); 630Assert.Equal("test(=)", constraint.Constraint); 640Assert.Equal("param", templatePart.Name); 643Assert.Equal(@"test(\{)", constraint.Constraint); 653Assert.Equal("par{am", templatePart.Name); 656Assert.Equal(@"test(\sd)", constraint.Constraint); 666Assert.Equal("param", templatePart.Name); 671Assert.Equal(@"test(\{)", constraint.Constraint); 681Assert.Equal("par(am", templatePart.Name); 684Assert.Equal(@"test(\()", constraint.Constraint); 694Assert.Equal("param", templatePart.Name); 697Assert.Equal(@"test(\()", constraint.Constraint); 707Assert.Equal("param", templatePart.Name); 710Assert.Equal("test(#$%", constraint.Constraint); 720Assert.Equal("param", templatePart.Name); 723constraint => Assert.Equal(@"test(#", constraint.Constraint), 724constraint => Assert.Equal(@"test1", constraint.Constraint)); 734Assert.Equal("param", templatePart.Name); 738constraint => Assert.Equal(@"test(abc:somevalue)", constraint.Constraint), 739constraint => Assert.Equal(@"name(test1", constraint.Constraint), 740constraint => Assert.Equal(@"differentname", constraint.Constraint)); 750Assert.Equal("param", templatePart.Name); 754Assert.Equal(@"test(constraintvalue", constraint.Constraint); 764Assert.Equal("param", templatePart.Name); 769Assert.Equal(@"test(\()", constraint.Constraint); 779Assert.Equal("param", templatePart.Name); 784Assert.Equal(@"test(\?)", constraint.Constraint); 794Assert.Equal("param", templatePart.Name); 799Assert.Equal(@"test(\?)", constraint.Constraint); 809Assert.Equal("param", templatePart.Name); 814Assert.Equal(@"test(\?)", constraint.Constraint); 824Assert.Equal("param", templatePart.Name); 829Assert.Equal(@"test(\?)", constraint.Constraint); 839Assert.Equal("par?am", templatePart.Name); 844Assert.Equal(@"test(\?)", constraint.Constraint); 854Assert.Equal("param", templatePart.Name); 859constraint => Assert.Equal(@"test(#)", constraint.Constraint), 860constraint => Assert.Equal(@"$)", constraint.Constraint)); 870Assert.Equal("param", templatePart.Name); 875Assert.Equal(@"test(#:)$)", constraint.Constraint); 885Assert.Equal("foo", templatePart.Name); 890Assert.Equal(@"regex(\\(\\(\\(\\()", constraint.Constraint); 900Assert.Equal("p1", templatePart.Name); 905Assert.Equal(@"regex(^\d{{3}}-\d{{3}}-\d{{4}}$)", constraint.Constraint); 915Assert.Equal("p1", templatePart.Name); 920Assert.Equal(@"regex(^\d{{3}}-\d{{3}}-\d{{4}}$)", constraint.Constraint); 939Assert.Equal(expectedParameterName, templatePart.Name);
Internal\DfaGraphWriterTest.cs (3)
33Assert.Equal(String.Join(Environment.NewLine, @"digraph DFA {", 56Assert.Equal(String.Join(Environment.NewLine, @"digraph DFA {", 80Assert.Equal(String.Join(Environment.NewLine, @"digraph DFA {",
LinkGeneratorEndpointNameExtensionsTest.cs (4)
64Assert.Equal("/Foo/Bar%3Fencodeme%3F/some%23-other-endpoint/In%3Fdex/?query=some%3Fquery#Fragment?", path); 90Assert.Equal("/Foo/Bar%3Fencodeme%3F/some%23-other-endpoint/In%3Fdex/?query=some%3Fquery#Fragment?", path); 115Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/some%23-other-endpoint/In%3Fdex/?query=some%3Fquery#Fragment?", path); 143Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/some%23-other-endpoint/In%3Fdex/?query=some%3Fquery#Fragment?", uri);
LinkGeneratorIntegrationTest.cs (23)
230Assert.Equal("/api/Pets/17", path); 251Assert.Equal("/", path); 272Assert.Equal("/Admin/Users/Add", path); 293Assert.Equal("/api/Store/17", path); 314Assert.Equal("/Pages", path); 335Assert.Equal("/Admin/Pages", path); 356Assert.Equal("/Home/Fake/17", path); 381Assert.Equal("/api/Pets/17", path); 402Assert.Equal("/Pets/GetById", path); 423Assert.Equal("/Pets/GetById", path); 444Assert.Equal("/Home/Index/17", path); 465Assert.Equal("/", path); 486Assert.Equal("/", path); 507Assert.Equal("/Home/Index11", path); 528Assert.Equal("/Admin/Home/Index11", path); 549Assert.Equal("/api/Store", path); 570Assert.Equal("/api/Store/17", path); 591Assert.Equal("/api/Foo/17", path); 612Assert.Equal("/Pages/Help/17", path); 633Assert.Equal("/Pages/Help", path); 654Assert.Equal("/Pages/Help", path); 675Assert.Equal("/Pets/Update?page=%2FPages%2FHelp2", path); 696Assert.Equal("/Admin/Pages", path);
LinkGeneratorRouteValuesAddressExtensionsTest.cs (6)
45Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 72Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 102Assert.Equal("/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 131Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", path); 163Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", uri); 195Assert.Equal("http://example.com/Foo/Bar%3Fencodeme%3F/Home/Index/?query=some%3Fquery#Fragment?", uri);
Matching\AcceptsMatcherPolicyTest.cs (1)
245Assert.Equal(AcceptsMatcherPolicy.Http415EndpointDisplayName, Assert.Single(e.Endpoints).DisplayName);
Matching\CandidateSetTest.cs (1)
324Assert.Equal(@"Using ExpandEndpoint requires that the replaced endpoint have a unique priority. The following endpoints were found with the same priority:" +
Matching\ContentEncodingNegotiationMatcherPolicyTest.cs (16)
361e => Assert.Equal("gzip", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue), 362e => Assert.Equal("br", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue), 365Assert.Equal("identity", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 367Assert.Equal("406 HTTP Unsupported Encoding", endpoint.DisplayName); 371Assert.Equal("", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 373Assert.Equal("406 HTTP Unsupported Encoding", endpoint.DisplayName); 396Assert.Equal("gzip", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 398e => Assert.Equal("Endpoint -> gzip: 1", e.DisplayName), 399e => Assert.Equal("Identity", e.DisplayName)); 403Assert.Equal("br", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 405e => Assert.Equal("Endpoint -> br: 1", e.DisplayName), 406e => Assert.Equal("Identity", e.DisplayName)); 410Assert.Equal("identity", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 412Assert.Equal("Identity", endpoint.DisplayName); 416Assert.Equal("", Assert.IsType<NegotiationMatcherPolicy<ContentEncodingMetadata>.NegotiationEdgeKey>(e.State).NegotiationValue); 418Assert.Equal("Identity", endpoint.DisplayName);
Matching\DataSourceDependentMatcherTest.cs (3)
165Assert.Equal(expectedError, exception.Message); 203Assert.Equal(expectedError, exception.Message); 233Assert.Equal(expectedError, exception.InnerException.Message);
Matching\DfaMatcherTest.cs (22)
161Assert.Equal("action", kvp.Key); 166Assert.Equal("controller", kvp.Key); 226Assert.Equal("action", kvp.Key); 231Assert.Equal("controller", kvp.Key); 236Assert.Equal("id", kvp.Key); 344Assert.Equal("action", kvp.Key); 349Assert.Equal("controller", kvp.Key); 604Assert.Equal("action", kvp.Key); 609Assert.Equal("controller", kvp.Key); 804Assert.Equal("No candidates found for the request path '/'", log.Message); 834Assert.Equal("1 candidate(s) found for the request path '/One'", log.Message); 839Assert.Equal("Endpoint '/{p:int}' with route pattern '/{p:int}' was rejected by constraint 'p':'Microsoft.AspNetCore.Routing.Constraints.IntRouteConstraint' with value 'One' for the request path '/One'", log.Message); 844Assert.Equal("Endpoint '/{p:int}' with route pattern '/{p:int}' is not valid for the request path '/One'", log.Message); 874Assert.Equal("1 candidate(s) found for the request path '/One'", log.Message); 879Assert.Equal("Endpoint '/x-{id}-y' with route pattern '/x-{id}-y' was rejected by complex segment 'x-{id}-y' for the request path '/One'", log.Message); 884Assert.Equal("Endpoint '/x-{id}-y' with route pattern '/x-{id}-y' is not valid for the request path '/One'", log.Message); 916Assert.Equal("3 candidate(s) found for the request path '/One'", log.Message); 921Assert.Equal("Endpoint '/{one}' with route pattern '/{one}' is valid for the request path '/One'", log.Message); 926Assert.Equal("Endpoint '/{p:int}' with route pattern '/{p:int}' was rejected by constraint 'p':'Microsoft.AspNetCore.Routing.Constraints.IntRouteConstraint' with value 'One' for the request path '/One'", log.Message); 931Assert.Equal("Endpoint '/{p:int}' with route pattern '/{p:int}' is not valid for the request path '/One'", log.Message); 936Assert.Equal("Endpoint '/x-{id}-y' with route pattern '/x-{id}-y' was rejected by complex segment 'x-{id}-y' for the request path '/One'", log.Message); 941Assert.Equal("Endpoint '/x-{id}-y' with route pattern '/x-{id}-y' is not valid for the request path '/One'", log.Message);
Matching\HostMatcherPolicyTest.cs (7)
223Assert.Equal("*:*", e.State.ToString()); 228Assert.Equal("*:5000", e.State.ToString()); 233Assert.Equal("*:5001", e.State.ToString()); 238Assert.Equal("*.contoso.com:*", e.State.ToString()); 243Assert.Equal("*.sub.contoso.com:*", e.State.ToString()); 248Assert.Equal("www.contoso.com:*", e.State.ToString()); 253Assert.Equal("www.contoso.com:5000", e.State.ToString());
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (3)
204Assert.Equal("DELETE, GET, PUT", httpContext.Response.Headers["Allow"]); 314Assert.Equal("DELETE, GET, PUT", httpContext.Response.Headers["Allow"]); 319Assert.Equal("DELETE, GET, PUT", httpContext.Response.Headers["Allow"]);
Matching\HttpMethodMatcherPolicyTest.cs (2)
310Assert.Equal(Http405EndpointDisplayName, e.Endpoints.Single().DisplayName); 354Assert.Equal(Http405EndpointDisplayName, e.Endpoints.Single().DisplayName);
MetadataTest.cs (7)
22Assert.Equal("DataTokens: key1=1,key2=2", value); 35Assert.Equal("EndpointName: Name", value); 48Assert.Equal("Hosts: Host1:*,Host2:80", value); 61Assert.Equal("HttpMethods: GET,POST, Cors: True", value); 74Assert.Equal("RouteName: RouteName", value); 87Assert.Equal("SuppressLinkGeneration: True", value); 100Assert.Equal("SuppressMatching: True", value);
Patterns\InlineRouteParameterParserTest.cs (145)
17Assert.Equal(parameterName, templatePart.Name); 29Assert.Equal("param", templatePart.Name); 41Assert.Equal("param", templatePart.Name); 53Assert.Equal("param", templatePart.Name); 65Assert.Equal("param", templatePart.Name); 77Assert.Equal("param", templatePart.Name); 81Assert.Equal("int", constraint.Content); 91Assert.Equal("param", templatePart.Name); 95Assert.Equal(@"test(\d+)", constraint.Content); 105Assert.Equal("param", templatePart.Name); 109Assert.Equal("int", constraint.Content); 119Assert.Equal("param", templatePart.Name); 124Assert.Equal("int", constraint.Content); 134Assert.Equal("param", templatePart.Name); 139Assert.Equal("int", constraint.Content); 149Assert.Equal("param", templatePart.Name); 153Assert.Equal(@"test(\d+)", constraint.Content); 163Assert.Equal("param", templatePart.Name); 169Assert.Equal(@"test(\d+)", constraint.Content); 179Assert.Equal("param", templatePart.Name); 182constraint => Assert.Equal(@"test(d+)", constraint.Content), 183constraint => Assert.Equal(@"test(w+)", constraint.Content)); 193Assert.Equal("param", templatePart.Name); 197constraint => Assert.Equal(@"test(d+)", constraint.Content), 198constraint => Assert.Equal(@"test(w+)", constraint.Content)); 208Assert.Equal("param", templatePart.Name); 211constraint => Assert.Equal(@"test(\d+)", constraint.Content), 212constraint => Assert.Equal(@"test(\w:+)", constraint.Content)); 222Assert.Equal("param", templatePart.Name); 227constraint => Assert.Equal(@"test(\d+)", constraint.Content), 228constraint => Assert.Equal(@"test(\w+)", constraint.Content)); 238Assert.Equal("param", templatePart.Name); 244constraint => Assert.Equal(@"test(\d+)", constraint.Content), 245constraint => Assert.Equal(@"test(\w+)", constraint.Content)); 258Assert.Equal("comparison-operator", templatePart.Name); 262Assert.Equal("length(6)", constraint.Content); 275Assert.Equal("p1", param1.Name); 280constraint => Assert.Equal("int", constraint.Content), 281constraint => Assert.Equal("test(3)", constraint.Content) 285Assert.Equal("p2", param2.Name); 290Assert.Equal("p3", param3.Name); 301Assert.Equal("world", templatePart.Name); 311Assert.Equal("param", templatePart.Name); 322Assert.Equal("param", templatePart.Name); 325Assert.Equal(@"test(\})", constraint.Content); 335Assert.Equal("param", templatePart.Name); 340Assert.Equal(@"test(\})", constraint.Content); 350Assert.Equal("param", templatePart.Name); 353Assert.Equal(@"test(\))", constraint.Content); 363Assert.Equal("param", templatePart.Name); 368Assert.Equal(@"test(\))", constraint.Content); 378Assert.Equal("param", templatePart.Name); 381Assert.Equal(@"test(:)", constraint.Content); 391Assert.Equal("param", templatePart.Name); 396Assert.Equal(@"test(:)", constraint.Content); 406Assert.Equal("param", templatePart.Name); 409Assert.Equal(@"test(a:b:c)", constraint.Content); 419Assert.Equal(":param", templatePart.Name); 424Assert.Equal("test", constraint.Content); 434Assert.Equal(":param", templatePart.Name); 440constraint => Assert.Equal("test", constraint.Content)); 450Assert.Equal(":param", templatePart.Name); 454constraint => Assert.Equal("test", constraint.Content)); 464Assert.Equal("param", templatePart.Name); 467Assert.Equal(@"test(\w,\w)", constraint.Content); 477Assert.Equal("par,am", templatePart.Name); 480Assert.Equal(@"test(\w)", constraint.Content); 490Assert.Equal("param", templatePart.Name); 495Assert.Equal(@"test(\w,\w)", constraint.Content); 505Assert.Equal("param", templatePart.Name); 511Assert.Equal("int", constraint.Content); 521Assert.Equal("param", templatePart.Name); 525Assert.Equal("test(=)", constraint.Content); 535Assert.Equal("param", templatePart.Name); 546Assert.Equal("param", templatePart.Name); 550Assert.Equal("test(a==b)", constraint.Content); 560Assert.Equal("param", templatePart.Name); 564Assert.Equal("test(a==b)", constraint.Content); 574Assert.Equal("par", templatePart.Name); 585Assert.Equal("param", templatePart.Name); 596Assert.Equal("par", templatePart.Name); 607Assert.Equal("par", templatePart.Name); 618Assert.Equal("param", templatePart.Name); 622Assert.Equal("test(=)", constraint.Content); 632Assert.Equal("param", templatePart.Name); 635Assert.Equal(@"test(\{)", constraint.Content); 645Assert.Equal("par{am", templatePart.Name); 648Assert.Equal(@"test(\sd)", constraint.Content); 658Assert.Equal("param", templatePart.Name); 663Assert.Equal(@"test(\{)", constraint.Content); 673Assert.Equal("par(am", templatePart.Name); 676Assert.Equal(@"test(\()", constraint.Content); 686Assert.Equal("param", templatePart.Name); 689Assert.Equal(@"test(\()", constraint.Content); 699Assert.Equal("param", templatePart.Name); 702Assert.Equal("test(#$%", constraint.Content); 712Assert.Equal("param", templatePart.Name); 715constraint => Assert.Equal(@"test(#", constraint.Content), 716constraint => Assert.Equal(@"test1", constraint.Content)); 726Assert.Equal("param", templatePart.Name); 730constraint => Assert.Equal(@"test(abc:somevalue)", constraint.Content), 731constraint => Assert.Equal(@"name(test1", constraint.Content), 732constraint => Assert.Equal(@"differentname", constraint.Content)); 742Assert.Equal("param", templatePart.Name); 746Assert.Equal(@"test(constraintvalue", constraint.Content); 756Assert.Equal("param", templatePart.Name); 761Assert.Equal(@"test(\()", constraint.Content); 771Assert.Equal("param", templatePart.Name); 776Assert.Equal(@"test(\?)", constraint.Content); 786Assert.Equal("param", templatePart.Name); 791Assert.Equal(@"test(\?)", constraint.Content); 801Assert.Equal("param", templatePart.Name); 806Assert.Equal(@"test(\?)", constraint.Content); 816Assert.Equal("param", templatePart.Name); 821Assert.Equal(@"test(\?)", constraint.Content); 831Assert.Equal("par?am", templatePart.Name); 836Assert.Equal(@"test(\?)", constraint.Content); 846Assert.Equal("param", templatePart.Name); 851constraint => Assert.Equal(@"test(#)", constraint.Content), 852constraint => Assert.Equal(@"$)", constraint.Content)); 862Assert.Equal("param", templatePart.Name); 867Assert.Equal(@"test(#:)$)", constraint.Content); 877Assert.Equal("foo", templatePart.Name); 882Assert.Equal(@"regex(\\(\\(\\(\\()", constraint.Content); 892Assert.Equal("p1", templatePart.Name); 897Assert.Equal(@"regex(^\d{{3}}-\d{{3}}-\d{{4}}$)", constraint.Content); 907Assert.Equal("p1", templatePart.Name); 912Assert.Equal(@"regex(^\d{{3}}-\d{{3}}-\d{{4}}$)", constraint.Content); 932Assert.Equal(expectedParameterName, templatePart.Name); 944Assert.Equal("path", parameterPart.Name); 957Assert.Equal("path", parameterPart.Name); 960Assert.Equal("a/b/c", parameterPart.Default.ToString()); 975Assert.Equal("path", parameterPart.Name); 979Assert.Equal(constraintContent, constraintReference.Content); 993Assert.Equal("path", parameterPart.Name); 997Assert.Equal(constraintContent, constraintReference.Content); 999Assert.Equal("a/b/c", parameterPart.Default.ToString()); 1010Assert.Equal("path", parameterPart.Name); 1022Assert.Equal("path", parameterPart.Name); 1025Assert.Equal("a/b/c", parameterPart.Default.ToString()); 1039Assert.Equal("path", parameterPart.Name); 1043Assert.Equal(constraintContent, constraintReference.Content); 1056Assert.Equal("path", parameterPart.Name); 1060Assert.Equal(constraintContent, constraintReference.Content); 1062Assert.Equal("a/b/c", parameterPart.Default.ToString());
Patterns\RoutePatternFactoryTest.cs (60)
36kvp => { Assert.Equal("a", kvp.Key); Assert.Equal("15", kvp.Value); }, 37kvp => { Assert.Equal("b", kvp.Key); Assert.Equal(17, kvp.Value); }, 38kvp => { Assert.Equal("c", kvp.Key); Assert.Equal("19", kvp.Value); }); 61kvp => { Assert.Equal("d", kvp.Key); Assert.Equal("15", kvp.Value); }, 62kvp => { Assert.Equal("e", kvp.Key); Assert.Equal(17, kvp.Value); }); 83Assert.Equal( 110kvp => { Assert.Equal("a", kvp.Key); Assert.Equal("13", kvp.Value); }); 131Assert.Equal( 157c => Assert.Equal("int", c.Content)); 166Assert.Equal("a", kvp.Key); 170c => Assert.Equal("int", c.Content)); 174Assert.Equal("b", kvp.Key); 203Assert.Equal("d", kvp.Key); 210Assert.Equal("e", kvp.Key); 239Assert.Equal("d", kvp.Key); 242c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 243c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 244c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString())); 270Assert.Equal("a", kvp.Key); 273c => Assert.Equal("int", c.Content)); 277Assert.Equal("b", kvp.Key); 280c => Assert.Equal("^(fizz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString())); 284Assert.Equal("c", kvp.Key); 287c => Assert.Equal("foo", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 288c => Assert.Equal("bar", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 289c => Assert.Equal("^(baz)$", Assert.IsType<RegexRouteConstraint>(c.ParameterPolicy).Constraint.ToString()), 290c => Assert.Equal("int", c.Content)); 337Assert.Equal("d", kvp.Key); 344Assert.Equal("e", kvp.Key); 373Assert.Equal("d", kvp.Key); 375Assert.Equal("^(foo)$", regex.Constraint.ToString()); 397Assert.Equal( 484Assert.Equal(paramPartB.Name, actual.Parameters[0].Name); 488Assert.Equal(paramPartC.Name, actual.Parameters[1].Name); 492Assert.Equal(paramPartD.Name, actual.Parameters[2].Name); 524Assert.Equal(paramPartB.Name, actual.Parameters[0].Name); 528Assert.Equal(paramPartC.Name, actual.Parameters[1].Name); 532Assert.Equal(paramPartD.Name, actual.Parameters[2].Name); 553kvp => { Assert.Equal("action", kvp.Key); Assert.Equal("Index", kvp.Value); }, 554kvp => { Assert.Equal("area", kvp.Key); Assert.Equal("Admin", kvp.Value); }, 555kvp => { Assert.Equal("controller", kvp.Key); Assert.Equal("Store", kvp.Value); }); 573kvp => { Assert.Equal("action", kvp.Key); Assert.Equal("Index", kvp.Value); }, 574kvp => { Assert.Equal("area", kvp.Key); Assert.Null(kvp.Value); }, 575kvp => { Assert.Equal("controller", kvp.Key); Assert.Equal("Store", kvp.Value); }); 593kvp => { Assert.Equal("action", kvp.Key); Assert.Equal("Index", kvp.Value); }, 594kvp => { Assert.Equal("area", kvp.Key); Assert.Equal("", kvp.Value); }, 595kvp => { Assert.Equal("controller", kvp.Key); Assert.Equal("Store", kvp.Value); }); 614Assert.Equal( 742Assert.Equal(literal, part.Content); 746Assert.Equal("/a/b/", combined.RawText); 759Assert.Equal("/{id}/{ID}", ex.Pattern); 760Assert.Equal("The route parameter name 'ID' appears more than one time in the route template.", ex.Message); 772Assert.Equal("/a/{x=foo}/b", combined.RawText); 775Assert.Equal("x", key); 789Assert.Equal("/a/b", combined.RawText); 792Assert.Equal("x", key); 806Assert.Equal("MapGroup cannot build a pattern for '/a/b' because the 'RoutePattern.ParameterPolicies' dictionary key 'X' has multiple values.", ex.Message); 818Assert.Equal("MapGroup cannot build a pattern for '/a/{x=foo}/b' because the 'RoutePattern.Defaults' dictionary key 'X' has multiple values.", ex.Message); 831Assert.Equal("MapGroup cannot build a pattern for '/a/b' because the 'RoutePattern.RequiredValues' dictionary key 'X' has multiple values.", ex.Message); 843Assert.Equal("MapGroup cannot build a pattern for '/a/{x:string}/b' because the 'RoutePattern.ParameterPolicies' dictionary key 'X' has multiple values.", ex.Message);
Patterns\RoutePatternParserTest.cs (1)
600Assert.Equal(routePattern, pattern.RawText);
RouteBuilderTest.cs (1)
45Assert.Equal(
RouteCollectionTest.cs (12)
52Assert.Equal(expectedUrl, pathData.VirtualPath); 80Assert.Equal(lowercaseUrl, pathData.VirtualPath); 118Assert.Equal(expectedUrl, pathData.VirtualPath); 150Assert.Equal(virtualPath, pathData.VirtualPath); 251Assert.Equal(expectedUrl, pathData.VirtualPath); 253Assert.Equal(virtualPathContext.RouteName, namedRouter.Name); 285Assert.Equal("/route1", pathData.VirtualPath); 287Assert.Equal("Route1", namedRouter.Name); 304Assert.Equal( 326Assert.Equal("The supplied route name 'Ambiguous' is ambiguous and matched more than one route.", ex.Message); 393Assert.Equal(expectedUrl, pathData.VirtualPath); 448Assert.Equal(expectedUrl, pathData.VirtualPath);
RouteConstraintBuilderTest.cs (6)
27Assert.Equal("controller", result.First().Key); 48Assert.Equal("controller", kvp.Key); 67Assert.Equal("controller", kvp.Key); 111Assert.Equal("id", result.First().Key); 124Assert.Equal("id", result.First().Key); 139Assert.Equal("name", result.First().Key);
RouteEndpointBuilderTest.cs (5)
24Assert.Equal("routePattern", ex.ParamName); 41Assert.Equal("Display name!", endpoint.DisplayName); 44Assert.Equal("/", endpoint.RoutePattern.RawText); 63Assert.Equal("/", endpoint.RoutePattern.RawText); 68Assert.Equal("Test", metadata.Route);
RouteOptionsTests.cs (1)
25Assert.Equal("TestRouteConstraint", accessor.Value.ConstraintMap["foo"].Name);
RouterMiddlewareTest.cs (1)
93Assert.Equal(expectedMessage, write.State?.ToString());
RouteTest.cs (42)
42Assert.Equal(expected, exception.Message); 48Assert.Equal(expected, exception.InnerException.Message); 479Assert.Equal("controller", value.Key); 480Assert.Equal("Home", Assert.IsType<string>(value.Value)); 610Assert.Equal("/Home", pathData.VirtualPath); 642Assert.Equal("/Home/Index?name=name%20with%20%25special%20%23characters", pathData.VirtualPath); 675Assert.Equal(expected, pathData.VirtualPath); 693Assert.Equal("/Home/Index?color=red&color=green&color=blue", pathData.VirtualPath); 711Assert.Equal("/Home/Index?items=10&items=20&items=30", pathData.VirtualPath); 729Assert.Equal("/Home/Index", pathData.VirtualPath); 747Assert.Equal("/Home/Index?page=1&color=red&color=green&color=blue&message=textfortest", pathData.VirtualPath); 783Assert.Equal(path, pathData.VirtualPath); 824Assert.Equal(path, pathData.VirtualPath); 846Assert.Equal("/Home", pathData.VirtualPath); 862Assert.Equal("/Home/Index", pathData.VirtualPath); 903Assert.Equal("/hello/1234", pathData.VirtualPath); 944Assert.Equal("/hello/1234", pathData.VirtualPath); 978Assert.Equal("/hello/1234", pathData.VirtualPath); 1009Assert.Equal("/slug/Home/Store", pathData.VirtualPath); 1040Assert.Equal("/slug/Home/Store", pathData.VirtualPath); 1070Assert.Equal("/slug/Shopping", pathData.VirtualPath); 1101Assert.Equal("/slug/Home/Store", pathData.VirtualPath); 1120Assert.Equal("/Home/Index/4", pathData.VirtualPath); 1152Assert.Equal("/Home/Index/98", pathData.VirtualPath); 1169Assert.Equal("/Home/Index", pathData.VirtualPath); 1201Assert.Equal("/Home/Index/14", pathData.VirtualPath); 1224Assert.Equal("/Home/Index/products", pathData.VirtualPath); 1246Assert.Equal("/Home/Index/products.xml", pathData.VirtualPath); 1268Assert.Equal("/Home/Index/products", pathData.VirtualPath); 1290Assert.Equal("/Home/Index/products.xml", pathData.VirtualPath); 1312Assert.Equal("/Home/Index/products", pathData.VirtualPath); 1334Assert.Equal("/Home/Index/products?format=json", pathData.VirtualPath); 1356Assert.Equal("/Home/Index/.products", pathData.VirtualPath); 1378Assert.Equal("/Home/Index/", pathData.VirtualPath); 1400Assert.Equal("/Home/Index", pathData.VirtualPath); 1424Assert.Equal("/a/15/17", pathData.VirtualPath); 1448Assert.Equal("/a/15/17", pathData.VirtualPath); 1472Assert.Equal("/a/15/17", pathData.VirtualPath); 1496Assert.Equal("/a", pathData.VirtualPath); 1623Assert.Equal(expectedMessage, exception.InnerException.Message); 1698Assert.Equal("RouteName", name); 1716Assert.Equal("RouteName", name);
RoutingMetricsTests.cs (7)
44Assert.Equal(RoutingMetrics.MeterName, meter.Name); 78Assert.Equal(RoutingMetrics.MeterName, meter.Name); 105Assert.Equal(RoutingMetrics.MeterName, meter.Name); 129Assert.Equal(RoutingMetrics.MeterName, meter.Name); 139Assert.Equal("failure", (string)measurement.Tags["aspnetcore.routing.match_status"]); 145Assert.Equal("success", (string)measurement.Tags["aspnetcore.routing.match_status"]); 146Assert.Equal(route, (string)measurement.Tags["http.route"]);
RoutingServiceCollectionExtensionsTests.cs (3)
25Assert.Equal("services", (ex as ArgumentNullException).ParamName); 39Assert.Equal("configureOptions", (ex as ArgumentNullException).ParamName); 51Assert.Equal("services", (ex as ArgumentNullException).ParamName);
Template\RoutePrecedenceTestsBase.cs (2)
108Assert.Equal("Route exceeds the maximum number of allowed segments of 28 and is unable to be processed.", ex.Message); 121Assert.Equal("Route exceeds the maximum number of allowed segments of 28 and is unable to be processed.", ex.Message);
Template\TemplateBinderTests.cs (13)
140Assert.Equal(expected, boundTemplate); 289Assert.Equal(expected, boundTemplate); 726Assert.Equal("Test", routeValue?.ToString()); 728Assert.Equal("Index", routeValue?.ToString()); 1171Assert.Equal(expectedParts.Path, actualParts.Path); 1185Assert.Equal(kvp.Value, value); 1253Assert.Equal(expected, boundTemplate); 1282Assert.Equal(expected, boundTemplate); 1312Assert.Equal(expected, boundTemplate); 1342Assert.Equal(expected, boundTemplate); 1372Assert.Equal(expected, boundTemplate); 1406Assert.Equal(expected, boundTemplate); 1436Assert.Equal(expected, boundTemplate);
Template\TemplateParserTests.cs (1)
767Assert.Equal(routeTemplate, pattern.TemplateText);
Template\TemplateSegmentTest.cs (5)
16Assert.Equal(nameof(other), actual.ParamName); 38Assert.Equal(paramPartC.Name, ((RoutePatternParameterPart)routePatternPathSegment.Parts[0]).Name); 40Assert.Equal(literalPartA.Content, ((RoutePatternLiteralPart)routePatternPathSegment.Parts[1]).Content); 42Assert.Equal(separatorPartE.Content, ((RoutePatternSeparatorPart)routePatternPathSegment.Parts[2]).Content); 44Assert.Equal(paramPartB.Name, ((RoutePatternParameterPart)routePatternPathSegment.Parts[3]).Name);
TemplateParserDefaultValuesTests.cs (6)
68Assert.Equal(message, ex.Message); 74Assert.Equal(message, ex.InnerException.Message); 93Assert.Equal(message, ex.Message); 97Assert.Equal(message, ex.InnerException.Message); 119Assert.Equal(message, ex.Message); 123Assert.Equal(message, ex.InnerException.Message);
Tree\LinkGenerationDecisionTreeTest.cs (1)
738Assert.Equal(expected, flattenedTree);
Tree\TreeRouteBuilderTest.cs (11)
90Assert.Equal("a", firstSegment.Key); 97Assert.Equal("c", thirdSegment.Key); 122Assert.Equal("a", firstSegment.Key); 129Assert.Equal("c", thirdSegment.Key); 137Assert.Equal("e", fifthSegment.Key); 166Assert.Equal("a", firstSegment.Key); 173Assert.Equal("c", thirdSegment.Key); 198Assert.Equal("a", firstSegment.Key); 205Assert.Equal("c", thirdSegment.Key); 230Assert.Equal("a", firstSegment.Key); 237Assert.Equal("c", thirdSegment.Key);
Tree\TreeRouterTest.cs (32)
819Assert.Equal(expectedPath, result.VirtualPath); 842Assert.Equal("/template", result.VirtualPath); 874Assert.Equal(expectedPath, result.VirtualPath); 906Assert.Equal(expectedPath, result.VirtualPath); 941Assert.Equal("/template/5", result.VirtualPath); 987Assert.Equal(expectedPath, result.VirtualPath); 1024Assert.Equal("/template/5", result.VirtualPath); 1054Assert.Equal("/template/5", result.VirtualPath); 1084Assert.Equal("/first/5", result.VirtualPath); 1106Assert.Equal("/a/b/3/d", result.VirtualPath); 1142Assert.Equal("/named", result.VirtualPath); 1228Assert.Equal("/template/5", result.VirtualPath); 1248Assert.Equal("/api/Store", pathData.VirtualPath); 1268Assert.Equal("/api/Store", pathData.VirtualPath); 1305Assert.Equal("/api/Store", pathData.VirtualPath); 1325Assert.Equal("/Customers/SeparatePageModels", pathData.VirtualPath); 1345Assert.Equal("/api/Store/Index", pathData.VirtualPath); 1370Assert.Equal("/api/AwesomeCo/dosomething/Store/Index", pathData.VirtualPath); 1390Assert.Equal("/api/Store", pathData.VirtualPath); 1411Assert.Equal("/api/Store/Index/5", pathData.VirtualPath); 1449Assert.Equal("/api/Store", pathData.VirtualPath); 1469Assert.Equal("/api/Store?id=5", pathData.VirtualPath); 1491Assert.Equal("/api2/Blog", pathData.VirtualPath); 1516Assert.Equal("/Help/Store", pathData.VirtualPath); 1541Assert.Equal("/Help/Store", pathData.VirtualPath); 1568Assert.Equal("/Help/Store", pathData.VirtualPath); 1595Assert.Equal("/Store", pathData.VirtualPath); 1689Assert.Equal(expected, pathData.VirtualPath); 1912Assert.Equal("/Help/Store", pathData.VirtualPath); 1934Assert.Equal("/Help/Store", pathData.VirtualPath); 1956Assert.Equal("/Help/Store", pathData.VirtualPath); 1978Assert.Equal("/Help/Store", pathData.VirtualPath);
UriBuildingContextTest.cs (4)
23Assert.Equal(expected, uriBuilldingContext.ToString()); 39Assert.Equal(expected, uriBuilldingContext.ToString()); 65Assert.Equal(expected, uriBuilldingContext.ToString()); 96Assert.Equal(expected, uriBuilldingContext.ToPathString().Value);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (315)
AuthenticationTests.cs (1)
367Assert.Equal(authType.ToString(), response.Headers.WwwAuthenticate.First().Scheme);
DelegateTests.cs (6)
62Assert.Equal(_expectedResponseString, responseString); 95Assert.Equal(_expectedResponseString, responseString); 128Assert.Equal(_expectedResponseString, responseString); 214Assert.Equal(_expectedResponseString, responseString); 244Assert.Equal(_expectedResponseString, responseString); 263Assert.Equal(_expectedResponseString, responseString);
Http2Tests.cs (34)
53Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 94Assert.Equal("411", decodedHeaders[InternalHeaderNames.Status]); 144Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 204Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 209Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 236Assert.Equal("chunked", httpContext.Request.Headers.TransferEncoding); 268Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 273Assert.Equal("Hello World", Encoding.UTF8.GetString(dataFrame.Payload.Span)); 303Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 341Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 352Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 388Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 427Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 467Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 484Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 503Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 534Assert.Equal("500", decodedHeaders[InternalHeaderNames.Status]); 568Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 600Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 616Assert.Equal("HTTP/1.1", httpContext.Request.Protocol); 627Assert.Equal("Hello World", response); 638Assert.Equal("HTTP/2", httpContext.Request.Protocol); 649Assert.Equal("Hello World", response); 661Assert.Equal("HTTP/2", httpContext.Request.Protocol); 703Assert.Equal("HTTP/2", httpContext.Request.Protocol); 730Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 750Assert.Equal("HTTP/2", httpContext.Request.Protocol); 777Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 800Assert.Equal("HTTP/2", httpContext.Request.Protocol); 829Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]); 852Assert.Equal("HTTP/2", httpContext.Request.Protocol); 898Assert.Equal("HTTP/2", httpContext.Request.Protocol); 947Assert.Equal("HTTP/2", httpContext.Request.Protocol); 982Assert.Equal("200", decodedHeaders[InternalHeaderNames.Status]);
Http3Tests.cs (9)
45Assert.Equal("HTTP/3", response); 80Assert.Equal("HTTP/1.1", await response1.Content.ReadAsStringAsync()); 81Assert.Equal(altsvc, response1.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 85Assert.Equal("HTTP/3", response3); 118Assert.Equal(altsvc, response2.Headers.GetValues(HeaderNames.AltSvc).SingleOrDefault()); 119Assert.Equal("HTTP/2", await response2.Content.ReadAsStringAsync()); 123Assert.Equal("HTTP/3", response3); 151Assert.Equal("HTTP/3", result); 152Assert.Equal("value", response.TrailingHeaders.GetValues("custom").SingleOrDefault());
HttpsTests.cs (10)
33Assert.Equal(string.Empty, response); 48Assert.Equal("Hello World", response); 58Assert.Equal("Hello World", input); 65Assert.Equal("Hello World", response); 90Assert.Equal(string.Empty, response); 124Assert.Equal(string.Empty, response); 146Assert.Equal(string.Empty, response); 189Assert.Equal("localhost", hostName); 230Assert.Equal(string.Empty, response); 260Assert.Equal(string.Empty, response);
Listener\RequestBodyTests.cs (4)
41Assert.Equal("Hello World", response); 65Assert.Equal(string.Empty, response); 89Assert.Equal(string.Empty, response); 114Assert.Equal(string.Empty, response);
Listener\RequestTests.cs (6)
27Assert.Equal("400", responseStatusCode); 81Assert.Equal("200", response.Substring(9)); 84Assert.Equal(expect, actualPath.TrimStart('/')); 104Assert.Equal("400", response.Substring(9)); 131Assert.Equal("200", response.Substring(9)); 169Assert.Equal("200", response.Substring(9));
Listener\ResponseHeaderTests.cs (7)
43Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString()); 66Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString()); 88Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString()); 117Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString()); 146Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString()); 175Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString()); 198Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
Listener\ServerOnExistingQueueTests.cs (17)
30Assert.Equal(string.Empty, response); 49Assert.Equal("Hello World", response); 62Assert.Equal("Hello World", input); 70Assert.Equal("Hello World", response); 86Assert.Equal(string.Empty, response); 104Assert.Equal(string.Empty, response); 121Assert.Equal(string.Empty, response); 146Assert.Equal(string.Empty, response); 166Assert.Equal(string.Empty, response); 185Assert.Equal(string.Empty, response); 199Assert.Equal(string.Empty, response); 221Assert.Equal(string.Empty, response); 234Assert.Equal(string.Empty, response); 267Assert.Equal(string.Empty, response); 287Assert.Equal(string.Empty, response); 307Assert.Equal(string.Empty, response); 315Assert.Equal(string.Empty, response);
Listener\ServerTests.cs (7)
68Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 108Assert.Equal("Hello World", response); 124Assert.Equal(string.Empty, response); 157Assert.Equal(string.Empty, response); 170Assert.Equal(string.Empty, response); 190Assert.Equal(string.Empty, response); 202Assert.Equal(string.Empty, response);
OpaqueUpgradeTests.cs (4)
43Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 71Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 273Assert.Equal("The response status code was incorrect: HTTP/1.1 200 OK", ex.Message); 355Assert.Equal("Upgrade requires HTTP/1.1.", ex.Message);
RequestBodyLimitTests.cs (30)
38Assert.Equal("Hello World", response); 60Assert.Equal("Hello World", response); 82Assert.Equal("Hello World", response); 105Assert.Equal("Hello World", response); 127Assert.Equal("Hello World", response); 149Assert.Equal("Hello World", response); 166Assert.Equal("The request's Content-Length 11 is larger than the request body size limit 10.", ex.Message); 169Assert.Equal("The request's Content-Length 11 is larger than the request body size limit 10.", ex.Message); 175Assert.Equal(string.Empty, response); 191Assert.Equal("The request's Content-Length 11 is larger than the request body size limit 10.", ex.Message); 194Assert.Equal("The request's Content-Length 11 is larger than the request body size limit 10.", ex.Message); 200Assert.Equal(string.Empty, response); 216Assert.Equal("The request's Content-Length 11 is larger than the request body size limit 10.", ex.Message); 219Assert.Equal("The request's Content-Length 11 is larger than the request body size limit 10.", ex.Message); 225Assert.Equal(string.Empty, response); 242Assert.Equal("The total number of bytes read 11 has exceeded the request body size limit 10.", ex.Message); 245Assert.Equal("The total number of bytes read 11 has exceeded the request body size limit 10.", ex.Message); 251Assert.Equal(string.Empty, response); 267Assert.Equal("The total number of bytes read 11 has exceeded the request body size limit 10.", ex.Message); 271Assert.Equal("The total number of bytes read 11 has exceeded the request body size limit 10.", ex.Message); 275Assert.Equal(string.Empty, response); 292Assert.Equal("The total number of bytes read 11 has exceeded the request body size limit 10.", ex.Message); 295Assert.Equal("The total number of bytes read 11 has exceeded the request body size limit 10.", ex.Message); 301Assert.Equal(string.Empty, response); 322Assert.Equal("The total number of bytes read 20 has exceeded the request body size limit 10.", ex.Message); 328Assert.Equal(string.Empty, response); 348Assert.Equal("The total number of bytes read 20 has exceeded the request body size limit 10.", ex.Message); 353Assert.Equal(string.Empty, response); 377Assert.Equal("Hello World!", response); 401Assert.Equal("Hello World!", response);
RequestBodyTests.cs (13)
39Assert.Equal("Hello World", response); 61Assert.Equal("Hello World", response); 79Assert.Equal("Hello World", response); 99Assert.Equal("Hello World", response); 117Assert.Equal("Hello World", response); 139Assert.Equal(string.Empty, response); 161Assert.Equal(string.Empty, response); 181Assert.Equal(string.Empty, response); 203Assert.Equal("HTTP/1.1 200 OK", lines[0]); 204Assert.Equal("0123456789", lines[12]); 235Assert.Equal("Hello World", response); 270Assert.Equal("", httpContext.Request.Headers[HeaderNames.ContentLength].ToString()); 282Assert.Equal("", httpContext.Request.Headers["Custom-Header"].ToString());
RequestHeaderTests.cs (13)
34Assert.Equal(string.Empty, response); 46Assert.Equal("close", requestHeaders["Connection"]); 49Assert.Equal("custom1, and custom2, custom3", requestHeaders["Custom-Header"]); 51Assert.Equal("spacervalue, spacervalue", requestHeaders["Spacer-Header"]); 80Assert.Equal("200", responseStatusCode); 98Assert.Equal(string.Empty, response); 111Assert.Equal("chunked", requestHeaders.TransferEncoding); 121Assert.Equal("200", responseStatusCode); 134Assert.Equal("gzip, chunked", requestHeaders.TransferEncoding); 144Assert.Equal("200", responseStatusCode); 157Assert.Equal("gzip, chunked", requestHeaders.TransferEncoding); 166Assert.Equal("1", requestHeaders["X-Content-Length"]); 176Assert.Equal("200", responseStatusCode);
RequestTests.cs (52)
31Assert.Equal("GET", requestInfo.Method); 34Assert.Equal("http", requestInfo.Scheme); 35Assert.Equal("/basepath", requestInfo.PathBase); 36Assert.Equal("/SomePath", requestInfo.Path); 37Assert.Equal("?SomeQuery", requestInfo.QueryString); 38Assert.Equal("/basepath/SomePath?SomeQuery", requestInfo.RawTarget); 39Assert.Equal("HTTP/1.1", requestInfo.Protocol); 43Assert.Equal("::1", connectionInfo.RemoteIpAddress.ToString()); 45Assert.Equal("::1", connectionInfo.LocalIpAddress.ToString()); 65Assert.Equal(string.Empty, response); 81Assert.Equal("TEST", requestInfo.Method); 88Assert.Equal("abcd", requestInfo.Scheme); 90Assert.Equal("/customized/Base", requestInfo.PathBase); 92Assert.Equal("/customized/Path", requestInfo.Path); 94Assert.Equal("?customizedQuery", requestInfo.QueryString); 96Assert.Equal("/customized/raw?Target", requestInfo.RawTarget); 98Assert.Equal("Custom/2.0", requestInfo.Protocol); 110Assert.Equal("CustomId", connectionInfo.ConnectionId); 116Assert.Equal("customTrace", requestIdentifierFeature.TraceIdentifier); 129Assert.Equal(string.Empty, response); 192Assert.Equal(string.Empty, response); 217Assert.Equal("http", requestInfo.Scheme); 218Assert.Equal(expectedPath, requestInfo.Path); 219Assert.Equal(expectedPathBase, requestInfo.PathBase); 220Assert.Equal(string.Empty, requestInfo.QueryString); 221Assert.Equal(requestPath, requestInfo.RawTarget); 236Assert.Equal(string.Empty, response); 247Assert.Equal("/%2F", requestInfo.Path); 248Assert.Equal("/%252F", requestInfo.RawTarget); 254Assert.Equal("200", responseStatusCode); 264Assert.Equal("/", requestInfo.Path); 265Assert.Equal("", requestInfo.PathBase); 273Assert.Equal(StatusCodes.Status200OK.ToString(CultureInfo.InvariantCulture), responseStatusCode); 290Assert.Equal(StatusCodes.Status400BadRequest.ToString(CultureInfo.InvariantCulture), responseStatusCode); 316Assert.Equal(expectedPath, requestInfo.Path); 317Assert.Equal(expectedPathBase, requestInfo.PathBase); 318Assert.Equal(requestPath, requestInfo.RawTarget); 333Assert.Equal(string.Empty, response); 352Assert.Equal(rawPath, requestInfo.RawTarget); 354Assert.Equal("/ !\"#$%&'()*+,-.%2F0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", requestInfo.Path); 360Assert.Equal("200", responseStatusCode); 393Assert.Equal("400", statusCode); 409Assert.Equal(rawPath, requestInfo.RawTarget); 410Assert.Equal(rawPath, requestInfo.Path); 416Assert.Equal("200", responseStatusCode); 433Assert.Equal(input, requestInfo.RawTarget); 434Assert.Equal(expectedPathBase, requestInfo.PathBase); 435Assert.Equal(expectedPath, requestInfo.Path); 441Assert.Equal("200", responseStatusCode); 454Assert.Equal(input, requestInfo.RawTarget); 455Assert.Equal(expected, requestInfo.Path); 461Assert.Equal("200", responseStatusCode);
ResponseBodyTests.cs (5)
38Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 204Assert.Equal("Manually Chunked", await response.Content.ReadAsStringAsync()); 227Assert.Equal("30", contentLength.First()); 307Assert.Equal("10", contentLength.First()); 431Assert.Equal("hello, world", Encoding.UTF8.GetString(payload));
ResponseCachingTests.cs (38)
58Assert.Equal("1", await SendRequestAsync(address)); 59Assert.Equal("2", await SendRequestAsync(address)); 78Assert.Equal("1", await SendRequestAsync(address)); 79Assert.Equal("2", await SendRequestAsync(address)); 99Assert.Equal("1", await SendRequestAsync(address)); 100Assert.Equal("2", await SendRequestAsync(address)); 120Assert.Equal("1", await SendRequestAsync(address, StatusCodes.Status304NotModified)); 121Assert.Equal("2", await SendRequestAsync(address, StatusCodes.Status304NotModified)); 145Assert.Equal("1", await SendRequestAsync(address)); 146Assert.Equal("1", await SendRequestAsync(address)); 165Assert.Equal("1", await SendRequestAsync(address)); 166Assert.Equal("1", await SendRequestAsync(address)); 185Assert.Equal("1", await SendRequestAsync(address)); 186Assert.Equal("1", await SendRequestAsync(address)); 205Assert.Equal("1", await SendRequestAsync(address)); 206Assert.Equal("1", await SendRequestAsync(address)); 225Assert.Equal("1", await SendRequestAsync(address)); 226Assert.Equal("1", await SendRequestAsync(address)); 246Assert.Equal("1", await SendRequestAsync(address)); 247Assert.Equal("1", await SendRequestAsync(address)); 270Assert.Equal("1", await SendRequestAsync(address)); 271Assert.Equal("2", await SendRequestAsync(address)); 293Assert.Equal("1", await SendRequestAsync(address)); 294Assert.Equal("2", await SendRequestAsync(address)); 313Assert.Equal("1", await SendRequestAsync(address)); 314Assert.Equal("2", await SendRequestAsync(address)); 334Assert.Equal("1", await SendRequestAsync(address)); 335Assert.Equal("1", await SendRequestAsync(address)); 355Assert.Equal("1", await SendRequestAsync(address)); 356Assert.Equal("2", await SendRequestAsync(address)); 377Assert.Equal("1", await SendRequestAsync(address)); 378Assert.Equal("1", await SendRequestAsync(address)); 396Assert.Equal("1", await GetFileAsync(address)); 397Assert.Equal("2", await GetFileAsync(address)); 416Assert.Equal("1", await GetFileAsync(address)); 417Assert.Equal("1", await GetFileAsync(address)); 451Assert.Equal("1", await SendRequestAsync(address + status + query, status)); 459Assert.Equal("1", await SendRequestAsync(address + status + query, status));
ResponseHeaderTests.cs (15)
34Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString()); 61Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]); 62Assert.Equal("custom1", response.Headers["WWW-Authenticate"]); 86Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]); 87Assert.Equal("custom1, and custom2, custom3", response.Headers["WWW-Authenticate"]); 111Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers["Server"]); 112Assert.Equal("custom1, and custom2, custom3", response.Headers["Custom-Header1"]); 133Assert.Equal("Dašta", header.Single()); 208Assert.Equal("Manually Chunked", await response.Content.ReadAsStringAsync()); 238Assert.Equal("value1a", response.Headers.GetValues("Custom1").First()); 239Assert.Equal("value1b", response.Headers.GetValues("Custom1").Skip(1).First()); 241Assert.Equal("value2a, value2b", response.Headers.GetValues("Custom2").First()); 268Assert.Equal("value1a", response.Headers.GetValues("Custom1").First()); 269Assert.Equal("value1b", response.Headers.GetValues("Custom1").Skip(1).First()); 271Assert.Equal("value2a, value2b", response.Headers.GetValues("Custom2").First());
ResponseSendFileTests.cs (3)
229Assert.Equal(FileLength.ToString(CultureInfo.InvariantCulture), contentLength.First()); 250Assert.Equal("10", contentLength.First()); 271Assert.Equal("0", contentLength.First());
ResponseTests.cs (8)
35Assert.Equal("OK", response.ReasonPhrase); 37Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 54Assert.Equal("Created", response.ReasonPhrase); 56Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 74Assert.Equal("CustomReasonPhrase", response.ReasonPhrase); 76Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync()); 92Assert.Equal(string.Empty, response.ReasonPhrase); 93Assert.Equal(string.Empty, await response.Content.ReadAsStringAsync());
ResponseTrailersTests.cs (20)
27Assert.Equal("HTTP/1.1", httpContext.Request.Protocol); 45Assert.Equal("HTTP/2", httpContext.Request.Protocol); 93Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 110Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 112Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 140Assert.Equal(body.Length.ToString(CultureInfo.InvariantCulture), response.Content.Headers.GetValues(HeaderNames.ContentLength).Single()); 141Assert.Equal(body, await response.Content.ReadAsStringAsync()); 165Assert.Equal((2 * body.Length).ToString(CultureInfo.InvariantCulture), contentLength.First()); 166Assert.Equal(body + body, await response.Content.ReadAsStringAsync()); 168Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 190Assert.Equal(body.Length.ToString(CultureInfo.InvariantCulture), contentLength.First()); 191Assert.Equal("TrailerName", response.Headers.Trailer.Single()); 192Assert.Equal(body, await response.Content.ReadAsStringAsync()); 194Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single()); 216Assert.Equal(body.Length.ToString(CultureInfo.InvariantCulture), contentLength.First()); 217Assert.Equal("TrailerName", response.Headers.Trailer.Single()); 218Assert.Equal(body, await response.Content.ReadAsStringAsync()); 239Assert.Equal("TrailerValue", response.TrailingHeaders.GetValues("TrailerName").Single()); 260Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 262Assert.Equal("Trailer Value", response.TrailingHeaders.GetValues("TrailerName").Single());
ServerTests.cs (13)
35Assert.Equal(string.Empty, response); 79Assert.Equal("0", prefix.Port); 124Assert.Equal("Hello World", response); 134Assert.Equal("Hello World", input); 140Assert.Equal("Hello World", response); 161Assert.Equal("Hello World", response); 350Assert.Equal(string.Empty, response); 409Assert.Equal(string.Empty, responseText); 445Assert.Equal("Hello World", response); 481Assert.Equal("Hello World", response); 518Assert.Equal("Hello World", response); 555Assert.Equal("Hello World", response); 634Assert.Equal("Hello World", response);
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (2)
DelegateOutOfProcTests.cs (2)
50Assert.Equal("Hello from delegatee", responseString); 66Assert.Equal("Hello from delegatee", responseString);
Microsoft.AspNetCore.Server.HttpSys.Tests (6)
UrlPrefixTests.cs (6)
68Assert.Equal(scheme, urlPrefix.Scheme); 69Assert.Equal(host, urlPrefix.Host); 70Assert.Equal(port, urlPrefix.Port); 71Assert.Equal(pathBase, urlPrefix.Path); 73Assert.Equal(toString ?? url, urlPrefix.ToString()); 82Assert.Equal("/p\u0041\u030Athbase/", urlPrefix.Path);
Microsoft.AspNetCore.Server.IISIntegration.Tests (7)
IISMiddlewareTests.cs (7)
322Assert.Equal("http://127.0.0.1:12345", configuration[WebHostDefaults.ServerUrlsKey]); 323Assert.Equal("true", configuration[WebHostDefaults.PreferHostingUrlsKey]); 350Assert.Equal("http://127.0.0.1:12345", configuration[WebHostDefaults.ServerUrlsKey]); 387Assert.Equal("/PathBase", requestPathBase); 388Assert.Equal("/Path", requestPath); 412Assert.Equal("Microsoft.AspNetCore.Server.IISIntegration.AuthenticationHandler", windows.HandlerType.FullName); 457Assert.Equal("AuthenticationHandler", windowsAuth.HandlerType.Name);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (342)
AddressBinderTests.cs (10)
92Assert.Equal("HelloWorld", listenOptions.PipeName); 94Assert.Equal(address, listenOptions.GetDisplayName()); 103Assert.Equal(@"LOCAL\HelloWorld", listenOptions.PipeName); 105Assert.Equal(address, listenOptions.GetDisplayName()); 114Assert.Equal("/tmp/kestrel-test.sock", listenOptions.PipeName); 116Assert.Equal(address, listenOptions.GetDisplayName()); 125Assert.Equal("/tmp/kestrel-test.sock", listenOptions.SocketPath); 136Assert.Equal("c:/foo/bar/pipe.socket", listenOptions.SocketPath); 195Assert.Equal(CoreStrings.FormatOverridingWithKestrelOptions(overriddenAddress), log.Message); 223Assert.Equal(CoreStrings.FormatOverridingWithPreferHostingUrls(nameof(addressBindContext.ServerAddressesFeature.PreferHostingUrls), overriddenAddress), log.Message);
BodyControlTests.cs (2)
45Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, writeEx.Message); 71Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, writeEx.Message);
ConnectionContextTests.cs (1)
24Assert.Equal("The connection was aborted by the application via ConnectionContext.Abort().", ex.Message);
ConnectionDispatcherTests.cs (2)
69Assert.Equal("Unexpected error listening", critical.Exception.Message); 115Assert.Equal("An error occurred running an IConnectionCompleteFeature.OnCompleted callback.", errors[0].Message);
DateHeaderValueManagerTests.cs (7)
31Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 47Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 49Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 71Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 78Assert.Equal(future.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 96Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String); 100Assert.Equal(now.ToString(Rfc1123DateFormat), dateHeaderValueManager.GetDateHeaderValues().String);
DiagnosticMemoryPoolTests.cs (12)
22Assert.Equal("Object is being disposed twice", exception.Message); 33Assert.Equal("Block is being returned to disposed pool", exception.Message); 43Assert.Equal("Block is being disposed twice", exception.Message); 57Assert.Equal("Block is backed by disposed slab", exception.Message); 70Assert.Equal("Block is backed by disposed slab", exception.Message); 90Assert.Equal("Block is backed by disposed slab", ode.Message); 105Assert.Equal("Block is backed by disposed slab", exception.Message); 117Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message); 132Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message); 154Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", ode.Message); 171Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message); 194Assert.Equal("Block is backed by disposed slab", exception.Message);
Http1\Http1ConnectionTests.cs (19)
83Assert.Equal(CoreStrings.BadRequest_HeadersExceedMaxTotalSize, exception.Message); 100Assert.Equal(CoreStrings.BadRequest_TooManyHeaders, exception.Message); 160Assert.Equal("http", ((IFeatureCollection)_http1Connection).Get<IHttpRequestFeature>().Scheme); 235Assert.Equal($"{connectionId}:00000001", nextId); 240Assert.Equal($"{connectionId}:00000002", secondId); 247Assert.Equal($"{connectionId}:{count:X8}", feature.TraceIdentifier); 417Assert.Equal(expectedMethod, ((IHttpRequestFeature)_http1Connection).Method); 468Assert.Equal(CoreStrings.BadRequest_RequestLineTooLong, exception.Message); 483Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestTarget_Detail(target), exception.Message); 498Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail($"GET {partialTarget.EscapeNonPrintable()}"), exception.Message); 515Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail(partialRequestLine.EscapeNonPrintable()), exception.Message); 532Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail($"GET {partialTarget.EscapeNonPrintable()}"), exception.Message); 548Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestTarget_Detail(target.EscapeNonPrintable()), exception.Message); 566Assert.Equal(CoreStrings.BadRequest_MethodNotAllowed, exception.Message); 567Assert.Equal(HttpUtilities.MethodToString(allowedMethod), exception.AllowedHeader); 852Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestTarget_Detail(string.Empty), exception.Message); 941Assert.Equal(CoreStrings.MaxRequestBodySizeCannotBeModifiedAfterRead, ex.Message); 1009Assert.Equal(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail("a=b"), ex.Message); 1018Assert.Equal(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail("a=b"), ex.Message);
Http2\Http2HeadersEnumeratorTests.cs (14)
94Assert.Equal("Name1", e.Current.Key); 95Assert.Equal("Value1", e.Current.Value); 99Assert.Equal("Name2", e.Current.Key); 100Assert.Equal("Value2-1", e.Current.Value); 104Assert.Equal("Name2", e.Current.Key); 105Assert.Equal("Value2-2", e.Current.Value); 119Assert.Equal("Grpc-Status", e.Current.Key); 120Assert.Equal("1", e.Current.Value); 124Assert.Equal("Name1", e.Current.Key); 125Assert.Equal("Value1", e.Current.Value); 129Assert.Equal("Name2", e.Current.Key); 130Assert.Equal("Value2-1", e.Current.Value); 134Assert.Equal("Name2", e.Current.Key); 135Assert.Equal("Value2-2", e.Current.Value);
Http2\Http2HPackEncoderTests.cs (60)
29Assert.Equal("48-03-33-30-32", hex); 32Assert.Equal(":status", statusHeader.Name); 33Assert.Equal("302", statusHeader.Value); 52Assert.Equal("58-07-70-72-69-76-61-74-65", hex); 55Assert.Equal("Cache-Control", statusHeader.Name); 56Assert.Equal("private", statusHeader.Value); 80Assert.Equal( 91Assert.Equal("Location", e.Name); 92Assert.Equal("https://www.example.com", e.Value); 97Assert.Equal("Cache-Control", e.Name); 98Assert.Equal("private", e.Value); 103Assert.Equal("Date", e.Name); 104Assert.Equal("Mon, 21 Oct 2013 20:13:21 GMT", e.Value); 109Assert.Equal(":status", e.Name); 110Assert.Equal("302", e.Value); 122Assert.Equal("48-03-33-30-37-C1-C0-BF", hex); 128Assert.Equal(":status", e.Name); 129Assert.Equal("307", e.Value); 134Assert.Equal("Location", e.Name); 135Assert.Equal("https://www.example.com", e.Value); 140Assert.Equal("Cache-Control", e.Name); 141Assert.Equal("private", e.Value); 146Assert.Equal("Date", e.Name); 147Assert.Equal("Mon, 21 Oct 2013 20:13:21 GMT", e.Value); 163Assert.Equal( 176Assert.Equal("Content-Encoding", e.Name); 177Assert.Equal("gzip", e.Value); 182Assert.Equal("Date", e.Name); 183Assert.Equal("Mon, 21 Oct 2013 20:13:22 GMT", e.Value); 188Assert.Equal(":status", e.Name); 189Assert.Equal("307", e.Value); 194Assert.Equal("Location", e.Name); 195Assert.Equal("https://www.example.com", e.Value); 224Assert.Equal( 235Assert.Equal("Location", e.Name); 236Assert.Equal("你好你好你好你.c", e.Value); 241Assert.Equal("Cache-Control", e.Name); 242Assert.Equal("你好e", e.Value); 247Assert.Equal("Date", e.Name); 248Assert.Equal("Mon, 21 Oct 2013 20:13:21 GMT", e.Value); 253Assert.Equal(":status", e.Name); 254Assert.Equal("302", e.Value); 266Assert.Equal("48-03-33-30-37-C1-C0-BF", hex); 272Assert.Equal(":status", e.Name); 273Assert.Equal("307", e.Value); 278Assert.Equal("Location", e.Name); 279Assert.Equal("你好你好你好你.c", e.Value); 284Assert.Equal("Cache-Control", e.Name); 285Assert.Equal("你好e", e.Value); 290Assert.Equal("Date", e.Name); 291Assert.Equal("Mon, 21 Oct 2013 20:13:21 GMT", e.Value); 307Assert.Equal( 320Assert.Equal("Content-Encoding", e.Name); 321Assert.Equal("gzip", e.Value); 326Assert.Equal("Date", e.Name); 327Assert.Equal("Mon, 21 Oct 2013 20:13:22 GMT", e.Value); 332Assert.Equal(":status", e.Name); 333Assert.Equal("307", e.Value); 338Assert.Equal("Location", e.Name); 339Assert.Equal("你好你好你好你.c", e.Value);
Http3\Http3QPackEncoderTests.cs (6)
26Assert.Equal("00-00-5F-30-03-34-31-38", hex); 43Assert.Equal("00-00-D9", hex); 92Assert.Equal("EE", hex); 111Assert.Equal("37-02-74-72-61-6E-73-6C-61-74-65-07-70-72-69-76-61-74-65", hex); 130Assert.Equal("37-03-6E-65-77-2D-68-65-61-64-65-72-05-76-61-6C-75-65", hex); 149Assert.Equal("5F-1D-12-61-70-70-6C-69-63-61-74-69-6F-6E-2F-63-75-73-74-6F-6D", hex);
HttpHeadersTests.cs (2)
262Assert.Equal("1", value[0]); 268Assert.Equal(HeaderUtilities.FormatNonNegativeInt64(long.MaxValue), value[0]);
HttpParserTests.cs (21)
43Assert.Equal(requestHandler.Method, expectedMethod); 44Assert.Equal(requestHandler.Version, expectedVersion); 45Assert.Equal(requestHandler.RawTarget, expectedRawTarget); 46Assert.Equal(requestHandler.RawPath, expectedRawPath); 47Assert.Equal(requestHandler.Version, expectedVersion); 96Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail(line[..^1].EscapeNonPrintable()), exception.Message); 124Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail(requestLine[..^1].EscapeNonPrintable()), exception.Message); 147Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail(line.EscapeNonPrintable()), exception.Message); 151Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail(method.EscapeNonPrintable() + @" / HTTP/1.1\x0D"), exception.Message); 171Assert.Equal(CoreStrings.FormatBadRequest_UnrecognizedHTTPVersion(httpVersion), exception.Message); 189Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestLine_Detail("GET "), exception.Message); 494Assert.Equal(expectedExceptionMessage, exception.Message); 514Assert.Equal(expectedExceptionMessage, exception.Message); 532Assert.Equal("Invalid request line: ''", exception.Message); 543Assert.Equal(CoreStrings.FormatBadRequest_UnrecognizedHTTPVersion(string.Empty), exception.Message); 557Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestHeader_Detail(string.Empty), exception.Message); 612Assert.Equal(expectedExceptionMessage, exception.Message); 632Assert.Equal(expectedExceptionMessage, exception.Message); 794Assert.Equal(CoreStrings.FormatBadRequest_InvalidRequestHeader_Detail(@"ab\x0A"), exception.Message); 829Assert.Equal(headerName, pairs[0].Key); 830Assert.Equal(expectedHeaderValue, pairs[0].Value);
HttpRequestHeadersTests.cs (28)
37Assert.Equal("value", header); 50Assert.Equal("value", host); 51Assert.Equal("0", contentLength); 381Assert.Equal("Host", entries[1].Key); 384Assert.Equal("Content-Length", entries[2].Key); 387Assert.Equal("custom", entries[3].Key); 422Assert.Equal(HeaderValue, values.PrevHeaderValue); 425Assert.Equal(HeaderValue, values.NextHeaderValue); 428Assert.Equal(values.PrevHeaderValue, values.NextHeaderValue); 457Assert.Equal(HeaderValue1, values.PrevHeaderValue); 460Assert.Equal(HeaderValue2, values.NextHeaderValue); 481Assert.Equal(HeaderValue1, values.PrevHeaderValue); 484Assert.Equal(string.Empty, values.NextHeaderValue); 505Assert.Equal(HeaderValue, values.PrevHeaderValue); 508Assert.Equal(HeaderValue, values.NextHeaderValue); 511Assert.Equal(values.PrevHeaderValue, values.NextHeaderValue); 557Assert.Equal(headerValueUtf16Latin1CrossOver, prevHeaderValue); 624Assert.Equal(headerValueUtf16Latin1CrossOver, parsedHeaderValue1); 625Assert.Equal(parsedHeaderValue1, parsedHeaderValue2); 693Assert.Equal(headerValue, parsedCookieHeaderValue); 728Assert.Equal(HeaderValue, values.PrevHeaderValue); 731Assert.Equal(HeaderValue, values.NextHeaderValue); 734Assert.Equal(values.PrevHeaderValue, values.NextHeaderValue); 756Assert.Equal(HeaderValue, prevHeaderValue); 768Assert.Equal(string.Empty, nextHeaderValue); 780Assert.Equal(string.Empty, nextHeaderValue); 817Assert.Equal(string.Empty, nextHeaderValue); 828Assert.Equal(string.Empty, nextHeaderValue);
HttpRequestStreamTests.cs (2)
121Assert.Equal("Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.", ioEx.Message); 124Assert.Equal("Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.", ioEx2.Message);
HttpResponseHeadersTests.cs (3)
320Assert.Equal(CoreStrings.FormatInvalidContentLength_InvalidNumber(contentLength), exception.Message); 331Assert.Equal(CoreStrings.FormatInvalidContentLength_InvalidNumber(contentLength), exception.Message); 341Assert.Equal(CoreStrings.FormatInvalidContentLength_InvalidNumber(contentLength), exception.Message);
HttpResponseStreamTests.cs (1)
124Assert.Equal("Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.", ioEx.Message);
HttpUtilitiesTest.cs (3)
50Assert.Equal(toString, expectedKnownString); 79Assert.Equal(expectedKnownString, toString); 133Assert.Equal(knownString1, expected);
KestrelEventSourceTests.cs (1)
25Assert.Equal("Microsoft-AspNetCore-Server-Kestrel", EventSource.GetName(esType));
KestrelServerLimitsTests.cs (2)
175Assert.Equal("value", exception.ParamName); 204Assert.Equal("value", exception.ParamName);
KestrelServerOptionsTests.cs (1)
103Assert.Equal("value", ex.ParamName);
KestrelServerTests.cs (6)
88Assert.Equal(CoreStrings.NoCertSpecifiedNoDevelopmentCertificateFound, ex.Message); 128Assert.Equal( 234Assert.Equal( 261Assert.Equal( 287Assert.Equal("transportFactory", exception.ParamName); 324Assert.Equal(CoreStrings.TransportNotFound, exception.Message);
ListenOptionsTests.cs (1)
73Assert.Equal("http://127.0.0.1:5555/", ((UriEndPoint)listenOptions.EndPoint).Uri.ToString());
LoggingStreamTests.cs (2)
39Assert.Equal($"Write[{bufferLength}]{Environment.NewLine}{expectedOutput}", mockLogger.Logs); 50Assert.Equal($"Write[0]", mockLogger.Logs);
MemoryPoolTests.cs (1)
47Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPool'.", exception.Message);
MessageBodyTests.cs (4)
381Assert.Equal(CoreStrings.BadRequest_BadChunkSizeData, ex.Message); 405Assert.Equal(CoreStrings.BadRequest_BadChunkSizeData, ex.Message); 553Assert.Equal(CoreStrings.FormatBadRequest_FinalTransferCodingNotChunked("chunked, not-chunked"), ex.Message); 587Assert.Equal(CoreStrings.FormatBadRequest_LengthRequiredHttp10(((IHttpRequestFeature)input.Http1Connection).Method), ex.Message);
MinDataRateTests.cs (2)
28Assert.Equal("bytesPerSecond", exception.ParamName); 45Assert.Equal("gracePeriod", exception.ParamName);
ReasonPhrasesTests.cs (1)
22Assert.Equal(expectedResult, Encoding.ASCII.GetString(bytes));
SniOptionsSelectorTests.cs (24)
73Assert.Equal("Exact", pathDictionary[wwwSubdomainOptions.ServerCertificate]); 76Assert.Equal("WildcardPrefix", pathDictionary[baSubdomainOptions.ServerCertificate]); 79Assert.Equal("WildcardPrefix", pathDictionary[aSubdomainOptions.ServerCertificate]); 85Assert.Equal("WildcardOnly", pathDictionary[noSubdomainOptions.ServerCertificate]); 88Assert.Equal("WildcardOnly", pathDictionary[anotherTldOptions.ServerCertificate]); 130Assert.Equal("Long", pathDictionary[baSubdomainOptions.ServerCertificate]); 134Assert.Equal("Short", pathDictionary[aSubdomainOptions.ServerCertificate]); 176Assert.Equal("Exact", pathDictionary[wwwSubdomainOptions.ServerCertificate]); 179Assert.Equal("WildcardPrefix", pathDictionary[baSubdomainOptions.ServerCertificate]); 182Assert.Equal("WildcardPrefix", pathDictionary[aSubdomainOptions.ServerCertificate]); 225Assert.Equal("Exact", pathDictionary[wwwSubdomainOptions.ServerCertificate]); 228Assert.Equal("WildcardPrefix", pathDictionary[baSubdomainOptions.ServerCertificate]); 231Assert.Equal("WildcardPrefix", pathDictionary[aSubdomainOptions.ServerCertificate]); 243Assert.Equal("CN=leaf.com", fullChain[0].Subject); 244Assert.Equal("CN=Test Intermediate CA 2", fullChain[0].IssuerName.Name); 245Assert.Equal("CN=Test Intermediate CA 2", fullChain[1].Subject); 246Assert.Equal("CN=Test Intermediate CA 1", fullChain[1].IssuerName.Name); 288Assert.Equal("a", pathDictionary[aSubdomainOptions.ServerCertificate]); 291Assert.Equal("b", pathDictionary[bSubdomainOptions.ServerCertificate]); 331Assert.Equal("An item with the same key has already been added. Key: .EXAMPLE.org (Parameter 'key')", exception.Message); 346Assert.Equal(CoreStrings.FormatSniNotConfiguredForServerName("example.org", "TestEndpointName"), authExWithServerName.Message); 349Assert.Equal(CoreStrings.FormatSniNotConfiguredToAllowNoServerName("TestEndpointName"), authExWithoutServerName.Message); 381Assert.Equal("WildcardOnly", pathDictionary[options.ServerCertificate]); 522Assert.Equal(CoreStrings.NoCertSpecifiedNoDevelopmentCertificateFound, ex.Message);
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
14Assert.Equal(KestrelMetrics.GetErrorType(expectedReason), errorType);
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
126Assert.Equal(expected, actualText); 135Assert.Equal("", text);
src\Shared\test\Shared.Tests\runtime\Http2\HPackDecoderTest.cs (39)
123Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 125Assert.Equal(":method", _handler.DecodedStaticHeaders[H2StaticTable.MethodGet].Key); 126Assert.Equal("GET", _handler.DecodedStaticHeaders[H2StaticTable.MethodGet].Value); 137Assert.Equal(_headerValueString, _handler.DecodedHeaders[_userAgentString]); 139Assert.Equal(_userAgentString, _handler.DecodedStaticHeaders[H2StaticTable.UserAgent].Key); 140Assert.Equal(_headerValueString, _handler.DecodedStaticHeaders[H2StaticTable.UserAgent].Value); 151Assert.Equal(_headerValueString, _handler.DecodedHeaders[_headerNameString]); 170Assert.Equal(_literalHeaderNameString, _handler.DecodedHeaders[_headerNameString]); // but we got the header anyway 178Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 254Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 278Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 302Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 326Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 372Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 404Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 499Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 515Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 531Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 547Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 563Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 579Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 595Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 622Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message); 631Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 637Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message); 646Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 665Assert.Equal(SR.Format(SR.net_http_hpack_large_table_size_update, 4097, DynamicTableInitialMaxSize), exception.Message); 677Assert.Equal(SR.Format(SR.net_http_headers_exceeded_length, MaxHeaderFieldSize), exception.Message); 696Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 728Assert.Equal(SR.Format(SR.net_http_headers_exceeded_length, MaxHeaderFieldSize + 1), ex.Message); 729Assert.Equal(string8191, _handler.DecodedHeaders[string8191]); 730Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 754Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 779Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 868Assert.Equal(SR.net_http_hpack_incomplete_header_block, exception.Message); 902Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message); 943Assert.Equal(expectedHeaderValue, handler.DecodedHeaders[expectedHeaderName]); 948Assert.Equal(expectedHeaderName, Encoding.ASCII.GetString(dynamicTable[0].Name)); 949Assert.Equal(expectedHeaderValue, Encoding.ASCII.GetString(dynamicTable[0].Value));
src\Shared\test\Shared.Tests\runtime\Http2\HuffmanDecodingTests.cs (3)
272Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message); 289Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message); 334Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message);
src\Shared\test\Shared.Tests\runtime\Http3\QPackDecoderTest.cs (14)
77Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 79Assert.Equal(":method", _handler.DecodedStaticHeaders[H3StaticTable.MethodGet].Key); 80Assert.Equal("GET", _handler.DecodedStaticHeaders[H3StaticTable.MethodGet].Value); 92Assert.Equal(_headerValueString, _handler.DecodedHeaders[_contentTypeString]); 94Assert.Equal(_contentTypeString, _handler.DecodedStaticHeaders[H3StaticTable.ContentTypeApplicationDnsMessage].Key); 95Assert.Equal(_headerValueString, _handler.DecodedStaticHeaders[H3StaticTable.ContentTypeApplicationDnsMessage].Value); 193Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 209Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 225Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 241Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 257Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 273Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 296Assert.Equal(SR.net_http_hpack_incomplete_header_block, exception.Message); 357Assert.Equal(expectedValue.Value, handler.DecodedHeaders[expectedValue.Key]);
StartLineTests.cs (39)
43Assert.Equal(rawTarget, Http1Connection.RawTarget); 44Assert.Equal(path, Http1Connection.Path); 45Assert.Equal(query, Http1Connection.QueryString); 70Assert.Equal(rawTarget, Http1Connection.RawTarget); 71Assert.Equal(path, Http1Connection.Path); 72Assert.Equal(query, Http1Connection.QueryString); 98Assert.Equal(rawTarget, Http1Connection.RawTarget); 99Assert.Equal(path, Http1Connection.Path); 100Assert.Equal(query, Http1Connection.QueryString); 125Assert.Equal(rawTarget, Http1Connection.RawTarget); 126Assert.Equal(path, Http1Connection.Path); 127Assert.Equal(query, Http1Connection.QueryString); 149Assert.Equal(rawTarget, Http1Connection.RawTarget); 150Assert.Equal(path, Http1Connection.Path); 151Assert.Equal(query, Http1Connection.QueryString); 212Assert.Equal(rawTarget, Http1Connection.RawTarget); 213Assert.Equal(path, Http1Connection.Path); 214Assert.Equal(query, Http1Connection.QueryString); 246Assert.Equal(rawTarget, Http1Connection.RawTarget); 247Assert.Equal(path, Http1Connection.Path); 248Assert.Equal(query, Http1Connection.QueryString); 305Assert.Equal(rawTarget, Http1Connection.RawTarget); 306Assert.Equal(path, Http1Connection.Path); 307Assert.Equal(query, Http1Connection.QueryString); 339Assert.Equal(rawTarget, Http1Connection.RawTarget); 340Assert.Equal(path, Http1Connection.Path); 341Assert.Equal(query, Http1Connection.QueryString); 386Assert.Equal(rawTarget, Http1Connection.RawTarget); 387Assert.Equal(path, Http1Connection.Path); 388Assert.Equal(query, Http1Connection.QueryString); 418Assert.Equal(rawTarget, Http1Connection.RawTarget); 419Assert.Equal(path, Http1Connection.Path); 420Assert.Equal(query, Http1Connection.QueryString); 468Assert.Equal(rawTarget, Http1Connection.RawTarget); 469Assert.Equal(path, Http1Connection.Path); 470Assert.Equal(query, Http1Connection.QueryString); 500Assert.Equal(rawTarget, Http1Connection.RawTarget); 501Assert.Equal(path, Http1Connection.Path); 502Assert.Equal(query, Http1Connection.QueryString);
StringUtilitiesTests.cs (2)
22Assert.Equal($"{str}:{value:X8}", StringUtilities.ConcatAsHexSuffix(str, ':', value)); 29Assert.Equal(":23BC0234", StringUtilities.ConcatAsHexSuffix(null, ':', value));
ThrowingWasUpgradedWriteOnlyStreamTests.cs (4)
22Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, Assert.Throws<InvalidOperationException>(() => stream.Write(new byte[1], 0, 1)).Message); 23Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, (await Assert.ThrowsAsync<InvalidOperationException>(() => stream.WriteAsync(new byte[1], 0, 1))).Message); 24Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, Assert.Throws<InvalidOperationException>(() => stream.Flush()).Message); 25Assert.Equal(CoreStrings.ResponseStreamWasUpgraded, (await Assert.ThrowsAsync<InvalidOperationException>(() => stream.FlushAsync())).Message);
Microsoft.AspNetCore.Server.Kestrel.Tests (13)
ConfigurationReaderTests.cs (1)
310Assert.Equal(CoreStrings.FormatSniNameCannotBeEmpty("End1"), end1Ex.Message);
HttpsConnectionAdapterOptionsTest.cs (1)
39Assert.Equal("value", exception.ParamName);
KestrelConfigurationLoaderTests.cs (11)
268Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, certificate.SerialNumber); 352Assert.Equal(expectedCert.SerialNumber, httpsOptions.ServerCertificate.SerialNumber); 693Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, certificate.SerialNumber); 776Assert.Equal(CoreStrings.FormatEndpointHasUnusedHttpsConfig("End1", "Certificate"), ex.Message); 785Assert.Equal(CoreStrings.FormatEndpointHasUnusedHttpsConfig("End1", "Certificate"), ex.Message); 794Assert.Equal(CoreStrings.FormatEndpointHasUnusedHttpsConfig("End1", "ClientCertificateMode"), ex.Message); 803Assert.Equal(CoreStrings.FormatEndpointHasUnusedHttpsConfig("End1", "SslProtocols"), ex.Message); 812Assert.Equal(CoreStrings.FormatEndpointHasUnusedHttpsConfig("End1", "Sni"), ex.Message); 884Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, expectedSerialNumber); 983Assert.Equal(opt.HttpsOptions.ServerCertificate.SerialNumber, expectedSerialNumber); 1861Assert.Equal("abc", serverOptions.CodeBackedListenOptions[0].PipeName);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (9)
QuicConnectionListenerTests.cs (1)
258Assert.Equal("Authentication failed because the remote party sent a TLS alert: 'UserCanceled'.", ex.Message);
WebHostTests.cs (8)
90Assert.Equal("hello, world", responseText); 254Assert.Equal("hello, world", responseText1); 268Assert.Equal("hello, world", responseText2); 325Assert.Equal("hello, world", responseText1); 338Assert.Equal("hello, world", responseText2); 363Assert.Equal("hello, world", responseText1); 375Assert.Equal("hello, world", responseText2); 412Assert.Equal("No registered IMultiplexedConnectionListenerFactory supports endpoint UnixDomainSocketEndPoint: /test-path", ex.Message);
Microsoft.AspNetCore.Session.Tests (18)
SessionTests.cs (18)
76Assert.Equal("Value", context.Session.GetString("Key")); 131Assert.Equal("Value", context.Session.GetString("Key")); 200Assert.Equal("0", await response.Content.ReadAsStringAsync()); 205Assert.Equal("1", await client.GetStringAsync("/")); 206Assert.Equal("2", await client.GetStringAsync("/")); 207Assert.Equal("3", await client.GetStringAsync("/")); 260Assert.Equal("0", await response.Content.ReadAsStringAsync()); 265Assert.Equal("1", await client.GetStringAsync("/second")); 266Assert.Equal("2", await client.GetStringAsync("/third")); 318Assert.Equal("0", await response.Content.ReadAsStringAsync()); 323Assert.Equal("1", await client.GetStringAsync("/second")); 324Assert.Equal("2", await client.GetStringAsync("/third")); 433Assert.Equal("2", result); 505Assert.Equal("10", data); 615Assert.Equal("VALUE", context.Session.GetString("KEY")); 616Assert.Equal("value", context.Session.GetString("key")); 656Assert.Equal(string.Empty, context.Session.Id); 706Assert.Equal(string.Empty, context.Session.Id);
Microsoft.AspNetCore.Shared.Tests (225)
AdaptiveCapacityDictionaryTests.cs (20)
185Assert.Equal("foo", dict[""]); 198Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 217kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 218kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 235Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 252Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 358Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 372Assert.Equal("foo", dict[""]); 390kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 391kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 412kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 433kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 452kvp => { Assert.Equal("age", kvp.Key); Assert.Equal(30, kvp.Value); }, 453kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 723Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 744Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 788Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 871Assert.Collection(dict, kvp => { Assert.Equal("key", kvp.Key); Assert.Equal("value", kvp.Value); }); 1275Assert.Equal("key", storage[0].Key); 1277Assert.Equal("key3", storage[1].Key);
CommandLineApplicationTests.cs (63)
51Assert.Equal("one", first.Value); 52Assert.Equal("two", second.Value); 93Assert.Equal("one", first.Value); 94Assert.Equal("two", second.Value); 96Assert.Equal("three", remaining); 153Assert.Equal("one", first.Value); 154Assert.Equal("two", second.Value); 186Assert.Equal("one", first.Values[0]); 187Assert.Equal("two", second.Values[0]); 225Assert.Equal("one", first.Values[0]); 226Assert.Equal("two", second.Values[0]); 246Assert.Equal("one", first.Values[0]); 247Assert.Equal("two", second.Values[0]); 262Assert.Equal($"Unrecognized command or argument '{unexpectedArg}'", exception.Message); 280Assert.Equal(unexpectedArg, arg); 292Assert.Equal("one", argument.Value); 305Assert.Equal("one", argument.Value); 318Assert.Equal("one", argument.Value); 319Assert.Equal("two", option.Value()); 331Assert.Equal("two", argument.Value); 332Assert.Equal("one", option.Value()); 360Assert.Equal(unexpectedArg, arg); 375Assert.Equal(unexpectedArg, arg); 403Assert.Equal(unexpectedArg, arg); 404Assert.Equal("one", option.Value()); 418Assert.Equal(unexpectedArg, arg); 419Assert.Equal("one", option.Value()); 434Assert.Equal($"Unrecognized option '{unexpectedOption}'", exception.Message); 452Assert.Equal(unexpectedOption, arg); 479Assert.Equal(unexpectedOption, arg); 494Assert.Equal(unexpectedOption, arg); 522Assert.Equal(unexpectedOption, arg); 523Assert.Equal("one", option.Value()); 537Assert.Equal(unexpectedOption, arg); 538Assert.Equal("one", option.Value()); 614Assert.Equal("one", option.Value()); 629Assert.Equal("one", option.Value()); 644Assert.Equal($"Unrecognized option '{unexpectedOption}'", exception.Message); 662Assert.Equal(unexpectedOption, arg); 677Assert.Equal($"Unrecognized option '{unexpectedOption}'", exception.Message); 695Assert.Equal(unexpectedOption, arg); 712Assert.Equal($"Unrecognized option '{unexpectedOption}'", exception.Message); 756Assert.Equal(unexpectedOption, arg); 787Assert.Equal(unexpectedOption, remaining); 812Assert.Equal("A1", optionAValue); 844Assert.Equal("top", top.Value()); 851Assert.Equal("nested", nested.Value()); 895Assert.Equal("G", globalOptionValue); 896Assert.Equal("N1", nest1OptionValue); 897Assert.Equal("N2", nest2OptionValue); 921Assert.Equal(topLevelValue, optTop.Value()); 949Assert.Equal(topLevelValue, optTop.Value()); 976Assert.Equal(topLevelValue, optTop.Value()); 1003Assert.Equal(topLevelValue, optTop.Value()); 1119Assert.Equal("Unexpected value 'File2' for option 'file'", exception.Message); 1145Assert.Equal("Unexpected value 'true' for option 'verbose'", exception.Message); 1156Assert.Equal($"Unrecognized command or argument '{inputOption}'", exception.Message); 1167Assert.Equal($"Unrecognized option '{inputOption}'", exception.Message); 1198Assert.Equal(firstUnmatchedOption, first.Value); 1199Assert.Equal(seconUnmatchedOption, second.Value); 1201Assert.Equal(firstActualOption, firstOption.Template); 1202Assert.Equal(secondActualOption, secondOption.Template); 1221Assert.Equal($"Unrecognized option '{firstOption}'", exception.Message);
ObjectMethodExecutorTest.cs (12)
52Assert.Equal("Hello", resultObject.value); 65Assert.Equal("HelloWorld", resultObject.value); 100Assert.Equal("Hello", resultObject.value); 113Assert.Equal("HelloWorld", resultObject.value); 175Assert.Equal("Hello 123", result.value); 207Assert.Equal("Hello 123", ((TestObject)result).value); 259Assert.Equal("Used UnsafeOnCompleted", (string)result); 274Assert.Equal("Used OnCompleted", (string)result); 304Assert.Equal("test result", result); 353Assert.Equal("test result", result); 374Assert.Equal("Test exception", exception.InnerException.Message); 407Assert.Equal("Test exception", exception.InnerException.Message);
PathNormalizerTests.cs (1)
85Assert.Equal(expected, Encoding.ASCII.GetString(data, 0, length));
PropertyHelperTest.cs (29)
25Assert.Equal("foo", property.Name); 26Assert.Equal("foo", helper.Name); 40Assert.Equal("bar", helper.Name); 72Assert.Equal(expected, instance.PropA); 89Assert.Equal(expected, instance.PropA); 103Assert.Equal("foo", helper.Name); 131Assert.Equal("bar_baz2", helper.Name); 142Assert.Equal("Prop1", helper.Name); 153Assert.Equal("Prop5", helper.Name); 165Assert.Equal("Prop5", helper.Name); 180Assert.Equal("Prop6", helper.Name); 206Assert.Equal("Foo", property.Name); 330Assert.Equal("Visible", result[0].Name); 331Assert.Equal("PropA", result[1].Name); 332Assert.Equal("PropB", result[2].Name); 346Assert.Equal("Length", property.Name); 361Assert.Equal("Id", result[0].Name); 363Assert.Equal("Name", result[1].Name); 378Assert.Equal("Id", result[0].Name); 380Assert.Equal("Name", result[1].Name); 395Assert.Equal("Length", property.Name); 410Assert.Equal("Id", result[0].Name); 412Assert.Equal("Name", result[1].Name); 427Assert.Equal("Id", result[0].Name); 429Assert.Equal("Name", result[1].Name); 449Assert.Equal("TestPublic", instance.PropA); 450Assert.Equal("TestProtected", instance.GetPropProtected()); 466Assert.Equal("OverridenTest value", instance.PropA); 482Assert.Equal("NewedTest value", instance.PropB);
QueryStringEnumerableTest.cs (4)
94Assert.Equal(expectedDecodedName, kvp.DecodeName().ToString()); 95Assert.Equal(expectedDecodedValue, kvp.DecodeValue().ToString()); 111Assert.Equal(expectedKey, actual.key); 112Assert.Equal(expectedValue, actual.value);
runtime\Http2\HPackDecoderTest.cs (39)
123Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 125Assert.Equal(":method", _handler.DecodedStaticHeaders[H2StaticTable.MethodGet].Key); 126Assert.Equal("GET", _handler.DecodedStaticHeaders[H2StaticTable.MethodGet].Value); 137Assert.Equal(_headerValueString, _handler.DecodedHeaders[_userAgentString]); 139Assert.Equal(_userAgentString, _handler.DecodedStaticHeaders[H2StaticTable.UserAgent].Key); 140Assert.Equal(_headerValueString, _handler.DecodedStaticHeaders[H2StaticTable.UserAgent].Value); 151Assert.Equal(_headerValueString, _handler.DecodedHeaders[_headerNameString]); 170Assert.Equal(_literalHeaderNameString, _handler.DecodedHeaders[_headerNameString]); // but we got the header anyway 178Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 254Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 278Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 302Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 326Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 372Assert.Equal(SR.Format(SR.net_http_invalid_header_name, string.Empty), exception.Message); 404Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 499Assert.Equal(SR.Format(SR.net_http_hpack_invalid_index, 62), exception.Message); 515Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 531Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 547Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 563Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 579Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 595Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderNameString]); 622Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message); 631Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 637Assert.Equal(SR.net_http_hpack_late_dynamic_table_size_update, exception.Message); 646Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 665Assert.Equal(SR.Format(SR.net_http_hpack_large_table_size_update, 4097, DynamicTableInitialMaxSize), exception.Message); 677Assert.Equal(SR.Format(SR.net_http_headers_exceeded_length, MaxHeaderFieldSize), exception.Message); 696Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 728Assert.Equal(SR.Format(SR.net_http_headers_exceeded_length, MaxHeaderFieldSize + 1), ex.Message); 729Assert.Equal(string8191, _handler.DecodedHeaders[string8191]); 730Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 754Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 779Assert.Equal(string8193, _handler.DecodedHeaders[string8193]); 868Assert.Equal(SR.net_http_hpack_incomplete_header_block, exception.Message); 902Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message); 943Assert.Equal(expectedHeaderValue, handler.DecodedHeaders[expectedHeaderName]); 948Assert.Equal(expectedHeaderName, Encoding.ASCII.GetString(dynamicTable[0].Name)); 949Assert.Equal(expectedHeaderValue, Encoding.ASCII.GetString(dynamicTable[0].Value));
runtime\Http2\HuffmanDecodingTests.cs (3)
272Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message); 289Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message); 334Assert.Equal(SR.net_http_hpack_huffman_decode_failed, exception.Message);
runtime\Http3\QPackDecoderTest.cs (14)
77Assert.Equal("GET", _handler.DecodedHeaders[":method"]); 79Assert.Equal(":method", _handler.DecodedStaticHeaders[H3StaticTable.MethodGet].Key); 80Assert.Equal("GET", _handler.DecodedStaticHeaders[H3StaticTable.MethodGet].Value); 92Assert.Equal(_headerValueString, _handler.DecodedHeaders[_contentTypeString]); 94Assert.Equal(_contentTypeString, _handler.DecodedStaticHeaders[H3StaticTable.ContentTypeApplicationDnsMessage].Key); 95Assert.Equal(_headerValueString, _handler.DecodedStaticHeaders[H3StaticTable.ContentTypeApplicationDnsMessage].Value); 193Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 209Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 225Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 241Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 257Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 273Assert.Equal(_headerValueString, _handler.DecodedHeaders[_literalHeaderFieldString]); 296Assert.Equal(SR.net_http_hpack_incomplete_header_block, exception.Message); 357Assert.Equal(expectedValue.Value, handler.DecodedHeaders[expectedValue.Key]);
SecurityHelperTests.cs (14)
19Assert.Equal("Alpha", user.Identity.AuthenticationType); 20Assert.Equal("Test1", user.Identity.Name); 31Assert.Equal("Alpha", user.Identity.AuthenticationType); 32Assert.Equal("Test1", user.Identity.Name); 36Assert.Equal("Beta", user.Identity.AuthenticationType); 37Assert.Equal("Test2", user.Identity.Name); 41Assert.Equal("Gamma", user.Identity.AuthenticationType); 42Assert.Equal("Test3", user.Identity.Name); 45Assert.Equal("Test3", user.Identities.Skip(0).First().Name); 46Assert.Equal("Test2", user.Identities.Skip(1).First().Name); 47Assert.Equal("Test1", user.Identities.Skip(2).First().Name); 83Assert.Equal("Gamma", user.Identity.AuthenticationType); 84Assert.Equal("Test3", user.Identity.Name); 87Assert.Equal("Test3", user.Identities.Skip(0).First().Name);
StackTraceHelperTest.cs (13)
62Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.GenericMethod<T>(T val)", methods[0]); 76Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.MethodWithOutParameter(out int value)", methods[0]); 90Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.MethodWithGenericOutParameter<TVal>(string a, out TVal value)", methods[0]); 105Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.MethodWithRefParameter(ref int value)", methods[0]); 120Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.MethodWithGenericRefParameter<TVal>(ref TVal value)", methods[0]); 135Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.MethodWithNullableParameter(Nullable<int> value)", methods[0]); 149Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest+GenericClass<T>.Throw(T parameter)", methods[0]); 196Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.ThrowCore()", methods[0]); 197Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.InvokeMethodOnTypeWithStackTraceHiddenAttribute()", methods[1]); 211Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.ThrowCore()", methods[0]); 212Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.InvokeStaticMethodOnTypeWithStackTraceHiddenAttribute()", methods[1]); 226Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest.ThrowCore()", methods[0]); 227Assert.Equal("Microsoft.Extensions.Internal.StackTraceHelperTest+TypeWithMethodWithStackTraceHiddenAttribute.Throw()", methods[1]);
TypeNameHelperTest.cs (9)
47Assert.Equal(expected, TypeNameHelper.GetTypeDisplayName(type)); 57Assert.Equal("ClassInGlobalNamespace<int>", TypeNameHelper.GetTypeDisplayName(type)); 82Assert.Equal(expected, TypeNameHelper.GetTypeDisplayName(type, false)); 104Assert.Equal(expected, TypeNameHelper.GetTypeDisplayName(type)); 117Assert.Equal(expected, TypeNameHelper.GetTypeDisplayName(type, fullName)); 176Assert.Equal(expected, TypeNameHelper.GetTypeDisplayName(type, fullName)); 196Assert.Equal(expected, actual); 216Assert.Equal(expected, actual); 257Assert.Equal(expectedTypeName, displayName);
WebEncodersTests.cs (4)
51Assert.Equal(expectedBase64Url, actualBase64Url); 57Assert.Equal(roundTrippedAsBase64, base64Input); 83Assert.Equal(expectedBase64Url, encodedString); 92Assert.Equal(roundTrippedAsBase64, base64Input);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (119)
HubConnectionTests.cs (62)
108Assert.Equal("Hello World!", result); 144Assert.Equal("The client requested version '1', but the server does not support this version.", ex.Message); 202Assert.Equal(originalMessage, result); 258Assert.Equal(originalMessage, result); 262Assert.Equal(originalMessage, result); 291Assert.Equal(connection.ConnectionId, connectionIdFromServer); 297Assert.Equal(connection.ConnectionId, connectionIdFromServer); 349Assert.Equal(originalMessage, result); 359Assert.Equal(originalMessage, result); 389Assert.Equal(originalMessage, result); 428Assert.Equal(originalMessage, await echoTcs.Task.DefaultTimeout()); 429Assert.Equal("Hello World!", await helloWorldTcs.Task.DefaultTimeout()); 665Assert.Equal("An unexpected error occurred invoking 'StreamException' on the server. InvalidOperationException: Error occurred while streaming.", ex.Message); 700Assert.Equal(originalMessage, await tcs.Task.DefaultTimeout()); 803Assert.Equal("1", await channel.ReadAsync().AsTask().DefaultTimeout()); 805Assert.Equal("2", await channel.ReadAsync().AsTask().DefaultTimeout()); 850Assert.Equal("A", await channel.ReadAsync().AsTask().DefaultTimeout()); 851Assert.Equal("B", await channel.ReadAsync().AsTask().DefaultTimeout()); 852Assert.Equal("C", await channel.ReadAsync().AsTask().DefaultTimeout()); 853Assert.Equal("D", await channel.ReadAsync().AsTask().DefaultTimeout()); 1055Assert.Equal("An unexpected error occurred invoking 'StreamException' on the server. InvalidOperationException: Error occurred while streaming.", ex.Message); 1082Assert.Equal("Failed to invoke '!@#$%' due to an error on the server. HubException: Method does not exist.", ex.Message); 1109Assert.Equal("Failed to invoke '!@#$%' due to an error on the server. HubException: Method does not exist.", ex.Message); 1136Assert.Equal("Failed to invoke 'Echo' due to an error on the server. InvalidDataException: Invocation provides 2 argument(s) but target expects 1.", ex.Message); 1191Assert.Equal("Failed to invoke '!@#$%' due to an error on the server. HubException: Method does not exist.", ex.Message); 1219Assert.Equal("Failed to invoke 'Stream' due to an error on the server. InvalidDataException: Invocation provides 2 argument(s) but target expects 1.", ex.Message); 1247Assert.Equal("Failed to invoke 'Stream' due to an error on the server. InvalidDataException: Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex.Message); 1274Assert.Equal("The client attempted to invoke the non-streaming 'HelloWorld' method with a streaming invocation.", ex.Message); 1301Assert.Equal("The client attempted to invoke the streaming 'Stream' method with a non-streaming invocation.", ex.Message); 1328Assert.Equal("The value returned by the streaming method 'StreamBroken' is not a ChannelReader<> or IAsyncEnumerable<>.", ex.Message); 1464Assert.Equal("Failed to invoke 'StreamEcho' due to an error on the server. InvalidDataException: Invocation provides 1 argument(s) but target expects 0.", 1494Assert.Equal("Hello, World!", message); 1526Assert.Equal("Response status code does not indicate success: 401 (Unauthorized).", ex.Message); 1549Assert.Equal("Hello, World!", message); 1693Assert.Equal("User Value", userAgent); 1728Assert.Equal("Bar", cookieValue); 1779Assert.Equal("Foo", echoResponse); 1838Assert.Equal("Foo", echoResponse); 1946Assert.Equal("Bearer test", headerResponse[0]); 1981Assert.Equal("a value", cookieValue); 2016Assert.Equal("127.0.0.1", localIP); 2017Assert.Equal("127.0.0.1", remoteIP); 2048Assert.Equal("SuperAdmin", userIdentifier); 2178Assert.Equal(connection.ConnectionId, newConnectionId); 2181Assert.Equal(echoMessage, result); 2238Assert.Equal(connection.ConnectionId, newConnectionId); 2241Assert.Equal(echoMessage, result); 2307Assert.Equal(echoMessage, result); 2344Assert.Equal("Hello World!", invokeTask.Result); 2390Assert.Equal("HTTP/2", httpProtocol); 2443Assert.Equal("HTTP/2", httpProtocol); 2486Assert.Equal("HTTP/2", httpProtocol); 2536Assert.Equal("HTTP/2", httpProtocol); 2584Assert.Equal(originalMessage, result); 2594Assert.Equal(originalMessage, result); 2595Assert.Equal(originalConnectionId, connection.ConnectionId); 2652Assert.Equal(originalMessage, result); 2662Assert.Equal(originalMessage, result); 2663Assert.Equal(originalConnectionId, connection.ConnectionId); 2733Assert.Equal(originalConnectionId, connection.ConnectionId); 2831Assert.Equal(originalMessage, result); 2895Assert.Equal(originalMessage, result);
HubConnectionTests.Tracing.cs (55)
89Assert.Equal("Hello World!", result); 111Assert.Equal("Hello World!", result); 143Assert.Equal(SignalRServerActivitySource.OnConnected, a.OperationName); 144Assert.Equal($"{serverHubName}/OnConnectedAsync", a.DisplayName); 145Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", a.Parent.OperationName); 153Assert.Equal(SignalRServerActivitySource.InvocationIn, a.OperationName); 154Assert.Equal($"{serverHubName}/HelloWorld", a.DisplayName); 155Assert.Equal(clientActivity1.Id, a.ParentId); 161Assert.Equal("value-1", baggage["baggage-1"]); 165Assert.Equal(SignalRServerActivitySource.InvocationIn, a.OperationName); 166Assert.Equal($"{serverHubName}/HelloWorld", a.DisplayName); 167Assert.Equal(clientActivity2.Id, a.ParentId); 173Assert.Equal("value-2", baggage["baggage-2"]); 177Assert.Equal(SignalRServerActivitySource.OnDisconnected, a.OperationName); 178Assert.Equal($"{serverHubName}/OnDisconnectedAsync", a.DisplayName); 179Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", a.Parent.OperationName); 187Assert.Equal(HubConnection.ActivityName, clientActivity1.OperationName); 188Assert.Equal($"{clientHubName}/HelloWorld", clientActivity1.DisplayName); 194Assert.Equal("value-1", baggage["baggage-1"]); 204Assert.Equal(HubConnection.ActivityName, clientActivity2.OperationName); 205Assert.Equal($"{clientHubName}/HelloWorld", clientActivity2.DisplayName); 211Assert.Equal("value-2", baggage["baggage-2"]); 315Assert.Equal(SignalRServerActivitySource.OnConnected, a.OperationName); 316Assert.Equal($"{hubName}/OnConnectedAsync", a.DisplayName); 318Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", a.Parent.OperationName); 325Assert.Equal(SignalRServerActivitySource.InvocationIn, a.OperationName); 326Assert.Equal($"{hubName}/Stream", a.DisplayName); 328Assert.Equal(clientActivity.Id, a.ParentId); 334Assert.Equal("value-1", baggage["baggage-1"]); 338Assert.Equal(SignalRServerActivitySource.OnDisconnected, a.OperationName); 339Assert.Equal($"{hubName}/OnDisconnectedAsync", a.DisplayName); 341Assert.Equal("Microsoft.AspNetCore.Hosting.HttpRequestIn", a.Parent.OperationName); 347Assert.Equal(HubConnection.ActivityName, clientActivity.OperationName); 348Assert.Equal($"{clientHubName}/Stream", clientActivity.DisplayName); 355Assert.Equal("value-1", baggage["baggage-1"]); 443a => Assert.Equal($"{hubName}/OnConnectedAsync", a.DisplayName), 446Assert.Equal($"{hubName}/Stream", a.DisplayName); 452a => Assert.Equal($"{hubName}/OnDisconnectedAsync", a.DisplayName)); 454Assert.Equal($"{clientHubName}/Stream", clientActivity.DisplayName); 513Assert.Equal("An unexpected error occurred invoking 'StreamException' on the server. InvalidOperationException: Error occurred while streaming.", ex.Message); 540a => Assert.Equal($"{serverHubName}/OnConnectedAsync", a.DisplayName), 543Assert.Equal($"{serverHubName}/StreamException", a.DisplayName); 549a => Assert.Equal($"{serverHubName}/OnDisconnectedAsync", a.DisplayName)); 551Assert.Equal($"{clientHubName}/StreamException", clientActivity.DisplayName); 635a => Assert.Equal($"{serverHubName}/OnConnectedAsync", a.DisplayName), 638Assert.Equal($"{serverHubName}/InvokeException", a.DisplayName); 644a => Assert.Equal($"{serverHubName}/OnDisconnectedAsync", a.DisplayName)); 646Assert.Equal(HubConnection.ActivityName, clientActivity.OperationName); 647Assert.Equal($"{clientHubName}/InvokeException", clientActivity.DisplayName); 734a => Assert.Equal($"{serverHubName}/OnConnectedAsync", a.DisplayName), 737Assert.Equal($"{serverHubName}/CallEcho", a.DisplayName); 738Assert.Equal(clientActivity.Id, a.ParentId); 740a => Assert.Equal($"{serverHubName}/OnDisconnectedAsync", a.DisplayName)); 742Assert.Equal(HubConnection.ActivityName, clientActivity.OperationName); 743Assert.Equal($"{clientHubName}/CallEcho", clientActivity.DisplayName);
HubProtocolVersionTests.cs (2)
53Assert.Equal("Hello World!", result); 86Assert.Equal("Hello World!", result);
Microsoft.AspNetCore.SignalR.Client.Tests (98)
HttpConnectionFactoryTests.cs (2)
55Assert.Equal("The provided EndPoint must be of type UriEndPoint.", ex.Message); 73Assert.Equal("If HttpConnectionOptions.Url was set, it must match the UriEndPoint.Uri passed to ConnectAsync.", ex.Message);
HttpConnectionTests.ConnectionLifecycle.cs (3)
72Assert.Equal(typeof(HttpConnection).FullName, exception.ObjectName); 158Assert.Equal("Unable to connect to the server with any of the available transports. " + 539Assert.Equal(typeof(HttpConnection).FullName, exception.ObjectName);
HttpConnectionTests.cs (5)
53Assert.Equal("url", exception.ParamName); 60Assert.Equal("httpConnectionOptions", exception.ParamName); 68Assert.Equal("The ConnectionId is set internally and should not be set by user code.", exception.Message); 162Assert.Equal("SendingHttpRequest", writeList[0].EventId.Name); 163Assert.Equal("UnsuccessfulHttpResponse", writeList[1].EventId.Name);
HttpConnectionTests.Negotiate.cs (25)
90Assert.Equal(expectedNegotiate, await negotiateUrlTcs.Task.DefaultTimeout()); 126Assert.Equal("0rge0d00-0040-0030-0r00-000q00r00e00", connectionId); 163Assert.Equal("0rge0d00-0040-0030-0r00-000q00r00e00", connectionId); 202Assert.Equal("0rge0d00-0040-0030-0r00-000q00r00e00", connectionId); 203Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 204Assert.Equal("http://fakeuri.org/?id=different-id", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 242Assert.Equal("0rge0d00-0040-0030-0r00-000q00r00e00", connectionId); 243Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 244Assert.Equal("http://fakeuri.org/?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 300Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 301Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 302Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 303Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString()); 327Assert.Equal("Negotiate redirection limit exceeded.", exception.Message); 406Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 407Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 408Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 409Assert.Equal("https://another.domain.url/chat?id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString()); 471Assert.Equal("http://fakeuri.org/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[0].RequestUri.ToString()); 472Assert.Equal("https://another.domain.url/chat/negotiate?negotiateVersion=1", testHttpHandler.ReceivedRequests[1].RequestUri.ToString()); 473Assert.Equal("https://another.domain.url/chat?negotiateVersion=1&id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[2].RequestUri.ToString()); 474Assert.Equal("https://another.domain.url/chat?negotiateVersion=1&id=0rge0d00-0040-0030-0r00-000q00r00e00", testHttpHandler.ReceivedRequests[3].RequestUri.ToString()); 476Assert.Equal("https://another.domain.url/chat", connectedEndpoint.ToString()); 600Assert.Equal("Test error.", exception.Message); 618Assert.Equal(expectedExceptionMessage, exception.Message);
HttpConnectionTests.Transport.cs (10)
44Assert.Equal("Bearer", request.Headers.Authorization.Scheme); 47Assert.Equal(callCount.ToString(CultureInfo.InvariantCulture), request.Headers.Authorization.Parameter); 169Assert.Equal("XMLHttpRequest", requestedWithValue); 263Assert.Equal($"Cannot access the {nameof(Transport)} pipe before the connection has started.", exception.Message); 279Assert.Equal(typeof(HttpConnection).FullName, exception.ObjectName); 389Assert.Equal("Bearer", request.Headers.Authorization.Scheme); 391Assert.Equal(accessTokenCallCount.ToString(CultureInfo.InvariantCulture), request.Headers.Authorization.Parameter); 410Assert.Equal("This is a test", Encoding.UTF8.GetString(message.Buffer)); 489Assert.Equal("Bearer", request.Headers.Authorization.Scheme); 491Assert.Equal(accessTokenCallCount.ToString(CultureInfo.InvariantCulture), request.Headers.Authorization.Parameter);
HubConnectionBuilderTests.cs (4)
23Assert.Equal("Cannot create HubConnection instance. An IConnectionFactory was not configured.", ex.Message); 33Assert.Equal("Cannot create HubConnection instance. An EndPoint was not configured.", ex.Message); 57Assert.Equal("JUST A TEST", actualProtocol.PayloadSerializer.DateFormatString); 70Assert.Equal("HubConnectionBuilder allows creation only of a single instance of HubConnection.", ex.Message);
HubConnectionTests.ConnectionLifecycle.cs (6)
200Assert.Equal($"The '{name}' method cannot be called if the connection is not active", ex.Message); 378Assert.Equal($"The '{nameof(HubConnection.SendCoreAsync)}' method cannot be called if the connection is not active", ex.Message); 413Assert.Equal($"The '{nameof(HubConnection.SendCoreAsync)}' method cannot be called if the connection is not active", ex.Message); 451Assert.Equal($"The '{nameof(HubConnection.SendCoreAsync)}' method cannot be called if the connection is not active", ex.Message); 481Assert.Equal($"The '{methodName}' method cannot be called if the connection is not active", ex.Message); 630Assert.Equal("Connection terminated while reading a message.", exception.Message);
HubConnectionTests.cs (7)
197Assert.Equal("{\"type\":7}", await connection.ReadSentTextMessageAsync().DefaultTimeout()); 216Assert.Equal("{\"type\":7}", await connection.ReadSentTextMessageAsync().DefaultTimeout()); 258Assert.Equal("{\"type\":7}", await connection.ReadSentTextMessageAsync().DefaultTimeout()); 277Assert.Equal("{\"type\":7}", await connection.ReadSentTextMessageAsync().DefaultTimeout()); 370Assert.Equal($"Server timeout ({hubConnection.ServerTimeout.TotalMilliseconds:0.00}ms) elapsed without receiving a message from the server.", exception.Message); 424Assert.Equal($"Server timeout ({hubConnection.ServerTimeout.TotalMilliseconds:0.00}ms) elapsed without receiving a message from the server.", exception.Message); 538Assert.Equal(expected.Foo, result.Foo);
HubConnectionTests.Protocol.cs (25)
31Assert.Equal("{\"type\":1,\"target\":\"Foo\",\"arguments\":[]}", invokeMessage); 55Assert.Equal("{\"protocol\":\"json\",\"version\":1}", handshakeMessage); 85Assert.Equal("Expected a handshake response from the server.", ex.Message); 131Assert.Equal("{\"type\":1,\"invocationId\":\"1\",\"target\":\"Foo\",\"arguments\":[]}", invokeMessage); 192Assert.Equal("The server closed the connection with the following error: Error!", closeException.Message); 214Assert.Equal("{\"type\":4,\"invocationId\":\"1\",\"target\":\"Foo\",\"arguments\":[]}", invokeMessage); 307Assert.Equal("An error occurred", ex.Message); 330Assert.Equal("Server provided a result in a completion response to a streamed invocation.", ex.Message); 353Assert.Equal("An error occurred", ex.Message); 376Assert.Equal("Streaming hub methods must be invoked with the 'HubConnection.StreamAsChannelAsync' method.", ex.Message); 578Assert.Equal("hello", response); 614Assert.Equal("hello", response); 637Assert.Equal("{\"type\":6}", firstPing); 640Assert.Equal("{\"type\":6}", secondPing); 669Assert.Equal("{\"type\":7}", message); 693Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"result\":10}", invokeMessage); 714Assert.Equal("'Result' already has a value returning handler. Multiple return values are not supported.", ex.Message); 740Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"result\":40}", invokeMessage); 768Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"error\":\"error from client\"}", invokeMessage); 797Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"result\":20}", invokeMessage); 819Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"error\":\"Client didn't provide a result.\"}", invokeMessage); 844Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"error\":\"Client didn't provide a result.\"}", invokeMessage); 869Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"error\":\"Client failed to parse argument(s).\"}", invokeMessage); 894Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"result\":null}", invokeMessage); 925Assert.Equal("{\"type\":3,\"invocationId\":\"1\",\"result\":1}", invokeMessage);
HubConnectionTests.Reconnect.cs (3)
538Assert.Equal(expectedMessage, reconnectingException.Message); 540Assert.Equal(expectedMessage, retryContexts[0].RetryReason.Message); 611Assert.Equal("The server closed the connection with the following error: Error!", closeError.Message);
HubConnectionTests.Tracing.cs (3)
46Assert.Equal(clientActivity.Id, traceParent); 83Assert.Equal(clientActivity.Id, traceParent); 121Assert.Equal(clientActivity.Id, traceParent);
ServerSentEventsTransportTests.cs (3)
289Assert.Equal("3:abc", Encoding.ASCII.GetString(message)); 377Assert.Equal($"The 'Binary' transfer format is not supported by this transport.", ex.GetLocalizationSafeMessage()); 490Assert.Equal(expectedMessage, Encoding.ASCII.GetString(message));
TestServerTests.cs (2)
60Assert.Equal(originalMessage, receivedMessage); 105Assert.Equal(originalMessage, receivedMessage);
Microsoft.AspNetCore.SignalR.Common.Tests (51)
Internal\Formatters\BinaryMessageParserTests.cs (1)
73Assert.Equal("Messages over 2GB in size are not supported.", ex.Message);
Internal\Formatters\TextMessageFormatterTests.cs (1)
22Assert.Equal("ABC\u001e", Encoding.UTF8.GetString(ms.ToArray()));
Internal\Formatters\TextMessageParserTests.cs (5)
20Assert.Equal("ABC", Encoding.UTF8.GetString(payload.ToArray())); 36Assert.Equal("ABC", Encoding.UTF8.GetString(payload.ToArray())); 38Assert.Equal("XYZ", Encoding.UTF8.GetString(payload.ToArray())); 46Assert.Equal("ABC", Encoding.UTF8.GetString(payload.ToArray())); 48Assert.Equal("XYZ", Encoding.UTF8.GetString(payload.ToArray()));
Internal\Protocol\HandshakeProtocolTests.cs (6)
30Assert.Equal(protocol, deserializedMessage.Protocol); 41Assert.Equal("json", deserializedMessage.Protocol); 55Assert.Equal(error, response.Error); 65Assert.Equal("dummy", response.Error); 94Assert.Equal(expectedMessage, exception.Message); 110Assert.Equal(expectedMessage, exception.Message);
Internal\Protocol\JsonHubProtocolTests.cs (12)
55Assert.Equal(expectedMessage, ex.Message); 73Assert.Equal(expectedOutput, json); 127Assert.Equal(Frame(expectedJson), json); 160Assert.Equal(Frame(expectedJson), json); 167Assert.Equal("1", streamItemMessage.InvocationId); 193Assert.Equal(Frame(expectedJson), json); 200Assert.Equal("1", completionMessage.InvocationId); 258Assert.Equal(expectedPersonExtended.Name, actualPersonExtended.Name); 267Assert.Equal(expectedPersonExtended2.Name, actualPersonExtended2.Name); 268Assert.Equal(expectedPersonExtended2.Location, actualPersonExtended2.Location); 276Assert.Equal(expectedJsonPerson.Name, actualJsonPerson.Name); 284Assert.Equal(expectedPerson.Name, actualPerson.Name);
Internal\Protocol\JsonHubProtocolTestsBase.cs (8)
128Assert.Equal(expectedOutput, json); 197Assert.Equal(expectedMessage, ex.Message); 258Assert.Equal(expectedMessage, bindingFailure.BindingFailure.SourceException.Message); 270Assert.Equal("Error reading JSON.", ex.Message); 310Assert.Equal("foo", bindingFailure.Target); 352Assert.Equal(expectedOutput, json); 479Assert.Equal("1", completion.InvocationId); 495Assert.Equal("1", completion.InvocationId);
Internal\Protocol\MessagePackHubProtocolTestBase.cs (2)
366Assert.Equal(testData.ErrorMessage, exception.Message); 399Assert.Equal(testData.ErrorMessage, bindingFailure.BindingFailure.SourceException.Message);
Internal\Protocol\MessagePackHubProtocolTests.cs (2)
256Assert.Equal("xyz", completion.InvocationId); 270Assert.Equal("xyz", completion.InvocationId);
Internal\Protocol\NewtonsoftJsonHubProtocolTests.cs (2)
53Assert.Equal(expectedMessage, ex.Message); 72Assert.Equal(expectedOutput, json);
Internal\Protocol\Utf8BufferTextReaderTests.cs (8)
25Assert.Equal("Hello World", new string(chars, 0, read)); 39Assert.Equal("a\u00E4\u00E4\u00a9o", new string(chars, 0, read)); 57Assert.Equal("Hello World", new string(chars, 10, read)); 71Assert.Equal("Hello", new string(chars, 0, read)); 76Assert.Equal(" Worl", new string(chars, 0, read)); 81Assert.Equal("d", new string(chars, 0, read)); 103Assert.Equal("\u00E4\u00E4", new string(chars, 0, read)); 108Assert.Equal("\u00E5", new string(chars, 0, read));
Internal\Protocol\Utf8BufferTextWriterTests.cs (4)
233Assert.Equal("Hello", Encoding.UTF8.GetString(bufferWriter1.ToArray())); 242Assert.Equal("World", Encoding.UTF8.GetString(bufferWriter2.ToArray())); 292Assert.Equal(testString, Encoding.UTF8.GetString(bufferWriter.ToArray())); 340Assert.Equal(expected, result);
Microsoft.AspNetCore.SignalR.Specification.Tests (20)
HubLifetimeManagerTestBase.cs (15)
49Assert.Equal("Hello", message.Target); 51Assert.Equal("World", (string)message.Arguments[0]); 54Assert.Equal("Hello", message.Target); 56Assert.Equal("World", (string)message.Arguments[0]); 82Assert.Equal("Hello", message.Target); 84Assert.Equal("World", (string)message.Arguments[0]); 112Assert.Equal("Hello", message.Target); 114Assert.Equal("World", (string)message.Arguments[0]); 143Assert.Equal("Hello", message.Target); 145Assert.Equal("World", (string)message.Arguments[0]); 168Assert.Equal("Hello", message.Target); 170Assert.Equal("World", (string)message.Arguments[0]); 224Assert.Equal("Error from client", ex.Message); 254Assert.Equal($"Connection ID '{connection2.ConnectionId}' is not valid for invocation ID '{invocation.InvocationId}'.", ex.Message); 338Assert.Equal($"Connection '{connection1.ConnectionId}' disconnected.", ex.Message);
ScaleoutHubLifetimeManagerTests.cs (5)
33Assert.Equal("Hello", message.Target); 35Assert.Equal("World", (string)message.Arguments[0]); 525Assert.Equal("Error from client", ex.Message); 576Assert.Equal("Connection disconnected.", ex.Message); 627Assert.Equal("Connection '1234' does not exist.", ex.Message);
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (22)
RedisDependencyInjectionExtensionsTests.cs (2)
30Assert.Equal(password, options.Value.Configuration.Password); 35Assert.Equal(host, dnsEndpoint.Host);
RedisEndToEnd.cs (10)
51Assert.Equal("Hello, World!", str); 82Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout()); 83Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout()); 110Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout()); 111Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout()); 141Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout()); 172Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout()); 176Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout()); 204Assert.Equal("Hello, World!", await tcs2.Task.DefaultTimeout()); 208Assert.Equal("Hello, World!", await tcs.Task.DefaultTimeout());
RedisHubLifetimeManagerTests.cs (6)
73Assert.Equal("Hello", message.Target); 82Assert.Equal("testProperty", prop.Name); 83Assert.Equal("Foo", prop.Value.Value<string>()); 117Assert.Equal("throw from connect", ex.Message); 124Assert.Equal("Error connecting to Redis.", logs[0].Message); 125Assert.Equal("throw from connect", logs[0].Exception.Message);
RedisProtocolTests.cs (4)
75Assert.Equal(testData.Decoded.ServerName, decoded.ServerName); 77Assert.Equal(testData.Decoded.GroupName, decoded.GroupName); 78Assert.Equal(testData.Decoded.ConnectionId, decoded.ConnectionId); 258Assert.Equal(testData.Decoded.ProtocolName, completionMessage.ProtocolName);
Microsoft.AspNetCore.SignalR.Tests (184)
AddSignalRTests.cs (2)
185Assert.Equal("json", p); 189Assert.Equal("messagepack", p);
DefaultHubActivatorTests.cs (1)
60Assert.Equal("hub",
DefaultHubLifetimeManagerTests.cs (6)
40Assert.Equal("Hello", message.Target); 42Assert.Equal("World", (string)message.Arguments[0]); 216Assert.Equal("Hello", message.Target); 218Assert.Equal("World", (string)message.Arguments[0]); 246Assert.Equal("Hello", message.Target); 248Assert.Equal("World", (string)message.Arguments[0]);
DefaultTransportFactoryTests.cs (3)
38Assert.Equal("httpClient", exception.ParamName); 71Assert.Equal("No requested transports available on the server.", ex.Message); 108Assert.Equal("No requested transports available on the server.", ex.Message);
EndToEndTests.cs (5)
241Assert.Equal("Negotiation can only be skipped when using the WebSocket transport directly.", exception.Message); 293Assert.Equal(message, Encoding.UTF8.GetString(await connection.Transport.Input.ReadAsync(bytes.Length).DefaultTimeout())); 345Assert.Equal(message, Encoding.UTF8.GetString(receivedData)); 451Assert.Equal("Response status code does not indicate success: 401 (Unauthorized).", ex.Message); 625Assert.Equal("Response status code does not indicate success: 401 (Unauthorized).", ex.Message);
HubConnectionHandlerTests.Activity.cs (19)
61Assert.Equal("test", res); 79Assert.Equal("inner", userCodeActivity.OperationName); 143Assert.Equal("test", res); 150Assert.Equal("0123456789abcdef0123456789abcdef", invocationActivity.TraceId.ToHexString()); 151Assert.Equal("0123456789abcdef", invocationActivity.ParentSpanId.ToHexString()); 152Assert.Equal("TraceState1", invocationActivity.TraceStateString); 276Assert.Equal("0123456789abcdef0123456789abcdef", invocationActivity.TraceId.ToHexString()); 277Assert.Equal("0123456789abcdef", invocationActivity.ParentSpanId.ToHexString()); 278Assert.Equal("TraceState1", invocationActivity.TraceStateString); 495Assert.Equal(SignalRServerActivitySource.Name, activity.Source.Name); 497Assert.Equal($"{typeof(THub).FullName}/{methodName}", activity.DisplayName); 504Assert.Equal("error.type", tags[3].Key); 505Assert.Equal(exceptionType.FullName, tags[3].Value); 513Assert.Equal("rpc.method", tags[0].Key); 514Assert.Equal(methodName, tags[0].Value); 515Assert.Equal("rpc.system", tags[1].Key); 516Assert.Equal("signalr", tags[1].Value); 517Assert.Equal("rpc.service", tags[2].Key); 518Assert.Equal(typeof(THub).FullName, tags[2].Value);
HubConnectionHandlerTests.ClientResult.cs (18)
35Assert.Equal(invocationId, completion.InvocationId); 66Assert.Equal("An unexpected error occurred invoking 'GetClientResult' on the server. HubException: Client error", completion.Error); 67Assert.Equal(invocationId, completion.InvocationId); 92Assert.Equal("Connection closed with an error. InvalidOperationException: Client results inside OnConnectedAsync Hub methods are not allowed.", closeMessage.Error); 123Assert.Equal($"Connection '{client.Connection.ConnectionId}' disconnected.", ex.Message); 153Assert.Equal("GetClientResult", invocation.Target); 187Assert.Equal("GetClientResult", invocation.Target); 264Assert.Equal(invocationId, completion.InvocationId); 270Assert.Equal(invocationId2, completion.InvocationId); 276Assert.Equal(invocationId3, completion.InvocationId); 380Assert.Equal("GetClientResultWithCancellation", invocation.Target); 385Assert.Equal("Invocation canceled by the server.", ex.Message); 425Assert.Equal("GetClientResult", invocation.Target); 430Assert.Equal("Invocation canceled by the server.", ex.Message); 465Assert.Equal("s1", invocationMessage.InvocationId); 472Assert.Equal(invocationId, completion.InvocationId); 507Assert.Equal(invocationId, streamItem.InvocationId); 510Assert.Equal(invocationId, completionMessage.InvocationId);
HubConnectionHandlerTests.cs (81)
208Assert.Equal("Handshake was canceled.", client.HandshakeResponseMessage.Error); 245Assert.Equal($"Cannot generate proxy implementation for '{typeof(IVoidReturningTypedHubClient).FullName}.{nameof(IVoidReturningTypedHubClient.Send)}'. All client proxy methods must return '{typeof(Task).FullName}' or 'System.Threading.Tasks.Task<T>'.", ex.Message); 264Assert.Equal("The protocol 'CustomProtocol' is not supported.", client.HandshakeResponseMessage.Error); 290Assert.Equal("Cannot use the 'messagepack' protocol on the current transport. The transport does not support 'Binary' transfer format.", client.HandshakeResponseMessage.Error); 323Assert.Equal("Handshake was canceled.", ((HandshakeResponseMessage)message).Error); 408Assert.Equal("1", completionMessage.InvocationId); 446Assert.Equal("1", completionMessage.InvocationId); 502Assert.Equal(exceptionLog.First().Exception.Message, $"The maximum message size of {maximumMessageSize}B was exceeded. The message size can be configured in AddHubOptions."); 532Assert.Equal(exceptionLog.First().Exception.Message, $"The maximum message size of {maximumMessageSize}B was exceeded. The message size can be configured in AddHubOptions."); 562Assert.Equal("1", completionMessage.InvocationId); 567Assert.Equal("2", completionMessage.InvocationId); 583Assert.Equal(exceptionLog.First().Exception.Message, $"The maximum message size of {maximumMessageSize}B was exceeded. The message size can be configured in AddHubOptions."); 613Assert.Equal("1", completionMessage.InvocationId); 618Assert.Equal("2", completionMessage.InvocationId); 623Assert.Equal("3", completionMessage.InvocationId); 649Assert.Equal("The server does not support version 9001 of the 'json' protocol.", client.HandshakeResponseMessage.Error); 715Assert.Equal("Lifetime manager OnConnectedAsync failed.", exception.Message); 785Assert.Equal("Hub OnDisconnected failed.", exception.Message); 932Assert.Equal($"An unexpected error occurred invoking '{methodName}' on the server. InvalidOperationException: BOOM!", message.Error); 936Assert.Equal($"An unexpected error occurred invoking '{methodName}' on the server.", message.Error); 999Assert.Equal($"An unexpected error occurred invoking '{methodName}' on the server. HubException: This is a hub exception", message.Error); 1242Assert.Equal("Failed to invoke 'OnDisconnectedAsync' due to an error on the server. HubException: Method does not exist.", result.Error); 1266Assert.Equal("Duplicate definitions of 'OverloadedMethod'. Overloading is not supported.", ex.Message); 1286Assert.Equal("Failed to invoke 'StaticMethod' due to an error on the server. HubException: Method does not exist.", result.Error); 1310Assert.Equal("Failed to invoke 'ToString' due to an error on the server. HubException: Method does not exist.", result.Error); 1313Assert.Equal("Failed to invoke 'GetHashCode' due to an error on the server. HubException: Method does not exist.", result.Error); 1316Assert.Equal("Failed to invoke 'Equals' due to an error on the server. HubException: Method does not exist.", result.Error); 1319Assert.Equal("Failed to invoke 'ReferenceEquals' due to an error on the server. HubException: Method does not exist.", result.Error); 1344Assert.Equal("Failed to invoke 'Dispose' due to an error on the server. HubException: Method does not exist.", result.Error); 1363Assert.Equal("Method 'GenericMethod' is a generic method which is not supported on a Hub.", exception.Message); 1390Assert.Equal("Broadcast", invocation.Target); 1428Assert.Equal("Array", invocation.Target); 1463Assert.Equal("Send", invocation.Target); 1472Assert.Equal("Broadcast", invocation.Target); 1504Assert.Equal("Send", invocation.Target); 1510Assert.Equal("Broadcast", invocation.Target); 1542Assert.Equal("Connection closed with an error.", close.Error); 1575Assert.Equal("Send", invocation.Target); 1580Assert.Equal("Send", invocation.Target); 1618Assert.Equal("Send", invocation.Target); 1623Assert.Equal("Send", invocation.Target); 1663Assert.Equal("Send", invocation.Target); 1668Assert.Equal("Send", invocation.Target); 1717Assert.Equal("Send", invocation.Target); 1764Assert.Equal("Send", invocation.Target); 1815Assert.Equal("Send", invocation.Target); 1858Assert.Equal("Send", invocation.Target); 1864Assert.Equal("Send", invocation.Target); 1921Assert.Equal("Send", invocation.Target); 1955Assert.Equal("Send", invocation.Target); 1988Assert.Equal("Send", invocation.Target); 2060Assert.Equal(invocationId, hubMessage.InvocationId); 2109Assert.Equal($"An error occurred on the server while streaming results. {detailedError}", completion.Error); 2113Assert.Equal("An error occurred on the server while streaming results.", completion.Error); 2152Assert.Equal(sentMessage, completion2.Arguments[0].ToString()); 2310Assert.Equal(nameof(MethodHub.MultiParamAuthMethod), resource.HubMethodName); 2565Assert.Equal("Send", message.Target); 2890Assert.Equal("Client hasn't sent a message/ping within the configured ClientTimeoutInterval.", ex.Message); 3159Assert.Equal("Connection closed with an error. InvalidOperationException: Hub OnConnected failed.", closeMessage.Error); 3163Assert.Equal("Connection closed with an error.", closeMessage.Error); 3301Assert.Equal("Invocation ID '123' is already in use.", completion.Error); 3538Assert.Equal(streamInvocationId, completion.InvocationId); 3576Assert.Equal("Connection closed with an error. InvalidDataException: Connection terminated while reading a message.", closeMessage.Error); 3932Assert.Equal("error identified and caught", (string)((CompletionMessage)response).Result); 4023Assert.Equal("An unexpected error occurred invoking 'StreamingConcat' on the server. HubException: Client sent 2 stream(s), Hub method expects 1.", response.Error); 4042Assert.Equal("An unexpected error occurred invoking 'StreamingConcat' on the server. HubException: Client sent 0 stream(s), Hub method expects 1.", response.Error); 4394Assert.Equal("Failed to invoke 'InvalidArgument' due to an error on the server.", completion.Error); 4526Assert.Equal("Echo", message.Target); 4555Assert.Equal("Send", invocation.Target); 4586Assert.Equal("The underlying connection was closed.", exception.Message); 4645Assert.Equal("Send", invocation.Target); 4662Assert.Equal("An unexpected error occurred invoking 'SingleService' on the server. InvalidOperationException: No service for type 'Microsoft.AspNetCore.SignalR.Tests.Service1' has been registered.", res.Error); 4742Assert.Equal("An unexpected error occurred invoking 'Stream' on the server. HubException: Client sent 0 stream(s), Hub method expects 1.", res.Error); 4764Assert.Equal("Failed to invoke 'ServiceWithoutAttribute' due to an error on the server. InvalidDataException: Invocation provides 0 argument(s) but target expects 1.", res.Error); 4854Assert.Equal("Failed to invoke 'ServiceWithAndWithoutAttribute' due to an error on the server. InvalidDataException: Invocation provides 0 argument(s) but target expects 1.", res.Error); 4896Assert.Equal("Failed to invoke 'ServiceWithoutAttribute' due to an error on the server. InvalidDataException: Invocation provides 0 argument(s) but target expects 1.", res.Error); 4916Assert.Equal("Failed to invoke 'IEnumerableOfServiceWithoutAttribute' due to an error on the server. InvalidDataException: Invocation provides 0 argument(s) but target expects 1.", res.Error); 5047Assert.Equal("'Microsoft.AspNetCore.SignalR.Tests.Service1' is not in DI as a keyed service.", ex.Message); 5063Assert.Equal("BadServicesHub.BadMethod: The FromKeyedServicesAttribute is not supported on parameters that are also annotated with IFromServiceMetadata.", ex.Message); 5106Assert.Equal("Test", message.Target); 5158Assert.Equal(errorMessage, ex.Message);
HubConnectionHandlerTestUtils\Utils.cs (2)
34Assert.Equal(expectedCompletion.Error, actualCompletion.Error); 48Assert.Equal(expectedInvocation.Target, actualInvocation.Target);
HubFilterTests.cs (3)
639Assert.Equal("Failed to invoke 'Method' due to an error on the server. HubException: Method does not exist.", message.Error); 670Assert.Equal("Failed to invoke 'Method' due to an error on the server. HubException: Method does not exist.", message.Error); 891Assert.Equal("An unexpected error occurred invoking 'Echo' on the server. HubException: Unknown hub method 'BaseMethod'", message.Error);
Internal\DefaultHubProtocolResolverTests.cs (1)
62Assert.Equal("protocolName", exception.ParamName);
Internal\TypedClientBuilderTests.cs (18)
24Assert.Equal("Method", send.Method); 48Assert.Equal("Method", send.Method); 75Assert.Equal("Method", send1.Method); 85Assert.Equal("SubMethod", send2.Method); 112Assert.Equal("Method", send1.Method); 121Assert.Equal("NoArgumentMethod", send2.Method); 136Assert.Equal("Type must be an interface.", ex.Message); 144Assert.Equal("Type must be an interface.", ex.Message); 152Assert.Equal("Type must be an interface.", ex.Message); 160Assert.Equal($"Cannot generate proxy implementation for '{typeof(IVoidMethodClient).FullName}.{nameof(IVoidMethodClient.Method)}'. All client proxy methods must return '{typeof(Task).FullName}' or '{typeof(Task).FullName}<T>'.", ex.Message); 168Assert.Equal($"Cannot generate proxy implementation for '{typeof(IStringMethodClient).FullName}.{nameof(IStringMethodClient.Method)}'. All client proxy methods must return '{typeof(Task).FullName}' or '{typeof(Task).FullName}<T>'.", ex.Message); 176Assert.Equal( 185Assert.Equal( 194Assert.Equal("Type must not contain properties.", ex.Message); 202Assert.Equal("Type must not contain events.", ex.Message); 218Assert.Equal("GetValue", send.Method); 260Assert.Equal("MethodReturning", send1.Method); 269Assert.Equal("NoArgumentMethodReturning", send2.Method);
MapSignalRTests.cs (22)
29Assert.Equal("Duplicate definitions of 'OverloadedMethod'. Overloading is not supported.", ex.Message); 59Assert.Equal("Unable to find the required services. Please add all the required services by calling " + 89Assert.Equal("/path/negotiate", endpoint.DisplayName); 94Assert.Equal("/path", endpoint.DisplayName); 122Assert.Equal("/path/negotiate", endpoint.DisplayName); 132Assert.Equal("/path", endpoint.DisplayName); 161Assert.Equal("/path/negotiate", endpoint.DisplayName); 166Assert.Equal("/path", endpoint.DisplayName); 190Assert.Equal("/path/negotiate", endpoint.DisplayName); 195Assert.Equal("/path", endpoint.DisplayName); 219Assert.Equal("/path/negotiate", endpoint.DisplayName); 224Assert.Equal("/path", endpoint.DisplayName); 251Assert.Equal("/path/negotiate", endpoint.DisplayName); 256Assert.Equal("/path", endpoint.DisplayName); 283Assert.Equal("/path/negotiate", endpoint.DisplayName); 288Assert.Equal("Foo", auth?.Policy); 293Assert.Equal("/path", endpoint.DisplayName); 298Assert.Equal("Foo", auth?.Policy); 322Assert.Equal("/path/negotiate", endpoint.DisplayName); 328Assert.Equal("/path", endpoint.DisplayName); 353Assert.Equal("/path/negotiate", endpoint.DisplayName); 359Assert.Equal("/path", endpoint.DisplayName);
SerializedHubMessageTests.cs (1)
87Assert.Equal("test", serializedMessage.ProtocolName);
UserAgentHeaderTest.cs (1)
19Assert.Equal(testData.Expected, Constants.ConstructUserAgent(testData.Version, testData.DetailedVersion, testData.Os, testData.Runtime, testData.RuntimeVersion));
WebSocketsTransportTests.cs (1)
152Assert.Equal("XMLHttpRequest", headerValue);
Microsoft.AspNetCore.SpaServices.Extensions.Tests (2)
SpaProxyTests.cs (1)
59Assert.Equal(expected, forwardedRequestMessage.RequestUri.ToString());
SpaServicesExtensionsTests.cs (1)
38Assert.Equal("No RootPath was set on the SpaStaticFilesOptions.", exception.Message);
Microsoft.AspNetCore.StaticAssets.Tests (19)
StaticAssetsIntegrationTests.cs (19)
64Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag); 66Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 67Assert.Equal("Hello, World!", await response.Content.ReadAsStringAsync()); 114Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag); 116Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 117Assert.Equal("Hello, World!", await response.Content.ReadAsStringAsync()); 166Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag); 168Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 169Assert.Equal("Hello, World!", await response.Content.ReadAsStringAsync()); 170Assert.Equal("immutable", response.Headers.CacheControl.ToString()); 335Assert.Equal($"\"3/1gIbsr1bCvZ2KQgJ7DpTGR3YHH9wpLKGiKNiGCmG8=\"", response.Headers.ETag.Tag); 337Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 338Assert.Equal("Hello, World!", await response.Content.ReadAsStringAsync()); 388Assert.Equal($"\"+fvSyRQcr4/t/rcA0u1KfZ8c3CpXxBDxsxDhnAftNqg=\"", response.Headers.ETag.Tag); 390Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 391Assert.Equal("Hello, World! Modified", await response.Content.ReadAsStringAsync()); 444Assert.Equal(GetGzipEtag(Path.Combine(webRoot, "sample.txt")), response.Headers.ETag.Tag); 446Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 451Assert.Equal("Hello, World! Modified", content);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (5)
FallbackStaticFileTest.cs (2)
63Assert.Equal("Hello, world!", responseText); 112Assert.Equal("Hello, world!", responseText);
StaticFileMiddlewareTests.cs (3)
86Assert.Equal("Hi from endpoint.", await response.Content.ReadAsStringAsync()); 163Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 205Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.StaticFiles.Tests (52)
DefaultContentTypeProviderTests.cs (6)
21Assert.Equal("text/plain", contentType); 37Assert.Equal("video/x-ms-dvr", contentType); 45Assert.Equal("text/plain", contentType); 47Assert.Equal("text/plain", contentType); 55Assert.Equal("text/plain", contentType); 57Assert.Equal("text/plain", contentType);
DefaultFilesMiddlewareTests.cs (5)
76Assert.Equal(requestUrl, await response.Content.ReadAsStringAsync()); // Should not be modified 119Assert.Equal("/SubFolder/", await response.Content.ReadAsStringAsync()); // Should not be modified 161Assert.Equal("/SubFolder/default.html", responseContent); // Should be modified and be valid path to file 226Assert.Equal(requestUrlWithSlash + "default.html", await response.Content.ReadAsStringAsync()); // Should be modified and be valid path to file 268Assert.Equal("http://localhost" + baseUrl + new PathString(requestUrl + "/") + queryString, actualURL);
DirectoryBrowserMiddlewareTests.cs (5)
134Assert.Equal("Hi from endpoint.", await response.Content.ReadAsStringAsync()); 171Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString()); 228Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString()); 272Assert.Equal("http://localhost" + requestUrl + "/" + queryString, response.Headers.GetValues("Location").FirstOrDefault()); 371Assert.Equal("text/html; charset=utf-8", response.Content.Headers.ContentType.ToString());
RangeHeaderTests.cs (28)
28Assert.Equal("bytes 0-10/62", resp.Content.Headers.ContentRange.ToString()); 30Assert.Equal("0123456789a", await resp.Content.ReadAsStringAsync()); 53Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 70Assert.Equal("bytes 0-10/62", resp.Content.Headers.ContentRange.ToString()); 72Assert.Equal("0123456789a", await resp.Content.ReadAsStringAsync()); 87Assert.Equal("bytes 0-10/62", resp.Content.Headers.ContentRange.ToString()); 89Assert.Equal("0123456789a", await resp.Content.ReadAsStringAsync()); 125Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 142Assert.Equal("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", await resp.Content.ReadAsStringAsync()); 159Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 178Assert.Equal("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", await resp.Content.ReadAsStringAsync()); 197Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 216Assert.Equal("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", await resp.Content.ReadAsStringAsync()); 224Assert.Equal("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", await resp.Content.ReadAsStringAsync()); 243Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 251Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 275Assert.Equal("bytes " + expectedRange + "/62", resp.Content.Headers.ContentRange.ToString()); 277Assert.Equal(expectedData, await resp.Content.ReadAsStringAsync()); 296Assert.Equal("bytes " + expectedRange + "/1", resp.Content.Headers.ContentRange.ToString()); 298Assert.Equal(expectedData, await resp.Content.ReadAsStringAsync()); 332Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 348Assert.Equal("bytes */62", resp.Content.Headers.ContentRange.ToString()); 385Assert.Equal("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", await resp.Content.ReadAsStringAsync()); 407Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync()); 426Assert.Equal("text/plain", resp.Content.Headers.ContentType.ToString()); 429Assert.Equal("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", await resp.Content.ReadAsStringAsync()); 446Assert.Equal("text/plain", resp.Content.Headers.ContentType.ToString()); 447Assert.Equal(string.Empty, await resp.Content.ReadAsStringAsync());
StaticFileMiddlewareTests.cs (8)
190Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 229Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 271Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 321Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 364Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString()); 412Assert.Equal("text/customfortest+plain", response.Content.Headers.ContentType.ToString()); 413Assert.Equal(responseText, responseContent); 482Assert.Equal("text/plain", response.Content.Headers.ContentType.ToString());
Microsoft.AspNetCore.TestHost.Tests (118)
ClientHandlerTests.cs (39)
27Assert.Equal(HttpProtocol.Http11, features.Get<IHttpRequestFeature>().Protocol); 28Assert.Equal("GET", features.Get<IHttpRequestFeature>().Method); 29Assert.Equal("https", features.Get<IHttpRequestFeature>().Scheme); 30Assert.Equal("/api/a%2Fb c", features.Get<IHttpRequestFeature>().Path); 37Assert.Equal("example.com", features.Get<IHttpRequestFeature>().Headers["host"]); 50Assert.Equal(HttpProtocol.Http11, context.Request.Protocol); 51Assert.Equal("GET", context.Request.Method); 52Assert.Equal("https", context.Request.Scheme); 53Assert.Equal("/A/Path", context.Request.PathBase.Value); 54Assert.Equal("/and/file.txt", context.Request.Path.Value); 55Assert.Equal("?and=query", context.Request.QueryString.Value); 62Assert.Equal("example.com", context.Request.Host.Value); 76Assert.Equal(HttpProtocol.Http11, features.Get<IHttpRequestFeature>().Protocol); 77Assert.Equal("GET", features.Get<IHttpRequestFeature>().Method); 78Assert.Equal("https", features.Get<IHttpRequestFeature>().Scheme); 79Assert.Equal("/A/Path", features.Get<IHttpRequestFeature>().PathBase); 80Assert.Equal("/and/file.txt", features.Get<IHttpRequestFeature>().Path); 81Assert.Equal("?and=query", features.Get<IHttpRequestFeature>().QueryString); 88Assert.Equal("example.com", features.Get<IHttpRequestFeature>().Headers["host"]); 100Assert.Equal("", context.Request.PathBase.Value); 101Assert.Equal("/", context.Request.Path.Value); 116Assert.Equal(userAgent, actualResult); 167Assert.Equal("chunked", context.Request.Headers.TransferEncoding); 184Assert.Equal("chunked", context.Request.Headers.TransferEncoding); 252Assert.Equal("StartTrailer", kvp.Key); 253Assert.Equal("Value!", kvp.Value.Single()); 257Assert.Equal("EndTrailer", kvp.Key); 258Assert.Equal("Value!", kvp.Value.Single()); 282Assert.Equal("?and=something", features.Get<IHttpRequestFeature>().QueryString); 364Assert.Equal("TestValue:1", response.Headers.GetValues("TestHeader").First()); 367Assert.Equal("TestValue:2", response.Headers.GetValues("TestHeader").First()); 380Assert.Equal("TestValue", response.Headers.GetValues("TestHeader").First()); 416Assert.Equal("TestValue", response.Headers.GetValues("TestHeader").First()); 418Assert.Equal("BodyStarted,BodyFinished", await response.Content.ReadAsStringAsync()); 435Assert.Equal("TestValue", response.Headers.GetValues("TestHeader").First()); 437Assert.Equal("BodyFinished", await response.Content.ReadAsStringAsync()); 453Assert.Equal("TestValue", response.Headers.GetValues("TestHeader").First()); 475Assert.Equal("TestValue", response.Headers.GetValues("TestHeader").First()); 534Assert.Equal("TestValue", response.Headers.GetValues("TestHeader").First());
HttpContextBuilderTests.cs (23)
31Assert.Equal(HttpProtocol.Http11, context.Request.Protocol); 32Assert.Equal("POST", context.Request.Method); 33Assert.Equal("https", context.Request.Scheme); 34Assert.Equal("example.com", context.Request.Host.Value); 35Assert.Equal("/A/Path", context.Request.PathBase.Value); 36Assert.Equal("/and/file.txt", context.Request.Path.Value); 37Assert.Equal("?and=query", context.Request.QueryString.Value); 60Assert.Equal(userAgent, actualResult); 73Assert.Equal("", context.Request.PathBase.Value); 74Assert.Equal("/", context.Request.Path.Value); 91Assert.Equal("TestValue", context.Response.Headers["TestHeader"]); 137Assert.Equal("TestValue", context.Response.Headers["TestHeader"]); 139Assert.Equal("BodyStarted", reader.ReadLine()); 141Assert.Equal("BodyFinished", reader.ReadToEnd()); 161Assert.Equal("TestValue", context.Response.Headers["TestHeader"]); 163Assert.Equal("BodyStarted", await reader.ReadLineAsync()); 165Assert.Equal("BodyFinished", await reader.ReadToEndAsync()); 185Assert.Equal("TestValue", context.Response.Headers["TestHeader"]); 187Assert.Equal("BodyFinished", new StreamReader(context.Response.Body).ReadToEnd()); 207Assert.Equal("TestValue", context.Response.Headers["TestHeader"]); 256Assert.Equal("TestValue", context.Response.Headers["TestHeader"]); 297Assert.Equal("TestValue", context.Response.Headers["TestHeader"]); 344Assert.Equal("The application aborted the request.", ex.Message);
RequestBuilderTests.cs (2)
19Assert.Equal("MyHost:90", request.Headers.Host.ToString()); 33Assert.Equal("Test/Value", request.Content.Headers.ContentType.ToString());
RequestLifetimeTests.cs (4)
29Assert.Equal("The application aborted the request.", ex.Message); 45Assert.Equal("The application aborted the request.", ex.Message); 68Assert.Equal("The application aborted the request.", rex.Message); 91Assert.Equal("The application aborted the request.", rex.Message);
ResponseResetTests.cs (4)
82Assert.Equal("The application reset the request with error code 12345.", rex.Message); 101Assert.Equal("The application reset the request with error code 12345.", rex.Message); 127Assert.Equal("The application reset the request with error code 12345.", rex.Message); 153Assert.Equal("The application reset the request with error code 12345.", rex.Message);
TestClientTests.cs (26)
37Assert.Equal(expected, actual); 47Assert.Equal("", ctx.Request.PathBase.Value); 48Assert.Equal("/", ctx.Request.Path.Value); 59Assert.Equal(expected, actual); 69Assert.Equal("", ctx.Request.PathBase.Value); 70Assert.Equal("/", ctx.Request.Path.Value); 81Assert.Equal(expected, actual); 102Assert.Equal("Hello world PUT Response", await response.Content.ReadAsStringAsync().DefaultTimeout()); 120Assert.Equal("Hello world POST Response", await response.Content.ReadAsStringAsync().DefaultTimeout()); 219Assert.Equal("STARTED", Encoding.UTF8.GetString(buffer, 0, length)); 228Assert.Equal("Hello world POST Response", Encoding.UTF8.GetString(buffer, 0, length)); 257Assert.Equal("HttpContent exception", ex.Message); 282Assert.Equal("SENT", Encoding.UTF8.GetString(serverBuffer, 0, serverLength)); 379Assert.Equal("POST Response", Encoding.UTF8.GetString(buffer, 0, length)); 438Assert.Equal("true", response.Headers.GetValues("test-header").Single()); 446Assert.Equal("An error occurred when completing the request. Request delegate may have finished while there is a pending read of the request body.", ex.InnerException.Message); 485Assert.Equal("true", response.Headers.GetValues("test-header").Single()); 688Assert.Equal("Normal Closure", result.CloseStatusDescription); 690Assert.Equal("charlie", clientSocket.SubProtocol); 959Assert.Equal(expected, actual); 961Assert.Equal(protocol, HttpProtocol.Http11); 986Assert.Equal(expected, actual); 988Assert.Equal(protocol, HttpProtocol.Http2); 1013Assert.Equal(expected, actual); 1015Assert.Equal(protocol, HttpProtocol.Http3); 1044Assert.Equal("test", actual);
TestServerTests.cs (17)
134Assert.Equal("OverridesConfigureServices, OverridesConfigureContainer", response); 204Assert.Equal("RequestServices:True", result); 227Assert.Equal("Hello World", await response.Content.ReadAsStringAsync()); 256Assert.Equal("ApplicationServicesEqual:True", result); 441Assert.Equal("Found:True", result); 463Assert.Equal("Success", result); 511Assert.Equal("Success", result); 552Assert.Equal("Success", result); 569Assert.Equal("FoundLogger:True", result); 590Assert.Equal("HasContext:True", result); 622Assert.Equal("HasContext:True", result); 638Assert.Equal("CreateInvokesApp", result); 656Assert.Equal("Response", await result.Content.ReadAsStringAsync()); 704Assert.Equal("FoundService:True", await result.Content.ReadAsStringAsync()); 717Assert.Equal("FoundFoo:False", await result.Content.ReadAsStringAsync()); 743Assert.Equal("Hello World", result); 796Assert.Equal("otherhost:5678", responseBody);
WebSocketClientTests.cs (3)
51Assert.Equal("http", capturedScheme); 52Assert.Equal(expectedHost, capturedHost); 53Assert.Equal("/connect", capturedPath);
Microsoft.AspNetCore.Testing.Tests (9)
FakeCertificateFactoryTests.cs (2)
19Assert.Equal("CN=dotnet-extensions-self-signed-unit-test-certificate", certificate.SubjectName.Name); 20Assert.Equal("localhost", certificate.GetNameInfo(X509NameType.DnsFromAlternativeName, false));
FakesExtensionsTests.cs (7)
101Assert.Equal(_urlAddresses[0], client.BaseAddress?.AbsoluteUri); 112Assert.Equal("No suitable address found to call the server.", exception.Message); 123Assert.Equal("No suitable address found to call the server.", exception.Message); 152Assert.Equal(_urlAddresses[1], client.BaseAddress?.AbsoluteUri); 220address => Assert.Equal(address.AbsoluteUri, _urlAddresses[0]), 221address => Assert.Equal(address.AbsoluteUri, _urlAddresses[1]), 222address => Assert.Equal(address.AbsoluteUri, _urlAddresses[2]));
Microsoft.AspNetCore.Tests (167)
WebApplicationTests.cs (165)
176Assert.Equal("http://localhost:5001", builder.Configuration["urls"]); 186Assert.Equal("http://localhost:5001", address); 191Assert.Equal("http://localhost:5001", url); 209Assert.Equal("http://localhost:5000", urls[0]); 210Assert.Equal("https://localhost:5001", urls[1]); 226Assert.Equal("http://localhost:5001", url); 248Assert.Equal("http://localhost:5002", urls[0]); 249Assert.Equal("https://localhost:5003", urls[1]); 268Assert.Equal("http://localhost:5001", url); 514Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 515Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 543Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 544Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 585Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 586Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 627Assert.Equal(NormalizePath(AppContext.BaseDirectory), NormalizePath(builder.Environment.ContentRootPath)); 651Assert.Equal(NormalizePath(Environment.CurrentDirectory), NormalizePath(builder.Environment.ContentRootPath)); 676Assert.Equal(NormalizePath(AppContext.BaseDirectory), NormalizePath(builder.Environment.ContentRootPath)); 746Assert.Equal(nameof(WebApplicationTests), webApplication.Environment.ApplicationName); 747Assert.Equal(Environments.Development, webApplication.Environment.EnvironmentName); 808Assert.Equal(nameof(WebApplicationTests), context.HostingEnvironment.ApplicationName); 809Assert.Equal(envName, context.HostingEnvironment.EnvironmentName); 810Assert.Equal(contentRoot, context.HostingEnvironment.ContentRootPath); 814Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 815Assert.Equal(envName, builder.Environment.EnvironmentName); 816Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 817Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 857Assert.Equal(nameof(WebApplicationTests), context.HostingEnvironment.ApplicationName); 858Assert.Equal(envName, context.HostingEnvironment.EnvironmentName); 859Assert.Equal(contentRoot, context.HostingEnvironment.ContentRootPath); 863Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 864Assert.Equal(envName, builder.Environment.EnvironmentName); 865Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 866Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 903Assert.Equal(nameof(WebApplicationTests), context.HostingEnvironment.ApplicationName); 904Assert.Equal(envName, context.HostingEnvironment.EnvironmentName); 905Assert.Equal(contentRoot, context.HostingEnvironment.ContentRootPath); 909Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 910Assert.Equal(envName, builder.Environment.EnvironmentName); 911Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 912Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 934Assert.Equal(assemblyName, context.HostingEnvironment.ApplicationName); 938Assert.Equal(assemblyName, builder.Environment.ApplicationName); 941Assert.Equal(assemblyName, context.HostingEnvironment.ApplicationName); 946Assert.Equal(assemblyName, context.HostingEnvironment.ApplicationName); 953Assert.Equal(assemblyName, hostEnv.ApplicationName); 954Assert.Equal(assemblyName, webHostEnv.ApplicationName); 976Assert.Equal(assemblyName, context.HostingEnvironment.ApplicationName); 980Assert.Equal(assemblyName, builder.Environment.ApplicationName); 983Assert.Equal(assemblyName, context.HostingEnvironment.ApplicationName); 988Assert.Equal(assemblyName, context.HostingEnvironment.ApplicationName); 995Assert.Equal(assemblyName, hostEnv.ApplicationName); 996Assert.Equal(assemblyName, webHostEnv.ApplicationName); 1029Assert.Equal("command_line_one", builder.Configuration["one"]); 1030Assert.Equal("unprefixed_two", builder.Configuration["two"]); 1031Assert.Equal("DOTNET_three", builder.Configuration["three"]); 1032Assert.Equal("ASPNETCORE_four", builder.Configuration["four"]); 1043Assert.Equal("1", builder.Configuration["x"]); 1044Assert.Equal("Larry", builder.Configuration["name"]); 1045Assert.Equal("20", builder.Configuration["age"]); 1046Assert.Equal("Testing", builder.Configuration["environment"]); 1047Assert.Equal("Testing", builder.Environment.EnvironmentName); 1051Assert.Equal("Testing", context.HostingEnvironment.EnvironmentName); 1056Assert.Equal("Testing", context.HostingEnvironment.EnvironmentName); 1063Assert.Equal("Testing", hostEnv.EnvironmentName); 1064Assert.Equal("Testing", webHostEnv.EnvironmentName); 1065Assert.Equal("1", app.Configuration["x"]); 1066Assert.Equal("Larry", app.Configuration["name"]); 1067Assert.Equal("20", app.Configuration["age"]); 1068Assert.Equal("Testing", app.Configuration["environment"]); 1101Assert.Equal("value", builder.WebHost.GetSetting("A")); 1102Assert.Equal("another", builder.WebHost.GetSetting("B")); 1106Assert.Equal("value", app.Configuration["A"]); 1107Assert.Equal("another", app.Configuration["B"]); 1109Assert.Equal("value", builder.Configuration["A"]); 1110Assert.Equal("another", builder.Configuration["B"]); 1157Assert.Equal("A", app.Configuration["A"]); 1158Assert.Equal("B", app.Configuration["B"]); 1159Assert.Equal("C", app.Configuration["C"]); 1160Assert.Equal("D", app.Configuration["D"]); 1161Assert.Equal("E", app.Configuration["E"]); 1162Assert.Equal("F", app.Configuration["F"]); 1164Assert.Equal("A", builder.Configuration["A"]); 1165Assert.Equal("B", builder.Configuration["B"]); 1166Assert.Equal("C", builder.Configuration["C"]); 1167Assert.Equal("D", builder.Configuration["D"]); 1168Assert.Equal("E", builder.Configuration["E"]); 1169Assert.Equal("F", builder.Configuration["F"]); 1211Assert.Equal("B", app.Configuration["B"]); 1254Assert.Equal("A", app.Configuration["A"]); 1279Assert.Equal("A", app.Configuration["A"]); 1280Assert.Equal("B", app.Configuration["B"]); 1429Assert.Equal("bar", builder.Configuration["foo"]); 1433Assert.Equal("bar", app.Configuration["foo"]); 1447Assert.Equal("https", context.Request.Scheme); 1482Assert.Equal(env0.ApplicationName, env1.ApplicationName); 1483Assert.Equal(env0.EnvironmentName, env1.EnvironmentName); 1484Assert.Equal(env0.ContentRootPath, env1.ContentRootPath); 1527Assert.Equal("bar", builder.Configuration["foo"]); 1535Assert.Equal("bar", config["foo"]); 1540Assert.Equal("bar", app.Configuration["foo"]); 1600Assert.Equal("/new", newRouteEndpoint.RoutePattern.RawText); 1607Assert.Equal("new", await oldResult.Content.ReadAsStringAsync()); 1703Assert.Equal("One", chosenEndpoint); 1744Assert.Equal("One", chosenEndpoint); 1837Assert.Equal("Configure() is not supported by WebApplicationBuilder.WebHost. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex.Message); 1838Assert.Equal("Configure() is not supported by WebApplicationBuilder.WebHost. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex1.Message); 1839Assert.Equal("UseStartup() is not supported by WebApplicationBuilder.WebHost. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex2.Message); 1840Assert.Equal("UseStartup() is not supported by WebApplicationBuilder.WebHost. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex3.Message); 1841Assert.Equal("UseStartup() is not supported by WebApplicationBuilder.WebHost. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex4.Message); 1848Assert.Equal("ConfigureWebHost() is not supported by WebApplicationBuilder.Host. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex5.Message); 1849Assert.Equal("ConfigureWebHost() is not supported by WebApplicationBuilder.Host. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex6.Message); 1850Assert.Equal("ConfigureWebHost() is not supported by WebApplicationBuilder.Host. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex7.Message); 1851Assert.Equal("ConfigureWebHost() is not supported by WebApplicationBuilder.Host. Use the WebApplication returned by WebApplicationBuilder.Build() instead.", ex8.Message); 1876Assert.Equal("One", ds.Endpoints[0].DisplayName); 1877Assert.Equal("Two", ds.Endpoints[1].DisplayName); 1878Assert.Equal("Three", ds.Endpoints[2].DisplayName); 1914Assert.Equal("One", chosenRoute); 1936Assert.Equal("One", ds.Endpoints[0].DisplayName); 1941Assert.Equal("One", chosenRoute); 2002Assert.Equal("Two", chosenRoute); 2006Assert.Equal("Four", chosenRoute); 2060Assert.Equal("BOOM Filter", ex.Message); 2091Assert.Equal("BOOM", ex.Message); 2101Assert.Equal("value", app.Configuration["testhostingstartup:config"]); 2111Assert.Equal("value", app.Configuration["testhostingstartup:config"]); 2126Assert.Equal("value", app.Configuration["testhostingstartup:config"]); 2175Assert.Equal(string.Empty, responseBody); 2230Assert.Equal(wwwroot, hostEnv.WebRootPath); 2258Assert.Equal(builder.Environment.ApplicationName, hostEnv.ApplicationName); 2259Assert.Equal(builder.Environment.EnvironmentName, hostEnv.EnvironmentName); 2260Assert.Equal(builder.Environment.ContentRootPath, hostEnv.ContentRootPath); 2262Assert.Equal(webHostEnv.ApplicationName, hostEnv.ApplicationName); 2263Assert.Equal(webHostEnv.EnvironmentName, hostEnv.EnvironmentName); 2264Assert.Equal(webHostEnv.ContentRootPath, hostEnv.ContentRootPath); 2288Assert.Equal(builder.Environment.ApplicationName, hostEnv.ApplicationName); 2289Assert.Equal(builder.Environment.EnvironmentName, hostEnv.EnvironmentName); 2290Assert.Equal(builder.Environment.ContentRootPath, hostEnv.ContentRootPath); 2292Assert.Equal(webHostEnv.ApplicationName, hostEnv.ApplicationName); 2293Assert.Equal(webHostEnv.EnvironmentName, hostEnv.EnvironmentName); 2294Assert.Equal(webHostEnv.ContentRootPath, hostEnv.ContentRootPath); 2296Assert.Equal(typeof(WebApplicationOptions).Assembly.FullName, hostEnv.ApplicationName); 2297Assert.Equal(Environments.Staging, hostEnv.EnvironmentName); 2298Assert.Equal(Path.GetTempPath(), hostEnv.ContentRootPath); 2412Assert.Equal("Hello World", response); 2455Assert.Equal(username, context.User.Identity.Name); 2463Assert.Equal(username, user.Identity.Name); 2558Assert.Equal("RegexRoute", chosenRoute); 2584Assert.Equal("AlphaRoute", chosenRoute); 2608Assert.Equal( 2637Assert.Equal("RegexRoute", chosenRoute); 2667Assert.Equal("RegexRoute", chosenRoute); 2699m => Assert.Equal(typeof(MiddlewareWithInterface).FullName, m), 2700m => Assert.Equal("Microsoft.AspNetCore.Authentication.AuthenticationMiddleware", m), 2748m => Assert.Equal("Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware", m), 2749m => Assert.Equal("Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware", m), 2750m => Assert.Equal("Microsoft.AspNetCore.Authentication.AuthenticationMiddleware", m), 2751m => Assert.Equal("Microsoft.AspNetCore.Authorization.AuthorizationMiddlewareInternal", m), 2752m => Assert.Equal(typeof(MiddlewareWithInterface).FullName, m), 2753m => Assert.Equal("Microsoft.AspNetCore.Routing.EndpointMiddleware", m)); 2771m => Assert.Equal("Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware", m)); 2808ep => Assert.Equal("/hello", ep.Metadata.GetRequiredMetadata<IRouteDiagnosticsMetadata>().Route)); 2814ep => Assert.Equal("/hello", ep.Metadata.GetRequiredMetadata<IRouteDiagnosticsMetadata>().Route)); 2832ep => Assert.Equal("/hello", ep.Metadata.GetRequiredMetadata<IRouteDiagnosticsMetadata>().Route)); 2838ep => Assert.Equal("/hello", ep.Metadata.GetRequiredMetadata<IRouteDiagnosticsMetadata>().Route));
WebHostTests.cs (2)
26Assert.Equal("http://localhost:5001", builder.GetSetting(WebHostDefaults.ServerUrlsKey)); 74Assert.Equal("https", context.Request.Scheme);
Microsoft.AspNetCore.WebSockets.Tests (17)
AddWebSocketsTests.cs (1)
30Assert.Equal("someString", socketOptions.AllowedOrigins[0]);
HandshakeTests.cs (3)
17Assert.Equal(expectedResponse, response); 54Assert.Equal(expectedResponse, response); 72Assert.Equal(expectedResponse, response);
SendReceiveTests.cs (2)
25Assert.Equal(message, Encoding.UTF8.GetString(receiveBuffer, 0, result.Count)); 42Assert.Equal(message, Encoding.UTF8.GetString(receiveBuffer, 0, result.Count));
WebSocketCompressionMiddlewareTests.cs (2)
41Assert.Equal("permessage-deflate; server_no_context_takeover", response.Headers.GetValues(HeaderNames.SecWebSocketExtensions).Aggregate((l, r) => $"{l}; {r}")); 103Assert.Equal(expectedResponse, response.Headers.GetValues(HeaderNames.SecWebSocketExtensions).Aggregate((l, r) => $"{l}; {r}"));
WebSocketMiddlewareTests.cs (9)
40Assert.Equal("alpha, bravo, charlie", context.Request.Headers["Sec-WebSocket-Protocol"]); 358Assert.Equal(closeDescription, result.CloseStatusDescription); 392Assert.Equal(closeDescription, result.CloseStatusDescription); 414Assert.Equal(closeDescription, result.CloseStatusDescription); 444Assert.Equal(closeDescription, result.CloseStatusDescription); 478Assert.Equal(closeDescription, result.CloseStatusDescription); 490Assert.Equal(closeDescription, result.CloseStatusDescription); 748Assert.Equal("Upgrade, keep-alive", context.Request.Headers.Connection.ToString()); 749Assert.Equal("websocket, example", context.Request.Headers.Upgrade.ToString());
Microsoft.AspNetCore.WebUtilities.Tests (154)
FileBufferingReadStreamTests.cs (4)
160Assert.Equal("Buffer limit exceeded.", exception.Message); 192Assert.Equal("Buffer limit exceeded.", exception.Message); 363Assert.Equal("Buffer limit exceeded.", exception.Message); 395Assert.Equal("Buffer limit exceeded.", exception.Message);
FileBufferingWriteStreamTests.cs (4)
256Assert.Equal("Buffer limit exceeded.", exception.Message); 271Assert.Equal("Buffer limit exceeded.", exception.Message); 300Assert.Equal("Buffer limit exceeded.", exception.Message); 315Assert.Equal("Buffer limit exceeded.", exception.Message);
FormPipeReaderTests.cs (62)
21Assert.Equal("bar", formCollection[""].ToString()); 31Assert.Equal("bar", formCollection[""].ToString()); 32Assert.Equal("2", formCollection["baz"].ToString()); 42Assert.Equal("", formCollection["foo"].ToString()); 52Assert.Equal("", formCollection["foo"].ToString()); 62Assert.Equal("", formCollection["foo"].ToString()); 63Assert.Equal("2", formCollection["baz"].ToString()); 73Assert.Equal("", formCollection["foo"].ToString()); 74Assert.Equal("2", formCollection["baz"].ToString()); 85Assert.Equal("The form value contains invalid characters.", exception.Message); 96Assert.Equal("1", formCollection["foo"].ToString()); 97Assert.Equal("2", formCollection["bar"].ToString()); 98Assert.Equal("3", formCollection["baz"].ToString()); 110Assert.Equal("Form value count limit 3 exceeded.", exception.Message); 125Assert.Equal("Form value count limit 3 exceeded.", exception.Message); 139Assert.Equal("1", formCollection["fooooooooo"].ToString()); 140Assert.Equal("2", formCollection["bar"].ToString()); 141Assert.Equal("3,4", formCollection["baz"].ToString()); 153Assert.Equal("Form key length limit 10 exceeded.", exception.Message); 167Assert.Equal("1", formCollection["foo"].ToString()); 168Assert.Equal("1234567890", formCollection["bar"].ToString()); 169Assert.Equal("3,4", formCollection["baz"].ToString()); 181Assert.Equal("Form value length limit 10 exceeded.", exception.Message); 206Assert.Equal("Form value length limit 10 exceeded.", exception.Message); 230Assert.Equal(string.Format( 251Assert.Equal(expectedValue, form[key]); 268Assert.Equal("bar", dict["foo"]); 269Assert.Equal("boo", dict["baz"]); 286Assert.Equal("bar", dict["foo"]); 287Assert.Equal("boo", dict["baz"]); 288Assert.Equal("", dict["t"]); 308Assert.Equal("bar", dict["foo"]); 309Assert.Equal("boo", dict["baz"]); 310Assert.Equal("", dict["t"]); 327Assert.Equal("bar", dict["foo"]); 328Assert.Equal("boo", dict["baz"]); 329Assert.Equal("", dict["t"]); 349Assert.Equal("bar", dict["foo"]); 350Assert.Equal("boo", dict["baz"]); 351Assert.Equal("", dict["t"]); 368Assert.Equal("bar", dict["foo"]); 369Assert.Equal("bo" + new string('a', 128), dict["baz"]); 386Assert.Equal(" ", dict[" "]); 387Assert.Equal(" ", dict[" "]); 388Assert.Equal("", dict[" "]); 405Assert.Equal(" ", dict[" "]); 406Assert.Equal(" +", dict[" +"]); 407Assert.Equal("", dict[" "]); 424Assert.Equal("\"%-.<>\\^_`{|}~", dict["\"%-.<>\\^_`{|}~"]); 425Assert.Equal("wow", dict["\"%-.<>\\^_`{|}"]); 441Assert.Equal("bar", dict["foo"]); 442Assert.Equal("boo", dict["baz"]); 456Assert.Equal("Form key length limit 2 exceeded.", exception.Message); 470Assert.Equal("Form key length limit 2 exceeded.", exception.Message); 484Assert.Equal("Form value length limit 2 exceeded.", exception.Message); 498Assert.Equal("Form value length limit 2 exceeded.", exception.Message); 512Assert.Equal("Form key length limit 10 exceeded.", exception.Message); 526Assert.Equal("Form value length limit 10 exceeded.", exception.Message); 563Assert.Equal("bar", values["fo"]); 565Assert.Equal("", values["ba"]); 584Assert.Equal("bar", values["fo"]); 586Assert.Equal("", values["b"]);
FormReaderTests.cs (24)
20Assert.Equal("bar", formCollection[""].ToString()); 32Assert.Equal("bar", formCollection[""].ToString()); 33Assert.Equal("2", formCollection["baz"].ToString()); 45Assert.Equal("", formCollection["foo"].ToString()); 57Assert.Equal("", formCollection["foo"].ToString()); 58Assert.Equal("2", formCollection["baz"].ToString()); 70Assert.Equal("1", formCollection["foo"].ToString()); 71Assert.Equal("2", formCollection["bar"].ToString()); 72Assert.Equal("3", formCollection["baz"].ToString()); 85Assert.Equal("Form value count limit 3 exceeded.", exception.Message); 97Assert.Equal("Form value count limit 3 exceeded.", exception.Message); 109Assert.Equal("1", formCollection["foo"].ToString()); 110Assert.Equal("2", formCollection["bar"].ToString()); 111Assert.Equal("3,4", formCollection["baz"].ToString()); 124Assert.Equal("Form key or value length limit 10 exceeded.", exception.Message); 136Assert.Equal("1", formCollection["foo"].ToString()); 137Assert.Equal("1234567890", formCollection["bar"].ToString()); 138Assert.Equal("3,4", formCollection["baz"].ToString()); 151Assert.Equal("Form key or value length limit 10 exceeded.", exception.Message); 165Assert.Equal("foo", pair.Key); 166Assert.Equal("", pair.Value); 170Assert.Equal("baz", pair.Key); 171Assert.Equal("2", pair.Value); 202Assert.Equal(expectedValue, form[key]);
HttpRequestStreamReaderTest.cs (10)
65Assert.Equal(expected, actual); 158Assert.Equal(valueString.Substring(0, valueString.IndexOf('\r')), data); 161Assert.Equal(valueString.Substring(valueString.IndexOf('\r') + 1, 3), data); 164Assert.Equal(valueString.Substring(valueString.IndexOf('\n') + 1, 2), data); 167Assert.Equal((valueString.Substring(valueString.LastIndexOf('\n') + 1)), data); 184Assert.Equal(valueString.Substring(1, valueString.IndexOf('\r') - 1), data); 204Assert.Equal(string.Empty, data); 226Assert.Equal("123456789", data); 229Assert.Equal("foo", data); 263Assert.Equal(string.Empty, empty);
HttpResponseStreamWriterTest.cs (1)
727Assert.Equal(content, actualContent);
MultipartReaderTests.cs (35)
116Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); 119Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray())); 134Assert.Equal("Multipart headers count limit 1 exceeded.", exception.Message); 147Assert.Equal("Line length limit 17 exceeded.", exception.Message); 159Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); 162Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray())); 176Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); 179Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray())); 193Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); 196Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray())); 201Assert.Equal("form-data; name=\"file1\"; filename=\"a.txt\"", section.Headers["Content-Disposition"][0]); 202Assert.Equal("text/plain", section.Headers["Content-Type"][0]); 205Assert.Equal("Content of a.txt.\r\n", Encoding.ASCII.GetString(buffer.ToArray())); 219Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); 222Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray())); 227Assert.Equal("form-data; name=\"file1\"; filename=\"a色.txt\"", section.Headers["Content-Disposition"][0]); 228Assert.Equal("text/plain", section.Headers["Content-Type"][0]); 231Assert.Equal("Content of a.txt.\r\n", Encoding.ASCII.GetString(buffer.ToArray())); 245Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); 248Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray())); 253Assert.Equal("form-data; name=\"file1\"; filename=\"a.txt\"", section.Headers["Content-Disposition"][0]); 254Assert.Equal("text/plain", section.Headers["Content-Type"][0]); 257Assert.Equal("Content of a.txt.\r\n", Encoding.ASCII.GetString(buffer.ToArray())); 262Assert.Equal("form-data; name=\"file2\"; filename=\"a.html\"", section.Headers["Content-Disposition"][0]); 263Assert.Equal("text/html", section.Headers["Content-Type"][0]); 266Assert.Equal("<!DOCTYPE html><title>Content of a.html.</title>\r\n", Encoding.ASCII.GetString(buffer.ToArray())); 292Assert.Equal("form-data; name=\"text\"", section.Headers["Content-Disposition"][0]); 294Assert.Equal("text default", GetString(buffer, read)); 300Assert.Equal("form-data; name=\"file1\"; filename=\"a.txt\"", section.Headers["Content-Disposition"][0]); 301Assert.Equal("text/plain", section.Headers["Content-Type"][0]); 303Assert.Equal("Content of a.txt.\r\n", GetString(buffer, read)); 339Assert.Equal("form-data; name=\"text\" filename=\"a\uFFFD!.txt\"", section.Headers["Content-Disposition"][0]); 342Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray())); 374Assert.Equal("form-data; name=\"text\" filename=\"a\uFFFD\uFFFDU.txt\"", section.Headers["Content-Disposition"][0]); 377Assert.Equal("text default", Encoding.ASCII.GetString(buffer.ToArray()));
QueryHelpersTests.cs (14)
15Assert.Equal("value1", collection["key1"].FirstOrDefault()); 16Assert.Equal("value2", collection["key2"].FirstOrDefault()); 24Assert.Equal("value1", collection["key1"].FirstOrDefault()); 25Assert.Equal("value2", collection["key2"].FirstOrDefault()); 34Assert.Equal("valueB", collection["key2"].FirstOrDefault()); 42Assert.Equal(string.Empty, collection["key1"].FirstOrDefault()); 43Assert.Equal(string.Empty, collection["key2"].FirstOrDefault()); 59Assert.Equal("", collection["fields [todoItems]"].FirstOrDefault()); 67Assert.Equal("fields [todoItems]", collection[""].FirstOrDefault()); 75Assert.Equal("", collection["fields [todoItems]"].FirstOrDefault()); 83Assert.Equal("[ 1 ]", collection["fields [todoItems]"].FirstOrDefault()); 134Assert.Equal(expectedUri, result); 167Assert.Equal(expectedUri, result); 199Assert.Equal(expectedUri, result);
Microsoft.Build.BuildCheck.UnitTests (37)
EditorConfig_Tests.cs (37)
124Assert.Equal("^.*/abc$", matcher.Regex.ToString()); 136Assert.Equal("^.*/[^/]*$", matcher.Regex.ToString()); 147Assert.Equal("^.*/[^/]*\\.cs$", matcher.Regex.ToString()); 164Assert.Equal("^.*/.*\\.cs$", matcher.Regex.ToString()); 174Assert.Equal("^.*/\\.\\.\\.$", matcher.Regex.ToString()); 194Assert.Equal("^.*/ab.def$", matcher.Regex.ToString()); 207Assert.Equal("^.*/ab\\\\c$", matcher.Regex.ToString()); 218Assert.Equal("^.*/\\*.*\\*\\*[^/]*$", matcher.Regex.ToString()); 230Assert.Equal("^.*/\\?.\\?[^/]*\\?.$", matcher.Regex.ToString()); 244Assert.Equal(@"^.*/abc\{}def$", matcher.Regex.ToString()); 256Assert.Equal("^.*/abc,def$", matcher.Regex.ToString()); 269Assert.Equal("^.*/[^/]*\\.(?:cs|vb|fs)$", matcher.Regex.ToString()); 299Assert.Equal("^/(?:[^/]*\\.cs|subdir/test\\.vb)$", matcher.Regex.ToString()); 313Assert.Equal("^.*/(?:)$", matcher.Regex.ToString()); 325Assert.Equal("^.*/(?:[^/]*\\.cs)$", matcher.Regex.ToString()); 351Assert.Equal("^.*/(?:test(?:\\.cs|\\.vb)|other\\.(?:a(?:bb|cc)))$", matcher.Regex.ToString()); 371Assert.Equal("^.*/ab(?:-)cd(?:-|)ef$", matcher.Regex.ToString()); 385Assert.Equal("^.*/ab(?:cs|vb|fs)cd$", matcher.Regex.ToString()); 505Assert.Equal(@"^.*/[^/]*\.[cf]s$", matcher.Regex.ToString()); 516Assert.Equal(@"^.*/[^/]*\.[^cf]s$", matcher.Regex.ToString()); 529Assert.Equal(@"^.*/[^/]*\.[\^cf]s$", matcher.Regex.ToString()); 543Assert.Equal("^.*/[0-9]x$", matcher.Regex.ToString()); 556Assert.Equal("^.*/[^0-9]x$", matcher.Regex.ToString()); 569Assert.Equal("^.*/[ab0-9]x$", matcher.Regex.ToString()); 614Assert.Equal(@"^.*/[\[a]bc$", matcher.Regex.ToString()); 629Assert.Equal(@"^.*/[-ac]bd$", matcher.Regex.ToString()); 644Assert.Equal(@"^.*/[ac-]bd$", matcher.Regex.ToString()); 658Assert.Equal(@"^.*/[ab]]cd$", matcher.Regex.ToString()); 673Assert.Equal(@"^.*/[ab\\]cd$", matcher.Regex.ToString()); 686Assert.Equal(@"^.*/ab\[cd$", matcher.Regex.ToString()); 779Assert.Equal("", config.GlobalSection.Name); 788Assert.Equal("*.cs", namedSections[0].Name); 814Assert.Equal("c:/\\{f\\*i\\?le1\\}.cs", namedSections[0].Name); 819Assert.Equal("c:/f\\,ile\\#2.cs", namedSections[1].Name); 824Assert.Equal("c:/f\\;i\\!le\\[3\\].cs", namedSections[2].Name); 889Assert.Equal("my_VAL", val); 890Assert.Equal("my_prop", properties.Keys.Single());
Microsoft.Build.CommandLine.UnitTests (35)
CommandLineSwitches_Tests.cs (35)
751Assert.Equal("/nologo", switches.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.NoLogo)); 758Assert.Equal("-NOLOGO", switches.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.NoLogo)); 775Assert.Equal("/v:q", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Verbosity)); 782Assert.Equal("q", parameters[0]); 788Assert.Equal("/v:q /verbosity:\"diag\";minimal", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Verbosity)); 795Assert.Equal("q", parameters[0]); 796Assert.Equal("diag", parameters[1]); 797Assert.Equal("minimal", parameters[2]); 819Assert.Equal("/t:\"", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 831Assert.Equal("/t:\" /t:A,\"\";B", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 839Assert.Equal("A", parameters[0]); 840Assert.Equal("B", parameters[1]); 860Assert.Equal("/l:\"", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Logger)); 867Assert.Equal("\"", parameters[0]); 873Assert.Equal("/l:\" /LOGGER:\"\",asm;\"p,a;r\"", switches.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Logger)); 880Assert.Equal("\"", parameters[0]); 881Assert.Equal("\"\"", parameters[1]); 882Assert.Equal("asm", parameters[2]); 883Assert.Equal("\"p,a;r\"", parameters[3]); 982Assert.Equal("/noconlog", switchesLeft.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.NoConsoleLogger)); 987Assert.Equal("/?", switchesLeft.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.Help)); 1000Assert.Equal("/NOCONSOLELOGGER", switchesLeft.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.NoConsoleLogger)); 1004Assert.Equal("/?", switchesLeft.GetParameterlessSwitchCommandLineArg(CommandLineSwitches.ParameterlessSwitch.Help)); 1030Assert.Equal("tempproject.proj", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Project)); 1037Assert.Equal("tempproject.proj", parameters[0]); 1039Assert.Equal("/t:build", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 1046Assert.Equal("build", parameters[0]); 1066Assert.Equal("/t:\"RESOURCES\";build", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Target)); 1073Assert.Equal("Clean", parameters[0]); 1074Assert.Equal("RESOURCES", parameters[1]); 1075Assert.Equal("build", parameters[2]); 1133Assert.Equal("tempproject.proj", switchesLeft.GetParameterizedSwitchCommandLineArg(CommandLineSwitches.ParameterizedSwitch.Project)); 1140Assert.Equal("tempproject.proj", parameters[0]); 1257Assert.Equal("v=q", result); 1630Assert.Equal(badCommandLineArg, e.CommandLineArg);
Microsoft.Build.Engine.OM.UnitTests (964)
Construction\ConstructionEditing_Tests.cs (1)
2357Assert.Equal("m1", metadatum.EvaluatedValue);
Construction\ElementLocationPublic_Tests.cs (6)
35Assert.Equal(project.FullPath, target.Location.File); 36Assert.Equal(project.FullPath, target.OutputsLocation.File); 52Assert.Equal(project.FullPath, target.Location.File); 53Assert.Equal(project.FullPath, target.OutputsLocation.File); 57Assert.Equal(project.FullPath, target.Location.File); 58Assert.Equal(project.FullPath, target.OutputsLocation.File);
Construction\ProjectChooseElement_Tests.cs (4)
226Assert.Equal("c1", whens[0].Condition); 227Assert.Equal("c2", whens[1].Condition); 280Assert.Equal("v1", project.GetPropertyValue("p")); 284Assert.Equal(String.Empty, project.GetPropertyValue("p"));
Construction\ProjectExtensionsElement_Tests.cs (8)
38Assert.Equal(@"<a />", extensions.Content); 88Assert.Equal(@"a<b />c", extensions.Content); 125Assert.Equal(String.Empty, content); 128Assert.Equal("y", extensions["b"]); 151Assert.Equal("y", content); 154Assert.Equal(String.Empty, content); 177Assert.Equal("z", extensions["c"]); 200Assert.Equal("y2", extensions["b"]);
Construction\ProjectImportElement_Tests.cs (8)
104Assert.Equal("i1.proj", imports[0].Project); 105Assert.Equal("i2.proj", imports[1].Project); 106Assert.Equal("c", imports[1].Condition); 127Assert.Equal("i1b.proj", import.Project); 183Assert.Equal("v1", project.GetPropertyValue("p")); 187Assert.Equal("v2", project.GetPropertyValue("p")); 222Assert.Equal("v1", project.GetPropertyValue("p")); 226Assert.Equal(String.Empty, project.GetPropertyValue("p"));
Construction\ProjectImportGroupElement_Tests.cs (11)
273Assert.Equal("i1.proj", imports[0].Project); 274Assert.Equal("i2.proj", imports[1].Project); 275Assert.Equal("c", imports[1].Condition); 305Assert.Equal("second", importGroups[1].Label); 308Assert.Equal("i1.proj", imports[0].Project); 309Assert.Equal("i2.proj", imports[1].Project); 310Assert.Equal("c", imports[1].Condition); 311Assert.Equal("i3.proj", imports[2].Project); 336Assert.Equal("i1b.proj", import.Project); 378Assert.Equal("c", importGroup.Condition); 395Assert.Equal("c", importGroup.Label);
Construction\ProjectItemDefinitionElement_Tests.cs (11)
63Assert.Equal("i", definition.ItemType); 65Assert.Equal("m1", Helpers.GetFirst(definition.Metadata).Name); 66Assert.Equal("v1", Helpers.GetFirst(definition.Metadata).Value); 115Assert.Equal("m1", metadata[0].Name); 116Assert.Equal("v1", metadata[0].Value); 117Assert.Equal("m2", metadata[1].Name); 118Assert.Equal("v2", metadata[1].Value); 119Assert.Equal("c", metadata[1].Condition); 120Assert.Equal("m1", metadata[2].Name); 121Assert.Equal("v3", metadata[2].Value); 212Assert.Equal("c", itemDefinition.Condition);
Construction\ProjectItemDefinitionGroupElement_Tests.cs (3)
92Assert.Equal("c", itemDefinitionGroups[0].Condition); 108Assert.Equal("c", itemDefinitionGroup.Condition); 125Assert.Equal("c", itemDefinitionGroup.Label);
Construction\ProjectItemElement_Tests.cs (36)
363Assert.Equal("i1", items[0].ItemType); 364Assert.Equal("i", items[0].Include); 368Assert.Equal("m1", metadata1[0].Name); 369Assert.Equal("v1", metadata1[0].Value); 372Assert.Equal("i2", items[1].ItemType); 373Assert.Equal("i", items[1].Include); 374Assert.Equal("j", items[1].Exclude); 376Assert.Equal("m2", metadata2[0].Name); 377Assert.Equal("v2", metadata2[0].Value); 417Assert.Equal("m1", metadata[0].Name); 418Assert.Equal("v1", metadata[0].Value); 419Assert.Equal("m2", metadata[1].Name); 420Assert.Equal("v2", metadata[1].Value); 421Assert.Equal("c", metadata[1].Condition); 422Assert.Equal("m1", metadata[2].Name); 423Assert.Equal("v3", metadata[2].Value); 599Assert.Equal("i", item.Remove); 612Assert.Equal("i", item.Update); 639Assert.Equal("i1", item.Include); 640Assert.Equal("i2", item.Exclude); 655Assert.Equal("ib", item.Include); 670Assert.Equal(String.Empty, item.Include); 685Assert.Equal(String.Empty, item.Include); 700Assert.Equal("ib", item.Exclude); 715Assert.Equal(String.Empty, item.Exclude); 730Assert.Equal(String.Empty, item.Exclude); 777Assert.Equal("ib", item.Remove); 792Assert.Equal(String.Empty, item.Remove); 807Assert.Equal(String.Empty, item.Remove); 871Assert.Equal("ib", item.Update); 886Assert.Equal(String.Empty, item.Update); 901Assert.Equal(String.Empty, item.Update); 948Assert.Equal("c", item.Condition); 980Assert.Equal("i2", Helpers.GetFirst(project.Items).EvaluatedInclude); 1015Assert.Equal("i2", item.Remove); 1035Assert.Equal("i2", item.Update);
Construction\ProjectItemGroupElement_tests.cs (4)
71Assert.Equal("i1", items[0].Include); 72Assert.Equal("i2", items[1].Include); 88Assert.Equal("c", itemGroup.Condition); 105Assert.Equal("c", itemGroup.Label);
Construction\ProjectMetadataElement_Tests.cs (43)
38Assert.Equal("m", metadatum.Name); 39Assert.Equal("m1", metadatum.Value); 40Assert.Equal("c", metadatum.Condition); 211Assert.Equal("m1b", metadatum.Value); 223Assert.Equal("m2", metadatum.Name); 237Assert.Equal("m", metadatum.Name); 351Assert.Equal(String.Empty, metadatum.Value); 437Assert.Equal("m1", metadata.Name); 438Assert.Equal("v1", metadata.Value); 462Assert.Equal("m1", metadata.Name); 463Assert.Equal("v1", metadata.Value); 496Assert.Equal("m1", metadata.Name); 497Assert.Equal(@"<&>""", metadata.Value); 521Assert.Equal("m1", metadata.Name); 522Assert.Equal(@"<&>""", metadata.Value); 573Assert.Equal("m1", metadata.Name); 574Assert.Equal("v1", metadata.Value); 616Assert.Equal("m1", metadata.Name); 617Assert.Equal("v1", metadata.Value); 690Assert.Equal("m1", metadata.Name); 691Assert.Equal("v1", metadata.Value); 733Assert.Equal("m1", metadata.Name); 734Assert.Equal("v1", metadata.Value); 819Assert.Equal("m1", metadata.Name); 820Assert.Equal("v1", metadata.Value); 882Assert.Equal("m1", metadata.Name); 883Assert.Equal("v1", metadata.Value); 951Assert.Equal("m1", metadata.Name); 952Assert.Equal("v1", metadata.Value); 994Assert.Equal("m1", metadata.Name); 995Assert.Equal("v1", metadata.Value); 1067Assert.Equal("m1", metadata.Name); 1068Assert.Equal("v1", metadata.Value); 1107Assert.Equal("m1", metadata.Name); 1108Assert.Equal("v1", metadata.Value); 1178Assert.Equal("m1", metadata.Name); 1179Assert.Equal("v1", metadata.Value); 1185Assert.Equal("m2", metadata.Name); 1186Assert.Equal("v2", metadata.Value); 1225Assert.Equal("m1", metadata.Name); 1226Assert.Equal("v1", metadata.Value); 1232Assert.Equal("m2", metadata.Name); 1233Assert.Equal("v2", metadata.Value);
Construction\ProjectOnErrorElement_Tests.cs (9)
28Assert.Equal("t", onError.ExecuteTargetsAttribute); 29Assert.Equal("c", onError.Condition); 57Assert.Equal("1", onError1.ExecuteTargetsAttribute); 58Assert.Equal("2", onError2.ExecuteTargetsAttribute); 84Assert.Equal(String.Empty, onError.ExecuteTargetsAttribute); 110Assert.Equal(String.Empty, onError.ExecuteTargetsAttribute); 223Assert.Equal("t2", onError.ExecuteTargetsAttribute); 266Assert.Equal("c", onError.Condition); 284Assert.Equal("et2", onError.ExecuteTargetsAttribute);
Construction\ProjectOutputElement_Tests.cs (9)
30Assert.Equal("p", output.TaskParameter); 31Assert.Equal(String.Empty, output.PropertyName); 32Assert.Equal("i1", output.ItemType); 45Assert.Equal("p", output.TaskParameter); 46Assert.Equal("p1", output.PropertyName); 47Assert.Equal(String.Empty, output.ItemType); 216Assert.Equal("c", output.Condition); 230Assert.Equal("p1b", output.PropertyName); 257Assert.Equal("p1b", output.ItemType);
Construction\ProjectPropertyElement_Tests.cs (11)
28Assert.Equal("p", property.Name); 29Assert.Equal("v", property.Value); 30Assert.Equal("c", property.Condition); 52Assert.Equal("p", property.Name); 53Assert.Equal(@"A<B>C<D /></B>E", property.Value); 163Assert.Equal("vb", property.Value); 179Assert.Equal("v1", property.Value); 192Assert.Equal("p2", property.Name); 206Assert.Equal("p", property.Name); 233Assert.Equal(String.Empty, property.Value); 261Assert.Equal("c", property.Condition);
Construction\ProjectPropertyGroupElement_Tests.cs (4)
69Assert.Equal("p1", properties[0].Name); 70Assert.Equal("p2", properties[1].Name); 86Assert.Equal("c", propertyGroup.Condition); 103Assert.Equal("c", propertyGroup.Label);
Construction\ProjectRootElement_Tests.cs (31)
109Assert.Equal(string.Empty, project.DefaultTargets); 110Assert.Equal(string.Empty, project.InitialTargets); 111Assert.Equal(ObjectModelHelpers.MSBuildDefaultToolsVersion, project.ToolsVersion); 124Assert.Equal("dt", project.DefaultTargets); 137Assert.Equal("it", project.InitialTargets); 150Assert.Equal("tv", project.ToolsVersion); 163Assert.Equal(project.FullPath, Path.Combine(Directory.GetCurrentDirectory(), "X")); 384Assert.Equal("MSB4041", ex.ErrorCode); 512Assert.Equal(string.Empty, root1.DefaultTargets); 513Assert.Equal(string.Empty, root2.DefaultTargets); 645Assert.Equal(path, project.FullPath); 646Assert.Equal(directory, project.DirectoryPath); 677Assert.Equal(path, project.FullPath); 678Assert.Equal(directory, project.DirectoryPath); 834Assert.Equal("q", properties[1].Name); 835Assert.Equal("r1", properties[2].Value); 836Assert.Equal("t1", properties[5].Value); 892Assert.Equal("j", items[1].ItemType); 893Assert.Equal("k1", items[2].Include); 894Assert.Equal("k4", items[5].Include); 1696(initial, reload, actualFile) => { Assert.Equal(String.Empty, actualFile); }); 1705(initial, reload, actualFile) => { Assert.Equal(initial, actualFile); }); 1714(initial, reload, actualFile) => { Assert.Equal(reload, actualFile); }); 1723(initial, reload, actualFile) => { Assert.Equal(reload, actualFile); }); 1775Assert.Equal(NativeMethodsShared.GetCurrentDirectory(), rootElement.DirectoryPath); 1894Assert.Equal(xml, projectElement.RawXml); 1905Assert.Equal(pre.RawXml, pre2.RawXml); 1910Assert.Equal(pre.RawXml, pre3.RawXml); 1932Assert.Equal(expected, actual); // "The encoding was not emitted as an XML declaration." 1941Assert.Equal(encoding.EncodingName, project.Encoding.EncodingName); 1955Assert.Equal(encoding.WebName, project.Encoding.WebName);
Construction\ProjectTargetElement_Tests.cs (19)
75Assert.Equal("i", target.Inputs); 76Assert.Equal("o", target.Outputs); 77Assert.Equal("d", target.DependsOnTargets); 78Assert.Equal("c", target.Condition); 94Assert.Equal("ib", target.Inputs); 95Assert.Equal("ob", target.Outputs); 96Assert.Equal("db", target.DependsOnTargets); 97Assert.Equal("cb", target.Condition); 157Assert.Equal(String.Empty, target.Condition); 209Assert.Equal("t1", task1.Name); 210Assert.Equal("t2", task2.Name); 225Assert.Equal("t2", target.Name); 241Assert.Equal("in", target.Inputs); 257Assert.Equal("out", target.Outputs); 273Assert.Equal("dot", target.DependsOnTargets); 289Assert.Equal("c", target.Condition); 305Assert.Equal("true", target.KeepDuplicateOutputs); 322Assert.Equal("@(a)", target.Returns); 329Assert.Equal(String.Empty, target.Returns);
Construction\ProjectTaskElement_Tests.cs (12)
36Assert.Equal("t1", task.Name); 39Assert.Equal(String.Empty, task.ContinueOnError); 58Assert.Equal("coe", task.ContinueOnError); 77Assert.Equal("c", task.Condition); 143Assert.Equal("v1", parameters["p1"]); 144Assert.Equal("v2", parameters["p2"]); 146Assert.Equal("v1", task.GetParameter("p1")); 147Assert.Equal(String.Empty, task.GetParameter("xxxx")); 162Assert.Equal("v1b", parameters["p1"]); 230Assert.Equal("v2", parameters["p2"]); 278Assert.Equal("true", task.ContinueOnError); 293Assert.Equal("c", task.Condition);
Construction\ProjectUsingTaskElement_Tests.cs (18)
192Assert.Equal("t1", usingTask.TaskName); 193Assert.Equal("af", usingTask.AssemblyFile); 194Assert.Equal(String.Empty, usingTask.AssemblyName); 195Assert.Equal(String.Empty, usingTask.Condition); 206Assert.Equal("t2", usingTask.TaskName); 207Assert.Equal(String.Empty, usingTask.AssemblyFile); 208Assert.Equal("an", usingTask.AssemblyName); 209Assert.Equal("c", usingTask.Condition); 220Assert.Equal("t2", usingTask.TaskName); 221Assert.Equal(String.Empty, usingTask.AssemblyFile); 222Assert.Equal("an", usingTask.AssemblyName); 223Assert.Equal("c", usingTask.Condition); 224Assert.Equal("AssemblyFactory", usingTask.TaskFactory); 253Assert.Equal("afb", usingTask.AssemblyFile); 267Assert.Equal("anb", usingTask.AssemblyName); 308Assert.Equal("tt", usingTask.TaskName); 323Assert.Equal("c", usingTask.Condition); 338Assert.Equal("AssemblyFactory", usingTask.TaskFactory);
Construction\SolutionFile_Tests.cs (69)
90Assert.Equal("Project name.myvctype", solution.ProjectsInOrder[0].ProjectName); 91Assert.Equal("Relative path\\to\\Project name.myvctype", solution.ProjectsInOrder[0].RelativePath); 92Assert.Equal("{0ABED153-9451-483C-8140-9E8D7306B216}", solution.ProjectsInOrder[0].ProjectGuid); 126Assert.Equal("Project name", solution.ProjectsInOrder[0].ProjectName); 127Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 128Assert.Equal("{0ABED153-9451-483C-8140-9E8D7306B216}", solution.ProjectsInOrder[0].ProjectGuid); 164Assert.Equal("src\\.proj", solution.ProjectsInOrder[0].RelativePath); 165Assert.Equal("{0ABED153-9451-483C-8140-9E8D7306B216}", solution.ProjectsInOrder[0].ProjectGuid); 200Assert.Equal("MyProject,(=IsGreat)", solution.ProjectsInOrder[0].ProjectName); 201Assert.Equal("Relative path to project file", solution.ProjectsInOrder[0].RelativePath); 202Assert.Equal("{0ABED153-9451-483C-8140-9E8D7306B216}", solution.ProjectsInOrder[0].ProjectGuid); 325Assert.Equal("ConsoleApplication1", solution.ProjectsInOrder[0].ProjectName); 326Assert.Equal(@"ConsoleApplication1\ConsoleApplication1.vbproj", solution.ProjectsInOrder[0].RelativePath); 327Assert.Equal("{AB3413A6-D689-486D-B7F0-A095371B3F13}", solution.ProjectsInOrder[0].ProjectGuid); 331Assert.Equal("vbClassLibrary", solution.ProjectsInOrder[1].ProjectName); 332Assert.Equal(@"vbClassLibrary\vbClassLibrary.vbproj", solution.ProjectsInOrder[1].RelativePath); 333Assert.Equal("{BA333A76-4511-47B8-8DF4-CA51C303AD0B}", solution.ProjectsInOrder[1].ProjectGuid); 337Assert.Equal("ClassLibrary1", solution.ProjectsInOrder[2].ProjectName); 338Assert.Equal(@"ClassLibrary1\ClassLibrary1.csproj", solution.ProjectsInOrder[2].RelativePath); 339Assert.Equal("{DEBCE986-61B9-435E-8018-44B9EF751655}", solution.ProjectsInOrder[2].ProjectGuid); 399Assert.Equal(@"ClassLibrary1\ClassLibrary1.csproj", solution.ProjectsInOrder[0].RelativePath); 400Assert.Equal("{34E0D07D-CF8F-459D-9449-C4188D8C5564}", solution.ProjectsInOrder[0].ProjectGuid); 404Assert.Equal("{E0F97730-25D2-418A-A7BD-02CAFDC6E470}", solution.ProjectsInOrder[1].ProjectGuid); 408Assert.Equal(@"MyPhysicalFolder\ClassLibrary1\ClassLibrary1.csproj", solution.ProjectsInOrder[2].RelativePath); 409Assert.Equal("{A5EE8128-B08E-4533-86C5-E46714981680}", solution.ProjectsInOrder[2].ProjectGuid); 411Assert.Equal("{E0F97730-25D2-418A-A7BD-02CAFDC6E470}", solution.ProjectsInOrder[2].ParentProjectGuid); 413Assert.Equal("{2AE8D6C4-FB43-430C-8AEB-15E5EEDAAE4B}", solution.ProjectsInOrder[3].ProjectGuid); 415Assert.Equal("{E0F97730-25D2-418A-A7BD-02CAFDC6E470}", solution.ProjectsInOrder[3].ParentProjectGuid); 417Assert.Equal(@"ClassLibrary2\ClassLibrary2.csproj", solution.ProjectsInOrder[4].RelativePath); 418Assert.Equal("{6DB98C35-FDCC-4818-B5D4-1F0A385FDFD4}", solution.ProjectsInOrder[4].ProjectGuid); 420Assert.Equal("{2AE8D6C4-FB43-430C-8AEB-15E5EEDAAE4B}", solution.ProjectsInOrder[4].ParentProjectGuid); 477Assert.Equal(@"SharedProject1\SharedProject1.shproj", solution.ProjectsInOrder[0].RelativePath); 478Assert.Equal("{14686F51-D0C2-4832-BBAA-6FBAEC676995}", solution.ProjectsInOrder[0].ProjectGuid); 482Assert.Equal(@"SharedProject2\SharedProject2.shproj", solution.ProjectsInOrder[1].RelativePath); 483Assert.Equal("{BAE750E8-4656-4947-B06B-3961E1051DF7}", solution.ProjectsInOrder[1].ProjectGuid); 487Assert.Equal(@"ClassLibrary1\ClassLibrary1.csproj", solution.ProjectsInOrder[2].RelativePath); 488Assert.Equal("{3A0EC360-A42A-417F-BDEF-619682CF6119}", solution.ProjectsInOrder[2].ProjectGuid); 492Assert.Equal(@"ClassLibrary2\ClassLibrary2.vbproj", solution.ProjectsInOrder[3].RelativePath); 493Assert.Equal("{6DEF6DE8-FBF0-4240-B469-282DEE87899C}", solution.ProjectsInOrder[3].ProjectGuid); 548Assert.Equal("MSB5023", e.ErrorCode); 610Assert.Equal(@"ClassLibrary1\ClassLibrary1.csproj", solution.ProjectsInOrder[0].RelativePath); 611Assert.Equal("{05A5AD00-71B5-4612-AF2F-9EA9121C4111}", solution.ProjectsInOrder[0].ProjectGuid); 613Assert.Equal("{FAB4EE06-6E01-495A-8926-5514599E3DD9}", (string)solution.ProjectsInOrder[0].Dependencies[0]); 616Assert.Equal(@"ClassLibrary2\ClassLibrary2.csproj", solution.ProjectsInOrder[1].RelativePath); 617Assert.Equal("{7F316407-AE3E-4F26-BE61-2C50D30DA158}", solution.ProjectsInOrder[1].ProjectGuid); 619Assert.Equal("{FAB4EE06-6E01-495A-8926-5514599E3DD9}", (string)solution.ProjectsInOrder[1].Dependencies[0]); 620Assert.Equal("{05A5AD00-71B5-4612-AF2F-9EA9121C4111}", (string)solution.ProjectsInOrder[1].Dependencies[1]); 623Assert.Equal(@"ClassLibrary3\ClassLibrary3.csproj", solution.ProjectsInOrder[2].RelativePath); 624Assert.Equal("{FAB4EE06-6E01-495A-8926-5514599E3DD9}", solution.ProjectsInOrder[2].ProjectGuid); 700Assert.Equal("Debug", solution.GetDefaultConfigurationName()); // "Default solution configuration" 701Assert.Equal("Mixed Platforms", solution.GetDefaultPlatformName()); // "Default solution platform" 760Assert.Equal("Debug", solution.GetDefaultConfigurationName()); // "Default solution configuration" 761Assert.Equal("Any CPU", solution.GetDefaultPlatformName()); // "Default solution platform" 901Assert.Equal("Debug|AnyCPU", csharpProject.ProjectConfigurations["Debug|Any CPU"].FullName); 904Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Debug|Mixed Platforms"].FullName); 907Assert.Equal("Debug|AnyCPU", csharpProject.ProjectConfigurations["Debug|Win32"].FullName); 910Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Release|Any CPU"].FullName); 913Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Release|Mixed Platforms"].FullName); 916Assert.Equal("Release|AnyCPU", csharpProject.ProjectConfigurations["Release|Win32"].FullName); 921Assert.Equal("Debug|Win32", vcProject.ProjectConfigurations["Debug|Any CPU"].FullName); 924Assert.Equal("Debug|Win32", vcProject.ProjectConfigurations["Debug|Mixed Platforms"].FullName); 927Assert.Equal("Debug|Win32", vcProject.ProjectConfigurations["Debug|Win32"].FullName); 930Assert.Equal("Release|Win32", vcProject.ProjectConfigurations["Release|Any CPU"].FullName); 933Assert.Equal("Release|Win32", vcProject.ProjectConfigurations["Release|Mixed Platforms"].FullName); 936Assert.Equal("Release|Win32", vcProject.ProjectConfigurations["Release|Win32"].FullName); 987Assert.Equal("Debug|.NET", webProject.ProjectConfigurations["Debug|.NET"].FullName); 992Assert.Equal("Debug", exeProject.ProjectConfigurations["Debug|.NET"].FullName); 997Assert.Equal("Debug", solution.GetDefaultConfigurationName()); // "Default solution configuration" 998Assert.Equal(".NET", solution.GetDefaultPlatformName()); // "Default solution platform"
Construction\UsingTaskBodyElement_Tests.cs (4)
29Assert.Equal("Contents", body.TaskBody); 81Assert.Equal("MoreContents", body.TaskBody); 95Assert.Equal(String.Empty, body.TaskBody); 122Assert.Equal(bool.TrueString, body.Evaluate);
Construction\UsingTaskParameterElement_Tests.cs (17)
54Assert.Equal("MyParameter", parameter.Name); 55Assert.Equal("System.String", parameter.ParameterType); 56Assert.Equal("true", parameter.Output); 57Assert.Equal("false", parameter.Required); 68Assert.Equal("MyParameter", parameter.Name); 69Assert.Equal(typeof(String).FullName, parameter.ParameterType); 70Assert.Equal(bool.FalseString, parameter.Output); 71Assert.Equal(bool.FalseString, parameter.Required); 106Assert.Equal("newType", parameter.ParameterType); 120Assert.Equal("output", parameter.Output); 134Assert.Equal("required", parameter.Required); 148Assert.Equal(typeof(String).FullName, parameter.ParameterType); 162Assert.Equal(bool.FalseString, parameter.Output); 176Assert.Equal(bool.FalseString, parameter.Required); 190Assert.Equal(typeof(String).FullName, parameter.ParameterType); 204Assert.Equal(bool.FalseString, parameter.Output); 218Assert.Equal(bool.FalseString, parameter.Required);
Definition\DefinitionEditing_Tests.cs (64)
165Assert.Equal("i", items[0].ItemType); 166Assert.Equal("i1", items[0].EvaluatedInclude); 167Assert.Equal("i1", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 168Assert.Equal("i1", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 192Assert.Equal("i", items[0].ItemType); 193Assert.Equal("i(1)", items[0].EvaluatedInclude); 194Assert.Equal("i(1)", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 195Assert.Equal("i(1)", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 271Assert.Equal("$(p)", Helpers.GetFirst(project.Items).UnevaluatedInclude); 272Assert.Equal("v1", Helpers.GetFirst(project.Items).EvaluatedInclude); 294Assert.Equal(paths[0], items[0].EvaluatedInclude); 295Assert.Equal(paths[1], items[1].EvaluatedInclude); 318Assert.Equal("@(h)", item.UnevaluatedInclude); 319Assert.Equal("h1", item.EvaluatedInclude); 892Assert.Equal("$(p)", item.UnevaluatedInclude); 895Assert.Equal("v1", item.EvaluatedInclude); 920Assert.Equal("@(h)", item.UnevaluatedInclude); 923Assert.Equal("h1", item.EvaluatedInclude); 948Assert.Equal("@(h)", item.UnevaluatedInclude); 949Assert.Equal("@(h)", item.EvaluatedInclude); 978Assert.Equal("@(h)", item.UnevaluatedInclude); 979Assert.Equal("@(h)", item.EvaluatedInclude); 1080Assert.Equal("$(p)", (Helpers.MakeList(project.Items))[1].EvaluatedInclude); 1177Assert.Equal("j", item.ItemType); 1221Assert.Equal("j", item.ItemType); 1242Assert.Equal("n1", item.GetMetadataValue("n")); 1441Assert.Equal("i1", item.EvaluatedInclude); 1486Assert.Equal("v1", project.GetPropertyValue("p1")); 1487Assert.Equal("v1", project.CreateProjectInstance().GetPropertyValue("p1")); 1511Assert.Equal("v^1", project.GetPropertyValue("p1")); 1512Assert.Equal("v^1", project.CreateProjectInstance().GetPropertyValue("p1")); 1532Assert.Equal("foo", project.GetPropertyValue("OutDir")); 1546Assert.Equal("v0", project.GetPropertyValue("p1")); 1562Assert.Equal("x@(i)x%(m)x", project.GetPropertyValue("p1")); 1790Assert.Equal("v2", project.GetPropertyValue("p")); 1809Assert.Equal("v2", project.GetPropertyValue("p")); 1832Assert.Equal(String.Empty, instance.GetPropertyValue("p1")); 1883Assert.Equal("m1", items[0].GetMetadataValue("m")); 1884Assert.Equal("m1", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].GetMetadataValue("m")); 1911Assert.Equal("m1$$", items[0].GetMetadataValue("m")); 1912Assert.Equal("m1$$", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].GetMetadataValue("m")); 1941Assert.Equal("m2", items[0].GetMetadataValue("m")); 1956Assert.Equal("a;b", items[0].UnevaluatedInclude); 1959Assert.Equal("a", items[0].EvaluatedInclude); 1960Assert.Equal("b", items[1].EvaluatedInclude); 2015Assert.Equal("l1", item.GetMetadata("m").EvaluatedValue); 2016Assert.Equal("%(l)", item.GetMetadata("m").Xml.Value); 2034Assert.Equal("l1", item.GetMetadata("m").EvaluatedValue); 2035Assert.Equal("%(l)", item.GetMetadata("m").Xml.Value); 2089Assert.Equal("i", items[0].ItemType); 2090Assert.Equal("i1", items[0].EvaluatedInclude); 2091Assert.Equal("i1", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 2092Assert.Equal("i1", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 2116Assert.Equal("i", items[0].ItemType); 2117Assert.Equal("i(1)", items[0].EvaluatedInclude); 2118Assert.Equal("i(1)", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 2119Assert.Equal("i(1)", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 2195Assert.Equal("$(p)", Helpers.GetFirst(project.Items).UnevaluatedInclude); 2196Assert.Equal("v1", Helpers.GetFirst(project.Items).EvaluatedInclude); 2218Assert.Equal(paths[0], items[0].EvaluatedInclude); 2219Assert.Equal(paths[1], items[1].EvaluatedInclude); 2242Assert.Equal("@(h)", item.UnevaluatedInclude); 2243Assert.Equal("h1", item.EvaluatedInclude); 2607Assert.Equal(initialXml, project.Xml.RawXml);
Definition\EditingElementsReferencedByOrReferences_Tests.cs (10)
52Assert.Equal("Y", items.First().EvaluatedInclude); // "Wrong evaluated include after changing type" 138Assert.Equal("A;B;C", item1.GetMetadataValue("M")); // "Invalid metadata at start" 141Assert.Equal("A;D", item2.GetMetadataValue("M")); // "Invalid metadata at start" 211Assert.Equal("A;B", item1.GetMetadataValue("M")); // "Invalid metadata after first removal" 213Assert.Equal("A;D", item2.GetMetadataValue("M")); // "Invalid metadata after first removal" 265Assert.Equal("A;B", item1.GetMetadataValue("M")); // "Invalid metadata after second removal" 267Assert.Equal("A", item2.GetMetadataValue("M")); // "Invalid metadata after second removal" 287Assert.Equal("m", item.GetMetadataValue("N")); // "Wrong metadata value at startup" 305Assert.Equal("%(I.M)", metadata.UnevaluatedValue); // "Unevaluated value is wrong" 306Assert.Equal(String.Empty, metadata.EvaluatedValue); // "Evaluated value is wrong"
Definition\ProjectCollection_Tests.cs (25)
170Assert.Equal("v", project.GlobalProperties["p"]); 201Assert.Equal("v", project.GlobalProperties["p"]); 232Assert.Equal("v", project.GlobalProperties["p"]); 256Assert.Equal("v", project.GlobalProperties["p"]); 272Assert.Equal("v", project.GlobalProperties["p"]); 286Assert.Equal("v", project.GlobalProperties["p"]); 392Assert.Equal("Debug", project.GlobalProperties["Configuration"]); 449Assert.Equal("Debug", project.GlobalProperties["Configuration"]); 460Assert.Equal("Release", project2.GlobalProperties["Configuration"]); 465Assert.Equal("X64", project.GlobalProperties["Platform"]); 466Assert.Equal("X64", project2.GlobalProperties["Platform"]); 470Assert.Equal("Itanium", project2.GlobalProperties["Platform"]); 599Assert.Equal("v1", project2.GlobalProperties["g1"]); 602Assert.Equal("v1", project2.GlobalProperties["g1"]); 622Assert.Equal("v1", project1.GlobalProperties["g1"]); 623Assert.Equal("v2", project1.GlobalProperties["g2"]); // Got overwritten 650Assert.Equal("v1", project2.GlobalProperties["g1"]); 653Assert.Equal("v1", project2.GlobalProperties["g1"]); 813Assert.Equal("Debug", project.GlobalProperties["Configuration"]); 817Assert.Equal("Debug", project.GlobalProperties["Configuration"]); 1092Assert.Equal(ObjectModelHelpers.MSBuildDefaultToolsVersion, collection.DefaultToolsVersion); 1112Assert.Equal(ObjectModelHelpers.MSBuildDefaultToolsVersion, collection.DefaultToolsVersion); 1150Assert.Equal("x", collection.DefaultToolsVersion); 1165Assert.Equal(project.ToolsVersion, ObjectModelHelpers.MSBuildDefaultToolsVersion); 1498Assert.Equal(ProjectCollection.Unescape(propertyValue), property.EvaluatedValue);
Definition\ProjectItem_Tests.cs (174)
102Assert.Equal("i", item.ItemType); 103Assert.Equal("i1", item.EvaluatedInclude); 104Assert.Equal("i1", item.UnevaluatedInclude); 129Assert.Equal("m1", itemMetadata[0].Name); 130Assert.Equal("m2", itemMetadata[1].Name); 131Assert.Equal("v1", itemMetadata[0].EvaluatedValue); 132Assert.Equal("v2", itemMetadata[1].EvaluatedValue); 201Assert.Equal("v0", item.GetMetadataValue("m0")); 202Assert.Equal("v1b", item.GetMetadataValue("m1")); 203Assert.Equal("v2", item.GetMetadataValue("m2")); 225Assert.Equal(String.Empty, item.GetMetadataValue("m0")); 299Assert.Equal( 302Assert.Equal(NativeMethodsShared.IsWindows ? @"c:\" : "/", item.GetMetadataValue("RootDir")); 303Assert.Equal(@"bar", item.GetMetadataValue("Filename")); 304Assert.Equal(@".baz", item.GetMetadataValue("Extension")); 305Assert.Equal(NativeMethodsShared.IsWindows ? @"c:\foo\" : "/foo/", item.GetMetadataValue("RelativeDir")); 306Assert.Equal(NativeMethodsShared.IsWindows ? @"foo\" : "foo/", item.GetMetadataValue("Directory")); 307Assert.Equal(String.Empty, item.GetMetadataValue("RecursiveDir")); 308Assert.Equal( 330Assert.Equal(info.LastWriteTime.ToString(fileTimeFormat), item.GetMetadataValue("ModifiedTime")); 331Assert.Equal(info.CreationTime.ToString(fileTimeFormat), item.GetMetadataValue("CreatedTime")); 332Assert.Equal(info.LastAccessTime.ToString(fileTimeFormat), item.GetMetadataValue("AccessedTime")); 373Assert.Equal(NativeMethodsShared.IsWindows ? @"b\" : "b/", item.GetMetadataValue("RecursiveDir")); 374Assert.Equal("c", item.GetMetadataValue("Filename")); 419Assert.Equal("i0", items[0].EvaluatedInclude); 420Assert.Equal(NativeMethodsShared.IsWindows ? @"b\" : "b/", items[1].GetMetadataValue("RecursiveDir")); 421Assert.Equal("i2", items[2].EvaluatedInclude); 468Assert.Equal("a", items[0].EvaluatedInclude); 1204Assert.Equal("m2", item1.GetMetadataValue("m")); 1205Assert.Equal("m1", item2.GetMetadataValue("m")); 1247Assert.Equal("m1", item1.GetMetadataValue("m")); 1248Assert.Equal("m1", item1b.GetMetadataValue("m")); 1249Assert.Equal("m1", item1c.GetMetadataValue("m")); 1250Assert.Equal("m1", item2.GetMetadataValue("m")); 1255Assert.Equal("m2", item1.GetMetadataValue("m")); 1256Assert.Equal("m2", item1b.GetMetadataValue("m")); 1257Assert.Equal("m2", item1c.GetMetadataValue("m")); 1258Assert.Equal("m2", item2.GetMetadataValue("m")); 1266Assert.Equal("m2", project.ItemDefinitions["i"].GetMetadataValue("m")); // Should not have been affected 1297Assert.Equal("m1", item1.GetMetadataValue("m")); 1298Assert.Equal("m1", item1b.GetMetadataValue("m")); 1299Assert.Equal("m1", item2.GetMetadataValue("m")); 1304Assert.Equal("m2", item1.GetMetadataValue("m")); 1305Assert.Equal("m2", item1b.GetMetadataValue("m")); 1306Assert.Equal("m2", item2.GetMetadataValue("m")); 1313Assert.Equal("m2", project.ItemDefinitions["i"].GetMetadataValue("m")); // Should not have been affected 1363Assert.Equal("l0", project.GetItems("i").First().GetMetadataValue("l")); 1364Assert.Equal("m1", project.GetItems("i").First().GetMetadataValue("m")); 1365Assert.Equal("n1", project.GetItems("i").First().GetMetadataValue("n")); 1366Assert.Equal("", project.GetItems("i").First().GetMetadataValue("o")); 1367Assert.Equal("", project.GetItems("i").First().GetMetadataValue("p")); 1369Assert.Equal("l0", project.GetItems("j").First().GetMetadataValue("l")); 1370Assert.Equal("m1", project.GetItems("j").First().GetMetadataValue("m")); 1371Assert.Equal("n1", project.GetItems("j").First().GetMetadataValue("n")); 1372Assert.Equal("o2", project.GetItems("j").First().GetMetadataValue("o")); 1373Assert.Equal("p2", project.GetItems("j").First().GetMetadataValue("p")); 1375Assert.Equal("l0", project.GetItems("k").First().GetMetadataValue("l")); 1376Assert.Equal("m1", project.GetItems("k").First().GetMetadataValue("m")); 1377Assert.Equal("n1", project.GetItems("k").First().GetMetadataValue("n")); 1378Assert.Equal("o2", project.GetItems("k").First().GetMetadataValue("o")); 1379Assert.Equal("p4", project.GetItems("k").First().GetMetadataValue("p")); 1381Assert.Equal("l0", project.GetItems("l").First().GetMetadataValue("l")); 1382Assert.Equal("m1", project.GetItems("l").First().GetMetadataValue("m")); 1383Assert.Equal("n1", project.GetItems("l").First().GetMetadataValue("n")); 1384Assert.Equal("o2", project.GetItems("l").First().GetMetadataValue("o")); 1385Assert.Equal("p4", project.GetItems("l").First().GetMetadataValue("p")); 1387Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("l")); 1388Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("m")); 1389Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("n")); 1390Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("o")); 1391Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("p")); 1393Assert.Equal("l0", project.GetItems("m").First().GetMetadataValue("l")); 1394Assert.Equal("m1", project.GetItems("m").First().GetMetadataValue("m")); 1395Assert.Equal("n1", project.GetItems("m").First().GetMetadataValue("n")); 1396Assert.Equal("o4", project.GetItems("m").First().GetMetadataValue("o")); 1397Assert.Equal("p4", project.GetItems("m").First().GetMetadataValue("p")); 1399Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("l")); 1400Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("m")); 1401Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("n")); 1402Assert.Equal("o4", project.GetItems("m").ElementAt(1).GetMetadataValue("o")); 1403Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("p")); 1461Assert.Equal("l0", project.GetItems("i").First().GetMetadataValue("l")); 1462Assert.Equal("m1", project.GetItems("i").First().GetMetadataValue("m")); 1463Assert.Equal("n1", project.GetItems("i").First().GetMetadataValue("n")); 1464Assert.Equal("", project.GetItems("i").First().GetMetadataValue("o")); 1465Assert.Equal("", project.GetItems("i").First().GetMetadataValue("p")); 1467Assert.Equal("l0", project.GetItems("j").First().GetMetadataValue("l")); 1468Assert.Equal("m1", project.GetItems("j").First().GetMetadataValue("m")); 1469Assert.Equal("n1", project.GetItems("j").First().GetMetadataValue("n")); 1470Assert.Equal("o2", project.GetItems("j").First().GetMetadataValue("o")); 1471Assert.Equal("p2", project.GetItems("j").First().GetMetadataValue("p")); 1473Assert.Equal("l0", project.GetItems("k").First().GetMetadataValue("l")); 1474Assert.Equal("m1", project.GetItems("k").First().GetMetadataValue("m")); 1475Assert.Equal("n1", project.GetItems("k").First().GetMetadataValue("n")); 1476Assert.Equal("o2", project.GetItems("k").First().GetMetadataValue("o")); 1477Assert.Equal("p4", project.GetItems("k").First().GetMetadataValue("p")); 1479Assert.Equal("l0", project.GetItems("l").First().GetMetadataValue("l")); 1480Assert.Equal("m1", project.GetItems("l").First().GetMetadataValue("m")); 1481Assert.Equal("n1", project.GetItems("l").First().GetMetadataValue("n")); 1482Assert.Equal("o2", project.GetItems("l").First().GetMetadataValue("o")); 1483Assert.Equal("p4", project.GetItems("l").First().GetMetadataValue("p")); 1485Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("l")); 1486Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("m")); 1487Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("n")); 1488Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("o")); 1489Assert.Equal("", project.GetItems("l").ElementAt(1).GetMetadataValue("p")); 1491Assert.Equal("l0", project.GetItems("m").First().GetMetadataValue("l")); 1492Assert.Equal("m1", project.GetItems("m").First().GetMetadataValue("m")); 1493Assert.Equal("n1", project.GetItems("m").First().GetMetadataValue("n")); 1494Assert.Equal("o4", project.GetItems("m").First().GetMetadataValue("o")); 1495Assert.Equal("p4", project.GetItems("m").First().GetMetadataValue("p")); 1497Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("l")); 1498Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("m")); 1499Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("n")); 1500Assert.Equal("o4", project.GetItems("m").ElementAt(1).GetMetadataValue("o")); 1501Assert.Equal("", project.GetItems("m").ElementAt(1).GetMetadataValue("p")); 1533Assert.Equal("v1;v2;", item.GetMetadataValue("m2")); 1556Assert.Equal("i1", item.GetMetadataValue("m")); 1577Assert.Equal("i1", item.GetMetadataValue("m")); 1598Assert.Equal(String.Empty, item.GetMetadataValue("m")); 1620Assert.Equal("m1", item.GetMetadataValue("m")); 1621Assert.Equal(String.Empty, item.GetMetadataValue("n")); 1661Assert.Equal(@"i1.obj", items[0].GetMetadataValue("m")); 1662Assert.Equal(@"i2.obj", items[1].GetMetadataValue("m")); 1688Assert.Equal(@"m1", items[0].GetMetadataValue("m")); 1689Assert.Equal(String.Empty, items[1].GetMetadataValue("m")); 1713Assert.Equal(@".x", items[0].GetMetadataValue("m")); 1714Assert.Equal(@".y", items[1].GetMetadataValue("m")); 1738Assert.Equal(@"h0.baz.obj", items[0].GetMetadataValue("m")); 1739Assert.Equal(@"h1.baz.obj", items[1].GetMetadataValue("m")); 1763Assert.Equal(@"i0;h0;h1", items[1].GetMetadataValue("m")); 1764Assert.Equal(@"i0;h0;h1", items[2].GetMetadataValue("m")); 1788Assert.Equal(@"i0.x;h0;h1;.y", items[1].GetMetadataValue("m")); 1789Assert.Equal(@"i0.x;h0;h1;", items[2].GetMetadataValue("m")); 1812Assert.Equal("h0;i0", items[1].GetMetadataValue("m1")); 1836Assert.Equal("v1", items[1].GetMetadataValue("m1")); 1837Assert.Equal(String.Empty, items[1].GetMetadataValue("m2")); 1860Assert.Equal("0", items[0].GetMetadataValue("m0")); 1861Assert.Equal("1", items[0].GetMetadataValue("m1")); 1862Assert.Equal(String.Empty, items[0].GetMetadataValue("m2")); 1880Assert.Equal(String.Empty, item.GetMetadataValue("m")); 1901Assert.Equal("m1", item.GetMetadataValue("m")); // Now originating from definition! 1968Assert.Equal("i1", item.GetMetadataValue("FileName")); 1972Assert.Equal("i2", item.Xml.Include); 1973Assert.Equal("i2", item.EvaluatedInclude); 1975Assert.Equal("i2", item.GetMetadataValue("FileName")); 2000Assert.Equal(Path.GetFileName(sourceFile), projectItem.EvaluatedInclude); 2006Assert.Equal(Path.GetFileName(renamedSourceFile), projectItem.EvaluatedInclude); 2027Assert.Equal("j", item.ItemType); 2161Assert.Equal("p;f1;f2", metadata.EvaluatedValue); 2162Assert.Equal("$(P);@(Foo)", metadata.Xml.Value); 2188Assert.Equal("M", metadata.Name); 2189Assert.Equal("V", metadata.EvaluatedValue); 2194Assert.Equal("M", metadataElement.Name); 2195Assert.Equal("V", metadataElement.Value); 2237Assert.Equal("M1", m1.Name); 2238Assert.Equal("V1", m1.EvaluatedValue); 2241Assert.Equal("M2", m2.Name); 2242Assert.Equal("V2", m2.EvaluatedValue); 2250Assert.Equal("M1", me1.Name); 2251Assert.Equal("V1", me1.Value); 2254Assert.Equal("M2", me2.Name); 2255Assert.Equal("V2", me2.Value); 2297Assert.Equal("M1", m1.Name); 2298Assert.Equal("V2", m1.EvaluatedValue); 2306Assert.Equal("M1", me1.Name); 2307Assert.Equal("V2", me1.Value); 2320Assert.Equal("a", items[0].EvaluatedInclude); 2332Assert.Equal(@"a;a", string.Join(";", items.Select(i => i.EvaluatedInclude))); 2343Assert.Equal(@"a.txt;b.cs", string.Join(";", items.Select(i => i.EvaluatedInclude))); 2355Assert.Equal(@"a;c", string.Join(";", items.Select(i => i.EvaluatedInclude))); 2385Assert.Equal(@"a;b", string.Join(";", project.Items.Select(i => i.EvaluatedInclude))); 2402Assert.Equal(@"a;b;c", string.Join(";", project.ItemsIgnoringCondition.Select(i => i.EvaluatedInclude))); 3002Assert.Equal("The required attribute \"Update\" is empty or missing from the element <i>.", exception.Message);
Definition\ProjectItemDefinition_Tests.cs (13)
70Assert.Equal("v", Helpers.GetFirst(project.GetItems("i")).GetMetadataValue("m")); 109Assert.Equal("m", metadataList[0].Name); 110Assert.Equal("m0", metadataList[0].EvaluatedValue); 249Assert.Equal("b", item.GetMetadataValue("m")); 276Assert.Equal("b.ext", item.GetMetadataValue("m")); 303Assert.Equal("b.l1", item.GetMetadataValue("m")); 334Assert.Equal("b.n1", item.GetMetadataValue("m")); 363Assert.Equal("%25(filename)", Project.GetMetadataValueEscaped(item, "m")); 364Assert.Equal("%(filename)", item.GetMetadataValue("m")); 392Assert.Equal(".bar", item.GetMetadataValue("m")); 420Assert.Equal(".foo", item.EvaluatedInclude); 460Assert.Equal("n1", item1.GetMetadataValue("n")); 463Assert.Equal("", item2.GetMetadataValue("n"));
Definition\ProjectMetadata_Tests.cs (31)
80Assert.Equal("v!4", Helpers.GetFirst(project.GetItems("i")).GetMetadataValue("m2")); 117Assert.Equal("$(p)", metadatum.UnevaluatedValue); 118Assert.Equal("p0", metadatum.EvaluatedValue); 135Assert.Equal("@(i)", metadatum.UnevaluatedValue); 136Assert.Equal("i1", metadatum.EvaluatedValue); 165Assert.Equal("%(i.m1)", metadatum.UnevaluatedValue); 166Assert.Equal(String.Empty, metadatum.EvaluatedValue); 192Assert.Equal("%(i.m0)", metadatum.UnevaluatedValue); 193Assert.Equal("v0", metadatum.EvaluatedValue); 218Assert.Equal("%(i.m1)", metadatum.UnevaluatedValue); 219Assert.Equal(String.Empty, metadatum.EvaluatedValue); 245Assert.Equal("%(m0)", metadatum.UnevaluatedValue); 246Assert.Equal("v0", metadatum.EvaluatedValue); 277Assert.Equal("%(m0)", metadatum.UnevaluatedValue); 278Assert.Equal("v0", metadatum.EvaluatedValue); 309Assert.Equal("%(i.m0)", metadatum.UnevaluatedValue); 310Assert.Equal("v0", metadatum.EvaluatedValue); 341Assert.Equal("%(j.m0)", metadatum.UnevaluatedValue); 342Assert.Equal(String.Empty, metadatum.EvaluatedValue); 374Assert.Equal("%(m0)", metadatum.UnevaluatedValue); 375Assert.Equal("v0", metadatum.EvaluatedValue); 403Assert.Equal("%(i.m0)", metadatum.UnevaluatedValue); 404Assert.Equal("v0", metadatum.EvaluatedValue); 437Assert.Equal("%(j.m0)", metadatum.UnevaluatedValue); 438Assert.Equal(String.Empty, metadatum.EvaluatedValue); 526Assert.Equal("%3B", item.GetMetadata("EscapedSemicolon").UnevaluatedValue); 527Assert.Equal(";", item.GetMetadata("EscapedSemicolon").EvaluatedValue); 528Assert.Equal(";", item.GetMetadataValue("EscapedSemicolon")); 530Assert.Equal("%24", item.GetMetadata("EscapedDollarSign").UnevaluatedValue); 531Assert.Equal("$", item.GetMetadata("EscapedDollarSign").EvaluatedValue); 532Assert.Equal("$", item.GetMetadataValue("EscapedDollarSign"));
Definition\ProjectProperty_Tests.cs (19)
52Assert.Equal("p", property.Name); 53Assert.Equal("v1", property.EvaluatedValue); 54Assert.Equal("v1", property.UnevaluatedValue); 75Assert.Equal("p", property.Name); 76Assert.Equal("v1", property.EvaluatedValue); 77Assert.Equal("$(o)", property.UnevaluatedValue); 92Assert.Equal("v2", property.EvaluatedValue); 93Assert.Equal("v2", property.UnevaluatedValue); 109Assert.Equal("v(2)", property.EvaluatedValue); 110Assert.Equal("v%282%29", property.UnevaluatedValue); 160Assert.Equal("v", property.EvaluatedValue); 161Assert.Equal("v", property.UnevaluatedValue); 166Assert.Equal("v", property.UnevaluatedValue); 229Assert.Equal("v0", project.GetPropertyValue("p1")); 230Assert.Equal("v0", property.EvaluatedValue); 231Assert.Equal("$(p0)", property.UnevaluatedValue); 248Assert.Equal("@(i)-%(m)", project.GetPropertyValue("p1")); 249Assert.Equal("@(i)-%(m)", property.EvaluatedValue); 250Assert.Equal("@(i)-%(m)", property.UnevaluatedValue);
Definition\ProtectImports_Tests.cs (10)
154Assert.Equal(NewValue, project.GetPropertyValue(PropertyName)); 260Assert.Equal(NewValue, item.EvaluatedInclude); // "Item in project didn't change name." 274Assert.Equal(NewValue, item.EvaluatedInclude); // "Item in project didn't change name." 366Assert.Equal(NewValue, item.GetMetadataValue(ProjectMetadataName)); // "Metadata not saved correctly in project." 381Assert.Equal(NewValue, item.GetMetadataValue(newName)); // "Metadata not saved correctly in project." 397Assert.Equal(newValue, metadata.EvaluatedValue); 459Assert.Equal(NewValue, item.GetMetadataValue(OverridableMetadataName)); // "Metadata not set correctly in project." 473Assert.Equal(NewValue, metadata.EvaluatedValue); 529Assert.Equal(_importFilename, item.Xml.ContainingProject.FullPath); // "Item was not found in the imported project." 620Assert.Equal(_importFilename, property.Xml.ContainingProject.FullPath); // "Property was not found in the imported project."
Instance\ProjectInstance_Tests.cs (34)
54Assert.Equal("v1", p.GetPropertyValue("p1")); 55Assert.Equal("v2X", p.GetPropertyValue("p2")); 68Assert.Equal("i", items[0].ItemType); 69Assert.Equal("i0", items[0].EvaluatedInclude); 70Assert.Equal(String.Empty, items[0].GetMetadataValue("m")); 72Assert.Equal("i1", items[1].EvaluatedInclude); 73Assert.Equal("m1", items[1].GetMetadataValue("m")); 74Assert.Equal("m1", items[1].GetMetadata("m").EvaluatedValue); 75Assert.Equal("v1", items[2].EvaluatedInclude); 88Assert.Equal("i", returned.ItemType); 89Assert.Equal("i1", returned.EvaluatedInclude); 94Assert.Equal("i1", item.EvaluatedInclude); 109Assert.Equal("i", returned.ItemType); 110Assert.Equal("i;1", returned.EvaluatedInclude); 115Assert.Equal("i;1", item.EvaluatedInclude); 140Assert.Equal("i1", item.EvaluatedInclude); 143Assert.Equal("m1", item.GetMetadataValue("m")); 144Assert.Equal("n1", item.GetMetadataValue("n")); 145Assert.Equal("o@", item.GetMetadataValue("o")); 209Assert.Equal("p2", instance.GetPropertyValue("p")); 214Assert.Equal("", instance.GetPropertyValue("p")); 242Assert.Equal("v1b", first.GetPropertyValue("p1")); 243Assert.Equal("v1", second.GetPropertyValue("p1")); 266Assert.Equal("i1", Helpers.MakeList(project.GetItems("j"))[0].EvaluatedInclude); 267Assert.Equal("m1", Helpers.MakeList(project.GetItems("j"))[0].GetMetadataValue("m")); 268Assert.Equal("n;;", Helpers.MakeList(project.GetItems("j"))[0].GetMetadataValue("n")); 310Assert.Equal(file1, Helpers.MakeList(projectInstance.GetItems("i"))[0].EvaluatedInclude); 311Assert.Equal(file2, Helpers.MakeList(projectInstance.GetItems("i"))[1].EvaluatedInclude); 431Assert.Equal(projB.FullPath, projBInstanceItem.GetMetadataValue(CapturedMetadataName)); 432Assert.Equal(projA.FullPath, projAInstanceItem.GetMetadataValue(CapturedMetadataName)); 473Assert.Equal(projB.FullPath, projBInstanceItem.GetMetadataValue(CapturedMetadataName)); 474Assert.Equal(projA.FullPath, projAInstanceItem.GetMetadataValue(CapturedMetadataName)); 515Assert.Equal(projA.FullPath, projAInstanceItem.GetMetadataValue(CapturedMetadataName)); 516Assert.Equal(projB.FullPath, projBInstanceItem.GetMetadataValue(CapturedMetadataName));
Instance\ProjectItemInstance_Tests.cs (80)
83Assert.Equal("i", item.ItemType); 84Assert.Equal("i1", item.EvaluatedInclude); 100Assert.Equal("m1", item.GetMetadata("m1").Name); 101Assert.Equal("m2", item.GetMetadata("m2").Name); 102Assert.Equal("v1", item.GetMetadataValue("m1")); 103Assert.Equal("v2", item.GetMetadataValue("m2")); 120Assert.Equal("m1", item.GetMetadata("m1").Name); 121Assert.Equal("m2", item.GetMetadata("m2").Name); 122Assert.Equal("v1", item.GetMetadataValue("m1")); 123Assert.Equal("v2", item.GetMetadataValue("m2")); 144Assert.Equal("v1", item.GetMetadataValue("m1")); 145Assert.Equal("v2", item.GetMetadataValue("m2")); 146Assert.Equal("v3", item.GetMetadataValue("m3")); 157Assert.Equal(String.Empty, item.GetMetadataValue("X")); 172Assert.Equal("v1", toItem.GetMetadata("m1")); 173Assert.Equal("v2", toItem.GetMetadata("m2")); 218Assert.Equal("i1b", item.EvaluatedInclude); 258Assert.Equal(String.Empty, item.GetMetadataValue("m")); 269Assert.Equal("m1", item.GetMetadataValue("m")); 280Assert.Equal(String.Empty, item.GetMetadataValue("m")); 292Assert.Equal(String.Empty, item.GetMetadataValue("m")); 330Assert.Equal(item.EvaluatedInclude, taskItem.ItemSpec); 333Assert.Equal("m1", taskItem.GetMetadata("m")); 335Assert.Equal("m2", item.GetMetadataValue("m")); 354Assert.Equal("esca%20ped%3bitem", taskItem.EvaluatedIncludeEscaped); 355Assert.Equal("esca ped;item", taskItem.ItemSpec); 357Assert.Equal("m;1", taskItem.GetMetadata("m;")); 358Assert.Equal("m%3b1", taskItem.GetMetadataValueEscaped("m;")); 359Assert.Equal("m1", taskItem.GetMetadataValueEscaped("m")); 361Assert.Equal("esca%20ped%3bitem", taskItem.EvaluatedIncludeEscaped); 362Assert.Equal("esca ped;item", taskItem.ItemSpec); 368Assert.Equal("m%3b2", taskItem2.GetMetadataValueEscaped("m;")); 369Assert.Equal("m;2", taskItem2.GetMetadata("m;")); 378Assert.Equal("m1", pair.Value); 383Assert.Equal("m;2", pair.Value); 388Assert.Equal("esca ped;item", pair.Value); 399Assert.Equal("m1", pair.Value); 404Assert.Equal("m%3b2", pair.Value); 409Assert.Equal("esca%20ped%3bitem", pair.Value); 426Assert.Equal(String.Empty, taskItem.GetMetadata("m")); 452Assert.Equal("i", item.ItemType); 453Assert.Equal("i1", item.EvaluatedInclude); 483Assert.Equal("m1", itemMetadata[0].Name); 484Assert.Equal("m2", itemMetadata[1].Name); 485Assert.Equal("v1", itemMetadata[0].EvaluatedValue); 486Assert.Equal("v2", itemMetadata[1].EvaluatedValue); 522Assert.Equal(";x86;", taskItem.GetMetadata("m0")); 523Assert.Equal("foo.extension", taskItem.GetMetadata("m1")); 524Assert.Equal(";foo.extension;", taskItem.GetMetadata("m2")); 525Assert.Equal("v1", taskItem.GetMetadata("m3")); 526Assert.Equal(";x86;", taskItem.GetMetadata("m4")); 553Assert.Equal("v0", item.GetMetadataValue("m0")); 554Assert.Equal("v1b", item.GetMetadataValue("m1")); 555Assert.Equal("v2", item.GetMetadataValue("m2")); 638Assert.Equal("v1;v2;", item.GetMetadataValue("m2")); 661Assert.Equal("i1", item.GetMetadataValue("m")); 682Assert.Equal("i1", item.GetMetadataValue("m")); 703Assert.Equal(String.Empty, item.GetMetadataValue("m")); 725Assert.Equal("m1", item.GetMetadataValue("m")); 726Assert.Equal(String.Empty, item.GetMetadataValue("n")); 766Assert.Equal(@"i1.obj", items[0].GetMetadataValue("m")); 767Assert.Equal(@"i2.obj", items[1].GetMetadataValue("m")); 793Assert.Equal(@"m1", items[0].GetMetadataValue("m")); 794Assert.Equal(String.Empty, items[1].GetMetadataValue("m")); 818Assert.Equal(@".x", items[0].GetMetadataValue("m")); 819Assert.Equal(@".y", items[1].GetMetadataValue("m")); 843Assert.Equal(@"h0.baz.obj", items[0].GetMetadataValue("m")); 844Assert.Equal(@"h1.baz.obj", items[1].GetMetadataValue("m")); 868Assert.Equal(@"i0;h0;h1", items[1].GetMetadataValue("m")); 869Assert.Equal(@"i0;h0;h1", items[2].GetMetadataValue("m")); 893Assert.Equal(@"i0.x;h0;h1;.y", items[1].GetMetadataValue("m")); 894Assert.Equal(@"i0.x;h0;h1;", items[2].GetMetadataValue("m")); 917Assert.Equal("h0;i0", items[1].GetMetadataValue("m1")); 941Assert.Equal("v1", items[1].GetMetadataValue("m1")); 942Assert.Equal(String.Empty, items[1].GetMetadataValue("m2")); 965Assert.Equal("0", items[0].GetMetadataValue("m0")); 966Assert.Equal("1", items[0].GetMetadataValue("m1")); 967Assert.Equal(String.Empty, items[0].GetMetadataValue("m2")); 1184Assert.Equal(includes[i], items[i].EvaluatedInclude); 1205Assert.Equal(expected[key], item.GetMetadataValue(key));
Instance\ProjectMetadataInstance_Tests.cs (2)
25Assert.Equal("m", metadata.Name); 26Assert.Equal("m1", metadata.EvaluatedValue);
Instance\ProjectOnErrorInstance_Tests.cs (2)
28Assert.Equal("et", onError.ExecuteTargets); 29Assert.Equal("c", onError.Condition);
Instance\ProjectPropertyInstance_Tests.cs (5)
26Assert.Equal("p", property.Name); 27Assert.Equal("v1", property.EvaluatedValue); 38Assert.Equal("v2", property.EvaluatedValue); 49Assert.Equal("v!2", property.EvaluatedValue); 60Assert.Equal(String.Empty, property.EvaluatedValue);
Instance\ProjectTargetInstance_Tests.cs (15)
29Assert.Equal("t", target.Name); 30Assert.Equal("c", target.Condition); 31Assert.Equal("i", target.Inputs); 32Assert.Equal("o", target.Outputs); 33Assert.Equal("d", target.DependsOnTargets); 34Assert.Equal("b", target.BeforeTargets); 35Assert.Equal("a", target.AfterTargets); 36Assert.Equal("k", target.KeepDuplicateOutputs); 37Assert.Equal("r", target.Returns); 38Assert.Equal("t1", ((ProjectTaskInstance)target.Children[0]).Name); 42Assert.Equal("t1", tasks[0].Name); 61Assert.Equal("i2", target.Inputs); 81Assert.Equal("i2", target.Inputs); 101Assert.Equal("i2", target.Inputs); 124Assert.Equal(project.FullPath, target.FullPath);
Instance\ProjectTaskInstance_Tests.cs (5)
28Assert.Equal("t1", task.Name); 29Assert.Equal("c", task.Condition); 30Assert.Equal("coe", task.ContinueOnError); 34Assert.Equal("a1", parameters["a"]); 35Assert.Equal("b1", parameters["b"]);
Instance\ProjectTaskOutputItemInstance_Tests.cs (3)
28Assert.Equal("p", output.TaskParameter); 29Assert.Equal("c", output.Condition); 30Assert.Equal("i", output.ItemType);
Instance\ProjectTaskOutputPropertyInstance_Tests.cs (3)
28Assert.Equal("p", output.TaskParameter); 29Assert.Equal("c", output.Condition); 30Assert.Equal("p1", output.PropertyName);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (62)
264Assert.Equal(expected.File, actual.File); 386Assert.Equal(realXml.OuterElement, viewXml.OuterElement); 404Assert.Equal(realXml.ElementName, viewXml.ElementName); 405Assert.Equal(realXml.Label, viewXml.Label); 525Assert.Equal(realXml.FullPath, viewXml.FullPath); 526Assert.Equal(realXml.DirectoryPath, viewXml.DirectoryPath); 528Assert.Equal(realXml.DefaultTargets, viewXml.DefaultTargets); 529Assert.Equal(realXml.InitialTargets, viewXml.InitialTargets); 530Assert.Equal(realXml.Sdk, viewXml.Sdk); 531Assert.Equal(realXml.TreatAsLocalProperty, viewXml.TreatAsLocalProperty); 532Assert.Equal(realXml.ToolsVersion, viewXml.ToolsVersion); 616Assert.Equal(realXml.Content, viewXml.Content); 628Assert.Equal(realXml.Name, viewXml.Name); 629Assert.Equal(realXml.Value, viewXml.Value); 642Assert.Equal(realXml.Name, viewXml.Name); 644Assert.Equal(realXml.ContinueOnError, viewXml.ContinueOnError); 646Assert.Equal(realXml.MSBuildRuntime, viewXml.MSBuildRuntime); 649Assert.Equal(realXml.MSBuildArchitecture, viewXml.MSBuildArchitecture); 668Assert.Equal(realParams[k], viewParams[k]); 691Assert.Equal(rkvp.Key, vkvp.Key); 706Assert.Equal(realXml.TaskParameter, viewXml.TaskParameter); 710Assert.Equal(realXml.ItemType, viewXml.ItemType); 711Assert.Equal(realXml.PropertyName, viewXml.PropertyName); 724Assert.Equal(realXml.TaskBody, viewXml.TaskBody); 725Assert.Equal(realXml.Evaluate, viewXml.Evaluate); 738Assert.Equal(realXml.Name, viewXml.Name); 739Assert.Equal(realXml.ParameterType, viewXml.ParameterType); 741Assert.Equal(realXml.Output, viewXml.Output); 743Assert.Equal(realXml.Required, viewXml.Required); 769Assert.Equal(realXml.AssemblyFile, viewXml.AssemblyFile); 772Assert.Equal(realXml.AssemblyName, viewXml.AssemblyName); 775Assert.Equal(realXml.TaskName, viewXml.TaskName); 778Assert.Equal(realXml.TaskFactory, viewXml.TaskFactory); 781Assert.Equal(realXml.Runtime, viewXml.Runtime); 784Assert.Equal(realXml.Architecture, viewXml.Architecture); 801Assert.Equal(realXml.Name, viewXml.Name); 803Assert.Equal(realXml.Inputs, viewXml.Inputs); 805Assert.Equal(realXml.Outputs, viewXml.Outputs); 807Assert.Equal(realXml.KeepDuplicateOutputs, viewXml.KeepDuplicateOutputs); 809Assert.Equal(realXml.DependsOnTargets, viewXml.DependsOnTargets); 811Assert.Equal(realXml.BeforeTargets, viewXml.BeforeTargets); 813Assert.Equal(realXml.AfterTargets, viewXml.AfterTargets); 815Assert.Equal(realXml.Returns, viewXml.Returns); 834Assert.Equal(realXml.Project, viewXml.Project); 839Assert.Equal(realXml.Sdk, viewXml.Sdk); 840Assert.Equal(realXml.Version, viewXml.Version); 841Assert.Equal(realXml.MinimumVersion, viewXml.MinimumVersion); 868Assert.Equal(realXml.ItemType, viewXml.ItemType); 893Assert.Equal(realXml.ItemType, viewXml.ItemType); 894Assert.Equal(realXml.Include, viewXml.Include); 895Assert.Equal(realXml.Exclude, viewXml.Exclude); 896Assert.Equal(realXml.Remove, viewXml.Remove); 897Assert.Equal(realXml.Update, viewXml.Update); 898Assert.Equal(realXml.KeepMetadata, viewXml.KeepMetadata); 899Assert.Equal(realXml.RemoveMetadata, viewXml.RemoveMetadata); 900Assert.Equal(realXml.KeepDuplicates, viewXml.KeepDuplicates); 935Assert.Equal(realXml.Name, viewXml.Name); 936Assert.Equal(realXml.Value, viewXml.Value); 959Assert.Equal(realXml.Name, viewXml.Name); 960Assert.Equal(realXml.Version, viewXml.Version); 961Assert.Equal(realXml.MinimumVersion, viewXml.MinimumVersion); 973Assert.Equal(realXml.ExecuteTargetsAttribute, viewXml.ExecuteTargetsAttribute);
ObjectModelRemoting\Helpers\ViewValidation.cs (6)
73Assert.Equal(current, getter(this.View)); 80Assert.Equal(newValue1, getter(this.View)); 81Assert.Equal(newValue1, getter(this.Real)); 86Assert.Equal(newValue, getter(this.View)); 87Assert.Equal(newValue, getter(this.Real)); 292Assert.Equal(md.Value, getMetadata(md.Key));
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (29)
23Assert.Equal(value, this.View.GetPropertyValue(name)); 24Assert.Equal(value, this.Real.GetPropertyValue(name)); 45Assert.Equal(m.Value, md.UnevaluatedValue); 87Assert.Equal(unevaluatedValue, added.UnevaluatedValue); 109Assert.Equal(real.Name, view.Name); 110Assert.Equal(real.EvaluatedValue, view.EvaluatedValue); 111Assert.Equal(real.UnevaluatedValue, view.UnevaluatedValue); 141Assert.Equal(real.Name, view.Name); 142Assert.Equal(real.EvaluatedValue, view.EvaluatedValue); 143Assert.Equal(real.UnevaluatedValue, view.UnevaluatedValue); 144Assert.Equal(real.ItemType, view.ItemType); 179Assert.Equal(real.ItemType, view.ItemType); 188Assert.Equal(rv, vv); 218Assert.Equal(real.ItemType, view.ItemType); 219Assert.Equal(real.UnevaluatedInclude, view.UnevaluatedInclude); 220Assert.Equal(real.EvaluatedInclude, view.EvaluatedInclude); 233Assert.Equal(rv, vv); 244Assert.Equal(real.GetMetadataValue("random non existent"), view.GetMetadataValue("random non existent")); 266Assert.Equal(real.Name, view.Name); 267Assert.Equal(real.Version, view.Version); 268Assert.Equal(real.MinimumVersion, view.MinimumVersion); 281Assert.Equal(real.Path, view.Path); 306Assert.Equal(realProps[i], viewProps[i]); 341Verify(view.GlobalProperties, real.GlobalProperties, (a, b, p) => Assert.Equal(b, a), context); 343Verify(view.ItemTypes, real.ItemTypes, (a, b, p) => Assert.Equal(b, a), context); 365Assert.Equal(real.ToolsVersion, view.ToolsVersion); 366Assert.Equal(real.SubToolsetVersion, view.SubToolsetVersion); 367Assert.Equal(real.DirectoryPath, view.DirectoryPath); 368Assert.Equal(real.FullPath, view.FullPath);
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (3)
272Assert.Equal(paramValue.Ver(i), newTask.View.Parameters[paramName.Ver(i)]); 281Assert.Equal(paramValue.Ver(i), newTask.View.Parameters[paramName.Ver(i)]); 612Assert.Equal("source", itemDef.View.ItemType);
ObjectModelRemoting\LinkedConstructionReadOnly_Tests.cs (4)
102Assert.Equal(realXml["a"], viewXml["a"]); 103Assert.Equal(realXml["b"], viewXml["b"]); 104Assert.Equal("x", viewXml["a"]); 105Assert.Equal("y", viewXml["b"]);
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (26)
47Assert.Equal(proj1Path, viewProj.FullPath); 57Assert.Equal(savedPath, realProj.FullPath); 239Assert.Equal("xxValue", fooView.GetMetadataValue("xx")); 253Assert.Equal("xxRealValue", fooView.GetMetadataValue("xxReal")); 264Assert.Equal("cpp", fooView.ItemType); 266Assert.Equal("cpp2", fooView.ItemType); 267Assert.Equal("cpp2", fooReal.ItemType); 269Assert.Equal("cpp3", fooView.ItemType); 270Assert.Equal("cpp3", fooReal.ItemType); 276Assert.Equal("foo.cpp", fooView.UnevaluatedInclude); 278Assert.Equal("fooRenamed.cpp", fooView.UnevaluatedInclude); 279Assert.Equal("fooRenamed.cpp", fooReal.UnevaluatedInclude); 282Assert.Equal("fooRenamedAgain.cpp", fooView.UnevaluatedInclude); 283Assert.Equal("fooRenamedAgain.cpp", fooReal.UnevaluatedInclude); 288Assert.Equal("fooRenamedOnceMore.cpp", fooView.UnevaluatedInclude); 289Assert.Equal("fooRenamedOnceMore.cpp", fooReal.UnevaluatedInclude); 292Assert.Equal("fooRenamedLastTimeForSure.cpp", fooView.UnevaluatedInclude); 293Assert.Equal("fooRenamedLastTimeForSure.cpp", fooReal.UnevaluatedInclude); 356Assert.Equal("fooValue", fooView.EvaluatedValue); 358Assert.Equal("fooValue", fooView.EvaluatedValue); 361Assert.Equal("fooValue", fooView.EvaluatedValue); 362Assert.Equal("fooValue", fooReal.EvaluatedValue); 368Assert.Equal("fooValueXXX", fooViewNew.EvaluatedValue); 371Assert.Equal("fooValueChanged$(xxx)", fooRealNew.UnevaluatedValue); 373Assert.Equal("fooValueChangedXXX", fooViewNew.EvaluatedValue); 374Assert.Equal("fooValueChangedXXX", fooRealNew.EvaluatedValue);
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (1)
136Assert.Equal("Group1", existingItemGroup.Label);
Microsoft.Build.Engine.UnitTests (1355)
AssemblyNameEx_Tests.cs (7)
355Assert.Equal("A", extension.Name); 361Assert.Equal("A", extension.Name); 367Assert.Equal("A", extension.Name); 373Assert.Equal("A", extension.Name); 379Assert.Equal("A", extension.Name); 391Assert.Equal("A", extension.Name); 399Assert.Equal("A", extension.Name);
BackEnd\BatchingEngine_Tests.cs (9)
78Assert.Equal("a.doc;b.doc;c.doc;d.doc;e.doc", bucket.Expander.ExpandIntoStringAndUnescape("@(doc)", ExpanderOptions.ExpandItems, MockElementLocation.Instance)); 79Assert.Equal("unittests.foo", bucket.Expander.ExpandIntoStringAndUnescape("$(bogus)$(UNITTESTS)", ExpanderOptions.ExpandPropertiesAndMetadata, MockElementLocation.Instance)); 82Assert.Equal("a.foo", buckets[0].Expander.ExpandIntoStringAndUnescape("@(File)", ExpanderOptions.ExpandItems, MockElementLocation.Instance)); 83Assert.Equal(".foo", buckets[0].Expander.ExpandIntoStringAndUnescape("@(File->'%(Extension)')", ExpanderOptions.ExpandItems, MockElementLocation.Instance)); 84Assert.Equal("obj\\a.ext", buckets[0].Expander.ExpandIntoStringAndUnescape("$(obj)\\%(Filename).ext", ExpanderOptions.ExpandPropertiesAndMetadata, MockElementLocation.Instance)); 87Assert.Equal(String.Empty, buckets[0].Expander.ExpandIntoStringAndUnescape("%(Extension)", ExpanderOptions.ExpandAll, MockElementLocation.Instance)); 105Assert.Equal("MSB4012", ex.ErrorCode); 113Assert.Equal("a.foo", items[0].EvaluatedInclude); 420Assert.Equal("high", log.Warnings[0].Code);
BackEnd\BinaryTranslator_Tests.cs (4)
439Assert.Equal(value["foo"], deserializedValue["foo"]); 440Assert.Equal(value["alpha"], deserializedValue["alpha"]); 441Assert.Equal(value["FOO"], deserializedValue["FOO"]); 803Assert.Equal(value, deserializedValue);
BackEnd\BuildManager_Tests.cs (20)
144Assert.Equal("InitialProperty1", propertyValue); 147Assert.Equal("InitialProperty2", propertyValue); 150Assert.Equal("InitialProperty3", propertyValue); 578Assert.Equal("InitialProperty1", propertyValue); 581Assert.Equal("InitialProperty2", propertyValue); 584Assert.Equal("InitialProperty3", propertyValue); 618Assert.Equal("InitialProperty1", propertyValue); 621Assert.Equal("InitialProperty2", propertyValue); 624Assert.Equal("InitialProperty3", propertyValue); 662Assert.Equal("InitialProperty1", propertyValue); 665Assert.Equal("InitialProperty2", propertyValue); 668Assert.Equal("InitialProperty3", propertyValue); 726Assert.Equal("InitialProperty3", propertyValue); 803Assert.Equal("InitialProperty3", propertyValue); 1883Assert.Equal("bar", instance.GetPropertyValue("Foo")); 1909Assert.Equal("bar", instance.GetPropertyValue("Foo")); 1941Assert.Equal("bar", instance.GetPropertyValue("Foo")); 3680Assert.Equal("InitialValue", results.ResultsByTarget["BuildOther"].Items.First().ItemSpec); 3702Assert.Equal(newPropertyValue, results.ResultsByTarget["Foo"].Items.First().ItemSpec); 3765Assert.Equal("foo;bar",
BackEnd\BuildRequest_Tests.cs (2)
77Assert.Equal("a", request2.Targets[0]); 136Assert.Equal(request.Targets[i], deserializedRequest.Targets[i]);
BackEnd\BuildRequestConfiguration_Tests.cs (14)
159Assert.Equal(config1.ProjectFullPath, Path.GetFullPath("file")); 167Assert.Equal("toolsVersion", config1.ToolsVersion); 371Assert.Equal("3", instance.GlobalProperties["ThreeIn"]); 372Assert.Equal("bazfile", instance.GlobalProperties["BazIn"]); 373Assert.Equal("1", instance.PropertiesToBuildWith["One"].EvaluatedValue); 374Assert.Equal("2", instance.PropertiesToBuildWith["Two"].EvaluatedValue); 375Assert.Equal("3", instance.PropertiesToBuildWith["Three"].EvaluatedValue); 381Assert.Equal("bazfile", instance.ItemsToBuildWith["Baz"].First().EvaluatedInclude); 399Assert.Equal("3", instance.GlobalProperties["ThreeIn"]); 400Assert.Equal("bazfile", instance.GlobalProperties["BazIn"]); 401Assert.Equal("1", instance.PropertiesToBuildWith["One"].EvaluatedValue); 402Assert.Equal("2", instance.PropertiesToBuildWith["Two"].EvaluatedValue); 403Assert.Equal("3", instance.PropertiesToBuildWith["Three"].EvaluatedValue); 407Assert.Equal("bazfile", instance.ItemsToBuildWith["Baz"].First().EvaluatedInclude);
BackEnd\BuildRequestEngine_Tests.cs (4)
420Assert.Equal("requiredTarget1", _newRequest_Request.BuildRequests[0].Targets[0]); 473Assert.Equal(Path.GetFullPath("OtherFile"), _newConfiguration_Config.ProjectFullPath); 474Assert.Equal("TestToolsVersion", _newConfiguration_Config.ToolsVersion); 487Assert.Equal("requiredTarget1", _newRequest_Request.BuildRequests[0].Targets[0]);
BackEnd\BuildResult_Tests.cs (1)
335Assert.Equal(result.Exception?.Message, deserializedResult.Exception?.Message);
BackEnd\CentralForwardingLogger_Tests.cs (1)
34Assert.Equal("MyParameters", centralLogger.Parameters); // "Expected parameters equal MyParameters"
BackEnd\ConfigurationMetadata_Tests.cs (4)
65Assert.Equal(data.ProjectFullPath, metadata.ProjectFullPath); 66Assert.Equal(data.ExplicitlySpecifiedToolsVersion, metadata.ToolsVersion); 78Assert.Equal(project.FullPath, metadata.ProjectFullPath); 79Assert.Equal(project.ToolsVersion, metadata.ToolsVersion);
BackEnd\FullyQualifiedBuildRequest_Tests.cs (1)
53Assert.Equal("foo", request.Targets[0]);
BackEnd\IntrinsicTask_Tests.cs (112)
45Assert.Equal("v1", properties["p1"].EvaluatedValue); 46Assert.Equal("v2", properties["p2"].EvaluatedValue); 65Assert.Equal("v1", properties["p1"].EvaluatedValue); 137Assert.Equal("", properties["p1"].EvaluatedValue); 252Assert.Equal("a1", i1Group.First().EvaluatedInclude); 253Assert.Equal("b1", i2Group.First().EvaluatedInclude); 426Assert.Equal("m1", group.First().GetMetadataValue("m1")); 450Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 451Assert.Equal("m2", group.First().GetMetadataValue("m2")); 452Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 477Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 478Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 479Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 503Assert.Equal("m1", group.First().GetMetadataValue("m1")); 504Assert.Equal("m2", group.First().GetMetadataValue("m2")); 505Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 532Assert.Equal("m1", group.First().GetMetadataValue("m1")); 533Assert.Equal("m2", group.First().GetMetadataValue("m2")); 534Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 556Assert.Equal("m1", group.First().GetMetadataValue("m1")); 580Assert.Equal("m1", group.First().GetMetadataValue("m1")); 581Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 582Assert.Equal("m3", group.First().GetMetadataValue("m3")); 606Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 607Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 608Assert.Equal("m3", group.First().GetMetadataValue("m3")); 635Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 636Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 637Assert.Equal("m3", group.First().GetMetadataValue("m3")); 705Assert.Equal("a1", i1Group.First().EvaluatedInclude); 706Assert.Equal("m1", i1Group.First().GetMetadataValue("m")); 731Assert.Equal("v0", i1Group.First().EvaluatedInclude); 803Assert.Equal("a.cpp", i1Group.First().EvaluatedInclude); 804Assert.Equal("a.obj", i2Group.First().EvaluatedInclude); 826Assert.Equal("a.cpp", i2Group.First().EvaluatedInclude); 827Assert.Equal("a.obj", i2Group.First().GetMetadataValue("m")); 848Assert.Equal("a1", i1Group.First().EvaluatedInclude); 849Assert.Equal("b2", i2Group.First().EvaluatedInclude); 874Assert.Equal("a1", i1Group.First().EvaluatedInclude); 875Assert.Equal("b1", i2Group.First().EvaluatedInclude); 957Assert.Equal("v0", properties["p0"].EvaluatedValue); 958Assert.Equal("v0", properties["p1"].EvaluatedValue); 983Assert.Equal("v0", i1Group.First().EvaluatedInclude); 984Assert.Equal("a2", i2Group.First().EvaluatedInclude); 1011Assert.Equal("a1", i1Group.First().EvaluatedInclude); 1012Assert.Equal("a2", i1Group.ElementAt(1).EvaluatedInclude); 1013Assert.Equal("m1", i2Group.First().EvaluatedInclude); 1014Assert.Equal("m2", i2Group.ElementAt(1).EvaluatedInclude); 1016Assert.Equal("m1", i1Group.First().GetMetadataValue("m")); 1017Assert.Equal("m2", i1Group.ElementAt(1).GetMetadataValue("m")); 1045Assert.Equal("a1", i2Group.First().EvaluatedInclude); 1046Assert.Equal("a2", i2Group.ElementAt(1).EvaluatedInclude); 1048Assert.Equal("n1", i2Group.First().GetMetadataValue("n")); 1049Assert.Equal(String.Empty, i2Group.ElementAt(1).GetMetadataValue("n")); 1102Assert.Equal("b1", i1Group.First().EvaluatedInclude); 1103Assert.Equal("b1", i1Group.ElementAt(1).EvaluatedInclude); 1104Assert.Equal("b1", i1Group.ElementAt(2).EvaluatedInclude); 1105Assert.Equal("m1", i1Group.First().GetMetadataValue("m")); 1106Assert.Equal("m2", i1Group.ElementAt(1).GetMetadataValue("m")); 1107Assert.Equal("m3", i1Group.ElementAt(2).GetMetadataValue("m")); 1109Assert.Equal("m1", i2Group.First().EvaluatedInclude); 1110Assert.Equal("m2", i2Group.ElementAt(1).EvaluatedInclude); 1111Assert.Equal("m3", i2Group.ElementAt(2).EvaluatedInclude); 1132Assert.Equal("v2", properties["p1"].EvaluatedValue); 1133Assert.Equal("#v1#", properties["p2"].EvaluatedValue); 1183Assert.Equal("n2", lookup.GetProperty("p1").EvaluatedValue); 1260Assert.Equal("v0", p.GetProperty("global").EvaluatedValue); 1266Assert.Equal("v2", p.GetProperty("global").EvaluatedValue); 1270Assert.Equal("v0", p.GetProperty("global").EvaluatedValue); 1295Assert.Equal("p1", value); 1300Assert.Equal("p0", value); 2129Assert.Equal("a1", i0Group.First().EvaluatedInclude); 2130Assert.Equal("a3", i0Group.ElementAt(1).EvaluatedInclude); 2131Assert.Equal("a4", i0Group.ElementAt(2).EvaluatedInclude); 2170Assert.Equal("v1", p1); 2210Assert.Equal("x", i1Group.First().EvaluatedInclude); 2253Assert.Equal("A_PCH", linkGroup.First().EvaluatedInclude); 2254Assert.Equal("m1.obj", linkGroup.ElementAt(1).EvaluatedInclude); 2255Assert.Equal("m2", linkGroup.ElementAt(2).EvaluatedInclude); 2256Assert.Equal("m2", linkGroup.ElementAt(3).EvaluatedInclude); 2395Assert.Equal("m1", p.ItemsToBuildWith["i0"].First().GetMetadataValue("m")); 2433Assert.Equal("a1", p.ItemsToBuildWith["i0"].First().EvaluatedInclude); 2524Assert.Equal("other", lookup.GetItems("i1").First().EvaluatedInclude); 2836Assert.Equal("m2", item.GetMetadataValue("m")); 2894Assert.Equal("m3", item.GetMetadataValue("m")); 2946Assert.Equal("a1", item1.EvaluatedInclude); 2947Assert.Equal("a2", item2.EvaluatedInclude); 2948Assert.Equal("m1", item1.GetMetadataValue("m")); 2949Assert.Equal("m3", item2.GetMetadataValue("m")); 2976Assert.Equal("a1", item1.EvaluatedInclude); 2977Assert.Equal("a2", item2.EvaluatedInclude); 2978Assert.Equal("m1", item1.GetMetadataValue("m")); 2979Assert.Equal("m3", item2.GetMetadataValue("m")); 3025Assert.Equal("a1", item1.EvaluatedInclude); 3026Assert.Equal("a2", item2.EvaluatedInclude); 3027Assert.Equal("m1", item1.GetMetadataValue("m")); 3028Assert.Equal("m3", item2.GetMetadataValue("m")); 3056Assert.Equal("a1", item1.EvaluatedInclude); 3057Assert.Equal("a2", item2.EvaluatedInclude); 3058Assert.Equal("m1", item1.GetMetadataValue("m")); 3059Assert.Equal("m3", item2.GetMetadataValue("m")); 3099Assert.Equal("m4", item.GetMetadataValue("m")); 3185Assert.Equal("m1", item.GetMetadataValue("m")); 3189Assert.Equal("m0", item.GetMetadataValue("m")); 3232Assert.Equal("m0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("m")); 3233Assert.Equal("n0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("n")); 3234Assert.Equal("m1", p.ItemsToBuildWith["i1"].First().GetMetadataValue("m")); 3235Assert.Equal("n1", p.ItemsToBuildWith["i1"].First().GetMetadataValue("n")); 3240Assert.Equal("m0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("m")); 3241Assert.Equal("n0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("n")); 3525Assert.Equal("gen.obj", instance.GetItems("CppCompile").First().GetMetadataValue("ObjectFile")); 3526Assert.Equal("def.obj", instance.GetItems("CppCompile").Last().GetMetadataValue("ObjectFile"));
BackEnd\LoggingService_Tests.cs (28)
738Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code); 739Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.File, actualBuildEvent.File); 740Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.ProjectFile, actualBuildEvent.ProjectFile); 741Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Subcategory, actualBuildEvent.Subcategory); 742Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.HelpKeyword, actualBuildEvent.HelpKeyword); 743Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Message, actualBuildEvent.Message); 744Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.SenderName, actualBuildEvent.SenderName); 823Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code); 827Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.File, actualBuildEvent.File); 828Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.HelpKeyword, actualBuildEvent.HelpKeyword); 831Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Message, actualBuildEvent.Message); 832Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.ProjectFile, actualBuildEvent.ProjectFile); 833Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.SenderName, actualBuildEvent.SenderName); 834Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Subcategory, actualBuildEvent.Subcategory); 876Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code); 877Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.File, actualBuildEvent.File); 878Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.ProjectFile, actualBuildEvent.ProjectFile); 879Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Subcategory, actualBuildEvent.Subcategory); 880Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.HelpKeyword, actualBuildEvent.HelpKeyword); 881Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Message, actualBuildEvent.Message); 882Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.SenderName, actualBuildEvent.SenderName); 930Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Code, actualBuildEvent.Code); 934Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.File, actualBuildEvent.File); 935Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.HelpKeyword, actualBuildEvent.HelpKeyword); 938Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Message, actualBuildEvent.Message); 939Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.ProjectFile, actualBuildEvent.ProjectFile); 940Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.SenderName, actualBuildEvent.SenderName); 941Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.Subcategory, actualBuildEvent.Subcategory);
BackEnd\LoggingServicesLogMethod_Tests.cs (3)
477Assert.Equal(targetsFile, error.File); 478Assert.Equal(projectFile, error.ProjectFile); 1299Assert.Equal(expectedEventArgs.EventName, actualEventArgs.EventName);
BackEnd\Lookup_Tests.cs (114)
38Assert.Equal("a2", lookup.GetItems("i1").First().EvaluatedInclude); 39Assert.Equal("a(2", lookup.GetItems("i2").First().EvaluatedInclude); 58Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude); 59Assert.Equal("a;1", lookup.GetItems("i2").First().EvaluatedInclude); 88Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude); 92Assert.Equal("a1", table1["i1"].First().EvaluatedInclude); 99Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude); 103Assert.Equal("a1", table1["i1"].First().EvaluatedInclude); 111Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude); 112Assert.Equal("a2", lookup.GetItems("i1").ElementAt(1).EvaluatedInclude); 116Assert.Equal("a1", table1["i1"].First().EvaluatedInclude); 123Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude); 124Assert.Equal("a2", lookup.GetItems("i1").ElementAt(1).EvaluatedInclude); 128Assert.Equal("a1", table1["i1"].First().EvaluatedInclude); 135Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude); 136Assert.Equal("a2", lookup.GetItems("i1").ElementAt(1).EvaluatedInclude); 140Assert.Equal("a1", table1["i1"].First().EvaluatedInclude); 141Assert.Equal("a2", table1["i1"].ElementAt(1).EvaluatedInclude); 272Assert.Equal("a2", lookup.GetItems("i1").First().EvaluatedInclude); 287Assert.Equal("a1", table1["i1"].First().EvaluatedInclude); 423Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 424Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 438Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 439Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 442Assert.Equal("m3", group.First().GetMetadataValue("m3")); 450Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 451Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 454Assert.Equal("m3", group.First().GetMetadataValue("m3")); 488Assert.Equal("m1", group.First().GetMetadataValue("m1")); 489Assert.Equal("m2", group.First().GetMetadataValue("m2")); 490Assert.Equal("m3", group.First().GetMetadataValue("m3")); 503Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 504Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 505Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 513Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 514Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 515Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 548Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 549Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 552Assert.Equal("m3", group.First().GetMetadataValue("m3")); 566Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 567Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 568Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 571Assert.Equal("m4", group.First().GetMetadataValue("m4")); 579Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 580Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 581Assert.Equal(String.Empty, group.First().GetMetadataValue("m3")); 584Assert.Equal("m4", group.First().GetMetadataValue("m4")); 619Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 620Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 623Assert.Equal("m3", group.First().GetMetadataValue("m3")); 637Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 638Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 641Assert.Equal("m3", group.First().GetMetadataValue("m3")); 649Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 650Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 653Assert.Equal("m3", group.First().GetMetadataValue("m3")); 686Assert.Equal("m1", group.First().GetMetadataValue("m1")); 689Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 697Assert.Equal("m1", group.First().GetMetadataValue("m1")); 700Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 708Assert.Equal("m1", group.First().GetMetadataValue("m1")); 711Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 740Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 741Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 749Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 750Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 758Assert.Equal(String.Empty, group.First().GetMetadataValue("m1")); 759Assert.Equal(String.Empty, group.First().GetMetadataValue("m2")); 788Assert.Equal("m2", group.First().GetMetadataValue("m")); 791Assert.Equal("m1", item1.GetMetadataValue("m")); 798Assert.Equal("m2", group.First().GetMetadataValue("m")); 802Assert.Equal("m1", item1.GetMetadataValue("m")); 809Assert.Equal("m2", group.First().GetMetadataValue("m")); 812Assert.Equal("m2", item1.GetMetadataValue("m")); 851Assert.Equal("m3", group.First().GetMetadataValue("m")); 852Assert.Equal("n2", group.First().GetMetadataValue("n")); 853Assert.Equal("o3", group.First().GetMetadataValue("o")); 888Assert.Equal("m2", group.First().GetMetadataValue("m")); 913Assert.Equal("m1", group.First().GetMetadataValue("m")); 914Assert.Equal("n1", group.First().GetMetadataValue("n")); 915Assert.Equal("o1", group.First().GetMetadataValue("o")); 928Assert.Equal("m2", foundGroup.First().GetMetadataValue("m")); 929Assert.Equal("n2", foundGroup.First().GetMetadataValue("n")); 930Assert.Equal("o1", foundGroup.First().GetMetadataValue("o")); 940Assert.Equal("m2", foundGroup.First().GetMetadataValue("m")); 941Assert.Equal("n3", foundGroup.First().GetMetadataValue("n")); 942Assert.Equal("o1", foundGroup.First().GetMetadataValue("o")); 945Assert.Equal("m1", item1.GetMetadataValue("m")); 946Assert.Equal("n1", item1.GetMetadataValue("n")); 947Assert.Equal("o1", item1.GetMetadataValue("o")); 954Assert.Equal("m2", foundGroup.First().GetMetadataValue("m")); 955Assert.Equal("n3", foundGroup.First().GetMetadataValue("n")); 956Assert.Equal("o1", foundGroup.First().GetMetadataValue("o")); 959Assert.Equal("m2", item1.GetMetadataValue("m")); 960Assert.Equal("n3", item1.GetMetadataValue("n")); 961Assert.Equal("o1", item1.GetMetadataValue("o")); 989Assert.Equal("m2", group.First().GetMetadataValue("m")); 992Assert.Equal("m1", item1.GetMetadataValue("m")); 999Assert.Equal("m2", group.First().GetMetadataValue("m")); 1002Assert.Equal("m2", item1.GetMetadataValue("m")); 1058Assert.Equal("m3", group4.First().GetMetadataValue("m")); 1066Assert.Equal("m3", group5.First().GetMetadataValue("m")); 1109Assert.Equal("m3", group4.First().GetMetadataValue("m")); 1117Assert.Equal("m3", group5.First().GetMetadataValue("m")); 1120Assert.Equal("m3", item1.GetMetadataValue("m")); 1255Assert.Equal("v2", lookup.GetProperty("p1").EvaluatedValue); 1256Assert.Equal("v1", group["p1"].EvaluatedValue); 1264Assert.Equal("v3", lookup.GetProperty("p1").EvaluatedValue); 1265Assert.Equal("v1", group["p1"].EvaluatedValue); 1272Assert.Equal("v4", lookup.GetProperty("p1").EvaluatedValue); 1276Assert.Equal("v4", lookup.GetProperty("p1").EvaluatedValue); 1283Assert.Equal("v4", lookup.GetProperty("p1").EvaluatedValue); 1284Assert.Equal("v4", group["p1"].EvaluatedValue);
BackEnd\MSBuild_Tests.cs (5)
1810Assert.Equal("|a", targetOutputs["Build"].Items[0].ItemSpec); 1811Assert.Equal("A|b", targetOutputs["Build"].Items[1].ItemSpec); 1812Assert.Equal("B|c", targetOutputs["Build"].Items[2].ItemSpec); 1813Assert.Equal("C|d", targetOutputs["Build"].Items[3].ItemSpec); 1814Assert.Equal("D|", targetOutputs["Build"].Items[4].ItemSpec);
BackEnd\NodePackets_Tests.cs (1)
205Assert.Equal(@"Task Parameter:
BackEnd\ResultsCache_Tests.cs (4)
333Assert.Equal("Value1", cachedResponseWithSubsetFlag1.Results.ProjectStateAfterBuild.GetPropertyValue("property1")); 334Assert.Equal("Value2", cachedResponseWithSubsetFlag1.Results.ProjectStateAfterBuild.GetPropertyValue("property2")); 338Assert.Equal("Value1", cachedResponseWithSubsetFlag2.Results.ProjectStateAfterBuild.GetPropertyValue("property1")); 339Assert.Equal("", cachedResponseWithSubsetFlag2.Results.ProjectStateAfterBuild.GetPropertyValue("property2"));
BackEnd\TargetBuilder_Tests.cs (1)
1552Assert.Equal(task.Name, tasks[currentTask]);
BackEnd\TargetEntry_Tests.cs (29)
183Assert.Equal("Bar", depsEnum.Current.TargetName); 192Assert.Equal("Bar", depsEnum.Current.TargetName); 194Assert.Equal("Foo", depsEnum.Current.TargetName); 226Assert.Equal("BazTask1", taskBuilder.ExecutedTasks[0].Name); 227Assert.Equal("BazTask2", taskBuilder.ExecutedTasks[1].Name); 236Assert.Equal("Baz2Task1", taskBuilder.ExecutedTasks[0].Name); 237Assert.Equal("Baz2Task2", taskBuilder.ExecutedTasks[1].Name); 238Assert.Equal("Baz2Task3", taskBuilder.ExecutedTasks[2].Name); 264Assert.Equal("ErrorTask1", taskBuilder.ExecutedTasks[0].Name); 265Assert.Equal("ErrorTask2", taskBuilder.ExecutedTasks[1].Name); 266Assert.Equal("ErrorTask3", taskBuilder.ExecutedTasks[2].Name); 277Assert.Equal("ErrorTask1", taskBuilder.ExecutedTasks[0].Name); 278Assert.Equal("ErrorTask2", taskBuilder.ExecutedTasks[1].Name); 290Assert.Equal("ErrorTask1", taskBuilder.ExecutedTasks[0].Name); 291Assert.Equal("ErrorTask2", taskBuilder.ExecutedTasks[1].Name); 292Assert.Equal("ErrorTask3", taskBuilder.ExecutedTasks[2].Name); 303Assert.Equal("ErrorTask1", taskBuilder.ExecutedTasks[0].Name); 304Assert.Equal("ErrorTask2", taskBuilder.ExecutedTasks[1].Name); 305Assert.Equal("ErrorTask3", taskBuilder.ExecutedTasks[2].Name); 386Assert.Equal("foo.o", results.Items[0].ItemSpec); 406Assert.Equal("testProject.proj", results.Items[0].ItemSpec); 710Assert.Equal("a", targeta.TargetName); 711Assert.Equal("b", targetb.TargetName); 712Assert.Equal("c", targetc.TargetName); 737Assert.Equal("item1", outputListB[0].ItemSpec); 749Assert.Equal("item2", outputListC[0].ItemSpec); 807Assert.Equal("a", targeta.TargetName); 808Assert.Equal("b", targetb.TargetName); 809Assert.Equal("c", targetc.TargetName);
BackEnd\TargetResult_Tests.cs (1)
43Assert.Equal(item.ItemSpec, result.Items[0].ItemSpec);
BackEnd\TaskExecutionHost_Tests.cs (6)
1303Assert.Equal(value, _bucket.Lookup.GetItems("output").First().EvaluatedInclude); 1329Assert.Equal(values[i], _bucket.Lookup.GetItems("output").ElementAt(i).EvaluatedInclude); 1357Assert.Equal(value, _bucket.Lookup.GetProperty("output").EvaluatedValue); 1381Assert.Equal(value, actualItem.ItemSpec); 1409Assert.Equal(value, actualItems[0].ItemSpec); 1444Assert.Equal(expectedItems[i], actualItems[i].ItemSpec);
BackEnd\TaskHost_Tests.cs (12)
137Assert.Equal("Your code failed.", customBuildError.Message); 138Assert.Equal("CodeViolation", customBuildError.CustomData); 162Assert.Equal("Your code failed.", customBuildWarning.Message); 163Assert.Equal("CodeViolation", customBuildWarning.CustomData); 186Assert.Equal("I am a message", customMessage.Message); 187Assert.Equal("CodeViolation", customMessage.CustomMessage); 327Assert.Equal("testCustomBuildEvent", _customLogger.LastCustom.Message); 385Assert.Equal("testCustomBuildEvent", _customLogger.LastCustom.Message); 401Assert.Equal("ext message", _customLogger.LastCustom.Message); 414Assert.Equal("ext err message", _customLogger.LastError.Message); 427Assert.Equal("ext warn message", _customLogger.LastWarning.Message); 440Assert.Equal("ext message", _customLogger.LastMessage.Message);
BackEnd\TaskHostConfiguration_Tests.cs (7)
371Assert.Equal(config.TaskName, deserializedConfig.TaskName); 468Assert.Equal(config.TaskName, deserializedConfig.TaskName); 519Assert.Equal(config.TaskName, deserializedConfig.TaskName); 568Assert.Equal(config.TaskName, deserializedConfig.TaskName); 616Assert.Equal(config.TaskName, deserializedConfig.TaskName); 671Assert.Equal(config.TaskName, deserializedConfig.TaskName); 771Assert.Equal(x.ItemSpec, y.ItemSpec);
BackEnd\TaskRegistry_Tests.cs (6)
1147Assert.Equal(expandedTaskFactory, registeredTaskRecords[0].TaskFactoryAttributeName); 1326Assert.Equal(parameterInfo.Name, defaultParameter.Name); 1333Assert.Equal(parameterInfo.Name, filledOutAttributesParameter.Name); 1703Assert.Equal(parameterInfo.Name, filledOutAttributesParameter.Name); 2019Assert.Equal(expectedRuntime, record.TaskFactoryParameters[XMakeAttributes.runtime]); 2024Assert.Equal(expectedArchitecture, record.TaskFactoryParameters[XMakeAttributes.architecture]);
BuildEventArgsSerialization_Tests.cs (1)
1232Assert.Equal(expected, actual);
Collections\MultiDictionary_Tests.cs (4)
109Assert.Equal("x1", values[0]); 110Assert.Equal("x2", values[1]); 115Assert.Equal("y1", values[0]); 146Assert.Equal("x2", values[0]);
Collections\OMcollections_tests.cs (2)
48Assert.Equal("v1", properties["p1"].EvaluatedValue); 49Assert.Equal("v3", properties["p2"].EvaluatedValue);
Construction\ElementLocation_Tests.cs (11)
42Assert.Equal("file", location.File); 55Assert.Equal("file", location.File); 68Assert.Equal("file", location.File); 169Assert.Equal(location.File, deserializedLocation.File); 187Assert.Equal(location.File, deserializedLocation.File); 200Assert.Equal("file", location.File); 235Assert.Equal(location.File, String.Empty); 245Assert.Equal("file", location.File); 258Assert.Equal("file", location.File); 271Assert.Equal("file", location.File); 289Assert.Equal(location.File, deserializedLocation.File);
Construction\ProjectRootElement_Tests.cs (6)
81Assert.Equal("Project", children[0].Name); 83Assert.Equal("Initial Comment", children[0].ChildNodes[0].Value); 84Assert.Equal("Ending Comment", children[0].ChildNodes[1].Value); 113Assert.Equal("Project", children[0].Name); 115Assert.Equal(string.Empty, children[0].ChildNodes[0].Value); 116Assert.Equal(string.Empty, children[0].ChildNodes[1].Value);
Construction\SolutionProjectGenerator_Tests.cs (51)
312Assert.Equal(text, warning.Message); 313Assert.Equal(code, warning.Code); 314Assert.Equal(keyword, warning.HelpKeyword); 321Assert.Equal(text, error.Message); 322Assert.Equal(code, error.Code); 323Assert.Equal(keyword, error.HelpKeyword); 362Assert.Equal("3.5", instances[0].ToolsVersion); 397Assert.Equal("3.5", instances[0].ToolsVersion); 426Assert.Equal(ObjectModelHelpers.MSBuildDefaultToolsVersion, instances[0].ToolsVersion); 430Assert.Equal(t.DefaultSubToolsetVersion, instances[0].SubToolsetVersion); 434Assert.Equal(t.DefaultSubToolsetVersion, instances[0].GetPropertyValue("VisualStudioVersion")); 438Assert.Equal(String.Empty, instances[0].GetPropertyValue("VisualStudioVersion")); 468Assert.Equal(ObjectModelHelpers.MSBuildDefaultToolsVersion, instances[0].ToolsVersion); 473Assert.Equal("11.0", instances[0].SubToolsetVersion); 474Assert.Equal("11.0", instances[0].GetPropertyValue("VisualStudioVersion")); 503Assert.Equal(ObjectModelHelpers.MSBuildDefaultToolsVersion, instances[0].ToolsVersion); 504Assert.Equal("ABC", instances[0].SubToolsetVersion); 505Assert.Equal("ABC", instances[0].GetPropertyValue("VisualStudioVersion")); 701Assert.Equal(ObjectModelHelpers.MSBuildDefaultToolsVersion, instances[0].ToolsVersion); 702Assert.Equal("11.0", instances[0].SubToolsetVersion); 703Assert.Equal("11.0", instances[0].GetPropertyValue("VisualStudioVersion")); 1247Assert.Equal("False", skipNonexistentProjects); 1251Assert.Equal("Build", skipNonexistentProjects); 1255Assert.Equal("Debug", item.GetMetadata("Configuration")); 1256Assert.Equal("Mixed Platforms", item.GetMetadata("Platform")); 1261Assert.Equal("Release", item.GetMetadata("Configuration")); 1262Assert.Equal("Any CPU", item.GetMetadata("Platform")); 1329Assert.Equal(toolsVersionParameter, instances[0].GetPropertyValue("ProjectToolsVersion")); 1502Assert.Equal("Clean", cleanTarget.Tasks.Where( 1506Assert.Equal("Rebuild", rebuildTarget.Tasks.Where( 1510Assert.Equal("Publish", publishTarget.Tasks.Where( 1515Assert.Equal("@(ProjectReference)", buildTarget.Tasks.Where( 1519Assert.Equal("@(ProjectReference->Reverse())", cleanTarget.Tasks.Where( 1523Assert.Equal("@(ProjectReference)", rebuildTarget.Tasks.Where( 1527Assert.Equal("@(ProjectReference)", publishTarget.Tasks.Where( 1566Assert.Equal("Debug", instances[0].GetPropertyValue("Configuration")); 1569Assert.Equal("Mixed Platforms", instances[0].GetPropertyValue("Platform")); 1596Assert.Equal("Release", instances[0].GetPropertyValue("Configuration")); 1599Assert.Equal("Any CPU", instances[0].GetPropertyValue("Platform")); 1621Assert.Equal("Debug", msbuildProject.GetPropertyValue("AspNetConfiguration")); 1625Assert.Equal("Release", msbuildProject.GetPropertyValue("AspNetConfiguration")); 1648Assert.Equal("v4.0", msbuildProject.GetPropertyValue("TargetFrameworkVersion")); 1658Assert.Equal("v3.5", msbuildProject.GetPropertyValue("TargetFrameworkVersion")); 1662Assert.Equal("v2.0", msbuildProject.GetPropertyValue("TargetFrameworkVersion")); 1668Assert.Equal("userdefined", msbuildProject.GetPropertyValue("TargetFrameworkVersion")); 1687Assert.Equal("2.0", msbuildProject.ToolsVersion); 1794Assert.Equal("Debug|Mixed Platforms", SolutionProjectGenerator.PredictActiveSolutionConfigurationName(solution, globalProperties)); 1797Assert.Equal("Release|Mixed Platforms", SolutionProjectGenerator.PredictActiveSolutionConfigurationName(solution, globalProperties)); 1800Assert.Equal("Release|Win32", SolutionProjectGenerator.PredictActiveSolutionConfigurationName(solution, globalProperties)); 2469Assert.Equal("MyTask", task.Name); 2631Assert.Equal(enable ? expectedPropertyValue : string.Empty, projectInstance.GetPropertyValue("PropertyA"));
CopyOnWriteDictionary_Tests.cs (7)
119Assert.Equal("1", dictionary["test"]); 123Assert.Equal("1", clone["test"]); 135Assert.Equal("1", dictionary["test"]); 139Assert.Equal("1", clone["TEST"]); 176Assert.Equal("1", dictionary["test"]); 192Assert.Equal("1", dictionary["test"]); 193Assert.Equal("2", clone["test"]);
Definition\ItemDefinitionGroup_Tests.cs (43)
609Assert.Equal("M-A(b)", withMetaItem.GetMetadata("MetaA")); 610Assert.Equal("M-B(b)", withMetaItem.GetMetadata("MetaB")); 648Assert.Equal("NEWMETA_A", withMetaItem.GetMetadata("MetaA")); 649Assert.Equal("M-B(b)", withMetaItem.GetMetadata("MetaB")); 692Assert.Equal("M-A(b)", withMetaItem.GetMetadata("MetaA")); 693Assert.Equal("M-B(b)", withMetaItem.GetMetadata("MetaB")); 1462Assert.Equal("m1", p.GetItems("j").First().GetMetadataValue("m")); 1520Assert.Equal("im1", p.GetItems("i").First().GetMetadataValue("m")); 1521Assert.Equal("in1", p.GetItems("i").First().GetMetadataValue("n")); 1522Assert.Equal("io2", p.GetItems("i").First().GetMetadataValue("o")); 1523Assert.Equal("ip1", p.GetItems("i").First().GetMetadataValue("p")); 1524Assert.Equal("", p.GetItems("i").First().GetMetadataValue("q")); 1526Assert.Equal("jm3", p.GetItems("j").First().GetMetadataValue("m")); 1527Assert.Equal("jn3", p.GetItems("j").First().GetMetadataValue("n")); 1528Assert.Equal("", p.GetItems("j").First().GetMetadataValue("o")); 1529Assert.Equal("", p.GetItems("j").First().GetMetadataValue("p")); 1530Assert.Equal("jq3", p.GetItems("j").First().GetMetadataValue("q")); 1532Assert.Equal("jm6", p.GetItems("j").ElementAt(1).GetMetadataValue("m")); 1533Assert.Equal("in1", p.GetItems("j").ElementAt(1).GetMetadataValue("n")); 1534Assert.Equal("io2", p.GetItems("j").ElementAt(1).GetMetadataValue("o")); 1535Assert.Equal("ip1", p.GetItems("j").ElementAt(1).GetMetadataValue("p")); 1536Assert.Equal("jq3", p.GetItems("j").ElementAt(1).GetMetadataValue("q")); 1538Assert.Equal("km5", p.GetItems("k").ElementAt(0).GetMetadataValue("m")); 1539Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("n")); 1540Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("o")); 1541Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("p")); 1542Assert.Equal("kq4", p.GetItems("k").ElementAt(0).GetMetadataValue("q")); 1543Assert.Equal("kr4", p.GetItems("k").ElementAt(0).GetMetadataValue("r")); 1544Assert.Equal("", p.GetItems("k").ElementAt(0).GetMetadataValue("s")); 1546Assert.Equal("jm3", p.GetItems("k").ElementAt(1).GetMetadataValue("m")); 1547Assert.Equal("jn3", p.GetItems("k").ElementAt(1).GetMetadataValue("n")); 1548Assert.Equal("", p.GetItems("k").ElementAt(1).GetMetadataValue("o")); 1549Assert.Equal("", p.GetItems("k").ElementAt(1).GetMetadataValue("p")); 1550Assert.Equal("jq3", p.GetItems("k").ElementAt(1).GetMetadataValue("q")); 1551Assert.Equal("kr4", p.GetItems("k").ElementAt(1).GetMetadataValue("r")); 1552Assert.Equal("ks3", p.GetItems("k").ElementAt(1).GetMetadataValue("s")); 1554Assert.Equal("jm6", p.GetItems("k").ElementAt(2).GetMetadataValue("m")); 1555Assert.Equal("in1", p.GetItems("k").ElementAt(2).GetMetadataValue("n")); 1556Assert.Equal("io2", p.GetItems("k").ElementAt(2).GetMetadataValue("o")); 1557Assert.Equal("ip1", p.GetItems("k").ElementAt(2).GetMetadataValue("p")); 1558Assert.Equal("jq3", p.GetItems("k").ElementAt(2).GetMetadataValue("q")); 1559Assert.Equal("kr4", p.GetItems("k").ElementAt(2).GetMetadataValue("r")); 1560Assert.Equal("ks3", p.GetItems("k").ElementAt(1).GetMetadataValue("s"));
Definition\Project_Internal_Tests.cs (7)
47Assert.Equal("x", collection.DefaultToolsVersion); 58Assert.Equal("x", project.ToolsVersion); 137Assert.Equal("2.0", project.ToolsVersion); 141Assert.Equal("2.0", project.ToolsVersion); 188Assert.Equal("2.0", project.GetPropertyValue("msbuildtoolsversion")); 191Assert.Equal("2.0", project.GetPropertyValue("msbuildtoolsversion")); 195Assert.Equal(
Definition\ProjectItem_Tests.cs (1)
37Assert.Equal(String.Empty, item2.GetMetadataValue("n"));
Definition\Toolset_Tests.cs (30)
86Assert.Equal(expectedPath, t.ToolsPath); 117Assert.Equal(t.ToolsVersion, t2.ToolsVersion); 118Assert.Equal(t.ToolsPath, t2.ToolsPath); 119Assert.Equal(t.OverrideTasksPath, t2.OverrideTasksPath); 124Assert.Equal(t.Properties[key].Name, t2.Properties[key].Name); 125Assert.Equal(t.Properties[key].EvaluatedValue, t2.Properties[key].EvaluatedValue); 137Assert.Equal(subToolset1.SubToolsetVersion, subToolset2.SubToolsetVersion); 142Assert.Equal(subToolset1.Properties[subToolsetPropertyKey].Name, subToolset2.Properties[subToolsetPropertyKey].Name); 143Assert.Equal(subToolset1.Properties[subToolsetPropertyKey].EvaluatedValue, subToolset2.Properties[subToolsetPropertyKey].EvaluatedValue); 152Assert.Equal(t.DefaultOverrideToolsVersion, t2.DefaultOverrideToolsVersion); 156Assert.Equal(@"c:\foo", t2.ImportPropertySearchPathsTable["MSBuildExtensionsPath"].SearchPaths[0]); 165Assert.Equal("v13.0", t.DefaultSubToolsetVersion); 178Assert.Equal(Constants.Dev10SubToolsetValue, t.DefaultSubToolsetVersion); 184Assert.Equal("11.0", t.DefaultSubToolsetVersion); 205Assert.Equal(Constants.Dev10SubToolsetValue, t.DefaultSubToolsetVersion); 241Assert.Equal(Constants.Dev10SubToolsetValue, subToolsetVersion); 271Assert.Equal("99.0", t.GenerateSubToolsetVersion()); 293Assert.Equal("foo", t.GenerateSubToolsetVersion()); 318Assert.Equal("v14.0", t.GenerateSubToolsetVersion(globalProperties, 0)); 346Assert.Equal("baz", t.GenerateSubToolsetVersion(explicitGlobalProperties, 0)); 368Assert.Equal(ObjectModelHelpers.CurrentVisualStudioVersion, t.GenerateSubToolsetVersion()); 387Assert.Equal("FakeSubToolset", t.GenerateSubToolsetVersion()); 409Assert.Equal("v13.0", t.GenerateSubToolsetVersion(globalProperties, 0)); 429Assert.Equal("12.0", t.GenerateSubToolsetVersion(null, 13)); 430Assert.Equal("v13.0", t.GenerateSubToolsetVersion(null, 14)); 434Assert.Equal(t.DefaultSubToolsetVersion, t.GenerateSubToolsetVersion(null, 55)); 462Assert.Equal("FakeSubToolset", t.GenerateSubToolsetVersion(explicitGlobalProperties, 0)); 475Assert.Equal("a1", t.GetProperty("a", "v11.0").EvaluatedValue); // property in base toolset 476Assert.Equal("c2", t.GetProperty("c", "v11.0").EvaluatedValue); // property in sub-toolset 477Assert.Equal("b2", t.GetProperty("b", "v11.0").EvaluatedValue); // property in sub-toolset that overrides base toolset
Definition\ToolsetConfigurationReader_Tests.cs (28)
79Assert.Equal("2.0", msbuildToolsetSection.Default); 82Assert.Equal("2.0", msbuildToolsetSection.Toolsets.GetElement(0).toolsVersion); 84Assert.Equal( 114Assert.Equal("c:\\foo", msbuildToolsetSection.MSBuildOverrideTasksPath); 179Assert.Equal("2.0", msbuildToolsetSection.Default); 182Assert.Equal("2.0", msbuildToolsetSection.Toolsets.GetElement(0).toolsVersion); 184Assert.Equal( 304Assert.Equal("4.0", msbuildToolsetSection.Default); 306Assert.Equal("4.0", msbuildToolsetSection.Toolsets.GetElement(0).toolsVersion); 308Assert.Equal( 448Assert.Equal("2.0", msbuildToolsetSection.Default); 452Assert.Equal( 455Assert.Equal( 484Assert.Equal("2.0", msbuildToolsetSection.Default); 487Assert.Equal(@"D:\windows\Microsoft.NET\Framework\v2.0.x86ret\", 489Assert.Equal(@"SomeOtherPropertyValue", 535Assert.Equal("2.0", msbuildToolsetSection.Default); 538Assert.Equal("2.0", msbuildToolsetSection.Toolsets.GetElement(0).toolsVersion); 540Assert.Equal( 546Assert.Equal("windows", allPaths.GetElement(0).OS); 548Assert.Equal(@"c:\foo", allPaths.GetElement(0).PropertyElements.GetElement("MSBuildExtensionsPath").Value); 549Assert.Equal(@"c:\foo64;c:\bar64", allPaths.GetElement(0).PropertyElements.GetElement("MSBuildExtensionsPath64").Value); 551Assert.Equal("osx", allPaths.GetElement(1).OS); 553Assert.Equal(@"/tmp/foo", allPaths.GetElement(1).PropertyElements.GetElement("MSBuildExtensionsPath").Value); 554Assert.Equal(@"/tmp/foo32;/tmp/bar32", allPaths.GetElement(1).PropertyElements.GetElement("MSBuildExtensionsPath32").Value); 556Assert.Equal("unix", allPaths.GetElement(2).OS); 558Assert.Equal(@"/tmp/bar", allPaths.GetElement(2).PropertyElements.GetElement("MSBuildExtensionsPath").Value); 591Assert.Equal(paths.SearchPaths[i], expectedPaths[i]);
Definition\ToolsVersion_Tests.cs (2)
281Assert.Equal(foundFiles[i], sortedTasksExpectedPaths[i]); 287Assert.Equal(foundoverrideFiles[i], sortedOverrideExpectedPaths[i]);
EscapingInProjects_Tests.cs (30)
368Assert.Equal("*.weirdo", newItems.First().UnevaluatedInclude); 369Assert.Equal("foo%3Bbar.weirdo", newItems.First().EvaluatedInclude); 370Assert.Equal("foo%253Bbar.weirdo", Project.GetEvaluatedItemIncludeEscaped(newItems.First())); 478Assert.Equal("MyWildCard", newItems.First().ItemType); // "Newly added item should have correct ItemType" 479Assert.Equal("*.weirdo", newItems.First().UnevaluatedInclude); // "Newly added item should have correct UnevaluatedInclude" 480Assert.Equal("foo%253bbar.weirdo", Project.GetEvaluatedItemIncludeEscaped(newItems.First())); // "Newly added item should have correct EvaluatedIncludeEscaped" 481Assert.Equal("foo%3bbar.weirdo", newItems.First().EvaluatedInclude); // "Newly added item should have correct EvaluatedInclude" 520Assert.Equal("MyWildCard", newItems.First().ItemType); // "Newly added item should have correct ItemType" 521Assert.Equal("*.AAA%253bBBB", newItems.First().UnevaluatedInclude); // "Newly added item should have correct UnevaluatedInclude" 522Assert.Equal("foo.AAA%253bBBB", Project.GetEvaluatedItemIncludeEscaped(newItems.First())); // "Newly added item should have correct EvaluatedIncludeEscaped" 523Assert.Equal("foo.AAA%3bBBB", newItems.First().EvaluatedInclude); // "Newly added item should have correct EvaluatedInclude" 654Assert.Equal(projectAbsolutePath, items.First().GetMetadataValue("FullPath")); 785Assert.Equal(expectedErrorMessage, ex.Message); // "Wrong error message" 883Assert.Equal("a", items.ElementAt(0).EvaluatedInclude); 884Assert.Equal("b;c", items.ElementAt(1).EvaluatedInclude); 885Assert.Equal("foo;bar", items.ElementAt(2).EvaluatedInclude); 915Assert.Equal("a", items.ElementAt(0).EvaluatedInclude); 916Assert.Equal("b;c", items.ElementAt(1).EvaluatedInclude); 917Assert.Equal("foo", items.ElementAt(2).EvaluatedInclude); 918Assert.Equal("bar", items.ElementAt(3).EvaluatedInclude); 1844Assert.Equal("%3B", item.GetMetadata("EscapedSemicolon").UnevaluatedValue); 1845Assert.Equal("%3B", item.GetMetadata("EscapedSemicolon").EvaluatedValueEscaped); 1846Assert.Equal(";", item.GetMetadata("EscapedSemicolon").EvaluatedValue); 1847Assert.Equal("%3B", Project.GetMetadataValueEscaped(item, "EscapedSemicolon")); 1848Assert.Equal(";", item.GetMetadataValue("EscapedSemicolon")); 1850Assert.Equal("%24", item.GetMetadata("EscapedDollarSign").UnevaluatedValue); 1851Assert.Equal("%24", item.GetMetadata("EscapedDollarSign").EvaluatedValueEscaped); 1852Assert.Equal("$", item.GetMetadata("EscapedDollarSign").EvaluatedValue); 1853Assert.Equal("%24", Project.GetMetadataValueEscaped(item, "EscapedDollarSign")); 1854Assert.Equal("$", item.GetMetadataValue("EscapedDollarSign"));
EscapingUtilities_Tests.cs (23)
18Assert.Equal("", EscapingUtilities.UnescapeAll("")); 19Assert.Equal("foo", EscapingUtilities.UnescapeAll("foo")); 20Assert.Equal("foo space", EscapingUtilities.UnescapeAll("foo%20space")); 21Assert.Equal("foo2;", EscapingUtilities.UnescapeAll("foo2%3B")); 22Assert.Equal(";foo3", EscapingUtilities.UnescapeAll("%3bfoo3")); 23Assert.Equal(";", EscapingUtilities.UnescapeAll("%3b")); 24Assert.Equal(";;;;;", EscapingUtilities.UnescapeAll("%3b%3B;%3b%3B")); 25Assert.Equal("%3B", EscapingUtilities.UnescapeAll("%253B")); 26Assert.Equal("===%ZZ %%%===", EscapingUtilities.UnescapeAll("===%ZZ%20%%%===")); 27Assert.Equal("hello; escaping% how( are) you?", EscapingUtilities.UnescapeAll("hello%3B escaping%25 how%28 are%29 you%3f")); 29Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25*?*%25*")); 30Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25%2a%3f%2a%25%2a")); 32Assert.Equal("*Star*craft or *War*cr@ft??", EscapingUtilities.UnescapeAll("%2aStar%2Acraft%20or %2aWar%2Acr%40ft%3f%3F")); 40Assert.Equal("%2a", EscapingUtilities.Escape("*")); 41Assert.Equal("%3f", EscapingUtilities.Escape("?")); 42Assert.Equal("#%2a%3f%2a#%2a", EscapingUtilities.Escape("#*?*#*")); 43Assert.Equal("%25%2a%3f%2a%25%2a", EscapingUtilities.Escape("%*?*%*")); 52Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 55Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 58Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 67Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 70Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 73Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text)));
Evaluation\Evaluator_Tests.cs (95)
1090Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1094Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1099Assert.Equal("dt", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1104Assert.Equal("dt2", project.GetPropertyValue("msbuildprojectdefaulttargets")); 1429Assert.Equal("3", (Helpers.GetFirst(instance.Targets["t"].Tasks)).GetParameter("Text")); 1454Assert.Equal("2;2", property.EvaluatedValue); 1455Assert.Equal("1", property.Predecessor.Predecessor.EvaluatedValue); 1529Assert.Equal("2;2", metadatum.EvaluatedValue); 1530Assert.Equal("1", metadatum.Predecessor.Predecessor.EvaluatedValue); 1588Assert.Equal("3;2;1", metadatum.EvaluatedValue); 1589Assert.Equal("2;1", metadatum.Predecessor.EvaluatedValue); 1590Assert.Equal("1", metadatum.Predecessor.Predecessor.EvaluatedValue); 1627Assert.Equal("3", metadatum.EvaluatedValue); 1628Assert.Equal("1", metadatum.Predecessor.EvaluatedValue); 1659Assert.Equal("2;1", metadatum.EvaluatedValue); 1660Assert.Equal("1", metadatum.Predecessor.EvaluatedValue); 1693Assert.Equal("2;1", metadatum.EvaluatedValue); 1694Assert.Equal("1", metadatum.Predecessor.EvaluatedValue); 1756Assert.Equal("2;1", metadatum.EvaluatedValue); 1757Assert.Equal("1", metadatum.Predecessor.EvaluatedValue); 1781Assert.Equal("h1", item.EvaluatedInclude); 1952Assert.Equal("1", restOfAllEvaluatedProperties.ElementAt(0).EvaluatedValue); 1953Assert.Equal("2", restOfAllEvaluatedProperties.ElementAt(1).EvaluatedValue); 1954Assert.Equal("2;2", restOfAllEvaluatedProperties.ElementAt(2).EvaluatedValue); 1955Assert.Equal("4", restOfAllEvaluatedProperties.ElementAt(3).EvaluatedValue); 2023Assert.Equal("i1", project.AllEvaluatedItems.ElementAt(0).EvaluatedInclude); 2024Assert.Equal(String.Empty, project.AllEvaluatedItems.ElementAt(0).GetMetadataValue("m")); 2025Assert.Equal("j1", project.AllEvaluatedItems.ElementAt(1).EvaluatedInclude); 2026Assert.Equal("m1", project.AllEvaluatedItems.ElementAt(1).GetMetadataValue("m")); 2027Assert.Equal("i3", project.AllEvaluatedItems.ElementAt(2).EvaluatedInclude); 2028Assert.Equal("i1", project.AllEvaluatedItems.ElementAt(3).EvaluatedInclude); 2029Assert.Equal("m2", project.AllEvaluatedItems.ElementAt(3).GetMetadataValue("m")); 2030Assert.Equal("i5", project.AllEvaluatedItems.ElementAt(4).EvaluatedInclude); 2031Assert.Equal("i10", project.AllEvaluatedItems.ElementAt(5).EvaluatedInclude); 2116Assert.Equal("1", restOfAllEvaluatedProperties.ElementAt(0).EvaluatedValue); 2117Assert.Equal("2", restOfAllEvaluatedProperties.ElementAt(1).EvaluatedValue); 2118Assert.Equal("3", restOfAllEvaluatedProperties.ElementAt(2).EvaluatedValue); 2179Assert.Equal("2", project.AllEvaluatedItemDefinitionMetadata.ElementAt(1).EvaluatedValue); 2180Assert.Equal("1;2", project.AllEvaluatedItemDefinitionMetadata.ElementAt(3).EvaluatedValue); 2341Assert.Equal("t", instance.DefaultTargets[0]); 2342Assert.Equal("q", instance.DefaultTargets[1]); 2365Assert.Equal("t", instance.InitialTargets[0]); 2366Assert.Equal("q", instance.InitialTargets[1]); 2444Assert.Equal(project.GetPropertyValue(specialPropertyName32), project.GetPropertyValue(specialPropertyName)); 2478Assert.Equal(@"c:\foo\bar", project.GetPropertyValue("MSBuildExtensionsPath")); 2501Assert.Equal(@"c:\devdiv\vscore\msbuild", project.GetPropertyValue("MSBuildExtensionsPath")); 2554Assert.Equal(@"c:\devdiv\vscore\msbuild", msbuildExtensionsPath32Value); 2575Assert.Equal(@"c:\devdiv\vscore\msbuild", msbuildExtensionsPath32Value); 2629Assert.Equal(@"c:\devdiv\vscore\msbuild", msbuildExtensionsPath64Value); 2650Assert.Equal(@"c:\devdiv\vscore\msbuild", msbuildExtensionsPath64Value); 2668Assert.Equal(expected, project.GetPropertyValue("LocalAppData")); 2686Assert.Equal(@"c:\AppData\Local", localAppDataValue); 2707Assert.Equal(@"c:\AppData\Local", localAppDataValue); 2769Assert.Equal(@"c:\foo", project.GetPropertyValue("MSBuildProjectDirectory")); 2770Assert.Equal(@"foo", project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2771Assert.Equal("bar.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2772Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2773Assert.Equal(@"c:\foo\bar.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2774Assert.Equal("bar", project.GetPropertyValue("MSBuildProjectName")); 2788Assert.Equal(dir, project.GetPropertyValue("MSBuildProjectDirectory")); 2789Assert.Equal(string.Empty, project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2790Assert.Equal("bar.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2791Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2792Assert.Equal(file, project.GetPropertyValue("MSBuildProjectFullPath")); 2793Assert.Equal("bar", project.GetPropertyValue("MSBuildProjectName")); 2806Assert.Equal(@"\\foo\bar", project.GetPropertyValue("MSBuildProjectDirectory")); 2807Assert.Equal(string.Empty, project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2808Assert.Equal("baz.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2809Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2810Assert.Equal(@"\\foo\bar\baz.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2811Assert.Equal("baz", project.GetPropertyValue("MSBuildProjectName")); 2824Assert.Equal(@"\\foo\bar\baz", project.GetPropertyValue("MSBuildProjectDirectory")); 2825Assert.Equal(@"baz", project.GetPropertyValue("MSBuildProjectDirectoryNoRoot")); 2826Assert.Equal("biz.csproj", project.GetPropertyValue("MSBuildProjectFile")); 2827Assert.Equal(".csproj", project.GetPropertyValue("MSBuildProjectExtension")); 2828Assert.Equal(@"\\foo\bar\baz\biz.csproj", project.GetPropertyValue("MSBuildProjectFullPath")); 2829Assert.Equal("biz", project.GetPropertyValue("MSBuildProjectName")); 3242Assert.Equal("BazBar", project.GetPropertyValue("Foo")); 3243Assert.Equal("Baz", project.GlobalProperties["Foo"]); 3272Assert.Equal("Foo;Goo", project.Xml.TreatAsLocalProperty); 3274Assert.Equal("BazGoo", project.GetPropertyValue("Foo")); 3275Assert.Equal("Baz", project.GlobalProperties["Foo"]); 3276Assert.Equal("FooGoo", project.GetPropertyValue("Goo")); 3277Assert.Equal("Foo", project.GlobalProperties["Goo"]); 3282Assert.Equal("BazGoo", project.GetPropertyValue("Foo")); 3283Assert.Equal("Baz", project.GlobalProperties["Foo"]); 3284Assert.Equal("Foo", project.GetPropertyValue("Goo")); 3285Assert.Equal("Foo", project.GlobalProperties["Goo"]); 3309Assert.Equal("Bar", project.GetPropertyValue("Foo")); 3315Assert.Equal("BazBar", project.GetPropertyValue("Foo")); 3316Assert.Equal("Baz", project.GlobalProperties["Foo"]); 3321Assert.Equal("Bar", project.GetPropertyValue("Foo")); 4338Assert.Equal(MSBuildConstants.CurrentVisualStudioVersion, actual); 4542Assert.Equal("MSB4067", ex.ErrorCode); 4616Assert.Equal(expected, actual.ToString());
Evaluation\Expander_Tests.cs (153)
165Assert.Equal(String.Empty, result); 182Assert.Equal("j", items[0].ItemType); 183Assert.Equal("j", items[1].ItemType); 184Assert.Equal("i0", items[0].EvaluatedInclude); 185Assert.Equal("i1", items[1].EvaluatedInclude); 202Assert.Equal("i", items[0].ItemType); 203Assert.Equal("i", items[1].ItemType); 204Assert.Equal("i0", items[0].EvaluatedInclude); 205Assert.Equal("i1", items[1].EvaluatedInclude); 222Assert.Equal("i", itemsTrue[0].ItemType); 223Assert.Equal("true", itemsTrue[0].EvaluatedInclude); 228Assert.Equal("i", itemsFalse[0].ItemType); 229Assert.Equal("false", itemsFalse[0].EvaluatedInclude); 260Assert.Equal("i", itemsTrue[0].ItemType); 261Assert.Equal(Path.Combine(s_rootPathPrefix, "firstdirectory", "seconddirectory"), itemsTrue[0].EvaluatedInclude); 266Assert.Equal("i", itemsDir[0].ItemType); 267Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"seconddirectory"), itemsDir[0].EvaluatedInclude); 286Assert.Equal("i", itemsTrue[5].ItemType); 287Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude); 292Assert.Equal("i", itemsTrue[5].ItemType); 293Assert.Equal(@"file0", itemsTrue[5].EvaluatedInclude); 298Assert.Equal("i", itemsTrue[5].ItemType); 299Assert.Equal(@".ext", itemsTrue[5].EvaluatedInclude); 313Assert.Equal(@"[@(type-&gt;'%(filename), '%'')]", result); 327Assert.Equal(@"[@(i->')']", result); 343Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, result); 359Assert.Equal(@"[firstdirectory\seconddirectory\]", result); 373Assert.Equal(@"", result); 659Assert.Equal("i", itemsTrue[5].ItemType); 660Assert.Equal(Path.Combine("firstdirectory", "seconddirectory") + Path.DirectorySeparatorChar, itemsTrue[5].EvaluatedInclude); 665Assert.Equal("i", itemsTrue[5].ItemType); 666Assert.Equal(@"file0", itemsTrue[5].EvaluatedInclude); 671Assert.Equal("i", itemsTrue[0].ItemType); 672Assert.Equal(@".ext", itemsTrue[0].EvaluatedInclude); 677Assert.Equal("i", itemsTrue[5].ItemType); 678Assert.Equal(@"le0", itemsTrue[5].EvaluatedInclude); 697Assert.Equal("i", itemsTrue[5].ItemType); 698Assert.Equal(Path.Combine(s_rootPathPrefix, "firstdirectory", "seconddirectory"), itemsTrue[5].EvaluatedInclude); 717Assert.Equal("i", items[5].ItemType); 718Assert.Equal("i", items[6].ItemType); 719Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"secondd;rectory"), items[5].EvaluatedInclude); 720Assert.Equal(Path.Combine(Directory.GetCurrentDirectory(), @"someo;herplace"), items[6].EvaluatedInclude); 737Assert.Equal("i", items[5].ItemType); 1406Assert.Equal( 1411Assert.Equal( 1416Assert.Equal( 1421Assert.Equal( 1426Assert.Equal( 1431Assert.Equal( 1436Assert.Equal( 1441Assert.Equal( 1461Assert.Equal( 1467Assert.Equal( 1488Assert.Equal( 1510Assert.Equal( 1571Assert.Equal(expected, expander.ExpandIntoStringAndUnescape(xmlattribute.Value, ExpanderOptions.ExpandAll | ExpanderOptions.Truncate, MockElementLocation.Instance)); 1618Assert.Equal(@"@(Resource->'%(Filename)') ; @(Content) ; @(NonExistent) ; ; %(NonExistent) ; \jk ; l\mno%3bpqr\stu ; @(IntermediateAssembly->'%(RelativeDir)') ; %(Language)_%(Culture)", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandProperties, MockElementLocation.Instance)); 1620Assert.Equal(@"@(Resource->'%(Filename)') ; @(Content) ; @(NonExistent) ; ; ; \jk ; l\mno%3bpqr\stu ; @(IntermediateAssembly->'%(RelativeDir)') ; english_abc%3bdef;ghi", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandPropertiesAndMetadata, MockElementLocation.Instance)); 1622Assert.Equal(@"string$(p);dialogs%3b ; splash.bmp ; ; ; ; \jk ; l\mno%3bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar + " ; english_abc%3bdef;ghi", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandAll, MockElementLocation.Instance)); 1624Assert.Equal(@"string$(p);dialogs%3b ; splash.bmp ; ; $(NonExistent) ; %(NonExistent) ; $(OutputPath) ; $(TargetPath) ; %(Language)_%(Culture)", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandItems, MockElementLocation.Instance)); 1645Assert.Equal(@"string$(p)", expanded[0]); 1646Assert.Equal(@"dialogs%253b", expanded[1]); 1647Assert.Equal(@"splash.bmp", expanded[2]); 1648Assert.Equal(@"\jk", expanded[3]); 1649Assert.Equal(@"l\mno%253bpqr\stu", expanded[4]); 1650Assert.Equal("subdir1" + Path.DirectorySeparatorChar, expanded[5]); 1651Assert.Equal("subdir2" + Path.DirectorySeparatorChar, expanded[6]); 1652Assert.Equal(@"english_abc%253bdef", expanded[7]); 1653Assert.Equal(@"ghi", expanded[8]); 1683Assert.Equal(String.Empty, result); 1699Assert.Equal(String.Empty, result); 1750Assert.Equal("String", result); 1775Assert.Equal("83;116;114;105;110;103", result); 1797Assert.Equal("123456", result); 1820Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 1842Assert.Equal("123456789123456789", result); 1864Assert.Equal("A;B;C;D", result); 1957Assert.Equal("null", result); 1972Assert.Equal("", result); 1976Assert.Equal("prefix_", result); 1992Assert.Equal("THIS IS SOME STUFF", result); 2008Assert.Equal("foo.ext", result); 2024Assert.Equal("18", result); 2040Assert.Equal("18", result); 2056Assert.Equal("this is some stuff_goop", result); 2072Assert.Equal("STUff", result); 2088Assert.Equal("SOME STUff", result); 2105Assert.Equal(Path.Combine(Path.DirectorySeparatorChar.ToString(), "my", "project", "is", "here.proj"), result); 2122Assert.Equal("STUff", result); 2138Assert.Equal("True", result); 2140Assert.Equal("False", result); 2157Assert.Equal("ff", result); 2174Assert.Equal("this is some stuff", result); 2191Assert.Equal("67890", result); 2206Assert.Equal("A;B;C;D", result); 2222Assert.Equal("A;B;C;D", result); 2257Assert.Equal("A;B;C;D", result); 2439Assert.Equal("[%(LowerLetterList.Identity.ToUpper())]", result); 2455Assert.Equal("The System Namespace", result); 2474Assert.Equal(@"foo.cpp", result); 2491Assert.Equal(Path.Combine(s_rootPathPrefix, "foo", "file.txt"), result); 2531Assert.Equal(@"-1", result); 2552Assert.Equal("System.Type", result); 2636Assert.Equal(Path.Combine(s_rootPathPrefix, "foo", "file.txt"), result); 2654Assert.Equal(Path.Combine(s_rootPathPrefix, "foo goo", "foo goo", "file.txt"), result); 2672Assert.Equal(Path.Combine(s_rootPathPrefix, "foo baz", "foo bar", "baz.txt"), result); 2689Assert.Equal(Path.Combine(s_rootPathPrefix, "foo baz ", "foo bar", "baz.txt"), result); 2705Assert.Equal(System.DateTime.Parse(_dateToParse).ToString("yyyy/MM/dd HH:mm:ss"), result); 2720Assert.Equal(System.DateTime.Parse(_dateToParse).ToString("MM.dd.yyyy"), result); 2735Assert.Equal(DateTime.Now.ToString("MM.dd.yyyy"), result); 2753Assert.Equal(Path.Combine(s_rootPathPrefix, "foo", "file.txt"), result); 2770Assert.Equal(@"True", result); 2775Assert.Equal(@"True", result); 2779Assert.Equal(@"False", result); 2794Assert.Equal(DateTime.Parse(_dateToParse).ToString("yyyy/MM/dd HH:mm:ss"), result); 2809Assert.Equal(System.Environment.GetFolderPath(Environment.SpecialFolder.System), result); 2846Assert.Equal(expectedExpansion, result); 3164Assert.Equal("True", result); 3326Assert.Equal(true.ToString(), result); 3350Assert.Equal(Microsoft.Build.Shared.FileUtilities.EnsureTrailingSlash(tempPath), Microsoft.Build.Shared.FileUtilities.EnsureTrailingSlash(result)); 3354Assert.Equal(String.Empty, result); 3384Assert.Equal(fileToFind, result); 3388Assert.Equal(String.Empty, result); 3447Assert.Equal(new CultureInfo("en-US").ToString(), result); 3462Assert.Equal((40 + 2).ToString(), result); 3477Assert.Equal((39.9 + 2.1).ToString(), result); 3492Assert.Equal("42", result); 3496Assert.Equal("42", result); 3513Assert.Equal("Different", result); 3519Assert.Equal("43", result); 3565Assert.Equal( 3569Assert.Equal( 3663Assert.Equal("32", result); 3684Assert.Equal((39.9 + 2.1).ToString(), result); 3688Assert.Equal((40 + 2).ToString(), result); 3692Assert.Equal((44 - 2).ToString(), result); 3696Assert.Equal((42.9 - 0.9).ToString(), result); 3700Assert.Equal((21 * 2).ToString(), result); 3704Assert.Equal((84.0 * 0.5).ToString(), result); 3708Assert.Equal((84 / 2).ToString(), result); 3712Assert.Equal((84.4 / 2.0).ToString(), result); 3716Assert.Equal((85 % 2).ToString(), result); 3720Assert.Equal((2345.5 % 43).ToString(), result); 3755Assert.Equal(String.Empty, result); 3774Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3798Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3822Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3846Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3877Assert.Equal(Path.Combine(s_rootPathPrefix, "some", "path", "fOo.Cs"), result); 4306Assert.Equal(path + Path.DirectorySeparatorChar, result); 4311Assert.Equal(path + Path.DirectorySeparatorChar, result); 4389Assert.Equal(availability, result); 4401Assert.Equal(expected, result);
Evaluation\ExpressionShredder_Tests.cs (109)
580Assert.Equal("i", capture.ItemType); 581Assert.Equal("%(Meta0)", capture.Captures[0].Value); 582Assert.Equal("%(Filename)", capture.Captures[1].Value); 583Assert.Equal("Substring($(Val))", capture.Captures[2].Value); 610Assert.Equal(match.Value, capture.Value); 618Assert.Equal(transformGroup.Captures[i].Value, capture.Captures[i].Value); 658Assert.Equal("Foo", capture.ItemType); 674Assert.Equal(";", capture.Separator); 675Assert.Equal("Foo", capture.ItemType); 692Assert.Equal("Foo", capture.ItemType); 694Assert.Equal("%(Fullpath)", capture.Captures[0].Value); 709Assert.Equal(";", capture.Separator); 710Assert.Equal("Foo", capture.ItemType); 712Assert.Equal("%(Fullpath)", capture.Captures[0].Value); 728Assert.Equal("Foo", capture.ItemType); 730Assert.Equal("Bar(a,b)", capture.Captures[0].Value); 731Assert.Equal("Bar", capture.Captures[0].FunctionName); 732Assert.Equal("a,b", capture.Captures[0].FunctionArguments); 747Assert.Equal(";", capture.Separator); 748Assert.Equal("Foo", capture.ItemType); 750Assert.Equal("Bar(a,b)", capture.Captures[0].Value); 751Assert.Equal("Bar", capture.Captures[0].FunctionName); 752Assert.Equal("a,b", capture.Captures[0].FunctionArguments); 768Assert.Equal("Foo", capture.ItemType); 769Assert.Equal("Metadata('Meta0')", capture.Captures[0].Value); 770Assert.Equal("Metadata", capture.Captures[0].FunctionName); 771Assert.Equal("'Meta0'", capture.Captures[0].FunctionArguments); 772Assert.Equal("Directory()", capture.Captures[1].Value); 773Assert.Equal("Directory", capture.Captures[1].FunctionName); 789Assert.Equal(";", capture.Separator); 790Assert.Equal("Foo", capture.ItemType); 791Assert.Equal("Metadata('Meta0')", capture.Captures[0].Value); 792Assert.Equal("Metadata", capture.Captures[0].FunctionName); 793Assert.Equal("'Meta0'", capture.Captures[0].FunctionArguments); 794Assert.Equal("Directory()", capture.Captures[1].Value); 795Assert.Equal("Directory", capture.Captures[1].FunctionName); 811Assert.Equal("|", capture.Separator); 812Assert.Equal("Foo", capture.ItemType); 813Assert.Equal("%(Fullpath)", capture.Captures[0].Value); 816Assert.Equal("Directory()", capture.Captures[1].Value); 817Assert.Equal("Directory", capture.Captures[1].FunctionName); 833Assert.Equal(";", capture.Separator); 834Assert.Equal("Foo", capture.ItemType); 835Assert.Equal("%(Fullpath)", capture.Captures[0].Value); 838Assert.Equal("Directory()", capture.Captures[1].Value); 839Assert.Equal("Directory", capture.Captures[1].FunctionName); 856Assert.Equal("Foo", capture.ItemType); 857Assert.Equal("$(SOMEPROP)%(Fullpath)", capture.Captures[0].Value); 875Assert.Equal("Foo", capture.ItemType); 876Assert.Equal("%(Filename)", capture.Captures[0].Value); 879Assert.Equal("Substring($(Val), $(Boo))", capture.Captures[1].Value); 880Assert.Equal("Substring", capture.Captures[1].FunctionName); 881Assert.Equal("$(Val), $(Boo)", capture.Captures[1].FunctionArguments); 897Assert.Equal("Foo", capture.ItemType); 898Assert.Equal("%(Filename)", capture.Captures[0].Value); 901Assert.Equal("Substring(\"AA\", 'BB', `cc`)", capture.Captures[1].Value); 902Assert.Equal("Substring", capture.Captures[1].FunctionName); 903Assert.Equal("\"AA\", 'BB', `cc`", capture.Captures[1].FunctionArguments); 919Assert.Equal("Foo", capture.ItemType); 920Assert.Equal("%(Filename)", capture.Captures[0].Value); 923Assert.Equal("Substring('()', $(Boo), ')(')", capture.Captures[1].Value); 924Assert.Equal("Substring", capture.Captures[1].FunctionName); 925Assert.Equal("'()', $(Boo), ')('", capture.Captures[1].FunctionArguments); 941Assert.Equal("Foo", capture.ItemType); 942Assert.Equal("%(Filename)", capture.Captures[0].Value); 945Assert.Equal("Substring(`()`, $(Boo), \"AA\")", capture.Captures[1].Value); 946Assert.Equal("Substring", capture.Captures[1].FunctionName); 947Assert.Equal("`()`, $(Boo), \"AA\"", capture.Captures[1].FunctionArguments); 963Assert.Equal("Foo", capture.ItemType); 964Assert.Equal("%(Filename)", capture.Captures[0].Value); 967Assert.Equal("Substring(`()`, $(Boo), \")(\")", capture.Captures[1].Value); 968Assert.Equal("Substring", capture.Captures[1].FunctionName); 969Assert.Equal("`()`, $(Boo), \")(\"", capture.Captures[1].FunctionArguments); 985Assert.Equal("Foo", capture.ItemType); 986Assert.Equal("%(Filename)", capture.Captures[0].Value); 989Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.Captures[1].Value); 990Assert.Equal("Substring", capture.Captures[1].FunctionName); 991Assert.Equal("\"()\", $(Boo), `)(`", capture.Captures[1].FunctionArguments); 1005Assert.Equal("Bar", expressions[0].ItemType); 1009Assert.Equal("Foo", capture.ItemType); 1010Assert.Equal("%(Filename)", capture.Captures[0].Value); 1013Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.Captures[1].Value); 1014Assert.Equal("Substring", capture.Captures[1].FunctionName); 1015Assert.Equal("\"()\", $(Boo), `)(`", capture.Captures[1].FunctionArguments); 1029Assert.Equal("Bar", expressions[1].ItemType); 1033Assert.Equal("Foo", capture.ItemType); 1034Assert.Equal("%(Filename)", capture.Captures[0].Value); 1037Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.Captures[1].Value); 1038Assert.Equal("Substring", capture.Captures[1].FunctionName); 1039Assert.Equal("\"()\", $(Boo), `)(`", capture.Captures[1].FunctionArguments); 1053Assert.Equal("Bar", expressions[1].ItemType); 1057Assert.Equal("Foo", capture.ItemType); 1058Assert.Equal("%(Filename)", capture.Captures[0].Value); 1061Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.Captures[1].Value); 1062Assert.Equal("Substring", capture.Captures[1].FunctionName); 1063Assert.Equal("\"()\", $(Boo), `)(`", capture.Captures[1].FunctionArguments); 1077Assert.Equal("Bar", expressions[1].ItemType); 1081Assert.Equal("Foo", capture.ItemType); 1082Assert.Equal("%(Filename)", capture.Captures[0].Value); 1085Assert.Equal("Substring(\"()\", $(Boo), `)(\"`)", capture.Captures[1].Value); 1086Assert.Equal("Substring", capture.Captures[1].FunctionName); 1087Assert.Equal("\"()\", $(Boo), `)(\"`", capture.Captures[1].FunctionArguments); 1099Assert.Equal("foo", expressions[0].ItemType); 1102Assert.Equal("foo", expressions[1].ItemType); 1103Assert.Equal("-", expressions[1].Separator); 1105Assert.Equal("foo", expressions[2].ItemType); 1108Assert.Equal("foo", expressions[3].ItemType); 1109Assert.Equal(",", expressions[3].Separator); 1111Assert.Equal("foo", expressions[4].ItemType);
Evaluation\ItemEvaluation_Tests.cs (7)
555Assert.Equal("0;6;7;8;9", String.Join(";", items.Select(i => i.EvaluatedInclude))); 598Assert.Equal("true", project.GetPropertyValue("FromImport")); 599Assert.Equal("**/foo/**/*.cs", project.GetConcatenatedItemsOfType("i")); 600Assert.Equal("**/yyy/**/*.cs", project.GetConcatenatedItemsOfType("i3")); 609Assert.Equal(expectedItems, project.GetConcatenatedItemsOfType("i2")); 620Assert.Equal("**/foo/**/*.cs", project.GetConcatenatedItemsOfType("ItemReference")); 623Assert.Equal(string.Empty, project.GetConcatenatedItemsOfType("RecursiveDir"));
Evaluation\ProjectSdkImplicitImport_Tests.cs (7)
144Assert.Equal(_sdkPropsPath, initialResolvedImport.ImportedProject.FullPath); 148Assert.Equal(_sdkTargetsPath, finalResolvedImport.ImportedProject.FullPath); 308Assert.Equal("MSB4229", exception.ErrorCode); 399Assert.Equal("MSB4238", e.ErrorCode); 424Assert.Equal("MSB4229", exception.ErrorCode); 827Assert.Equal(expectedContainingProjectPath, property.Xml.ContainingProject.FullPath); 831Assert.Equal(expectedValue, property.EvaluatedValue);
Evaluation\SimpleVersion_Tests.cs (1)
297Assert.Equal(expected, version.ToString());
EventArgsFormatting_Tests.cs (12)
28Assert.Equal( 39Assert.Equal( 48Assert.Equal( 57Assert.Equal( 66Assert.Equal( 75Assert.Equal( 84Assert.Equal( 93Assert.Equal( 103Assert.Equal( 117Assert.Equal("source.cs(42): CS error 312: message\r Hello", errorString); 118Assert.Equal("source.cs(42): CS warning 312: message\r Hello", warningString); 127Assert.Equal(
FileLogger_Tests.cs (1)
477Assert.Equal(expectedLines[i].Trim(), actualLines[i].Trim());
FileMatcher_Tests.cs (19)
834Assert.Equal(@"D:\LongDirectoryName\LongSubDirectory\LongFileName.txt", longPath); 850Assert.Equal(@"D:\LongDirectoryName\LongSubDirectory\LongFileName.txt", longPath); 866Assert.Equal(@"\\server\share\LongDirectoryName\LongSubDirectory\LongFileName.txt", longPath); 882Assert.Equal(@"\\server\share\LongDirectoryName\LongSubDirectory\LongFileName.txt", longPath); 898Assert.Equal(@"LongDirectoryName\LongSubDirectory\LongFileName.txt", longPath); 914Assert.Equal(@"LongDirectoryName\LongSubDirectory\", longPath); 930Assert.Equal(@"LongDirectoryName\\LongSubDirectory\\", longPath); 946Assert.Equal(@"c:\apple\banana\tomato\pomegranate\orange\", longPath); 963Assert.Equal(@"c:\apple\banana\tomato\pomegranate\orange\chocol~1\vanila~1", longPath); 1448Assert.Equal("1.file", strings[0]); 1452Assert.Equal(strings[0], NativeMethodsShared.IsWindows ? "directory\\1.file" : "directory/1.file"); 1456Assert.Equal("1.file", strings[0]); 1460Assert.Equal(strings[0], NativeMethodsShared.IsWindows ? "c:\\1.file" : "/1.file"); 1464Assert.Equal(strings[0], NativeMethodsShared.IsWindows ? "c:\\directorymorechars\\1.file" : "/directorymorechars/1.file"); 1470Assert.Equal("1.file", strings[0]); 1474Assert.Equal("directory\\1.file", strings[0]); 1478Assert.Equal("1.file", strings[0]); 1482Assert.Equal("\\Machine\\1.file", strings[0]); 1486Assert.Equal("\\Machine\\directorymorechars\\1.file", strings[0]);
FileUtilities_Tests.cs (93)
36Assert.Equal(String.Empty, modifier); 40Assert.Equal(String.Empty, modifier); 44Assert.Equal(@"foo" + Path.DirectorySeparatorChar, modifier); 48Assert.Equal(@"foo" + Path.DirectorySeparatorChar, modifier); 54Assert.Equal(itemSpec, modifier); 55Assert.Equal(itemSpec, cache); 58Assert.Equal(itemSpecDir, modifier); 61Assert.Equal(@"foo", modifier); 64Assert.Equal(@".txt", modifier); 67Assert.Equal(String.Empty, modifier); 70Assert.Equal(itemSpec, modifier); 75Assert.Equal(projectPathDir, modifier); 78Assert.Equal(@".proj", modifier); 81Assert.Equal(projectPath, modifier); 84Assert.Equal(@"goo", modifier); 92Assert.Equal(@"foo.cpp", FileUtilities.MakeRelative(@"c:\abc\def", @"c:\abc\def\foo.cpp")); 93Assert.Equal(@"def\foo.cpp", FileUtilities.MakeRelative(@"c:\abc\", @"c:\abc\def\foo.cpp")); 94Assert.Equal(@"..\foo.cpp", FileUtilities.MakeRelative(@"c:\abc\def\xyz", @"c:\abc\def\foo.cpp")); 95Assert.Equal(@"..\ttt\foo.cpp", FileUtilities.MakeRelative(@"c:\abc\def\xyz\", @"c:\abc\def\ttt\foo.cpp")); 96Assert.Equal(@"e:\abc\def\foo.cpp", FileUtilities.MakeRelative(@"c:\abc\def", @"e:\abc\def\foo.cpp")); 97Assert.Equal(@"foo.cpp", FileUtilities.MakeRelative(@"\\aaa\abc\def", @"\\aaa\abc\def\foo.cpp")); 98Assert.Equal(@"foo.cpp", FileUtilities.MakeRelative(@"c:\abc\def", @"foo.cpp")); 99Assert.Equal(@"\\host\path\file", FileUtilities.MakeRelative(@"c:\abc\def", @"\\host\path\file")); 100Assert.Equal(@"\\host\d$\file", FileUtilities.MakeRelative(@"c:\abc\def", @"\\host\d$\file")); 101Assert.Equal(@"..\fff\ggg.hh", FileUtilities.MakeRelative(@"c:\foo\bar\..\abc\cde", @"c:\foo\bar\..\abc\fff\ggg.hh")); 104Assert.Equal(@"def\", FileUtilities.MakeRelative(@"c:\abc\", @"c:\abc\def\")); 105Assert.Equal(@"..\", FileUtilities.MakeRelative(@"c:\abc\def\xyz\", @"c:\abc\def\")); 106Assert.Equal(@"..\ttt\", FileUtilities.MakeRelative(@"c:\abc\def\xyz\", @"c:\abc\def\ttt\")); 107Assert.Equal(@".", FileUtilities.MakeRelative(@"c:\abc\def\", @"c:\abc\def\")); 110Assert.Equal(@"def", FileUtilities.MakeRelative(@"c:\abc\", @"c:\abc\def")); 111Assert.Equal(@"..\..\ghi", FileUtilities.MakeRelative(@"c:\abc\def\xyz\", @"c:\abc\ghi")); 112Assert.Equal(@"..\ghi", FileUtilities.MakeRelative(@"c:\abc\def\xyz\", @"c:\abc\def\ghi")); 113Assert.Equal(@"..\ghi", FileUtilities.MakeRelative(@"c:\abc\def\", @"c:\abc\ghi")); 116Assert.Equal(@"def\", FileUtilities.MakeRelative(@"c:\abc", @"c:\abc\def\")); 117Assert.Equal(@"..\", FileUtilities.MakeRelative(@"c:\abc\def\xyz", @"c:\abc\def\")); 118Assert.Equal(@"..\ghi\", FileUtilities.MakeRelative(@"c:\abc\def\xyz", @"c:\abc\def\ghi\")); 119Assert.Equal(@".", FileUtilities.MakeRelative(@"c:\abc\def", @"c:\abc\def\")); 123Assert.Equal(@"bar.cpp", FileUtilities.MakeRelative(@"/abc/def", @"/abc/def/bar.cpp")); 124Assert.Equal(@"def/foo.cpp", FileUtilities.MakeRelative(@"/abc/", @"/abc/def/foo.cpp")); 125Assert.Equal(@"../foo.cpp", FileUtilities.MakeRelative(@"/abc/def/xyz", @"/abc/def/foo.cpp")); 126Assert.Equal(@"../ttt/foo.cpp", FileUtilities.MakeRelative(@"/abc/def/xyz/", @"/abc/def/ttt/foo.cpp")); 127Assert.Equal(@"foo.cpp", FileUtilities.MakeRelative(@"/abc/def", @"foo.cpp")); 128Assert.Equal(@"../fff/ggg.hh", FileUtilities.MakeRelative(@"/foo/bar/../abc/cde", @"/foo/bar/../abc/fff/ggg.hh")); 131Assert.Equal(@"def/", FileUtilities.MakeRelative(@"/abc/", @"/abc/def/")); 132Assert.Equal(@"../", FileUtilities.MakeRelative(@"/abc/def/xyz/", @"/abc/def/")); 133Assert.Equal(@"../ttt/", FileUtilities.MakeRelative(@"/abc/def/xyz/", @"/abc/def/ttt/")); 134Assert.Equal(@".", FileUtilities.MakeRelative(@"/abc/def/", @"/abc/def/")); 137Assert.Equal(@"def", FileUtilities.MakeRelative(@"/abc/", @"/abc/def")); 138Assert.Equal(@"../../ghi", FileUtilities.MakeRelative(@"/abc/def/xyz/", @"/abc/ghi")); 139Assert.Equal(@"../ghi", FileUtilities.MakeRelative(@"/abc/def/xyz/", @"/abc/def/ghi")); 140Assert.Equal(@"../ghi", FileUtilities.MakeRelative(@"/abc/def/", @"/abc/ghi")); 143Assert.Equal(@"def/", FileUtilities.MakeRelative(@"/abc", @"/abc/def/")); 144Assert.Equal(@"../", FileUtilities.MakeRelative(@"/abc/def/xyz", @"/abc/def/")); 145Assert.Equal(@"../ghi/", FileUtilities.MakeRelative(@"/abc/def/xyz", @"/abc/def/ghi/")); 146Assert.Equal(@".", FileUtilities.MakeRelative(@"/abc/def", @"/abc/def/")); 246Assert.Equal(NativeMethodsShared.IsWindows ? @"c:\" : "/", FileUtilities.GetDirectory(NativeMethodsShared.IsWindows ? @"c:\" : "/")); 247Assert.Equal(NativeMethodsShared.IsWindows ? @"c:\" : "/", FileUtilities.GetDirectory(NativeMethodsShared.IsWindows ? @"c:\foo" : "/foo")); 248Assert.Equal(NativeMethodsShared.IsWindows ? @"c:" : "/", FileUtilities.GetDirectory(NativeMethodsShared.IsWindows ? @"c:" : "/")); 249Assert.Equal(FileUtilities.FixFilePath(@"\"), FileUtilities.GetDirectory(@"\")); 250Assert.Equal(FileUtilities.FixFilePath(@"\"), FileUtilities.GetDirectory(@"\foo")); 251Assert.Equal(FileUtilities.FixFilePath(@"..\"), FileUtilities.GetDirectory(@"..\foo")); 252Assert.Equal(FileUtilities.FixFilePath(@"\foo\"), FileUtilities.GetDirectory(@"\foo\")); 253Assert.Equal(FileUtilities.FixFilePath(@"\\server\share"), FileUtilities.GetDirectory(@"\\server\share")); 254Assert.Equal(FileUtilities.FixFilePath(@"\\server\share\"), FileUtilities.GetDirectory(@"\\server\share\")); 255Assert.Equal(FileUtilities.FixFilePath(@"\\server\share\"), FileUtilities.GetDirectory(@"\\server\share\file")); 256Assert.Equal(FileUtilities.FixFilePath(@"\\server\share\directory\"), FileUtilities.GetDirectory(@"\\server\share\directory\")); 257Assert.Equal(FileUtilities.FixFilePath(@"foo\"), FileUtilities.GetDirectory(@"foo\bar")); 258Assert.Equal(FileUtilities.FixFilePath(@"\foo\bar\"), FileUtilities.GetDirectory(@"\foo\bar\")); 259Assert.Equal(String.Empty, FileUtilities.GetDirectory("foo")); 325Assert.Equal(FileUtilities.FixFilePath(@"foo\bar\"), FileUtilities.EnsureTrailingSlash(@"foo\bar")); // "test 1" 326Assert.Equal(FileUtilities.FixFilePath(@"foo/bar\"), FileUtilities.EnsureTrailingSlash(@"foo/bar")); // "test 2" 329Assert.Equal(FileUtilities.FixFilePath(@"foo/bar/"), FileUtilities.EnsureTrailingSlash(@"foo/bar/")); // test 3" 330Assert.Equal(FileUtilities.FixFilePath(@"foo\bar\"), FileUtilities.EnsureTrailingSlash(@"foo\bar\")); // test 4" 331Assert.Equal(FileUtilities.FixFilePath(@"foo/bar\"), FileUtilities.EnsureTrailingSlash(@"foo/bar\")); // test 5" 332Assert.Equal(FileUtilities.FixFilePath(@"foo\bar/"), FileUtilities.EnsureTrailingSlash(@"foo\bar/")); // "test 5" 419Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath))); 433Assert.Equal(fullPath, FileUtilities.NormalizePath(Path.Combine(currentDirectory, filePath))); 444Assert.Equal(@"c:\", FileUtilities.ItemSpecModifiers.GetItemSpecModifier(currentDirectory, fullPath, String.Empty, FileUtilities.ItemSpecModifiers.RootDir, ref cache)); 488Assert.Equal(@"\\localhost", FileUtilities.NormalizePath(@"\\localhost")); 495Assert.Equal(@"\\localhost\share", FileUtilities.NormalizePath(@"\\localhost\share")); 502Assert.Equal(@"c:\abc\def", FileUtilities.NormalizePath(@"c:\abc\" + longPart + @"\..\def")); 944Assert.Equal("second\\file.txt", FileUtilities.MaybeAdjustFilePath("second\\file.txt")); 947Assert.Equal("second/file.txt", FileUtilities.MaybeAdjustFilePath("second\\file.txt", firstDirectory)); 968Assert.Equal(Path.Combine(root, "1", "2", "3", "4", "5"), FileUtilities.GetFolderAbove(path, 0)); 969Assert.Equal(Path.Combine(root, "1", "2", "3", "4"), FileUtilities.GetFolderAbove(path)); 970Assert.Equal(Path.Combine(root, "1", "2", "3"), FileUtilities.GetFolderAbove(path, 2)); 971Assert.Equal(Path.Combine(root, "1", "2"), FileUtilities.GetFolderAbove(path, 3)); 972Assert.Equal(Path.Combine(root, "1"), FileUtilities.GetFolderAbove(path, 4)); 973Assert.Equal(root, FileUtilities.GetFolderAbove(path, 5)); 974Assert.Equal(root, FileUtilities.GetFolderAbove(path, 99)); 976Assert.Equal(root, FileUtilities.GetFolderAbove(root, 99)); 985Assert.Equal( 989Assert.Equal(
Globbing\MSBuildGlob_Tests.cs (19)
43Assert.Equal(expectedRoot, glob.TestOnlyGlobRoot); 51Assert.Equal(Directory.GetCurrentDirectory().WithTrailingSlash(), glob.TestOnlyGlobRoot); 67Assert.Equal(expectedRoot, glob.TestOnlyGlobRoot); 98Assert.Equal(expectedFixedDirectory, glob.FixedDirectoryPart); 120Assert.Equal(fileSpec, glob.TestOnlyFileSpec); 122Assert.Equal(globRoot.WithTrailingSlash(), glob.TestOnlyGlobRoot); 125Assert.Equal(expectedFixedDirectory, glob.FixedDirectoryPart); 126Assert.Equal("**/", glob.WildcardDirectoryPart); 127Assert.Equal("*.cs", glob.FilenamePart); 139Assert.Equal(illegalFileSpec, glob.TestOnlyFileSpec); 141Assert.Equal(globRoot.WithTrailingSlash(), glob.TestOnlyGlobRoot); 143Assert.Equal(string.Empty, glob.FixedDirectoryPart); 144Assert.Equal(string.Empty, glob.WildcardDirectoryPart); 145Assert.Equal(string.Empty, glob.FilenamePart); 168Assert.Equal(string.Empty, glob.WildcardDirectoryPart); 169Assert.Equal("%42", glob.FilenamePart); 358Assert.Equal(FileUtilities.GetFullPathNoThrow(rootedFixedDirectoryPart), result.FixedDirectoryPartMatchGroup); 359Assert.Equal(NormalizeSlashes(wildcardDirectoryPart), result.WildcardDirectoryPartMatchGroup); 360Assert.Equal(NormalizeSlashes(filenamePart), result.FilenamePartMatchGroup);
Instance\ProjectMetadataInstance_Internal_Tests.cs (4)
31Assert.Equal("m", clone.Name); 32Assert.Equal("m1", clone.EvaluatedValue); 47Assert.Equal(metadata.Name, deserializedMetadata.Name); 48Assert.Equal(metadata.EvaluatedValue, deserializedMetadata.EvaluatedValue);
Instance\ProjectPropertyInstance_Internal_Tests.cs (9)
31Assert.Equal("p", clone.Name); 32Assert.Equal("v1", clone.EvaluatedValue); 47Assert.Equal(property.Name, deserializedProperty.Name); 48Assert.Equal(property.EvaluatedValue, deserializedProperty.EvaluatedValue); 64Assert.Equal(property.Name, deserializedProperty.Name); 65Assert.Equal(property.EvaluatedValue, deserializedProperty.EvaluatedValue); 83Assert.Equal(property.Name, deserializedProperty.Name); 84Assert.Equal(property.EvaluatedValue, deserializedProperty.EvaluatedValue); 86Assert.Equal("Microsoft.Build.Execution.ProjectPropertyInstance+ProjectPropertyInstanceImmutable", property.GetType().ToString());
Instance\TaskItem_Tests.cs (3)
61Assert.Equal(item.ItemSpec, deserializedItem.ItemSpec); 63Assert.Equal(item.GetMetadata("a"), deserializedItem.GetMetadata("a")); 64Assert.Equal(item.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath), deserializedItem.GetMetadata(FileUtilities.ItemSpecModifiers.DefiningProjectFullPath));
InvalidProjectFileException_Tests.cs (1)
81Assert.Equal(file, e.ProjectFile); // https://github.com/dotnet/msbuild/issues/1286
LogFormatter_Tests.cs (5)
26Assert.Equal("00:02:05.45", result); 41Assert.Equal("00:00:00", result); 50Assert.Equal(testTime.ToString("HH:mm:ss.fff", CultureInfo.CurrentCulture), result); 54Assert.Equal(testTime.ToString("HH:mm:ss.fff", CultureInfo.CurrentCulture), result); 58Assert.Equal(testTime.ToString("HH:mm:ss.fff", CultureInfo.CurrentCulture), result);
Parser_Tests.cs (6)
221Assert.Equal("@(item->foo('ab'))", tree.GetUnexpandedValue(null)); 580Assert.Equal("bar", projectItem.EvaluatedInclude); 586Assert.Equal("m1", metadatam.EvaluatedValue); 591Assert.Equal("m2", metadatam.EvaluatedValue); 595Assert.Equal("n1", metadatan.EvaluatedValue); 596Assert.Equal("n2", metadatan.Predecessor.EvaluatedValue);
ResourceUtilities_Tests.cs (14)
21Assert.Equal("MSB7007", code); 22Assert.Equal("This is a message.", messageOnly); 26Assert.Equal("MSB7007", code); 27Assert.Equal("This is a message.", messageOnly); 31Assert.Equal("MSB7007", code); 32Assert.Equal("This is a message.", messageOnly); 37Assert.Equal("MSB7007 : This is a message.", messageOnly); 42Assert.Equal("MSB 7007: This is a message.", messageOnly); 47Assert.Equal("MSB007: This is a message.", messageOnly); 52Assert.Equal("MSB: This is a message.", messageOnly); 57Assert.Equal("1001: This is a message.", messageOnly); 62Assert.Equal("7001MSB: This is a message.", messageOnly); 67Assert.Equal("MSB564B: This is a message.", messageOnly); 72Assert.Equal("msb1001: This is a message.", messageOnly);
Scanner_Tests.cs (13)
88Assert.Equal("IllFormedEqualsInCondition", lexer.GetErrorResource()); 89Assert.Equal("b", lexer.UnexpectedlyFound); 100Assert.Equal("IllFormedPropertyCloseParenthesisInCondition", lexer.GetErrorResource()); 104Assert.Equal("IllFormedPropertyOpenParenthesisInCondition", lexer.GetErrorResource()); 119Assert.Equal("IllFormedPropertySpaceInCondition", lexer.GetErrorResource()); 146Assert.Equal("IllFormedItemListCloseParenthesisInCondition", lexer.GetErrorResource()); 151Assert.Equal("IllFormedItemListOpenParenthesisInCondition", lexer.GetErrorResource()); 156Assert.Equal("IllFormedItemListCloseParenthesisInCondition", lexer.GetErrorResource()); 161Assert.Equal("IllFormedItemListQuoteInCondition", lexer.GetErrorResource()); 166Assert.Equal("IllFormedItemListQuoteInCondition", lexer.GetErrorResource()); 171Assert.Equal("IllFormedItemListCloseParenthesisInCondition", lexer.GetErrorResource()); 184Assert.Equal("IllFormedQuotedStringInCondition", lexer.GetErrorResource()); 189Assert.Equal("IllFormedQuotedStringInCondition", lexer.GetErrorResource());
TaskParameter_Tests.cs (48)
159Assert.Equal(value[0].ToString(CultureInfo.InvariantCulture), stringArray[0]); 160Assert.Equal(value[1].ToString(CultureInfo.InvariantCulture), stringArray[1]); 198Assert.Equal("foo", foo.ItemSpec); 207Assert.Equal("foo", foo2.ItemSpec); 226Assert.Equal("foo", foo.ItemSpec); 227Assert.Equal("a1", foo.GetMetadata("a")); 228Assert.Equal("b1", foo.GetMetadata("b")); 237Assert.Equal("foo", foo2.ItemSpec); 238Assert.Equal("a1", foo2.GetMetadata("a")); 239Assert.Equal("b1", foo2.GetMetadata("b")); 255Assert.Equal("foo", wrappedParameter[0].ItemSpec); 256Assert.Equal("bar", wrappedParameter[1].ItemSpec); 266Assert.Equal("foo", wrappedParameter2[0].ItemSpec); 267Assert.Equal("bar", wrappedParameter2[1].ItemSpec); 283Assert.Equal("foo;bar", foo.ItemSpec); 292Assert.Equal("foo;bar", foo2.ItemSpec); 308Assert.Equal("foo%3bbar", foo.ItemSpec); 317Assert.Equal("foo%3bbar", foo2.ItemSpec); 328Assert.Equal("foo%3bbar", foo4.ItemSpec); 344Assert.Equal("foo;bar", foo.ItemSpec); 345Assert.Equal("foo;bar", foo.EvaluatedIncludeEscaped); 354Assert.Equal("foo;bar", foo2.ItemSpec); 355Assert.Equal("foo;bar", foo2.EvaluatedIncludeEscaped); 375Assert.Equal("foo", foo.ItemSpec); 376Assert.Equal("a1%b1", foo.GetMetadata("a")); 377Assert.Equal("c1(d1", foo.GetMetadata("b")); 386Assert.Equal("foo", foo2.ItemSpec); 387Assert.Equal("a1%b1", foo2.GetMetadata("a")); 388Assert.Equal("c1(d1", foo2.GetMetadata("b")); 408Assert.Equal("foo", foo.ItemSpec); 409Assert.Equal("a1%25b1", foo.GetMetadata("a")); 410Assert.Equal("c1%28d1", foo.GetMetadata("b")); 419Assert.Equal("foo", foo2.ItemSpec); 420Assert.Equal("a1%25b1", foo2.GetMetadata("a")); 421Assert.Equal("c1%28d1", foo2.GetMetadata("b")); 432Assert.Equal("foo", foo4.ItemSpec); 433Assert.Equal("a1%25b1", foo4.GetMetadata("a")); 434Assert.Equal("c1%28d1", foo4.GetMetadata("b")); 455Assert.Equal("foo", foo.ItemSpec); 456Assert.Equal("a1(b1", foo.GetMetadata("a")); 457Assert.Equal("c1)d1", foo.GetMetadata("b")); 458Assert.Equal("a1(b1", foo.GetMetadataValueEscaped("a")); 459Assert.Equal("c1)d1", foo.GetMetadataValueEscaped("b")); 468Assert.Equal("foo", foo2.ItemSpec); 469Assert.Equal("a1(b1", foo2.GetMetadata("a")); 470Assert.Equal("c1)d1", foo2.GetMetadata("b")); 471Assert.Equal("a1(b1", foo2.GetMetadataValueEscaped("a")); 472Assert.Equal("c1)d1", foo2.GetMetadataValueEscaped("b"));
TestComparers\ProjectInstanceModelTestComparers.cs (50)
39Assert.Equal(xPair.Key, yPair.Key); 50Assert.Equal(x.OriginalProjectToolsVersion, y.OriginalProjectToolsVersion); 51Assert.Equal(x.SubToolsetVersion, y.SubToolsetVersion); 53Assert.Equal(x.Directory, y.Directory); 61Assert.Equal(xPair.Key, yPair.Key); 70Assert.Equal(xPair.Key, yPair.Key); 84Assert.Equal(x.Name, y.Name); 85Assert.Equal(x.Condition, y.Condition); 86Assert.Equal(x.Inputs, y.Inputs); 87Assert.Equal(x.Outputs, y.Outputs); 88Assert.Equal(x.Returns, y.Returns); 89Assert.Equal(x.KeepDuplicateOutputs, y.KeepDuplicateOutputs); 90Assert.Equal(x.DependsOnTargets, y.DependsOnTargets); 91Assert.Equal(x.BeforeTargets, y.BeforeTargets); 92Assert.Equal(x.AfterTargets, y.AfterTargets); 153Assert.Equal(x.Condition, y.Condition); 172Assert.Equal(x.ItemType, y.ItemType); 173Assert.Equal(x.Include, y.Include); 174Assert.Equal(x.Exclude, y.Exclude); 175Assert.Equal(x.Remove, y.Remove); 176Assert.Equal(x.KeepMetadata, y.KeepMetadata); 177Assert.Equal(x.RemoveMetadata, y.RemoveMetadata); 178Assert.Equal(x.KeepDuplicates, y.KeepDuplicates); 179Assert.Equal(x.Condition, y.Condition); 188Assert.Equal(x.MatchOnMetadata, y.MatchOnMetadata); 191Assert.Equal(x.MatchOnMetadataOptions, y.MatchOnMetadataOptions); 209Assert.Equal(x.Name, y.Name); 210Assert.Equal(x.Value, y.Value); 211Assert.Equal(x.Condition, y.Condition); 228Assert.Equal(x.Condition, y.Condition); 248Assert.Equal(x.ItemType, y.ItemType); 264Assert.Equal(x.TargetName, y.TargetName); 280Assert.Equal(x.Name, y.Name); 281Assert.Equal(x.Value, y.Value); 282Assert.Equal(x.Condition, y.Condition); 299Assert.Equal(x.ExecuteTargets, y.ExecuteTargets); 300Assert.Equal(x.Condition, y.Condition); 318Assert.Equal(x.Name, y.Name); 319Assert.Equal(x.Condition, y.Condition); 320Assert.Equal(x.ContinueOnError, y.ContinueOnError); 321Assert.Equal(x.MSBuildRuntime, y.MSBuildRuntime); 322Assert.Equal(x.MSBuildArchitecture, y.MSBuildArchitecture); 350Assert.Equal(xPair.Key, yPair.Key); 351Assert.Equal(xPair.Value.Item1, yPair.Value.Item1); 382Assert.Equal(x.ItemType, y.ItemType); 383Assert.Equal(x.TaskParameter, y.TaskParameter); 384Assert.Equal(x.Condition, y.Condition); 403Assert.Equal(x.PropertyName, y.PropertyName); 404Assert.Equal(x.TaskParameter, y.TaskParameter); 405Assert.Equal(x.Condition, y.Condition);
TestComparers\TaskRegistryComparers.cs (15)
48Assert.Equal(x.RegisteredName, y.RegisteredName); 50Assert.Equal(x.TaskFactoryAttributeName, y.TaskFactoryAttributeName); 58Assert.Equal(xp.Key, yp.Key); 59Assert.Equal(xp.Value, yp.Value); 77Assert.Equal(x.InlineTaskXmlBody, y.InlineTaskXmlBody); 85Assert.Equal(xp.Key, yp.Key); 102Assert.Equal(x.Name, y.Name); 105Assert.Equal(x.PropertyType.FullName, y.PropertyType.FullName); 126Assert.Equal(x.ToolsVersion, y.ToolsVersion); 127Assert.Equal(x.ToolsPath, y.ToolsPath); 128Assert.Equal(x.DefaultOverrideToolsVersion, y.DefaultOverrideToolsVersion); 129Assert.Equal(x.OverrideTasksPath, y.OverrideTasksPath); 136Assert.Equal(xp.Key, yp.Key); 137Assert.Equal(xp.Value.Name, yp.Value.Name); 138Assert.Equal(xp.Value.EvaluatedValue, yp.Value.EvaluatedValue);
Utilities_Tests.cs (19)
38Assert.Equal("&lt;<!-- bar; baz; --><x /><!-- bar -->", xmlContents); 47Assert.Equal("<x /><!-- bar; baz; --><!-- bar -->", xmlContents); 56Assert.Equal("<!-- bar; baz; --><!-- bar --><x />", xmlContents); 118Assert.Equal("&lt;<!----><x /><!---->", xmlContents); 127Assert.Equal("<x /><!----><!---->", xmlContents); 136Assert.Equal("<!----><!----><x />", xmlContents); 186Assert.Equal("<invalid<xml&&<", xmlContents); 199Assert.Equal("This is not a real <CDATA />, just trying to fool the reader.", xmlContents); 210Assert.Equal("whatever", xmlContents); 221Assert.Equal("This is not a real CDATA, just trying to fool the reader.", xmlContents); 232Assert.Equal("<RootOfPropValue><![CDATA[foo]]></RootOfPropValue>", xmlContents); 243Assert.Equal("foo", xmlContents); 257Assert.Equal("This is some text contain a node <xml a=\"&lt;\" />, &amp; an escaped character.", xmlContents); 268Assert.Equal("This is some text & an escaped character.", xmlContents); 280Assert.Equal("foo; biz; & boz", xmlContents); 288Assert.Equal("xyz", xmlContents); 296Assert.Equal("", xmlContents); 304Assert.Equal("-->", xmlContents); 322Assert.Equal("\"66\", \"44\"", result);
WarningsAsMessagesAndErrors_Tests.cs (5)
227Assert.Equal(ExpectedEventMessage, actualEvent.Message); 228Assert.Equal(ExpectedEventCode, actualEvent.Code); 239Assert.Equal(ExpectedEventMessage, actualEvent.Message); 240Assert.Equal(ExpectedEventCode, actualEvent.Code); 251Assert.Equal(ExpectedEventCode, actualEvent.Code);
XmakeAttributes_Tests.cs (4)
152Assert.Equal(currentArchitecture, mergedArchitecture); 155Assert.Equal(XMakeAttributes.MSBuildArchitectureValues.x64, mergedArchitecture); 158Assert.Equal(XMakeAttributes.MSBuildArchitectureValues.x86, mergedArchitecture); 161Assert.Equal(currentArchitecture, mergedArchitecture);
XmlUtilities_Tests.cs (1)
61Assert.Equal(expected, actual);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (253)
CopyRefAssemblyTests.cs (2)
77Assert.Equal("test", File.ReadAllText(dest)); 104Assert.Equal("test", File.ReadAllText(dest.Path));
CscTests.cs (66)
32Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 40Assert.Equal("/out:test1.exe test1.cs test2.cs", csc.GenerateResponseFileContents()); 49Assert.Equal("/pathmap:\"K1=V1,K2=V2\" /out:test.exe test.cs", csc.GenerateResponseFileContents()); 53Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 62Assert.Equal("/out:test.exe /deterministic+ test.cs", csc.GenerateResponseFileContents()); 67Assert.Equal("/out:test.exe /deterministic- test.cs", csc.GenerateResponseFileContents()); 71Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 80Assert.Equal("/out:test.exe /publicsign+ test.cs", csc.GenerateResponseFileContents()); 85Assert.Equal("/out:test.exe /publicsign- test.cs", csc.GenerateResponseFileContents()); 89Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 98Assert.Equal("/out:test.exe /runtimemetadataversion:v1234 test.cs", csc.GenerateResponseFileContents()); 103Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 112Assert.Equal("/out:test.exe /langversion:iso-1 test.cs", csc.GenerateResponseFileContents()); 121Assert.Equal("/out:test.exe /checksumalgorithm:sha256 test.cs", csc.GenerateResponseFileContents()); 126Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 131Assert.Equal("/out:test.exe /checksumalgorithm: test.cs", csc.GenerateResponseFileContents()); 139Assert.Equal(string.Empty, csc.GenerateResponseFileContents()); 143Assert.Equal("/instrument:TestCoverage", csc.GenerateResponseFileContents()); 147Assert.Equal("/instrument:TestCoverage,Mumble", csc.GenerateResponseFileContents()); 151Assert.Equal("/instrument:TestCoverage,Mumble,Stumble", csc.GenerateResponseFileContents()); 160Assert.Equal("/out:test.dll /target:library test.cs", csc.GenerateResponseFileContents()); 169Assert.Equal("/out:test.exe /target:bad test.cs", csc.GenerateResponseFileContents()); 178Assert.Equal("/out:x.exe test.cs", csc.GenerateResponseFileContents()); 189Assert.Equal("/define:D1;D2 /out:test.exe test.cs", csc.GenerateResponseFileContents()); 205Assert.Equal("/out:test.exe /features:a /features:b test.cs", csc.GenerateResponseFileContents()); 252Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 262Assert.Equal("/debug:full /out:test.exe test.cs", csc.GenerateResponseFileContents()); 267Assert.Equal("/debug:pdbonly /out:test.exe test.cs", csc.GenerateResponseFileContents()); 272Assert.Equal("/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 277Assert.Equal("/debug:embedded /out:test.exe test.cs", csc.GenerateResponseFileContents()); 282Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 287Assert.Equal("/debug: /out:test.exe test.cs", csc.GenerateResponseFileContents()); 297Assert.Equal(@"/debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.cs", csc.GenerateResponseFileContents()); 303Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 309Assert.Equal(@"/debug:portable /out:test.exe /sourcelink: test.cs", csc.GenerateResponseFileContents()); 319Assert.Equal(@"/debug:portable /out:test.exe /embed:test.cs /embed:test.txt test.cs", csc.GenerateResponseFileContents()); 325Assert.Equal(@"/debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.cs", csc.GenerateResponseFileContents()); 331Assert.Equal(@"/debug:portable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 337Assert.Equal(@"/debug:full /out:test.exe test.cs", csc.GenerateResponseFileContents()); 348Assert.Equal(@"/out:test.exe /embed /embed:test.cs /embed:test.txt test.cs", csc.GenerateResponseFileContents()); 354Assert.Equal(@"/out:test.exe /embed test.cs", csc.GenerateResponseFileContents()); 363Assert.Equal("/out:test.exe /refout:ref\\test.dll test.cs", csc.GenerateResponseFileContents()); 372Assert.Equal("/out:test.exe /refonly test.cs", csc.GenerateResponseFileContents()); 381Assert.Equal("/nullable:enable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 390Assert.Equal("/nullable:disable /out:test.exe test.cs", csc.GenerateResponseFileContents()); 399Assert.Equal("/nullable:safeonly /out:test.exe test.cs", csc.GenerateResponseFileContents()); 408Assert.Equal("/nullable:warnings /out:test.exe test.cs", csc.GenerateResponseFileContents()); 417Assert.Equal("/nullable:safeonlywarnings /out:test.exe test.cs", csc.GenerateResponseFileContents()); 426Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 434Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 442Assert.Equal(@"/nosdkpath", csc.GenerateResponseFileContents()); 452Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 458Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 463Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents()); 473Assert.Equal("", csc.GenerateCommandLineContents()); 474Assert.Equal(Path.Combine("path", "to", "custom_csc"), csc.GeneratePathToTool()); 479Assert.Equal("", csc.GenerateCommandLineContents()); 480Assert.Equal(Path.Combine("path", "to", "custom_csc"), csc.GeneratePathToTool()); 490Assert.Equal("", csc.GenerateCommandLineContents()); 497Assert.Equal("", csc.GenerateCommandLineContents()); 507Assert.Equal(@"/out:test.exe /analyzerconfig:.editorconfig test.cs", csc.GenerateResponseFileContents()); 512Assert.Equal($@"/out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.cs subdir{Path.DirectorySeparatorChar}test.cs", csc.GenerateResponseFileContents()); 517Assert.Equal(@"/out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.cs", csc.GenerateResponseFileContents()); 527Assert.Equal("/out:test.exe /skipanalyzers+ test.cs", csc.GenerateResponseFileContents()); 532Assert.Equal("/out:test.exe /skipanalyzers- test.cs", csc.GenerateResponseFileContents()); 536Assert.Equal("/out:test.exe test.cs", csc.GenerateResponseFileContents());
CsiTests.cs (8)
17Assert.Equal("/i- test.csx", csi.GenerateResponseFileContents()); 28Assert.Equal("/i- /features:a /features:b test.csx", csi.GenerateResponseFileContents()); 47Assert.Equal("/i- test.csx", csi.GenerateResponseFileContents()); 57Assert.Equal("/i- test.csx -Arg1 -Arg2", csi.GenerateResponseFileContents()); 66Assert.Equal(@"/i- test.csx ""C:\Some Path\Some File.ini"" ""C:\Some Path\Some Other File.bak""", csi.GenerateResponseFileContents()); 75Assert.Equal(@"/i- test.csx ""\""C:\Some Path\Some File.ini\"""" ""\""C:\Some Path\Some Other File.bak\""""", csi.GenerateResponseFileContents()); 84Assert.Equal(@"/i- test.csx", csi.GenerateResponseFileContents()); 93Assert.Equal(@"/i- test.csx", csi.GenerateResponseFileContents());
GenerateMSBuildEditorConfigTests.cs (14)
30Assert.Equal(@"is_global = true 48Assert.Equal(@"is_global = true 67Assert.Equal(@"is_global = true 89Assert.Equal(@"is_global = true 118Assert.Equal(@"is_global = true 145Assert.Equal(@"is_global = true 166Assert.Equal(@"is_global = true 188Assert.Equal(@"is_global = true 214Assert.Equal(@"is_global = true 251Assert.Equal($@"is_global = true 283Assert.Equal($@"is_global = true 321Assert.Equal(@"is_global = true 349Assert.Equal(@"is_global = true 378Assert.Equal(expectedContents, File.ReadAllText(fileName));
IntegrationTests.cs (7)
103Assert.Equal("", result.Output); 104Assert.Equal("", result.Errors); 115Assert.Equal(expectedOutput, runningResult.Output); 416Assert.Equal("", result.Output); 417Assert.Equal("", result.Errors); 421Assert.Equal("Hello\r\nthere\r\nWorld\r\n", runningResult.Output); 784Assert.Equal("", result.Errors);
MapSourceRootTests.cs (33)
60Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage1\"), task.MappedSourceRoots[0].ItemSpec); 61Assert.Equal(@"/_1/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 63Assert.Equal(Utilities.FixFilePath(@"/packages/SourcePackage2/"), task.MappedSourceRoots[1].ItemSpec); 64Assert.Equal(@"/_2/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 66Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\"), task.MappedSourceRoots[2].ItemSpec); 67Assert.Equal(@"/_/", task.MappedSourceRoots[2].GetMetadata("MappedPath")); 68Assert.Equal(@"Git", task.MappedSourceRoots[2].GetMetadata("SourceControl")); 70Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\"), task.MappedSourceRoots[3].ItemSpec); 71Assert.Equal(@"/_/a/b/", task.MappedSourceRoots[3].GetMetadata("MappedPath")); 72Assert.Equal(@"Git", task.MappedSourceRoots[3].GetMetadata("SourceControl")); 73Assert.Equal(@"some value", task.MappedSourceRoots[3].GetMetadata("some metadata")); 109Assert.Equal(Utilities.FixFilePath(@"!@#:;$%^&*()_+|{}\"), task.MappedSourceRoots[0].ItemSpec); 110Assert.Equal(@"/_1/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 112Assert.Equal(Utilities.FixFilePath("****/"), task.MappedSourceRoots[1].ItemSpec); 113Assert.Equal(@"/_/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 114Assert.Equal(@"Git", task.MappedSourceRoots[1].GetMetadata("SourceControl")); 116Assert.Equal(Utilities.FixFilePath(@"****\|||:;\"), task.MappedSourceRoots[2].ItemSpec); 117Assert.Equal(@"/_/|||:;/", task.MappedSourceRoots[2].GetMetadata("MappedPath")); 118Assert.Equal(@"Git", task.MappedSourceRoots[2].GetMetadata("SourceControl")); 186Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\"), task.MappedSourceRoots[0].ItemSpec); 187Assert.Equal(@"/_/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 189Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\a\"), task.MappedSourceRoots[1].ItemSpec); 190Assert.Equal(@"/_/a/a/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 192Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\b\"), task.MappedSourceRoots[2].ItemSpec); 193Assert.Equal(@"/_/a/b/", task.MappedSourceRoots[2].GetMetadata("MappedPath")); 195Assert.Equal(Utilities.FixFilePath(@"c:\MyProjects\MyProject\a\c\"), task.MappedSourceRoots[3].ItemSpec); 196Assert.Equal(@"/_/a/c/", task.MappedSourceRoots[3].GetMetadata("MappedPath")); 224Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage1\"), task.MappedSourceRoots[0].ItemSpec); 225Assert.Equal(@"/_/", task.MappedSourceRoots[0].GetMetadata("MappedPath")); 227Assert.Equal(Utilities.FixFilePath(@"C:\packages\SourcePackage1\"), task.MappedSourceRoots[1].ItemSpec); 228Assert.Equal(@"/_1/", task.MappedSourceRoots[1].GetMetadata("MappedPath")); 230Assert.Equal(Utilities.FixFilePath(@"c:\packages\SourcePackage2\"), task.MappedSourceRoots[2].ItemSpec); 231Assert.Equal(@"/_2/", task.MappedSourceRoots[2].GetMetadata("MappedPath"));
TargetTests.cs (62)
65Assert.Equal("true", shouldRun); 89Assert.Equal("true", shouldRun); 90Assert.Equal("true", hasItems); 114Assert.Equal("true", shouldRun); 115Assert.Equal("true", hasItems); 142Assert.Equal("true", hasItems); 169Assert.Equal("_GeneratedEditorConfigProperty", item.ItemType); 173Assert.Equal("Value", metadata.Name); 174Assert.Equal("abc", metadata.EvaluatedValue); 202Assert.Equal("_GeneratedEditorConfigProperty", item.ItemType); 206Assert.Equal("Value", metadata.Name); 207Assert.Equal("def", metadata.EvaluatedValue); 231Assert.Equal("_GeneratedEditorConfigProperty", item.ItemType); 235Assert.Equal("Value", metadata.Name); 236Assert.Equal("", metadata.EvaluatedValue); 263Assert.Equal("_GeneratedEditorConfigMetadata", item.ItemType); 267Assert.Equal("Compile", itemType.EvaluatedValue); 271Assert.Equal("CustomMeta", metaName.EvaluatedValue); 275Assert.Equal("abc", customMeta.EvaluatedValue); 305Assert.Equal("_GeneratedEditorConfigMetadata", item.ItemType); 309Assert.Equal("Compile", itemType.EvaluatedValue); 313Assert.Equal("CustomMeta", metaName.EvaluatedValue); 317Assert.Equal("abc", customMeta.EvaluatedValue); 345Assert.Equal("_GeneratedEditorConfigMetadata", item.ItemType); 349Assert.Equal("Compile", itemType.EvaluatedValue); 353Assert.Equal("CustomMeta", metaName.EvaluatedValue); 380Assert.Equal("_GeneratedEditorConfigMetadata", item.ItemType); 384Assert.Equal("Compile", itemType.EvaluatedValue); 388Assert.Equal("", metaName.EvaluatedValue); 434Assert.Equal(expectedVersion, langVersion); 435Assert.Equal(expectedVersion, maxLangVersion); 463Assert.Equal("55.0", langVersion); 464Assert.Equal("7.3", maxLangVersion); 488Assert.Equal("9.0", langVersion); 489Assert.Equal("7.3", maxLangVersion); 490Assert.Equal("7.3", publicMaxLangVersion); 515Assert.Equal("9.0", langVersion); 516Assert.Equal("7.3", maxLangVersion); 517Assert.Equal("7.3", publicMaxLangVersion); 564Assert.Equal("file1.cs", noneItems[0].EvaluatedInclude); 565Assert.Equal("Always", noneItems[0].GetMetadataValue("CopyToOutputDirectory")); 567Assert.Equal("file2.cs", noneItems[1].EvaluatedInclude); 568Assert.Equal("PreserveNewest", noneItems[1].GetMetadataValue("CopyToOutputDirectory")); 570Assert.Equal("file3.cs", noneItems[2].EvaluatedInclude); 571Assert.Equal("Never", noneItems[2].GetMetadataValue("CopyToOutputDirectory")); 587Assert.Equal("false", emit); 588Assert.Equal(string.Empty, dir); 612Assert.Equal("true", emit); 613Assert.Equal("fallbackDirectory/generated", dir); 633Assert.Equal("false", emit); 634Assert.Equal(string.Empty, dir); 663Assert.Equal(emitGeneratedFiles.ToString().ToLower(), emit); 667Assert.Equal(expectedDir, dir); 671Assert.Equal(string.Empty, dir); 705Assert.Equal(expectedSkipAnalyzersValue, actualSkipAnalyzersValue); 764Assert.Equal(expectedImplicitlySkippedAnalyzersValue, actualImplicitlySkippedAnalyzersValue); 768Assert.Equal(expectedSkipAnalyzersValue, actualSkipAnalyzersValue); 772Assert.Equal(expectedFeaturesValue, actualFeaturesValue); 825Assert.Equal(expectedLastBuildWithSkipAnalyzers, actualLastBuildWithSkipAnalyzers); 835Assert.Equal(expectedLastBuildWithSkipAnalyzers, items.Single().EvaluatedInclude); 845Assert.Equal(expectedLastBuildWithSkipAnalyzers, item.EvaluatedInclude); 846Assert.Equal("ImplicitBuild", item.GetMetadataValue("Kind"));
TestUtilities\TaskTestUtil.cs (1)
25Assert.Equal(line, rsp);
VbcTests.cs (60)
29Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 37Assert.Equal("/optionstrict:custom /out:test1.exe test1.vb test2.vb", vbc.GenerateResponseFileContents()); 46Assert.Equal("/optionstrict:custom /pathmap:\"K1=V1,K2=V2\" /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 50Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 59Assert.Equal("/optionstrict:custom /out:test.exe /deterministic+ test.vb", vbc.GenerateResponseFileContents()); 64Assert.Equal("/optionstrict:custom /out:test.exe /deterministic- test.vb", vbc.GenerateResponseFileContents()); 68Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 77Assert.Equal("/optionstrict:custom /out:test.exe /publicsign+ test.vb", vbc.GenerateResponseFileContents()); 82Assert.Equal("/optionstrict:custom /out:test.exe /publicsign- test.vb", vbc.GenerateResponseFileContents()); 86Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 95Assert.Equal("/optionstrict:custom /out:test.exe /runtimemetadataversion:v1234 test.vb", vbc.GenerateResponseFileContents()); 100Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 109Assert.Equal("/optionstrict:custom /out:test.exe /langversion:15.3 test.vb", vbc.GenerateResponseFileContents()); 118Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm:sha256 test.vb", vbc.GenerateResponseFileContents()); 123Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 128Assert.Equal("/optionstrict:custom /out:test.exe /checksumalgorithm: test.vb", vbc.GenerateResponseFileContents()); 136Assert.Equal("/optionstrict:custom", vbc.GenerateResponseFileContents()); 140Assert.Equal("/optionstrict:custom /instrument:TestCoverage", vbc.GenerateResponseFileContents()); 144Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble", vbc.GenerateResponseFileContents()); 148Assert.Equal("/optionstrict:custom /instrument:TestCoverage,Mumble,Stumble", vbc.GenerateResponseFileContents()); 157Assert.Equal("/optionstrict:custom /out:test.dll /target:library test.vb", vbc.GenerateResponseFileContents()); 166Assert.Equal("/optionstrict:custom /out:test.exe /target:bad test.vb", vbc.GenerateResponseFileContents()); 175Assert.Equal("/optionstrict:custom /out:x.exe test.vb", vbc.GenerateResponseFileContents()); 186Assert.Equal($@"/optionstrict:custom /define:""{s}"" /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 202Assert.Equal(@"/optionstrict:custom /out:test.exe /features:a /features:b test.vb", vbc.GenerateResponseFileContents()); 221Assert.Equal(@"/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 231Assert.Equal("/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 236Assert.Equal("/optionstrict:custom /debug:pdbonly /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 241Assert.Equal("/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 246Assert.Equal("/optionstrict:custom /debug:embedded /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 251Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 256Assert.Equal("/optionstrict:custom /debug: /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 266Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink:""C:\x y\z.json"" test.vb", vbc.GenerateResponseFileContents()); 272Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 278Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /sourcelink: test.vb", vbc.GenerateResponseFileContents()); 288Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:test.vb /embed:test.txt test.vb", vbc.GenerateResponseFileContents()); 294Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe /embed:""C:\x y\z.json"" test.vb", vbc.GenerateResponseFileContents()); 300Assert.Equal(@"/optionstrict:custom /debug:portable /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 306Assert.Equal(@"/optionstrict:custom /debug:full /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 312Assert.Equal(@"/optionstrict:custom /debug:full /out:""a;b.exe"" /embed:""a;b.vb"" ""a;b.vb""", vbc.GenerateResponseFileContents()); 318Assert.Equal(@"/optionstrict:custom /debug:full /out:""a, b.exe"" /embed:""a, b.vb"" ""a, b.vb""", vbc.GenerateResponseFileContents()); 329Assert.Equal(@"/optionstrict:custom /out:test.exe /embed /embed:test.vb /embed:test.txt test.vb", vbc.GenerateResponseFileContents()); 335Assert.Equal(@"/optionstrict:custom /out:test.exe /embed test.vb", vbc.GenerateResponseFileContents()); 344Assert.Equal("/optionstrict:custom /out:test.exe /refout:ref\\test.dll test.vb", vbc.GenerateResponseFileContents()); 353Assert.Equal("/optionstrict:custom /out:test.exe /refonly test.vb", vbc.GenerateResponseFileContents()); 363Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 369Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 374Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 385Assert.Equal("/doc- /optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 396Assert.Equal("/doc+ /optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 406Assert.Equal("/doc+ /optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 416Assert.Equal("/optionstrict:custom /doc:test.xml /out:test.exe test.vb", vbc.GenerateResponseFileContents()); 425Assert.Equal(@"/optionstrict:custom /sdkpath:path\to\sdk", vbc.GenerateResponseFileContents()); 434Assert.Equal(@"/optionstrict:custom /nosdkpath", vbc.GenerateResponseFileContents()); 443Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig test.vb", vbc.GenerateResponseFileContents()); 448Assert.Equal(@$"/optionstrict:custom /out:test.exe /analyzerconfig:.editorconfig /analyzerconfig:subdir\.editorconfig test.vb subdir{Path.DirectorySeparatorChar}test.vb", vbc.GenerateResponseFileContents()); 453Assert.Equal(@"/optionstrict:custom /out:test.exe /analyzerconfig:..\.editorconfig /analyzerconfig:""sub dir\.editorconfig"" test.vb", vbc.GenerateResponseFileContents()); 463Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers+ test.vb", vbc.GenerateResponseFileContents()); 468Assert.Equal("/optionstrict:custom /out:test.exe /skipanalyzers- test.vb", vbc.GenerateResponseFileContents()); 472Assert.Equal("/optionstrict:custom /out:test.exe test.vb", vbc.GenerateResponseFileContents());
Microsoft.Build.Tasks.UnitTests (596)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (4)
3051Assert.Equal(loadModeResolvedFiles[i].ItemSpec, t.ResolvedFiles[i].ItemSpec); 3052Assert.Equal(loadModeResolvedFiles[i].GetMetadata("CopyLocal"), t.ResolvedFiles[i].GetMetadata("CopyLocal")); 3053Assert.Equal(loadModeResolvedFiles[i].GetMetadata("ResolvedFrom"), t.ResolvedFiles[i].GetMetadata("ResolvedFrom")); 3095Assert.Equal(cache, t.FilesWritten[0].ItemSpec);
AssemblyNameEx_Tests.cs (7)
355Assert.Equal("A", extension.Name); 361Assert.Equal("A", extension.Name); 367Assert.Equal("A", extension.Name); 373Assert.Equal("A", extension.Name); 379Assert.Equal("A", extension.Name); 391Assert.Equal("A", extension.Name); 399Assert.Equal("A", extension.Name);
AssignCulture_Tests.cs (41)
32Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 33Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 34Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 52Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 53Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 54Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 74Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 75Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 76Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 95Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 96Assert.Equal("My Random String", t.AssignedFiles[0].GetMetadata("MyAttribute")); 97Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 98Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 117Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 118Assert.Equal("MyResource.resx", t.AssignedFiles[0].ItemSpec); 119Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 136Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 137Assert.Equal("MyResource", t.AssignedFiles[0].ItemSpec); 138Assert.Equal("MyResource", t.CultureNeutralAssignedFiles[0].ItemSpec); 156Assert.Equal(String.Empty, t.AssignedFiles[0].GetMetadata("Culture")); 157Assert.Equal("MyResource..resx", t.AssignedFiles[0].ItemSpec); 158Assert.Equal("MyResource..resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 202Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 203Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 204Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 224Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 225Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 226Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 242Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 243Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 244Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 259Assert.Equal("true", t.AssignedFiles[0].GetMetadata("WithCulture")); 260Assert.Equal(culture, t.AssignedFiles[0].GetMetadata("Culture")); 261Assert.Equal($"MyResource.{culture}.resx", t.AssignedFiles[0].ItemSpec); 262Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 281Assert.Equal("en-GB", t.AssignedFiles[0].GetMetadata("Culture")); 282Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 283Assert.Equal("MyResource.fr.resx", t.CultureNeutralAssignedFiles[0].ItemSpec); 302Assert.Equal("fr", t.AssignedFiles[0].GetMetadata("Culture")); 303Assert.Equal("MyResource.fr.resx", t.AssignedFiles[0].ItemSpec); 304Assert.Equal("MyResource.resx", t.CultureNeutralAssignedFiles[0].ItemSpec);
AssignLinkMetadata_Tests.cs (4)
77Assert.Equal(item.ItemSpec, t.OutputItems[0].ItemSpec); 81Assert.Equal(Path.Combine("SubFolder", "a.cs"), t.OutputItems[0].GetMetadata("Link")); 104Assert.Equal(item2.ItemSpec, t.OutputItems[0].ItemSpec); 108Assert.Equal(Path.Combine("SubFolder", "a.cs"), t.OutputItems[0].GetMetadata("Link"));
CodeTaskFactoryTests.cs (1)
1228Assert.Equal("MSB4801", error.Code);
CommandLineBuilderExtension_Tests.cs (2)
46Assert.Equal(@"/myswitch:MyResource.bmp,Kenny,Private", c.ToString()); 91Assert.Equal(
ConvertToAbsolutePath_Tests.cs (1)
106Assert.Equal(testFile.FullName, t.AbsolutePaths[0].ItemSpec);
Copy_Tests.cs (55)
736Assert.Equal("This is a destination file.", destinationContent); 803Assert.Equal("This is a source file.", destinationContent); 937Assert.Equal("This is a source file.", destinationContent); 1009Assert.Equal("This is a source file1.", destinationContent1); 1011Assert.Equal("This is a source file2.", destinationContent2); 1076Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 1156Assert.Equal("This is a source temp file.", File.ReadAllText(destinationFile)); 1618Assert.Equal(validOutFile, t.CopiedFiles[0].ItemSpec); 1620Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 1623Assert.Equal(invalidFile, t.DestinationFiles[0].ItemSpec); 1624Assert.Equal(validOutFile, t.DestinationFiles[1].ItemSpec); 1625Assert.Equal(validOutFile, t.CopiedFiles[0].ItemSpec); 1628Assert.Equal("en-GB", t.SourceFiles[1].GetMetadata("Locale")); 1629Assert.Equal("taupe", t.SourceFiles[1].GetMetadata("Color")); 1632Assert.Equal("Pumpkin", t.DestinationFiles[1].GetMetadata("Flavor")); 1633Assert.Equal("Pumpkin", t.CopiedFiles[0].GetMetadata("Flavor")); 1636Assert.Equal("taupe", t.DestinationFiles[1].GetMetadata("Color")); 1637Assert.Equal("taupe", t.CopiedFiles[0].GetMetadata("Color")); 1640Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 1641Assert.Equal("fr", t.CopiedFiles[0].GetMetadata("Locale")); 1693Assert.Equal(file, t.DestinationFiles[0].ItemSpec); 1712Assert.Equal(file, t.DestinationFiles[0].ItemSpec); 1764Assert.Equal(filename.ToLowerInvariant(), t.DestinationFiles[0].ItemSpec); 1819Assert.Equal(file, t.DestinationFiles[0].ItemSpec); 1820Assert.Equal(dest2, t.DestinationFiles[1].ItemSpec); 1821Assert.Equal(file, t.CopiedFiles[0].ItemSpec); 1897Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 1901Assert.Equal(destFile, t.DestinationFiles[0].ItemSpec); 1902Assert.Equal(destFile, t.CopiedFiles[0].ItemSpec); 1958Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 1962Assert.Equal(destFile, t.DestinationFiles[0].ItemSpec); 1963Assert.Equal(destFile, t.CopiedFiles[0].ItemSpec); 2095Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[0].Key.Name); 2096Assert.Equal(Path.Combine(tempPath, "b.cs"), xaCopies[1].Key.Name); 2097Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[2].Key.Name); 2102Assert.Equal(Path.Combine(tempPath, "a.cs"), xbCopies[0].Key.Name); 2584Assert.Equal("This is a source temp file.", destinationFileContents); 2588Assert.Equal(destFile, t.DestinationFiles[0].ItemSpec); 2589Assert.Equal(destFile, t.CopiedFiles[0].ItemSpec); 2598Assert.Equal("This is another source temp file.", destinationFileContents); // "Expected the destination hard linked file to contain the contents of source file. Even after modification of the source" 2681Assert.Equal("This is source temp file 1.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 2683Assert.Equal("This is source temp file 2.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 2687Assert.Equal(destFile1, t.DestinationFiles[0].ItemSpec); 2688Assert.Equal(destFile2, t.DestinationFiles[1].ItemSpec); 2689Assert.Equal(destFile1, t.CopiedFiles[0].ItemSpec); 2690Assert.Equal(destFile2, t.CopiedFiles[1].ItemSpec); 2699Assert.Equal("This is source temp file 1.", destinationFileContents); // "Expected the destination copied file to contain the contents of original source file only." 2776Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 2780Assert.Equal(destFile, t.DestinationFiles[0].ItemSpec); 2781Assert.Equal(destFile, t.CopiedFiles[0].ItemSpec); 2790Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination copied file to contain the contents of original source file only." 2841Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination symbolic linked file to contain the contents of source file." 2845Assert.Equal(destFile, t.DestinationFiles[0].ItemSpec); 2846Assert.Equal(destFile, t.CopiedFiles[0].ItemSpec); 2856Assert.Equal("This is another source temp file.", destinationFileContents); // "Expected the destination hard linked file to contain the contents of source file. Even after modification of the source"
CreateCSharpManifestResourceName_Tests.cs (28)
44Assert.Equal("MyStuff.Namespace.Class", result); 92Assert.Equal(className, result); 126Assert.Equal("d\u00C4a.Class", result); 146Assert.Equal("Namespace.Class", result); 166Assert.Equal("MyStuff.Namespace.Class", result); 186Assert.Equal("MyStuff.Namespace.Class.en-GB", result); 207Assert.Equal("MyStuff.Namespace.Class.en-GB", result); 227Assert.Equal("MyStuff.Namespace.Class.fr-fr", result); 248Assert.Equal("RootNamespace.SubFolder.MyForm.en-GB", result); 289Assert.Equal("RootNamespace.XmlEditor.rgs", result); 309Assert.Equal("RootNamespace.SubFolder.SplashScreen.bmp", result); 329Assert.Equal(FileUtilities.FixFilePath(@"fr\RootNamespace.SubFolder.SplashScreen.bmp"), result); 349Assert.Equal(@"RootNamespace.SubFolder.SplashScreen.bmp", result); 375Assert.Equal(@"CustomToolTest.SR1", resourceNames[0].ItemSpec); 625Assert.Equal(result, expected); 699Assert.Equal("ClassLibrary1.MyForm", result); 726Assert.Equal("RootNamespace.MyForm.en-GB", result); 808Assert.Equal(@"strings.resx", resourceFiles[0].ItemSpec); 809Assert.Equal(@"ResourceRoot.strings", resourceFiles[0].GetMetadata("ManifestResourceName")); 834Assert.Equal(@"pic.bmp", resourceFiles[0].ItemSpec); 835Assert.Equal(@"ResourceRoot.pic.bmp", resourceFiles[0].GetMetadata("LogicalName")); 860Assert.Equal(@"pic.bmp", resourceFiles[0].ItemSpec); 861Assert.Equal(@"foo", resourceFiles[0].GetMetadata("LogicalName")); 885Assert.Equal(@"strings.resx", resourceFiles[0].ItemSpec); 886Assert.Equal(String.Empty, resourceFiles[0].GetMetadata("LogicalName")); 906Assert.Equal(@"RootNamespace.SubFolder.MyResource.fr.resources", result); 926Assert.Equal(@"RootNamespace.MyResource.fr.resources", result); 946Assert.Equal(@"RootNamespace.MyResource.resources", result);
CreateItem_Tests.cs (5)
83Assert.Equal("MyFile.txt", t.Include[0].ItemSpec); 101Assert.Equal(t.Include[0].ItemSpec, t.Include[0].ItemSpec); 236Assert.Equal("SomeValue", t.Include[0].GetMetadata("MyMetaData")); 259Assert.Equal("SomePreserveMeValue", t.Include[0].GetMetadata("MyMetaData")); 284Assert.Equal("SomeOverwriteValue", t.Include[0].GetMetadata("MyMetaData"));
Culture_Tests.cs (4)
22Assert.Equal("fr", info.culture); 23Assert.Equal("MyResource.resx", info.cultureNeutralFilename); 36Assert.Equal("MyResource.resx", info.cultureNeutralFilename); 52Assert.Equal("MyResource.notalocale.resx", info.cultureNeutralFilename);
Delete_Tests.cs (2)
36Assert.Equal("en-GB", t.DeletedFiles[0].GetMetadata("Locale")); 39Assert.Equal("MyFiles.nonexistent", t.DeletedFiles[0].ItemSpec);
DirectoryBuildProjectImportTestBase.cs (4)
88Assert.Equal(String.Empty, project.GetPropertyValue(DirectoryBuildProjectPathPropertyName)); 122Assert.Equal(String.Empty, project.GetPropertyValue(DirectoryBuildProjectPathPropertyName)); 150Assert.Equal(customFilePath, project.GetPropertyValue(DirectoryBuildProjectPathPropertyName)); 177Assert.Equal(Path.Combine(ObjectModelHelpers.TempProjectDir, DirectoryBuildProjectFile), project.GetPropertyValue(DirectoryBuildProjectPathPropertyName));
EscapingUtilities_Tests.cs (23)
18Assert.Equal("", EscapingUtilities.UnescapeAll("")); 19Assert.Equal("foo", EscapingUtilities.UnescapeAll("foo")); 20Assert.Equal("foo space", EscapingUtilities.UnescapeAll("foo%20space")); 21Assert.Equal("foo2;", EscapingUtilities.UnescapeAll("foo2%3B")); 22Assert.Equal(";foo3", EscapingUtilities.UnescapeAll("%3bfoo3")); 23Assert.Equal(";", EscapingUtilities.UnescapeAll("%3b")); 24Assert.Equal(";;;;;", EscapingUtilities.UnescapeAll("%3b%3B;%3b%3B")); 25Assert.Equal("%3B", EscapingUtilities.UnescapeAll("%253B")); 26Assert.Equal("===%ZZ %%%===", EscapingUtilities.UnescapeAll("===%ZZ%20%%%===")); 27Assert.Equal("hello; escaping% how( are) you?", EscapingUtilities.UnescapeAll("hello%3B escaping%25 how%28 are%29 you%3f")); 29Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25*?*%25*")); 30Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25%2a%3f%2a%25%2a")); 32Assert.Equal("*Star*craft or *War*cr@ft??", EscapingUtilities.UnescapeAll("%2aStar%2Acraft%20or %2aWar%2Acr%40ft%3f%3F")); 40Assert.Equal("%2a", EscapingUtilities.Escape("*")); 41Assert.Equal("%3f", EscapingUtilities.Escape("?")); 42Assert.Equal("#%2a%3f%2a#%2a", EscapingUtilities.Escape("#*?*#*")); 43Assert.Equal("%25%2a%3f%2a%25%2a", EscapingUtilities.Escape("%*?*%*")); 52Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 55Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 58Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 67Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 70Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 73Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text)));
Exec_Tests.cs (5)
289Assert.Equal(working, exec.WorkingDirectory); 292Assert.Equal(system, exec.GetWorkingDirectoryAccessor()); 598Assert.Equal(expectedEncoding, exec.StdOutEncoding); 599Assert.Equal(expectedEncoding, exec.StdErrEncoding); 824Assert.Equal("foo", exec.WorkingDirectory);
FileStateTests.cs (4)
85Assert.Equal(info.FullName, state.Name); 214Assert.Equal(info.FullName, state.Name); 219Assert.Equal(originalName, state.Name); 221Assert.Equal(originalName, state.Name); // Name is from the constructor, didn't change
FindAppConfigFile_Tests.cs (9)
25Assert.Equal("app.config", f.AppConfigFile.ItemSpec); 26Assert.Equal("targetpath", f.AppConfigFile.GetMetadata("TargetPath")); 38Assert.Equal("app.config", f.AppConfigFile.ItemSpec); 39Assert.Equal("targetpath", f.AppConfigFile.GetMetadata("TargetPath")); 51Assert.Equal(FileUtilities.FixFilePath("foo\\app.config"), f.AppConfigFile.ItemSpec); 52Assert.Equal("targetpath", f.AppConfigFile.GetMetadata("TargetPath")); 77Assert.Equal(FileUtilities.FixFilePath(@"foo\\app.config"), f.AppConfigFile.ItemSpec); 94Assert.Equal("app.config", f.AppConfigFile.ItemSpec); 95Assert.Equal(item2.GetMetadata("id"), f.AppConfigFile.GetMetadata("id"));
FindInList_Tests.cs (8)
25Assert.Equal("A.CS", f.ItemFound.ItemSpec); 37Assert.Equal("a.cs", f.ItemFound.ItemSpec); 64Assert.Equal("a.cs", f.ItemFound.ItemSpec); 65Assert.Equal(item1.GetMetadata("id"), f.ItemFound.GetMetadata("id")); 84Assert.Equal("a.cs", f.ItemFound.ItemSpec); 85Assert.Equal(item2.GetMetadata("id"), f.ItemFound.GetMetadata("id")); 120Assert.Equal(FileUtilities.FixFilePath(@"c:\foo\a.cs"), f.ItemFound.ItemSpec); 135Assert.Equal(FileUtilities.FixFilePath(@"foo\a.cs"), f.ItemFound.ItemSpec);
FindInvalidProjectReferences_Tests.cs (2)
58Assert.Equal("proj3.proj", t.InvalidReferences[0].ItemSpec); 59Assert.Equal("proj4.proj", t.InvalidReferences[1].ItemSpec);
FindUnderPath_Tests.cs (6)
35Assert.Equal(FileUtilities.FixFilePath(@"C:\MyProject\File1.txt"), t.InPath[0].ItemSpec); 36Assert.Equal(FileUtilities.FixFilePath(@"C:\SomeoneElsesProject\File2.txt"), t.OutOfPath[0].ItemSpec); 111Assert.Equal(testFile.FullName, t.InPath[0].ItemSpec); 112Assert.Equal(NativeMethodsShared.IsWindows ? @"C:\SomeoneElsesProject\File2.txt" : "/SomeoneElsesProject/File2.txt", 133Assert.Equal(testFile.Name, t.InPath[0].ItemSpec); 134Assert.Equal(NativeMethodsShared.IsWindows ? @"C:\SomeoneElsesProject\File2.txt" : "/SomeoneElsesProject/File2.txt",
GetInstalledSDKLocations_Tests.cs (18)
296Assert.Equal("1.0", sdksAndVersions["MyAssembly, Version=1.0"]); 297Assert.Equal("1.0", sdksAndVersions["MyAssembly, Version=2.0"]); 298Assert.Equal("2.0", sdksAndVersions["MyAssembly, Version=3.0"]); 299Assert.Equal("1.0", sdksAndVersions["MyAssembly, Version=4.0"]); 300Assert.Equal("1.0", sdksAndVersions["MyAssembly, Version=5.0"]); 301Assert.Equal("2.0", sdksAndVersions["MyAssembly, Version=6.0"]); 343Assert.Equal( 349Assert.Equal( 355Assert.Equal( 362Assert.Equal( 368Assert.Equal( 374Assert.Equal( 417Assert.Equal( 423Assert.Equal( 429Assert.Equal( 436Assert.Equal( 442Assert.Equal( 448Assert.Equal(
GetSDKReference_Tests.cs (35)
301Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]); 302Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]); 307Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[0]); 308Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[1]); 313Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\X86\\"), sdkFolders[0]); 314Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\Retail\\Neutral\\"), sdkFolders[1]); 315Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\X86\\"), sdkFolders[2]); 316Assert.Equal(Path.Combine(sdkDirectory, folderName + "\\CommonConfiguration\\Neutral\\"), sdkFolders[3]); 474Assert.Equal("B.xml", Path.GetFileName(t.CopyLocalFiles[2].ItemSpec)); 686Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec)); 687Assert.Equal("true", t.References[0].GetMetadata("WinMDFile")); 688Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType")); 689Assert.Equal("false", t.References[0].GetMetadata("CopyLocal")); 693Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec)); 694Assert.Equal("false", t.References[4].GetMetadata("WinMDFile")); 696Assert.Equal("false", t.References[4].GetMetadata("CopyLocal")); 828Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec)); 829Assert.Equal("SDKWithManifest, Version=2.0", t.References[0].GetMetadata("ReferenceGrouping")); 831Assert.Equal("true", t.References[0].GetMetadata("WinMDFile")); 832Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType")); 833Assert.Equal("false", t.References[0].GetMetadata("CopyLocal")); 837Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec)); 838Assert.Equal("false", t.References[4].GetMetadata("WinMDFile")); 840Assert.Equal("false", t.References[4].GetMetadata("CopyLocal")); 880Assert.Equal("A.winmd", Path.GetFileName(t.References[0].ItemSpec)); 881Assert.Equal("true", t.References[0].GetMetadata("WinMDFile")); 882Assert.Equal("SDKWithManifest, Version=2.0", t.References[0].GetMetadata("ReferenceGrouping")); 883Assert.Equal("Managed", t.References[0].GetMetadata("WinMDFileType")); 884Assert.Equal("SDKWithManifestDisplayName", t.References[0].GetMetadata("ReferenceGroupingDisplayName")); 885Assert.Equal("false", t.References[0].GetMetadata("CopyLocal")); 889Assert.Equal("E.dll", Path.GetFileName(t.References[4].ItemSpec)); 890Assert.Equal("false", t.References[4].GetMetadata("WinMDFile")); 892Assert.Equal("false", t.References[4].GetMetadata("CopyLocal")); 965Assert.Equal("A.dll", Path.GetFileName(t.RedistFiles[0].ItemSpec)); 981Assert.Equal("Super", t.RedistFiles[2].GetMetadata("Root"));
Hash_Tests.cs (7)
26Assert.Equal(expectedHash, actualHash); 33Assert.Equal(expectedHash, actualHash2); 65Assert.Equal(expectedHash, actualHash); 82Assert.Equal(expectedHash, actualHash); 143Assert.Equal(uppercaseHash, lowercaseHash); 144Assert.Equal(uppercaseHash, mixedcaseHash); 145Assert.Equal(mixedcaseHash, lowercaseHash);
MakeDir_Tests.cs (9)
44Assert.Equal(dir, t.DirectoriesCreated[0].ItemSpec); 48Assert.Equal("en-GB", t.DirectoriesCreated[0].GetMetadata("Locale")); 51Assert.Equal(dir, t.DirectoriesCreated[0].ItemSpec); 95Assert.Equal(dir2, t.DirectoriesCreated[1].ItemSpec); 103Assert.Equal(dir2, t.DirectoriesCreated[2].ItemSpec); 106Assert.Equal(dir, t.DirectoriesCreated[0].ItemSpec); 147Assert.Equal(dir, t.DirectoriesCreated[0].ItemSpec); 158Assert.Equal(dir, t.DirectoriesCreated[0].ItemSpec); 215Assert.Equal(dir, t.DirectoriesCreated[0].ItemSpec);
Move_Tests.cs (28)
52Assert.Equal(destinationFile, t.DestinationFiles[0].ItemSpec); 98Assert.Equal(destinationFile, t.DestinationFiles[0].ItemSpec); 146Assert.Equal(destinationFile, t.DestinationFiles[0].ItemSpec); 155Assert.Equal("This is a destination temp file.", destinationFileContents); // "Expected the destination file to still contain the contents of destination file." 240Assert.Equal("This is a destination temp file.", destinationFileContents); // "Expected the destination file to be unchanged." 292Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 348Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 402Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 460Assert.Equal(validOutFile, t.MovedFiles[0].ItemSpec); 462Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 465Assert.Equal(invalidFile, t.DestinationFiles[0].ItemSpec); 466Assert.Equal(validOutFile, t.DestinationFiles[1].ItemSpec); 467Assert.Equal(validOutFile, t.MovedFiles[0].ItemSpec); 470Assert.Equal("en-GB", t.SourceFiles[1].GetMetadata("Locale")); 471Assert.Equal("taupe", t.SourceFiles[1].GetMetadata("Color")); 474Assert.Equal("Pumpkin", t.DestinationFiles[1].GetMetadata("Flavor")); 475Assert.Equal("Pumpkin", t.MovedFiles[0].GetMetadata("Flavor")); 478Assert.Equal("taupe", t.DestinationFiles[1].GetMetadata("Color")); 479Assert.Equal("taupe", t.MovedFiles[0].GetMetadata("Color")); 482Assert.Equal("fr", t.DestinationFiles[1].GetMetadata("Locale")); 483Assert.Equal("fr", t.MovedFiles[0].GetMetadata("Locale")); 619Assert.Equal(filename.ToLowerInvariant(), t.DestinationFiles[0].ItemSpec); 663Assert.Equal(file, t.DestinationFiles[0].ItemSpec); 664Assert.Equal(dest2, t.DestinationFiles[1].ItemSpec); 666Assert.Equal(file, t.MovedFiles[0].ItemSpec); 712Assert.Equal("This is a source temp file.", destinationFileContents); // "Expected the destination file to contain the contents of source file." 716Assert.Equal(destFile, t.DestinationFiles[0].ItemSpec); 717Assert.Equal(destFile, t.MovedFiles[0].ItemSpec);
MSBuild_Tests.cs (5)
1348Assert.Equal("|a", msbuildTask.TargetOutputs[0].ItemSpec); 1349Assert.Equal("A|b", msbuildTask.TargetOutputs[1].ItemSpec); 1350Assert.Equal("B|c", msbuildTask.TargetOutputs[2].ItemSpec); 1351Assert.Equal("C|d", msbuildTask.TargetOutputs[3].ItemSpec); 1352Assert.Equal("D|", msbuildTask.TargetOutputs[4].ItemSpec);
NativeMethodsShared_Tests.cs (1)
152Assert.Equal(currentDirectory, Directory.GetCurrentDirectory());
PropertyParser_Tests.cs (16)
37Assert.Equal("Debug", propertiesTable["Configuration"]); 56Assert.Equal("Debug", propertiesTable["Configuration"]); 57Assert.Equal("AnyCPU", propertiesTable["Platform"]); 58Assert.Equal("Lab22Dev", propertiesTable["VBL"]); 76Assert.Equal("Debug", propertiesTable["Configuration"]); 77Assert.Equal("AnyCPU", propertiesTable["Platform"]); 95Assert.Equal("", propertiesTable["Configuration"]); 96Assert.Equal("", propertiesTable["Platform"]); 132Assert.Equal("Clean; Build", propertiesTable["DependsOn"]); 149Assert.Equal("CleanBuild", propertiesTable["Depends On"]); 165Assert.Equal("Debug", propertiesTable["Configuration"]); 166Assert.Equal("Any CPU", propertiesTable["Platform"]); 182Assert.Equal("1234;5678;9999", propertiesTable["WarningsAsErrors"]); 183Assert.Equal("Debug", propertiesTable["Configuration"]); 199Assert.Equal(@"c:\Rajeev%3bs Stuff\binaries", propertiesTable["OutDir"]); 200Assert.Equal("Debug", propertiesTable["Configuration"]);
ReadLinesFromFile_Tests.cs (12)
47Assert.Equal("Line1", r.Lines[0].ItemSpec); 56Assert.Equal("Line1", r.Lines[0].ItemSpec); 57Assert.Equal("Line2", r.Lines[1].ItemSpec); 58Assert.Equal("Line3", r.Lines[2].ItemSpec); 94Assert.Equal("Line1_%3b_", r.Lines[0].ItemSpec); 103Assert.Equal("Line1_%3b_", r.Lines[0].ItemSpec); 104Assert.Equal("Line2", r.Lines[1].ItemSpec); 105Assert.Equal("Line3", r.Lines[2].ItemSpec); 139Assert.Equal("My special character is \u00C3", r.Lines[0].ItemSpec); 199Assert.Equal("Line1", r.Lines[0].ItemSpec); 200Assert.Equal("Line2", r.Lines[1].ItemSpec); 201Assert.Equal("Line3", r.Lines[2].ItemSpec);
RemoveDuplicates_Tests.cs (11)
28Assert.Equal("MyFile.txt", t.Filtered[0].ItemSpec); 46Assert.Equal("MyFile.txt", t.Filtered[0].ItemSpec); 71Assert.Equal("MyFile2.txt", t.Filtered[0].ItemSpec); 72Assert.Equal("MyFile1.txt", t.Filtered[1].ItemSpec); 73Assert.Equal("MyFile3.txt", t.Filtered[2].ItemSpec); 97Assert.Equal("MyFile2.txt", t.Filtered[0].ItemSpec); 98Assert.Equal("MyFile1.txt", t.Filtered[1].ItemSpec); 99Assert.Equal("MyFile3.txt", t.Filtered[2].ItemSpec); 116Assert.Equal("MyFile1.txt", t.Filtered[0].ItemSpec); 117Assert.Equal("MyFile2.txt", t.Filtered[1].ItemSpec); 135Assert.Equal("MyFile.txt", t.Filtered[0].ItemSpec);
ResolveCodeAnalysisRuleSet_Tests.cs (4)
90Assert.Equal(expected: codeAnalysisRuleSet, actual: resolvedRuleSet); 136Assert.Equal(expected: codeAnalysisRuleSet, actual: resolvedRuleSet); 187Assert.Equal(expected: ruleSetFullPath, actual: resolvedRuleSet); 265Assert.Equal(expected: codeAnalysisRuleSet, actual: resolvedRuleSet);
ResolveNonMSBuildProjectOutput_Tests.cs (3)
67Assert.Equal(missingAttr, expectedMissingAttribute); 119Assert.Equal(resolvedPath.ItemSpec, expectedPath); 232Assert.Equal("true", ((ITaskItem)resolvedOutputs[Path.Combine("obj", "managed.dll")]).GetMetadata("ManagedAssembly"));
ResolveSDKReference_Tests.cs (92)
82Assert.Equal("foo", parsedDependencies[0]); 86Assert.Equal("bar, Version=1.0", parsedDependencies[0]); 87Assert.Equal("foo, Version=2.0", parsedDependencies[1]); 107Assert.Equal("\"bar, Version=1.0\"", result[0]); 108Assert.Equal("\"bar, Version=2.0\"", result[1]); 109Assert.Equal("\"baz, Version=2.0\"", result[2]); 117Assert.Equal("\"bar, Version=2.0\"", result[0]); 118Assert.Equal("\"baz, Version=2.0\"", result[1]); 342Assert.Equal("true", reference.ResolvedItem.GetMetadata("RuntimeReferenceOnly")); 451Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 513Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 554Assert.Equal(simpleName, reference.SimpleName); 555Assert.Equal(version, reference.Version); 1096Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1134Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1175Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1182Assert.Equal("Retail", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration")); 1183Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture")); 1213Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1252Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1286Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1357Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1424Assert.Equal(_sdkPath, t.ResolvedSDKReferences[0].ItemSpec); 1532Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 1533Assert.Equal(goodSDKLocation, t.ResolvedSDKReferences[1].ItemSpec); 1759Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 1858Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 1859Assert.Equal("MetadataIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1860Assert.Equal("PlatformIdentity", t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity")); 1861Assert.Equal("Metadata AppxLocation", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1862Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType")); 1863Assert.Equal("Error", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 1864Assert.Equal("ManifestDisplayName", t.ResolvedSDKReferences[0].GetMetadata("DisplayName")); 1865Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyRedist")); 1866Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("ExpandReferenceAssemblies")); 1867Assert.Equal("True", t.ResolvedSDKReferences[0].GetMetadata("CopyLocalExpandedReferenceAssemblies")); 1868Assert.Equal("Custom", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration")); 1869Assert.Equal("Neutral", t.ResolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture")); 1871Assert.Equal("MyRedistSubDirectory", t.ResolvedSDKReferences[0].GetMetadata("CopyRedistToSubDirectory")); 1872Assert.Equal("9.0", t.ResolvedSDKReferences[0].GetMetadata("MaxPlatformVersion")); 1873Assert.Equal("3.3.3", t.ResolvedSDKReferences[0].GetMetadata("MaxOSVersionTested")); 1874Assert.Equal("3.3.3", t.ResolvedSDKReferences[0].GetMetadata("MinOSVersion")); 1937Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 1938Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 1939Assert.Equal("Neutral|RetailX86Location", t.ResolvedSDKReferences[0].GetMetadata("AppXLocation")); 1940Assert.Equal("External", t.ResolvedSDKReferences[0].GetMetadata("SDKType")); 2008Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2072Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2148Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2216Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2217Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 2218Assert.Equal("Good Platform", t.ResolvedSDKReferences[0].GetMetadata("PlatformIdentity")); 2286Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2500Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2574Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2575Assert.Equal("MyFamily", t.ResolvedSDKReferences[0].GetMetadata("ProductFamilyName")); 2641Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2642Assert.Equal("MetadataFamily", t.ResolvedSDKReferences[0].GetMetadata("ProductFamilyName")); 2705Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2706Assert.Equal("Allow", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 2773Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2774Assert.Equal("Warning", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 2870Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2871Assert.Equal(testDirectory2, t.ResolvedSDKReferences[1].ItemSpec); 2872Assert.Equal(testDirectory3, t.ResolvedSDKReferences[2].ItemSpec); 2968Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 2969Assert.Equal(testDirectory2, t.ResolvedSDKReferences[1].ItemSpec); 2970Assert.Equal(testDirectory3, t.ResolvedSDKReferences[2].ItemSpec); 3080Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 3081Assert.Equal(testDirectory2, t.ResolvedSDKReferences[1].ItemSpec); 3082Assert.Equal(testDirectory3, t.ResolvedSDKReferences[2].ItemSpec); 3083Assert.Equal(testDirectory4, t.ResolvedSDKReferences[3].ItemSpec); 3179Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 3180Assert.Equal(testDirectory2, t.ResolvedSDKReferences[1].ItemSpec); 3181Assert.Equal(testDirectory3, t.ResolvedSDKReferences[2].ItemSpec); 3255Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 3258Assert.Equal("Allow", t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 3262Assert.Equal(manifestEntry, t.ResolvedSDKReferences[0].GetMetadata("SupportsMultipleVersions")); 3330Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 3474Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 3475Assert.Equal("GoodTestSDKIdentity", t.ResolvedSDKReferences[0].GetMetadata("FrameworkIdentity")); 3610Assert.Equal(testDirectory, t.ResolvedSDKReferences[0].ItemSpec); 4172Assert.Equal("Retail", resolvedSDKReferences[0].GetMetadata("TargetedSDKConfiguration")); 4173Assert.Equal("Neutral", resolvedSDKReferences[0].GetMetadata("TargetedSDKArchitecture")); 4302Assert.Equal("http://msdn.microsoft.com/MySDK", resolvedSDKReferences1[0].GetMetadata("MoreInfo")); 4303Assert.Equal("9.0", resolvedSDKReferences1[0].GetMetadata("MaxPlatformVersion")); 4304Assert.Equal("6.2.0", resolvedSDKReferences1[0].GetMetadata("MinOSVersion")); 4305Assert.Equal("6.2.3", resolvedSDKReferences1[0].GetMetadata("MaxOSVersionTested")); 4311Assert.Equal("http://msdn.microsoft.com/MySDK", resolvedSDKReferences2[0].GetMetadata("MoreInfo")); 4312Assert.Equal(String.Empty, resolvedSDKReferences2[0].GetMetadata("MaxPlatformVersion")); 4313Assert.Equal(String.Empty, resolvedSDKReferences2[0].GetMetadata("MinOSVersion")); 4314Assert.Equal(String.Empty, resolvedSDKReferences2[0].GetMetadata("MaxOSVersionTested"));
ResourceHandling\GenerateResource_Tests.cs (97)
73Assert.Equal("InputValue", t.OutputResources[0].GetMetadata("Attribute")); 75Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 77Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 128Assert.Equal(expectedOutFile0, t.Sources[0].GetMetadata("OutputResource")); 129Assert.Equal(expectedOutFile1, t.Sources[1].GetMetadata("OutputResource")); 130Assert.Equal(expectedOutFile2, t.Sources[2].GetMetadata("OutputResource")); 131Assert.Equal(expectedOutFile3, t.Sources[3].GetMetadata("OutputResource")); 161Assert.Equal("InputValue", t.OutputResources[0].GetMetadata("Attribute")); 163Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 165Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 212Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 213Assert.Equal(t.FilesWritten[0].ItemSpec, resourcesFile); 250Assert.Equal(".resx", Path.GetExtension(t.FilesWritten[0].ItemSpec)); 257Assert.Equal(".txt", Path.GetExtension(t2a.FilesWritten[0].ItemSpec)); 264Assert.Equal(".resx", Path.GetExtension(t2b.FilesWritten[0].ItemSpec)); 267Assert.Equal(Utilities.ReadFileContent(t.OutputResources[0].ItemSpec), 303Assert.Equal(".txt", Path.GetExtension(resourcesFile)); 304Assert.Equal(Utilities.GetTestTextContent(null, null, true /*cleaned up */), Utilities.ReadFileContent(resourcesFile)); 748Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 750Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 805Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile1); 806Assert.Equal(t.FilesWritten[0].ItemSpec, resourcesFile1); 807Assert.Equal(t.OutputResources[1].ItemSpec, resourcesFile2); 808Assert.Equal(t.FilesWritten[1].ItemSpec, resourcesFile2); 824Assert.Equal(t2.OutputResources[0].ItemSpec, resourcesFile1); 825Assert.Equal(t2.FilesWritten[0].ItemSpec, resourcesFile1); 826Assert.Equal(t2.OutputResources[1].ItemSpec, resourcesFile2); 827Assert.Equal(t2.FilesWritten[1].ItemSpec, resourcesFile2); 1041Assert.Equal(".resx", Path.GetExtension(resourcesFile)); 1071Assert.Equal(".resx", Path.GetExtension(t.FilesWritten[0].ItemSpec)); 1078Assert.Equal(".resources", Path.GetExtension(t2a.FilesWritten[0].ItemSpec)); 1086Assert.Equal(".resx", Path.GetExtension(t2b.FilesWritten[0].ItemSpec)); 1089Assert.Equal(Utilities.ReadFileContent(t.OutputResources[0].ItemSpec), 1122Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1133Assert.Equal(".txt", Path.GetExtension(resourcesFile)); 1135Assert.Equal(Utilities.GetTestTextContent(null, null, true /*cleaned up */), Utilities.ReadFileContent(resourcesFile)); 1170Assert.Equal(t.StronglyTypedClassName, stronglyTypedClassName); 1171Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1173Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1177Assert.Equal(t.FilesWritten[2].ItemSpec, stronglyTypedFileName); 1233Assert.Equal(t.StronglyTypedClassName, stronglyTypedClassName); 1234Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1236Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1241Assert.Equal(t.FilesWritten[2].ItemSpec, stronglyTypedFileName); 1269Assert.Equal(t2.OutputResources[0].ItemSpec, resourcesFile); 1270Assert.Equal(t2.FilesWritten[0].ItemSpec, resourcesFile); 1273Assert.Equal(t2.FilesWritten[2].ItemSpec, Path.ChangeExtension(t2.Sources[0].ItemSpec, ".cs")); 1324Assert.Equal(t.StronglyTypedClassName, stronglyTypedClassName); 1326Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1328Assert.Equal(t.FilesWritten[2].ItemSpec, strFile); 1356Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile); 1358Assert.Equal(t.FilesWritten[2].ItemSpec, strFile); 1417Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1419Assert.Equal(".resources", Path.GetExtension(t.FilesWritten[0].ItemSpec)); 1423Assert.Equal(t.FilesWritten[1].ItemSpec, strFile); 1424Assert.Equal(t.StronglyTypedFileName, strFile); 1477Assert.Equal(t.FilesWritten[2].ItemSpec, stronglyTypedFileName); 1480Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1482Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1536Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1538Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1544Assert.Equal(t.StronglyTypedFileName, STRfile); 1548Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec)); 1594Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1596Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1602Assert.Equal(t.StronglyTypedFileName, STRfile); 1606Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec)); 1789Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile2); 1791Assert.Equal(t.FilesWritten[0].ItemSpec, resourcesFile2); 1868Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile2); 1870Assert.Equal(t.FilesWritten[0].ItemSpec, resourcesFile2); 1977Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 1978Assert.Equal(t.FilesWritten[0].ItemSpec, t.OutputResources[0].ItemSpec); 2201Assert.Equal("fr", t.OutputResources[0].GetMetadata("Locale")); 2204Assert.Equal("MyAlternateResource.resources", t.OutputResources[0].ItemSpec); 2207Assert.Equal("Pumpkin", t.OutputResources[0].GetMetadata("Flavor")); 2234Assert.Equal(resourcesFile, t.OutputResources[0].ItemSpec); 2237Assert.Equal("en-GB", t.OutputResources[0].GetMetadata("Locale")); 2268Assert.Equal(outputFile, t.OutputResources[i].ItemSpec); 2307Assert.Equal(t.FilesWritten[i].ItemSpec, t.OutputResources[i].ItemSpec); 2354Assert.Equal(outputFile, t.OutputResources[0].ItemSpec); 2357Assert.Equal(outputFile, t.OutputResources[1].ItemSpec); 2364Assert.Equal(outputFile, t.OutputResources[2].ItemSpec); 2368Assert.Equal(t.FilesWritten[0].ItemSpec, Path.ChangeExtension(t.Sources[0].ItemSpec, ".resources")); 2369Assert.Equal(t.FilesWritten[1].ItemSpec, Path.ChangeExtension(t.Sources[1].ItemSpec, ".resources")); 2381Assert.Equal(t.FilesWritten[2].ItemSpec, Path.ChangeExtension(t.Sources[3].ItemSpec, ".resources")); 2432Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.StronglyTypedFileName)); 2475Assert.Equal(t.StronglyTypedFileName, Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs")); 2589Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile); 3632Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 3634Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 4240Assert.Equal(Path.GetFileNameWithoutExtension(textFile), Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec)); 4244Assert.Equal(t.StronglyTypedClassName, stronglyTypedClassName); 4247Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 4251Assert.Equal(".resources", Path.GetExtension(resourcesFile)); 4256Assert.Equal(Path.ChangeExtension(t.Sources[0].ItemSpec, codeFileExtension), t.StronglyTypedFileName); 4257Assert.Equal(t.FilesWritten[2].ItemSpec, t.StronglyTypedFileName);
ResourceUtilities_Tests.cs (14)
21Assert.Equal("MSB7007", code); 22Assert.Equal("This is a message.", messageOnly); 26Assert.Equal("MSB7007", code); 27Assert.Equal("This is a message.", messageOnly); 31Assert.Equal("MSB7007", code); 32Assert.Equal("This is a message.", messageOnly); 37Assert.Equal("MSB7007 : This is a message.", messageOnly); 42Assert.Equal("MSB 7007: This is a message.", messageOnly); 47Assert.Equal("MSB007: This is a message.", messageOnly); 52Assert.Equal("MSB: This is a message.", messageOnly); 57Assert.Equal("1001: This is a message.", messageOnly); 62Assert.Equal("7001MSB: This is a message.", messageOnly); 67Assert.Equal("MSB564B: This is a message.", messageOnly); 72Assert.Equal("msb1001: This is a message.", messageOnly);
StreamMappedString_Tests.cs (5)
107Assert.Equal("bcd", s.Substring(1, 3)); 116Assert.Equal("bcd", s.Substring(1, 3)); 129Assert.Equal("abcxdef", s.Substring(0, 7)); 140Assert.Equal(String.Empty, s.Substring(1, 30)); 153Assert.Equal("abc", s.Substring(0, 3));
WriteCodeFragment_Tests.cs (9)
91Assert.Equal(file, task.OutputFile.ItemSpec); 116Assert.Equal(expectedFile, task.OutputFile.ItemSpec); 136Assert.Equal(file.ItemSpec, task.OutputFile.ItemSpec); 160Assert.Equal(fileName, task.OutputFile.ItemSpec); 185Assert.Equal(file, task.OutputFile.ItemSpec); 383Assert.Equal(Path.GetTempPath(), task.OutputFile.ItemSpec.Substring(0, Path.GetTempPath().Length)); 384Assert.Equal(".cs", task.OutputFile.ItemSpec.Substring(task.OutputFile.ItemSpec.Length - 3)); 406Assert.Equal(folder.ItemSpec, task.OutputFile.ItemSpec.Substring(0, folder.ItemSpec.Length)); 407Assert.Equal(".cs", task.OutputFile.ItemSpec.Substring(task.OutputFile.ItemSpec.Length - 3));
WriteLinesToFile_Tests.cs (1)
70Assert.Equal("\uBDEA", r.Lines[0].ItemSpec);
XmlPeek_Tests.cs (9)
81Assert.Equal(p.Result[i].ItemSpec, results[i]); 110Assert.Equal(p.Result[i].ItemSpec, results[i]); 127Assert.Equal("<Namespace Prefix=\"s\" Uri=\"http://nsurl\" />", p.Namespaces); 139Assert.Equal(p.Result[i].ItemSpec, results[i]); 161Assert.Equal(p.Result[i].ItemSpec, results[i]); 181Assert.Equal(p.Result[i].ItemSpec, results[i]); 198Assert.Equal(xmlInputPath, p.XmlInputPath.ItemSpec); 199Assert.Equal(_xmlFileNoNsNoDtd, p.XmlContent); 202Assert.Equal("//variable/@Name", p.Query);
XslTransformation_Tests.cs (5)
306Assert.Equal(_xmlDocument, t.XmlContent); 340Assert.Equal(_xslDocument, t.XslContent); 374Assert.Equal(String.Empty, engine.Log); // "The log should be empty" 459Assert.Equal("<Parameter " + res + "/>", t.Parameters); 891Assert.Equal(expectedOutput, fileContents);
Microsoft.Build.UnitTests.Shared (6)
ObjectModelHelpers.cs (6)
112Assert.Equal(itemInclude.ToUpperInvariant(), item.EvaluatedInclude.ToUpperInvariant()); 427Assert.Equal(expectedMetadataValue, actualMetadataValue); 828Assert.Equal(newExpectedProjectContents, newActualProjectContents); // "Project XML does not match expected XML. See 'Standard Out' tab for details." 1292Assert.Equal(xPair.Key, yPair.Key); 1293Assert.Equal(xPair.Value, yPair.Value); 1576Assert.Equal(newExpectedProjectContents, newActualProjectContents); // "Project XML does not match expected XML. See 'Standard Out' tab for details."
Microsoft.Build.Utilities.UnitTests (38)
EscapingUtilities_Tests.cs (23)
18Assert.Equal("", EscapingUtilities.UnescapeAll("")); 19Assert.Equal("foo", EscapingUtilities.UnescapeAll("foo")); 20Assert.Equal("foo space", EscapingUtilities.UnescapeAll("foo%20space")); 21Assert.Equal("foo2;", EscapingUtilities.UnescapeAll("foo2%3B")); 22Assert.Equal(";foo3", EscapingUtilities.UnescapeAll("%3bfoo3")); 23Assert.Equal(";", EscapingUtilities.UnescapeAll("%3b")); 24Assert.Equal(";;;;;", EscapingUtilities.UnescapeAll("%3b%3B;%3b%3B")); 25Assert.Equal("%3B", EscapingUtilities.UnescapeAll("%253B")); 26Assert.Equal("===%ZZ %%%===", EscapingUtilities.UnescapeAll("===%ZZ%20%%%===")); 27Assert.Equal("hello; escaping% how( are) you?", EscapingUtilities.UnescapeAll("hello%3B escaping%25 how%28 are%29 you%3f")); 29Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25*?*%25*")); 30Assert.Equal("%*?*%*", EscapingUtilities.UnescapeAll("%25%2a%3f%2a%25%2a")); 32Assert.Equal("*Star*craft or *War*cr@ft??", EscapingUtilities.UnescapeAll("%2aStar%2Acraft%20or %2aWar%2Acr%40ft%3f%3F")); 40Assert.Equal("%2a", EscapingUtilities.Escape("*")); 41Assert.Equal("%3f", EscapingUtilities.Escape("?")); 42Assert.Equal("#%2a%3f%2a#%2a", EscapingUtilities.Escape("#*?*#*")); 43Assert.Equal("%25%2a%3f%2a%25%2a", EscapingUtilities.Escape("%*?*%*")); 52Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 55Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 58Assert.Equal(text, EscapingUtilities.UnescapeAll(EscapingUtilities.Escape(text))); 67Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 70Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text))); 73Assert.Equal(text, EscapingUtilities.Escape(EscapingUtilities.UnescapeAll(text)));
NativeMethodsShared_Tests.cs (1)
152Assert.Equal(currentDirectory, Directory.GetCurrentDirectory());
ResourceUtilities_Tests.cs (14)
21Assert.Equal("MSB7007", code); 22Assert.Equal("This is a message.", messageOnly); 26Assert.Equal("MSB7007", code); 27Assert.Equal("This is a message.", messageOnly); 31Assert.Equal("MSB7007", code); 32Assert.Equal("This is a message.", messageOnly); 37Assert.Equal("MSB7007 : This is a message.", messageOnly); 42Assert.Equal("MSB 7007: This is a message.", messageOnly); 47Assert.Equal("MSB007: This is a message.", messageOnly); 52Assert.Equal("MSB: This is a message.", messageOnly); 57Assert.Equal("1001: This is a message.", messageOnly); 62Assert.Equal("7001MSB: This is a message.", messageOnly); 67Assert.Equal("MSB564B: This is a message.", messageOnly); 72Assert.Equal("msb1001: This is a message.", messageOnly);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (6)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (6)
1426Assert.Equal("c", symbolRenamedOperation._symbol.Name); 1427Assert.Equal("C", symbolRenamedOperation._newName); 1451Assert.Equal("test", symbolRenamedOperation._symbol.Name); 1452Assert.Equal("ITest", symbolRenamedOperation._newName); 1481Assert.Equal("arg", symbolRenamedOperation._symbol.Name); 1482Assert.Equal("TArg", symbolRenamedOperation._newName);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (242)
CommandLineDiagnosticFormatterTests.cs (10)
22Assert.Equal(@"a.cs", formatter.RelativizeNormalizedPath(@"X:\rootdir\dir\a.cs")); 23Assert.Equal(@"temp\a.cs", formatter.RelativizeNormalizedPath(@"X:\rootdir\dir\temp\a.cs")); 24Assert.Equal(@"Y:\rootdir\dir\a.cs", formatter.RelativizeNormalizedPath(@"Y:\rootdir\dir\a.cs")); 31Assert.Equal(@"a.cs", formatter.RelativizeNormalizedPath(@"X:\rootdir\dir\a.cs")); 32Assert.Equal(@"temp\a.cs", formatter.RelativizeNormalizedPath(@"X:\rootdir\dir\temp\a.cs")); 33Assert.Equal(@"Y:\rootdir\dir\a.cs", formatter.RelativizeNormalizedPath(@"Y:\rootdir\dir\a.cs")); 45Assert.Equal(@"temp.cs", formatter.RelativizeNormalizedPath(@"c:\temp.cs")); 57Assert.Equal(@"C\D\temp.cs", formatter.RelativizeNormalizedPath(@"c:\A\B\C\D\temp.cs")); 69Assert.Equal(@"c:\ABCD\file.cs", formatter.RelativizeNormalizedPath(@"c:\ABCD\file.cs")); 81Assert.Equal(@"c:\AB\file.cs", formatter.RelativizeNormalizedPath(@"c:\AB\file.cs"));
CommandLineTests.cs (206)
150Assert.Equal("", outWriter.ToString()); 170Assert.Equal("", outWriter.ToString()); 206Assert.Equal("", outWriter.ToString()); 300Assert.Equal("", outWriter.ToString()); 315Assert.Equal("my_val", val); 322Assert.Equal("my_val2", val); 351Assert.Equal( 387Assert.Equal( 406Assert.Equal("", outWriter.ToString()); 410Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932))); 426Assert.Equal("", outWriter.ToString()); 430Assert.Equal("星野 八郎太", File.ReadAllText(Path.Combine(dir.Path, "output.txt"), Encoding.GetEncoding(932))); 515Assert.Equal(basePath, args.BaseDirectory); 586Assert.Equal("error CS0006: Metadata file 'System.dll' could not be found", outWriter.ToString().Trim()); 623Assert.Equal("Test", args.CompilationOptions.MainTypeName); 627Assert.Equal("Test", args.CompilationOptions.MainTypeName); 631Assert.Equal("Test.Class1", args.CompilationOptions.MainTypeName); 635Assert.Equal("Test", args.CompilationOptions.MainTypeName); 639Assert.Equal("Test", args.CompilationOptions.MainTypeName); 643Assert.Equal("Test.Class1", args.CompilationOptions.MainTypeName); 648Assert.Equal("решения.Class1", args.CompilationOptions.MainTypeName); 692Assert.Equal("warning CS2008: No source files specified.", outWriter.ToString().Trim()); 697Assert.Equal("warning CS2008: No source files specified.", outWriter.ToString().Trim()); 702Assert.Equal("warning CS2008: No source files specified.", outWriter.ToString().Trim()); 707Assert.Equal("warning CS2008: No source files specified.", outWriter.ToString().Trim()); 896Assert.Equal(@"d:\abc def\ab cd\a.res", args.Win32ResourceFile); 903Assert.Equal(@"d:\abc def\ab cd\a.ico", args.Win32Icon); 910Assert.Equal(@"d:\abc def\ab cd\a.manifest", args.Win32Manifest); 920Assert.Equal(@"someFile.goo.bar", desc.FileName); 921Assert.Equal("someFile.goo.bar", desc.ResourceName); 925Assert.Equal(@"someFile.goo.bar", desc.FileName); 926Assert.Equal("someName", desc.ResourceName); 930Assert.Equal(@"some File.goo.bar", desc.FileName); 931Assert.Equal("someName", desc.ResourceName); 935Assert.Equal(@"someFile.goo.bar", desc.FileName); 936Assert.Equal("some Name", desc.ResourceName); 942Assert.Equal(@"someFile.goo.bar", desc.FileName); 943Assert.Equal("someFile.goo.bar", desc.ResourceName); 949Assert.Equal(@"someFile.goo.bar", desc.FileName); 950Assert.Equal("someFile.goo.bar", desc.ResourceName); 973Assert.Equal("someFile.goo.bar", desc.FileName); 974Assert.Equal("someFile.goo.bar", desc.ResourceName); 981Assert.Equal("someFile.goo.bar", desc.FileName); 982Assert.Equal("someFile.goo.bar", desc.ResourceName); 1027Assert.Equal("path", desc.FileName); 1028Assert.Equal("path", desc.ResourceName); 1092Assert.Equal("path", desc.FileName); 1093Assert.Equal("path", desc.ResourceName); 1108Assert.Equal("path", desc.FileName); 1109Assert.Equal(longE, desc.ResourceName); 1131Assert.Equal("a", resourceDescription.ResourceName); 1138Assert.Equal("b", resourceDescription.ResourceName); 1144Assert.Equal("c", resourceDescription.FileName); 1145Assert.Equal("c", resourceDescription.ResourceName); 1151Assert.Equal("d", resourceDescription.FileName); 1152Assert.Equal("d", resourceDescription.ResourceName); 1286Assert.Equal("a", parsedArgs.MetadataReferences.Single().Properties.Aliases.Single()); 1287Assert.Equal("b", parsedArgs.MetadataReferences.Single().Reference); 1469Assert.Equal("blah", args.Win32Manifest); 2008Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2021Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2028Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2095Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath); 2096Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2100Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.PdbPath); 2101Assert.Equal(Path.Combine(WorkingDirectory, "something.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2108Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2112Assert.Equal(Path.Combine(WorkingDirectory, "a.pdb"), parsedArgs.GetPdbFilePath("a.dll")); 2138Assert.Equal(@"C:\MyFolder\MyPdb.pdb", parsedArgs.PdbPath); 2143Assert.Equal(@"c:\MyPdb.pdb", parsedArgs.PdbPath); 2147Assert.Equal(Path.Combine(Path.GetPathRoot(WorkingDirectory), @"MyFolder\MyPdb.pdb"), parsedArgs.PdbPath); 2152Assert.Equal(@"C:\My Folder\MyPdb.pdb", parsedArgs.PdbPath); 2157Assert.Equal(FileUtilities.ResolveRelativePath("MyPdb.pdb", WorkingDirectory), parsedArgs.PdbPath); 2179Assert.Equal(@"\\server\share\MyPdb.pdb", parsedArgs.PdbPath); 2211Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink); 2215Assert.Equal(Path.Combine(WorkingDirectory, "sl.json"), parsedArgs.SourceLink); 2219Assert.Equal(Path.Combine(WorkingDirectory, "s l.json"), parsedArgs.SourceLink); 2455Assert.Equal("", output.ToString().Trim()); 2499Assert.Equal(expectedEmbeddedMap[docPath], embeddedSource.ToString()); 2526Assert.Equal(expectedEmbeddedMap[docPath], sourceStr); 2639Assert.Equal(MscorlibFullPath, parsedArgs.MetadataReferences[0].Reference); 2642Assert.Equal("goo.dll", parsedArgs.MetadataReferences[1].Reference); 2649Assert.Equal(MscorlibFullPath, parsedArgs.MetadataReferences[0].Reference); 2652Assert.Equal("goo.dll", parsedArgs.MetadataReferences[1].Reference); 2659Assert.Equal(MscorlibFullPath, parsedArgs.MetadataReferences[0].Reference); 2662Assert.Equal("goo.dll", parsedArgs.MetadataReferences[1].Reference); 2669Assert.Equal(MscorlibFullPath, parsedArgs.MetadataReferences[0].Reference); 2672Assert.Equal("goo.dll", parsedArgs.MetadataReferences[1].Reference); 2675Assert.Equal("bar.dll", parsedArgs.MetadataReferences[2].Reference); 2678Assert.Equal("c=mod.dll", parsedArgs.MetadataReferences[3].Reference); 2701Assert.Equal(expectedRef, result.Reference); 2787Assert.Equal("error CS0006: Metadata file 'missing.dll' could not be found", outWriter.ToString().Trim()); 2900Assert.Equal(file.Path, (string)err.Arguments[0]); 2904Assert.Equal("Data at the root level is invalid. Line 1, position 1.", (string)err.Arguments[1]); 4353Assert.Equal("", outWriter.ToString().Trim()); 4372Assert.Equal($@"error CS7093: Cannot read config file '{root}DoesNotExist\NOwhere\bonobo.exe.config' -- 'Could not find a part of the path '{root}DoesNotExist\NOwhere\bonobo.exe.config'.'", outWriter.ToString().Trim()); 4506Assert.Equal("aa", peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4507Assert.Equal("hocusPocus", peReader.GetString(peReader.GetModuleDefinition().Name)); 4752Assert.Equal("", outWriter.ToString().Trim()); 4757Assert.Equal("", outWriter.ToString().Trim()); 5945Assert.Equal("error CS7041: Each linked resource and module must have a unique filename. Filename '" + Path.GetFileName(modfile) + "' is specified more than once in this assembly", outWriter.ToString().Trim()); 5997Assert.Equal("Hello World!", output.Trim()); 6029Assert.Equal(nameGuid, assemblyName.Name); 6030Assert.Equal("0.0.0.0", assemblyName.Version.ToString()); 6031Assert.Equal(string.Empty, assemblyName.CultureName); 6051Assert.Equal("Hello World!", result.Output.Trim()); 6117Assert.Equal("", output.Trim()); 6132Assert.Equal("", output.Trim()); 6148Assert.Equal("", output.Trim()); 6151Assert.Equal("", output.Trim()); 6154Assert.Equal("warning CS2008: No source files specified.", output.Trim()); 6168Assert.Equal("", output.Trim()); 6182Assert.Equal("", output.Trim()); 6408Assert.Equal("error CS1680: Invalid reference alias option: 'myAlias=' -- missing filename", outWriter.ToString().Trim()); 6507Assert.Equal("error CS1680: Invalid reference alias option: 'myAlias=' -- missing filename", outWriter.ToString().Trim()); 6925Assert.Equal("error CS5001: Program does not contain a static 'Main' method suitable for an entry point", outWriter.ToString().Trim()); 6971Assert.Equal(@"", 6997Assert.Equal(@" 7016Assert.Equal(expected, ReplaceCommitHash(orig)); 7029Assert.Equal("", CommonCompiler.ExtractShortCommitHash("")); 7030Assert.Equal("<", CommonCompiler.ExtractShortCommitHash("<")); 7031Assert.Equal("<developer build>", CommonCompiler.ExtractShortCommitHash("<developer build>")); 7032Assert.Equal("1", CommonCompiler.ExtractShortCommitHash("1")); 7033Assert.Equal("1234567", CommonCompiler.ExtractShortCommitHash("1234567")); 7034Assert.Equal("12345678", CommonCompiler.ExtractShortCommitHash("12345678")); 7035Assert.Equal("12345678", CommonCompiler.ExtractShortCommitHash("123456789")); 7067Assert.Equal(expectedOutputName, peReader.GetString(peReader.GetModuleDefinition().Name)); 7096Assert.Equal("error CS0006: Metadata file 'missing.dll' could not be found", outWriter.ToString().Trim()); 7494Assert.Equal("", output); // Autodetected UTF-8, NO ERROR 7498Assert.Equal(@" 7814Assert.Equal(expectedManifest, actualManifest); 7980Assert.Equal("", outWriter.ToString().Trim()); 7985Assert.Equal("{FILE}(1,14): error CS0518: Predefined type 'System.Object' is not defined or imported", 7993Assert.Equal("", outWriter.ToString().Trim()); 8134Assert.Equal("", outWriter.ToString().Trim()); 8139Assert.Equal("", outWriter.ToString().Trim()); 8147Assert.Equal("", outWriter.ToString().Trim()); 8163Assert.Equal("error CS2006: Command-line syntax error: Missing '<text>' for '/define' option", outWriter.ToString().Trim()); 8168Assert.Equal("warning CS2029: Invalid name for a preprocessing symbol; '' is not a valid identifier", outWriter.ToString().Trim()); 8173Assert.Equal("error CS2006: Command-line syntax error: Missing '<text>' for '/define:' option", outWriter.ToString().Trim()); 8178Assert.Equal("error CS2006: Command-line syntax error: Missing '<text>' for '/define:' option", outWriter.ToString().Trim()); 8183Assert.Equal("warning CS2029: Invalid name for a preprocessing symbol; '' is not a valid identifier", outWriter.ToString().Trim()); 8188Assert.Equal("warning CS2029: Invalid name for a preprocessing symbol; '' is not a valid identifier", outWriter.ToString().Trim()); 8194Assert.Equal("warning CS2029: Invalid name for a preprocessing symbol; '' is not a valid identifier", errorLines[0]); 8195Assert.Equal("warning CS2029: Invalid name for a preprocessing symbol; 'b@' is not a valid identifier", errorLines[1]); 8200Assert.Equal("warning CS2029: Invalid name for a preprocessing symbol; 'b@' is not a valid identifier", outWriter.ToString().Trim()); 8207Assert.Equal(@"warning CS2029: Invalid name for a preprocessing symbol; 'OE_WIN32=-1:LANG_HOST_EN=-1:LANG_OE_EN=-1:LANG_PRJ_EN=-1:HOST_COM20SDKEVERETT=-1:EXEMODE=-1:OE_NT5=-1:Win32=-1' is not a valid identifier", errorLines[0]); 8208Assert.Equal(@"warning CS2029: Invalid name for a preprocessing symbol; 'TRACE=TRUE' is not a valid identifier", errorLines[1]); 8231Assert.Equal("", output.Trim()); 8238Assert.Equal( 8276Assert.Equal("", output.Trim()); 8281Assert.Equal( 8305Assert.Equal("", output.Trim()); 8310Assert.Equal( 8509Assert.Equal(Path.GetFileName(source) + "(7,17): warning CS1634: Expected 'disable' or 'restore'", outWriter.ToString().Trim()); 8514Assert.Equal("", outWriter.ToString().Trim()); 8519Assert.Equal("error CS2001: Source file '" + Path.Combine(baseDir, "nonexistent.cs") + "' could not be found.", outWriter.ToString().Trim()); 8548Assert.Equal("", outWriter.ToString().Trim()); 8572Assert.Equal( 8606Assert.Equal( 8633Assert.Equal("error CS1583: Error reading Win32 resources -- Image is too small.", outWriter.ToString().Trim()); 8658Assert.Equal("error CS1583: Error reading Win32 resources -- Unrecognized resource file format.", outWriter.ToString().Trim()); 8678Assert.Equal("", outWriter.ToString().Trim()); 8699Assert.Equal("", outWriter.ToString().Trim()); 8704Assert.Equal("", outWriter.ToString().Trim()); 9021Assert.Equal($"error CS0016: Could not write to output file '{xmlPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9051Assert.Equal($"error CS0016: Could not write to output file '{sourceLinkPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9127Assert.Equal(expectedOutput, outWriter.ToString().Trim()); 9240Assert.Equal(expected.Trim(), actual.Trim()); 9371Assert.Equal(outString, outWriter.ToString().Trim()); 9718Assert.Equal("", outWriter.ToString().Trim()); 10386Assert.Equal("globalA", globalA); 10387Assert.Equal("localA", localA); 10405Assert.Equal("globalA", globalA); 10406Assert.Equal("diffLocalA", localA); 10418Assert.Equal("diffGlobalA", globalA); 10419Assert.Equal("diffLocalA", localA); 11175Assert.Equal("error CS2005: Missing file specification for 'keyfile' option", outWriter.ToString().Trim()); 11187Assert.Equal("error CS2005: Missing file specification for 'keyfile' option", outWriter.ToString().Trim()); 11199Assert.Equal("error CS2005: Missing file specification for 'keyfile' option", outWriter.ToString().Trim()); 11211Assert.Equal("error CS2005: Missing file specification for 'keyfile' option", outWriter.ToString().Trim()); 11340Assert.Equal("", output.Trim()); 11360Assert.Equal(expected, content.Trim()); 11364Assert.Equal(expected, output.Trim()); 11715Assert.Equal("", output); 11718Assert.Equal("", output); 11801Assert.Equal(expectedDoc, content.Trim()); 11804Assert.Equal("Hello", output.Trim()); 11843Assert.Equal("a.cs(1,39): error CS0103: The name 'error' does not exist in the current context", outWriter.ToString().Trim()); 11886Assert.Equal("", outWriter.ToString()); 11928Assert.Equal(expectedDoc, content.Trim()); 11994Assert.Equal( 12002Assert.Equal( 12246Assert.Equal("", result.Output.Trim()); 14635Assert.Equal("value1", keyValue); 14646Assert.Equal("value1", keyValue); 14650Assert.Equal("value4", keyValue); 14750Assert.Equal("", outWriter.ToString()); 14795Assert.Equal("", outWriter.ToString()); 14988Assert.Equal("", outWriter.ToString()); 14998Assert.Equal("value1", val); 15001Assert.Equal("value3", val); 15007Assert.Equal("value2", val); 15009Assert.Equal("value3", val); 15016Assert.Equal("value3", val); 15524Assert.Equal("", outWriter.ToString());
SarifErrorLoggerTests.cs (10)
52Assert.Equal("", outWriter.ToString().Trim()); 59Assert.Equal(expectedOutput, actualOutput); 91Assert.Equal(expectedOutput, actualOutput); 126Assert.Equal(expectedOutput, actualOutput); 160Assert.Equal(expectedOutput, actualOutput); 196Assert.Equal(expectedOutput, actualOutput); 231Assert.Equal(expectedOutput, actualOutput); 266Assert.Equal(expectedOutput, actualOutput); 301Assert.Equal(expectedOutput, actualOutput); 333Assert.Equal(expectedOutput, actualOutput);
SarifV2ErrorLoggerTests.cs (9)
501Assert.Equal(expectedOutput, actualOutput); 582Assert.Equal(expectedOutput, actualOutput); 650Assert.Equal(expectedOutput, actualOutput); 704Assert.Equal("CS5001", (string)results0["ruleId"]); 707Assert.Equal("CS0169", (string)results1["ruleId"]); 713Assert.Equal($"file:///{mappedDir.Path.Replace(@"\", "/")}/otherfile.cs", (string)resultFile["uri"]); 730Assert.Equal("CS5001", (string)results0["ruleId"]); 733Assert.Equal("CS0169", (string)results1["ruleId"]); 739Assert.Equal(expected: $"file:///{mappedDir.Path.Replace(@"\", "/")}/otherfile.cs", (string)physicalLocation["artifactLocation"]["uri"]);
TouchedFileLoggingTests.cs (7)
54Assert.Equal("", outWriter.ToString().Trim()); 100Assert.Equal("", outWriter.ToString().Trim()); 134Assert.Equal(string.Empty, outWriter.ToString().Trim()); 176Assert.Equal(string.Empty, writer.ToString().Trim()); 178Assert.Equal(string.Format(@" 235Assert.Equal(string.Join("\r\n", expected), 239Assert.Equal(string.Join("\r\n", expected),
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (135)
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
939Assert.Equal(expectedCode, formattedText.ToString());
CodeActions\PreviewTests.cs (1)
121Assert.Equal(ChangedDocumentText, text);
CodeActions\PullMemberUp\CSharpPullMemberUpTests.cs (1)
49Assert.Equal(actions.First().Title, FeaturesResources.Pull_members_up_to_base_type);
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
199Assert.Equal(oldRefText, newRefText); 206Assert.Equal(expectedSourceReference, actualRefText);
CommentSelection\CSharpCommentSelectionTests.cs (1)
143Assert.Equal(expected, doc.GetTextBuffer().CurrentSnapshot.GetText());
Completion\ArgumentProviders\ArgumentProviderOrderTests.cs (4)
88Assert.Equal(orderedCSharpArgumentProviders.Last().Metadata.Name, Assert.Single(orderedCSharpArgumentProviders[i].Metadata.BeforeTyped)); 92Assert.Equal(orderedCSharpArgumentProviders[i - 1].Metadata.Name, after); 105Assert.Equal("FirstBuiltInArgumentProvider", firstArgumentProvider.Metadata.Name); 116Assert.Equal("LastBuiltInArgumentProvider", lastArgumentProvider.Metadata.Name);
Completion\CompletionProviders\CompletionProviderOrderTests.cs (4)
120Assert.Equal(orderedCSharpCompletionProviders.Last().Metadata.Name, Assert.Single(orderedCSharpCompletionProviders[i].Metadata.BeforeTyped)); 124Assert.Equal(orderedCSharpCompletionProviders[i - 1].Metadata.Name, after); 137Assert.Equal("FirstBuiltInCompletionProvider", firstCompletionProvider.Metadata.Name); 148Assert.Equal("LastBuiltInCompletionProvider", lastCompletionProvider.Metadata.Name);
Completion\CompletionProviders\ConversionCompletionProviderTests.cs (13)
56c => Assert.Equal("SomeText0", c.DisplayText), 57c => Assert.Equal("SomeText1", c.DisplayText), 58c => Assert.Equal("SomeText2", c.DisplayText), 59c => Assert.Equal("SomeText3", c.DisplayText), 60c => Assert.Equal("\uD884\uDF4AStartWith_3134A_Identifier", c.DisplayText), 61c => Assert.Equal("\uffdcStartWith_FFDC_Identifier", c.DisplayText), 65Assert.Equal("float", c.DisplayText); 66Assert.Equal("\uFFFD001_float", c.SortText); 67Assert.Equal("float", c.FilterText); 251i => Assert.Equal(displayText1, i.DisplayText), 252i => Assert.Equal(displayText2, i.DisplayText)); 279i => Assert.Equal("float", i.DisplayText), 280i => Assert.Equal("int", i.DisplayText));
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (1)
778Assert.Equal(typeName, result.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
Completion\CompletionProviders\OperatorCompletionProviderTests.cs (25)
227i => Assert.Equal("==", i.DisplayText), 228i => Assert.Equal("!=", i.DisplayText), 229i => Assert.Equal(">", i.DisplayText), 230i => Assert.Equal(">=", i.DisplayText), 231i => Assert.Equal("<", i.DisplayText), 232i => Assert.Equal("<=", i.DisplayText), 233i => Assert.Equal("!", i.DisplayText), 234i => Assert.Equal("+", i.DisplayText), // Addition a+b 235i => Assert.Equal("-", i.DisplayText), // Subtraction a-b 236i => Assert.Equal("*", i.DisplayText), 237i => Assert.Equal("/", i.DisplayText), 238i => Assert.Equal("%", i.DisplayText), 239i => Assert.Equal("++", i.DisplayText), 240i => Assert.Equal("--", i.DisplayText), 241i => Assert.Equal("+", i.DisplayText), // Unary plus +a 242i => Assert.Equal("-", i.DisplayText), // Unary minus -a 243i => Assert.Equal("&", i.DisplayText), 244i => Assert.Equal("|", i.DisplayText), 245i => Assert.Equal("^", i.DisplayText), 246i => Assert.Equal("<<", i.DisplayText), 247i => Assert.Equal(">>", i.DisplayText), 248i => Assert.Equal(">>>", i.DisplayText), 249i => Assert.Equal("~", i.DisplayText) 455Assert.Equal("+", i.DisplayText); 460Assert.Equal("+", i.DisplayText);
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (5)
2485Assert.Equal(actualExpectedCode, actualCodeAfterCommit); 2738Assert.Equal(actualExpectedCode, actualCodeAfterCommit); 2793Assert.Equal(actualExpectedCode, actualCodeAfterCommit); 3268Assert.Equal(after, actualCodeAfterCommit); 3361Assert.Equal("<Clone>$", cloneMemberName);
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (5)
69Assert.Equal(updatedEditorConfig, result?.ToString()); 78Assert.Equal(updatedEditorConfig, result?.ToString()); 415Assert.Equal(ExpectedInitialEditorConfig, fileText); 423Assert.Equal(ExpectedEditorConfigAfterAllSeveritiesChanged, fileText); 433Assert.Equal(ExpectedEditorConfigAfterSymbolSpecChange, fileText);
EncapsulateField\EncapsulateFieldTestState.cs (1)
71Assert.Equal(expected, _testDocument.GetTextBuffer().CurrentSnapshot.GetText().ToString());
ExtractInterface\ExtractInterfaceTests.cs (5)
511Assert.Equal(""" 551Assert.Equal(""" 592Assert.Equal(""" 903Assert.Equal(expectedInterfaceCode, interfaceCode); 1060Assert.Equal("""
ExtractMethod\ExtractMethodBase.cs (1)
62Assert.Equal(expected, subjectBuffer.CurrentSnapshot.GetText());
ExtractMethod\MiscTests.cs (2)
67Assert.Equal(expected, rootWithTriviaRestored.ToFullString()); 116Assert.Equal(expected, rootWithTriviaRestored.ToFullString());
FixInterpolatedVerbatimString\FixInterpolatedVerbatimStringCommandHandlerTests.cs (4)
66Assert.Equal(expectedOutput, view.TextBuffer.CurrentSnapshot.GetText()); 73Assert.Equal(quoteCharSnapshotText, view.TextBuffer.CurrentSnapshot.GetText()); 87Assert.Equal(quoteCharSnapshotText, view.TextBuffer.CurrentSnapshot.GetText()); 94Assert.Equal(originalSnapshotText, view.TextBuffer.CurrentSnapshot.GetText());
Formatting\CodeCleanupTests.cs (2)
828Assert.Equal(expected, actual.ToString()); 931Assert.Equal(expected, actual.ToString());
Formatting\FormattingEngineTests.cs (1)
444Assert.Equal(expected, node.ToFullString());
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (2)
3386Assert.Equal(expected, newSnapshot.GetText()); 3445Assert.Equal(expected, actual);
Formatting\Indentation\SmartTokenFormatterFormatTokenTests.cs (1)
616Assert.Equal(expected, actual);
InlineDiagnostics\InlineDiagnosticsTaggerProviderTests.cs (2)
26Assert.Equal(PredefinedErrorTypeNames.SyntaxError, firstSpan.Tag.ErrorType); 34Assert.Equal(PredefinedErrorTypeNames.SyntaxError, firstSpan.Tag.ErrorType);
Interactive\NavigateTo\InteractiveNavigateToTests.cs (5)
473Assert.Equal("Name", itemDisplay.Name); 474Assert.Equal(string.Format(FeaturesResources.in_0_project_1, "DogBed", "Test"), itemDisplay.AdditionalInformation); 480Assert.Equal("Name", itemDisplay.Name); 481Assert.Equal(string.Format(FeaturesResources.in_0_project_1, "Goo", "Test"), itemDisplay.AdditionalInformation); 621Assert.Equal(value, descriptionItem.Details.Single().Text);
NavigateTo\NavigateToTests.cs (5)
674Assert.Equal("Name", itemDisplay.Name); 675Assert.Equal(string.Format(FeaturesResources.in_0_project_1, "DogBed", "Test"), itemDisplay.AdditionalInformation); 681Assert.Equal("Name", itemDisplay.Name); 682Assert.Equal(string.Format(FeaturesResources.in_0_project_1, "Goo", "Test"), itemDisplay.AdditionalInformation); 1011Assert.Equal(value, descriptionItem.Details.Single().Text);
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (12)
97Assert.Equal(GetDllPath(sharedDir), implementationDll); 139Assert.Equal(GetDllPath(sharedDir), implementationDll); 190Assert.Equal(dllFilePath, service.FollowTypeForwards(symbol, typeForwardDllFilePath, new NoDuplicatesLogger())); 251Assert.Equal(dllFilePath, foundImplementationFilePath); 312Assert.Equal(dllFilePath, foundImplementationFilePath); 366Assert.Equal(dllFilePath, service.FollowTypeForwards(symbol, typeForwardDllFilePath, new NoDuplicatesLogger())); 417Assert.Equal(dllFilePath, service.FollowTypeForwards(symbol, typeForwardDllFilePath, new NoDuplicatesLogger())); 424Assert.Equal(dllFilePath, service.FollowTypeForwards(symbol, typeForwardDllFilePath, new NoDuplicatesLogger())); 482Assert.Equal(dllFilePath, service.FollowTypeForwards(symbol, typeForwardDllFilePath, new NoDuplicatesLogger())); 489Assert.Equal(dllFilePath, service.FollowTypeForwards(symbol, typeForwardDllFilePath, new NoDuplicatesLogger())); 554Assert.Equal(realImplementationDllFilePath, foundImplementationFilePath); 563Assert.Equal(realImplementationDllFilePath, foundImplementationFilePath);
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
184Assert.Equal(expectedDescription, description.Text);
QuickInfo\SyntacticQuickInfoSourceTests.cs (1)
575Assert.Equal(expectedContent, actualText);
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (2)
99Assert.Equal(expectedOutput, textBuffer.CurrentSnapshot.AsText().ToString()); 109Assert.Equal(originalSnapshot.GetText(), currentSnapshot.GetText());
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (3)
71Assert.Equal(massaged, TextView.TextSnapshot.GetText()); 150Assert.Equal(expected, finalText); 174Assert.Equal(expected, finalText);
StringIndentation\StringIndentationTests.cs (1)
37Assert.Equal(contents, actual);
SymbolKey\SymbolKeyErrorTypeTests.cs (1)
397Assert.Equal(symbol.ToDisplayString(), resolution.Symbol!.ToDisplayString());
SymbolKey\SymbolKeyTests.cs (1)
172Assert.Equal("global::ConditionalWeakTableTest<TKey!, TValue!>.CreateValueCallback!", parameterType.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier)));
TypeInferrer\TypeInferrerTests.cs (1)
44Assert.Equal(expectedType, typeSyntax.ToString());
Workspaces\WorkspaceTests_EditorFeatures.cs (18)
245Assert.Equal(type.Identifier.ValueText, typeName); 515Assert.Equal("public class X { }", docZText.ToString()); 729Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 736Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 739Assert.Equal(startText, buffer.CurrentSnapshot.GetText()); 744Assert.Equal(newText, buffer.CurrentSnapshot.GetText()); 1064Assert.Equal("some text", (await additionalDocument.GetTextAsync()).ToString()); 1088Assert.Equal("root = true", (await analyzerConfigDocument.GetTextAsync()).ToString()); 1119Assert.Equal(newText, buffer.CurrentSnapshot.GetText()); 1152Assert.Equal(newText, buffer.CurrentSnapshot.GetText()); 1255Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1291Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1321Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AdditionalDocuments.Single().Name); 1349Assert.Equal("original.config", workspace.CurrentSolution.GetProject(project1.Id).AnalyzerConfigDocuments.Single().Name); 1430Assert.Equal(originalText, (await eventArgs[0].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1431Assert.Equal(originalText, (await eventArgs[1].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1433Assert.Equal(updatedText, (await eventArgs[0].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1434Assert.Equal(updatedText, (await eventArgs[1].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString());
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (3)
EmbeddedLanguages\Json\CSharpJsonParserTests_NstTests.cs (1)
21Assert.Equal(expected.Replace("\"", "\"\""), actualTree);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
63Assert.Equal(expected.Replace("\"", DoubleQuoteEscaping), actual);
Recommendations\RecommenderTests.cs (1)
99Assert.Equal(KeywordText, result!.Keyword);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (469)
BreakingChanges.cs (2)
199Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 218Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString());
CodeGen\CodeGenCapturing.cs (3)
180Assert.Equal("field_0", expr); 189Assert.Equal("field_0 + field_1 + field_2", expr); 198Assert.Equal("field_2 + captureVar_0 + captureVar_1", expr);
CodeGen\CodeGenCheckedTests.cs (3)
2916Assert.Equal("x", xNode.ToString()); 2923Assert.Equal("checked(x)", checkedNode.ToString()); 2948Assert.Equal("x", xNode.ToString());
CodeGen\CodeGenDeconstructTests.cs (111)
97Assert.Equal(@"(x, y)", lhs.ToString()); 102Assert.Equal(@"new C()", right.ToString()); 256Assert.Equal("(x, y) = new C()", deconstruction.ToString()); 279Assert.Equal("a = 1", assignment.ToString()); 312Assert.Equal(@"foreach (char in s) { }", foreachDeconstruction.ToString()); 1129Assert.Equal(@"(i, ""hello"")", tuple.ToString()); 1470Assert.Equal("(x, y)", xy.ToString()); 1511Assert.Equal("(x, y) = new C(1)", tuple1.Parent.ToString()); 1516Assert.Equal("(x, y) = new C(2)", tuple2.Parent.ToString()); 1564Assert.Equal("(x, y) = new C()", tuple.Parent.ToString()); 2288Assert.Equal(@"(x, (y, z)) = Tuple.Create(1, Tuple.Create(""hello"", ""world""))", deconstruction.ToString()); 2689Assert.Equal(@"(x, (y, z))", lhs.ToString()); 3131Assert.Equal(@"var (x1, (x2, x3))", lhs.ToString()); 3136Assert.Equal(@"(x2, x3)", lhsNested.ToString()); 3179Assert.Equal(@"(int x1, var (x2, (x3, x4)), var x5)", lhs.ToString()); 3185Assert.Equal(@"var (x2, (x3, x4))", x234.ToString()); 3190Assert.Equal(@"(x3, x4)", x34.ToString()); 3243Assert.Equal(@"(x1, (x2, x3))", x123.ToString()); 3249Assert.Equal(@"(x2, x3)", x23.ToString()); 3281Assert.Equal("(var x1, var (x2, x3))", lhs.ToString()); 3287Assert.Equal("var (x2, x3)", lhsNested.ToString()); 3331Assert.Equal("(var x1, byte _, var (x2, x3))", lhs.ToString()); 3337Assert.Equal("var (x2, x3)", lhsNested.ToString()); 3444Assert.Equal(@"(string x1, byte x2, var x3)", lhs.ToString()); 3448Assert.Equal(@"(null, 2, 3)", literal.ToString()); 3480Assert.Equal(@"(string x1, var x2)", lhs.ToString()); 3484Assert.Equal(@"(null, (1, 2))", literal.ToString()); 3490Assert.Equal(@"(1, 2)", nestedLiteral.ToString()); 3580Assert.Equal(decl.Identifier.ValueText, symbol.Name); 3612Assert.Equal(decl.Identifier.ValueText, field.Name); 3701Assert.Equal("var", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3706Assert.Equal("int", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 3754Assert.Equal("int", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3758Assert.Equal("var", x34Var.Type.ToString()); 3803Assert.Equal("D", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3806Assert.Equal("D", x1Alias.Target.ToDisplayString()); 3811Assert.Equal("int", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 3852Assert.Equal("var", x12Var.Type.ToString()); 3943Assert.Equal("int", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3948Assert.Equal("var", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 3989Assert.Equal("int", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 3994Assert.Equal("int", model.GetSymbolInfo(x2Type).Symbol.ToDisplayString()); 4037Assert.Equal("var", x12Var.Type.ToString()); 4145Assert.Equal("var", x12Var.Type.ToString()); 4228Assert.Equal("var", x12Var.Type.ToString()); 4339Assert.Equal("var", x12Var.Type.ToString()); 4406Assert.Equal("x", collection.ToString()); 4409Assert.Equal("x", symbol.Name); 4460Assert.Equal("var", x23Var.Type.ToString()); 4606Assert.Equal("var", x23Var.Type.ToString()); 5036Assert.Equal("string", model.GetSymbolInfo(xType).Symbol.ToDisplayString()); 5042Assert.Equal("int", model.GetSymbolInfo(yType).Symbol.ToDisplayString()); 5188Assert.Equal("string", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 5193Assert.Equal("var", x23Var.Type.ToString()); 5650Assert.Equal("var", x1Type.Name); 5659Assert.Equal("var", x2Type.Name); 5694Assert.Equal("var", x1Type.Name); 5703Assert.Equal("var", x2Type.Name); 5740Assert.Equal("var", x123Var.Type.ToString()); 5782Assert.Equal("var", x123Var.Type.ToString()); 5819Assert.Equal("byte", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 5822Assert.Equal("byte", x1Alias.Target.ToDisplayString()); 5827Assert.Equal("byte", model.GetSymbolInfo(x3Type).Symbol.ToDisplayString()); 5830Assert.Equal("byte", x3Alias.Target.ToDisplayString()); 5871Assert.Equal("var", model.GetSymbolInfo(x1Type).Symbol.ToDisplayString()); 5877Assert.Equal("var", model.GetSymbolInfo(x3Type).Symbol.ToDisplayString()); 5912Assert.Equal("int _", declaration1.ToString()); 5920Assert.Equal("var _", declaration2.ToString()); 5926Assert.Equal("var (_, z)", declaration3.ToString()); 6001Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6041Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6050Assert.Equal("int _", symbolClone.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6094Assert.Equal("List<int> _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6144Assert.Equal("double _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6150Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6255Assert.Equal("(_, var x)", discard.Parent.Parent.ToString()); 6257Assert.Equal("int _", symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6307Assert.Equal("long _", model.GetSymbolInfo(discard1).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6310Assert.Equal("(_, x)", tuple1.ToString()); 6340Assert.Equal("var (_, x)", tuple1.ToString()); 6368Assert.Equal("(_, x)", discard.Parent.Parent.ToString()); 6399Assert.Equal("var (_, x)", declaration1.ToString()); 6404Assert.Equal("(_, (var y, int z))", discard2.Parent.Parent.ToString()); 6405Assert.Equal("int _", model.GetSymbolInfo(discard2).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 6409Assert.Equal("(var y, int z)", yz.ToString()); 6414Assert.Equal("var y", y.ToString()); 6445Assert.Equal("(_, _)", tuple.ToString()); 6862Assert.Equal("string _", declaration1.ToString()); 6868Assert.Equal("alias _", declaration2.ToString()); 6873Assert.Equal("(string _, alias _)", tuple.ToString()); 6934Assert.Equal("var (_, x3)", nestedDeclaration.ToString()); 6941Assert.Equal("(var _, var (_, x3))", tuple.ToString()); 6980Assert.Equal("var _", declaration1.ToString()); 6989Assert.Equal("int _", declaration2.ToString()); 6994Assert.Equal("_", discard3.Parent.ToString()); 6997Assert.Equal("int _", model.GetSymbolInfo(discard3).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 7008Assert.Equal("var (_, _)", nestedDeclaration.ToString()); 7239Assert.Equal(@"(int x1, z)", lhs.ToString()); 7356Assert.Equal("int", model.GetTypeInfo(x1Ref).Type.ToDisplayString()); 7361Assert.Equal("string[]", model.GetTypeInfo(x2Ref).Type.ToDisplayString()); 7395Assert.Equal("int", model.GetTypeInfo(x1Ref).Type.ToDisplayString()); 7431Assert.Equal("int", model.GetTypeInfo(x1Ref.First()).Type.ToDisplayString()); 7436Assert.Equal("string[]", model.GetTypeInfo(x2Ref.First()).Type.ToDisplayString()); 7521Assert.Equal(@"(int x, (y, var z))", lhs.ToString()); 7565Assert.Equal("int", model.GetTypeInfo(x1Ref).Type.ToDisplayString()); 7569Assert.Equal("string", model.GetTypeInfo(x2Ref).Type.ToDisplayString()); 8360Assert.Equal("((int, int))(y, b)", node.ToString()); 8587Assert.Equal("((byte, byte))(new C(), new D())", node.ToString()); 8631Assert.Equal("((int, int))(1L, 2L)", node.ToString()); 8651Assert.Equal("((short, short))((int, int))(1L, 2L)", node.Parent.ToString()); 9011Assert.Equal("var (y1, y2) =", node.ToString());
CodeGen\CodeGenDynamicTests.cs (4)
605Assert.Equal("System.Runtime.CompilerServices.CallSite<System.Action<System.Runtime.CompilerServices.CallSite, object, int, int, int>>", 613Assert.Equal("<>p__0", field.Name); 617Assert.Equal("<>p__0", field.Name); 655Assert.Equal("System.Runtime.CompilerServices.DynamicAttribute", attributes[0].AttributeClass.ToDisplayString());
CodeGen\CodeGenFunctionPointersTests.cs (11)
2608Assert.Equal(intermediate.Display, module.ReferencedAssemblies[1].Name); 5405Assert.Equal("System.Runtime.CompilerServices.NullableAttribute({0, 1, 1, 1})", getAttribute("F1")); 5406Assert.Equal("System.Runtime.CompilerServices.NullableAttribute({0, 1, 2, 1})", getAttribute("F2")); 5407Assert.Equal("System.Runtime.CompilerServices.NullableAttribute({0, 1, 1, 2})", getAttribute("F3")); 5408Assert.Equal("System.Runtime.CompilerServices.NullableAttribute({0, 2, 1, 1})", getAttribute("F4")); 5409Assert.Equal("System.Runtime.CompilerServices.NullableAttribute({0, 2, 2, 2})", getAttribute("F5")); 5410Assert.Equal("System.Runtime.CompilerServices.NullableAttribute({0, 0, 1, 0, 0, 0, 1, 0, 2})", getAttribute("F6")); 5474Assert.Equal(expectedAttribute, field.GetAttributes().Single().ToString()); 5560Assert.Equal(expectedAttribute, f.GetAttributes().Single().ToString()); 5609Assert.Equal("System.Runtime.CompilerServices.DynamicAttribute({false, false, false, false, false, true, false, true})", param.GetAttributes().Single().ToString()); 7417Assert.Equal("a => a", lambda.ToString());
CodeGen\CodeGenInterpolatedString.cs (4)
39Assert.Equal("@$\"", token1.Text); 40Assert.Equal("@$\"", token1.ValueText); 43Assert.Equal("$@\"", token2.Text); 44Assert.Equal("$@\"", token2.ValueText);
CodeGen\CodeGenLocalFunctionTests.cs (4)
5774Assert.Equal("something.dll", importData.ModuleName); 5775Assert.Equal("local1", importData.EntryPointName); 5846Assert.Equal("something.dll", importData.ModuleName); 5847Assert.Equal("a", importData.EntryPointName);
CodeGen\CodeGenRefLocalTests.cs (1)
4079Assert.Equal("C", alias.Target.ToDisplayString());
CodeGen\CodeGenScriptTests.cs (3)
499Assert.Equal("System.Threading.Tasks.Task<object>", ((MethodSymbol)methodData.Method).ReturnType.ToDisplayString()); 559Assert.Equal("System.Threading.Tasks.Task<object>", ((MethodSymbol)methodData.Method).ReturnType.ToDisplayString()); 587Assert.Equal("System.Threading.Tasks.Task<object>", ((MethodSymbol)methodData.Method).ReturnType.ToDisplayString());
CodeGen\CodeGenTupleEqualityTests.cs (68)
363Assert.Equal("(x, x)", tupleX.ToString()); 368Assert.Equal("x", lastX.ToString()); 382Assert.Equal("(y, y)", tupleY.ToString()); 386Assert.Equal("y", lastY.ToString()); 717Assert.Equal("t", t.ToString()); 727Assert.Equal("(1L, 2)", tuple.ToString()); 794Assert.Equal("(s, null)", tuple1.ToString()); 807Assert.Equal("(null, s)", tuple2.ToString()); 858Assert.Equal("t1", t1.ToString()); 867Assert.Equal("(1L, 2)", tuple.ToString()); 875Assert.Equal("2", two.ToString()); 906Assert.Equal("t1", t1.ToString()); 915Assert.Equal("(1L, 2)", tuple.ToString()); 923Assert.Equal("2", two.ToString()); 955Assert.Equal("t1", t1.ToString()); 965Assert.Equal("(1L, t2)", tuple.ToString()); 971Assert.Equal("t2", t2.ToString()); 1002Assert.Equal("(null, null)", tuple.ToString()); 1010Assert.Equal("(1, (null, null))", lastTuple.ToString()); 1060Assert.Equal("default", literal.ToString()); 1094Assert.Equal("default", literal.ToString()); 1126Assert.Equal("default", literal.ToString()); 1157Assert.Equal("default", literal.ToString()); 1313Assert.Equal("(default, default)", lastTuple.ToString()); 1318Assert.Equal("default", lastDefault.ToString()); 1400Assert.Equal("null", nullLiteral.ToString()); 1404Assert.Equal("null", nullLiteral2.ToString()); 1413Assert.Equal("default", defaultLiteral.ToString()); 1469Assert.Equal("default", defaultLiteral.ToString()); 1498Assert.Equal("((null, null), t)", tuple.ToString()); 1507Assert.Equal("t", t.ToString()); 1518Assert.Equal("(null, null)", nestedTuple.ToString()); 1529Assert.Equal("null", nestedNull.ToString()); 1560Assert.Equal("null", literal.ToString()); 1569Assert.Equal("(null, null)", tuple.ToString()); 1595Assert.Equal("2", lastLiteral.ToString()); 1620Assert.Equal("((null, 2), null)", rightTuple.ToString()); 1626Assert.Equal("(null, 2)", nestedTuple.ToString()); 1632Assert.Equal("2", two.ToString()); 1676Assert.Equal("(null, null, null, null)", tuple1.ToString()); 1684Assert.Equal("(null, x => x, Main, (int i) => { int j = 0; return i + j; })", tuple2.ToString()); 1708Assert.Equal("i + j", addition.ToString()); 1777Assert.Equal("(s, s)", tuple1.ToString()); 1783Assert.Equal("(1, () => { })", tuple2.ToString()); 1919Assert.Equal("(d1, null)", tuple1.ToString()); 1925Assert.Equal("(null, d2)", tuple2.ToString()); 2576Assert.Equal("(0, 1)", intTuple.ToString()); 2584Assert.Equal("(this, this)", lastTuple.ToString()); 2644Assert.Equal("t1", t1.ToString()); 3281Assert.Equal("nt1", nt1.ToString()); 3287Assert.Equal("nt2", nt2.ToString()); 3687Assert.Equal("nt1", nt1.ToString()); 3693Assert.Equal("nt2", nt2.ToString()); 3811Assert.Equal("nt1", nt1.ToString()); 3817Assert.Equal("nt2", nt2.ToString()); 3914Assert.Equal("nt1", nt1.ToString()); 3920Assert.Equal("nt2", nt2.ToString()); 4039Assert.Equal("(1, 2)", tuple.ToString()); 4045Assert.Equal("nt", nt.ToString()); 4084Assert.Equal("(1, 2) == nt", comparison.ToString()); 4087Assert.Equal("(1, 2)", tuple.ToString()); 4093Assert.Equal("nt", nt.ToString()); 4185Assert.Equal("null", lastNull.ToString()); 4277Assert.Equal("t.Rest == t.Rest", comparison.ToString()); 5162Assert.Equal("((string, (byte, long))) (null, (1, 2L))", leftCast.ToString()); 5170Assert.Equal("(null, (1, 2L))", leftTuple.ToString()); 5178Assert.Equal("null", leftNull.ToString()); 5186Assert.Equal("(1, 2L)", leftNestedTuple.ToString());
CodeGen\CodeGenTupleTest.cs (154)
1612Assert.Equal(@"(1, ""hello"", c: 2)", node.ToString()); 3364Assert.Equal("first", mFirst.Name); 3374Assert.Equal("T1 first", mFirst.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 3382Assert.Equal("Item1", mItem1.Name); 3693Assert.Equal("a", yType.TupleElements[0].Name); 3697Assert.Equal("Item2", yType.TupleElements[1].Name); 3701Assert.Equal("b", yType.TupleElements[2].Name); 4602Assert.Equal("Item1", mItem1.Name); 4608Assert.Equal("error CS8128: Member 'Item1' was not found on type '(T1, T2)' from assembly 'comp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.", 4840Assert.Equal("i.M((null, null))", invocation1.ToString()); 4845Assert.Equal("c.M((null, null))", invocation2.ToString()); 5076Assert.Equal("d.M((1, 2))", invocation.ToString()); 5120Assert.Equal("d.M((1, 2))", invocation.ToString()); 5161Assert.Equal("d.P", memberAccess.ToString()); 5165Assert.Equal("this.P", memberAccess2.ToString()); 5169Assert.Equal("base.P", memberAccess3.ToString()); 5205Assert.Equal("d.E()", invocation.ToString()); 7499Assert.Equal("((int, string)?) (1, null)", value.ToString()); 7503Assert.Equal("(1, null)", tuple.ToString()); 7532Assert.Equal("(1, null)", value.ToString()); 7571Assert.Equal("(1, null)", tuple1.ToString()); 7580Assert.Equal("(2, null)", tuple2.ToString()); 7589Assert.Equal("(3, null)", tuple3.ToString()); 7637Assert.Equal(expected, tuple.ToString()); 8294Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8326Assert.Equal(@"11", l11.ToString()); 8333Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8380Assert.Equal(@"(1, ""hello"")", node.ToString()); 8409Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8438Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8486Assert.Equal(@"((long c, string d))(x)", node.ToString()); 8493Assert.Equal(@"(x)", node.ToString()); 8520Assert.Equal(@"((long c, string d))(x)", node.ToString()); 8527Assert.Equal(@"(x)", node.ToString()); 8553Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8582Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8629Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8664Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8693Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8722Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8753Assert.Equal(@"11", l11.ToString()); 8760Assert.Equal(@"(e: 1, f: ""hello"")", node.ToString()); 8807Assert.Equal(@"(e: 1, f: null)", node.ToString()); 8838Assert.Equal(@"null", lnull.ToString()); 8845Assert.Equal(@"(e: 1, f: null)", node.ToString()); 8896Assert.Equal(@"(e: 1, f: new C1(""qq""))", node.ToString()); 8943Assert.Equal(@"(e: 1, f: new C1(""qq""))", node.ToString()); 9016Assert.Equal(@"(1, ""qq"")", node.ToString()); 9073Assert.Equal(@"(""1"", ""qq"")", node.ToString()); 9145Assert.Equal(@"(1, ""qq"")", node.ToString()); 9226Assert.Equal(@"(1, ""qq"")", node.ToString()); 9309Assert.Equal(@"(1, null)", node.ToString()); 10956Assert.Equal("7.0", Compilation.GetRequiredLanguageVersion(comp.GetDiagnostics()[1])); 10957Assert.Equal("7.0", Compilation.GetRequiredLanguageVersion(comp.GetDiagnostics()[2])); 11152Assert.Equal("ValueTuple", m1Tuple.Name); 11221Assert.Equal("(int, int)", m1Tuple.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 11222Assert.Equal("(int a2, int b2)", m2Tuple.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 11277Assert.Equal("Item1", m2Item1.Name); 11280Assert.Equal("MetadataFile(System.ValueTuple.dll)", m2Item1.TupleUnderlyingField.Locations.Single().ToString()); 11281Assert.Equal("SourceFile([826..828))", m2Item1.Locations.Single().ToString()); 11298Assert.Equal("int a2", m2a2.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 11416Assert.Equal("ValueTuple", m1Tuple.Name); 11514Assert.Equal("(int, int, int, int, int, int, int, int, int)", m1Tuple.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 11515Assert.Equal("(int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2)", 11566Assert.Equal("Item9", m2Item9.Name); 11568Assert.Equal("SourceFile([739..741))", m2Item9.Locations.Single().ToString()); 11569Assert.Equal("MetadataFile(System.ValueTuple.dll)", m2Item9.TupleUnderlyingField.Locations.Single().ToString()); 11583Assert.Equal("int i2", m2i2.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 11997Assert.Equal("int h4", m4h4.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12226Assert.Equal("int Item8", m5Item8.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12269Assert.Equal("Rest", m.Name); 12614Assert.Equal("Item1", m8Item1.Name); 12770Assert.Equal("(1, 11)", m1Tuple.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12771Assert.Equal("(a2: 2, b2: 22)", m2Tuple.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12773Assert.Equal("public struct ValueTuple<T1, T2>", m1Tuple.OriginalDefinition.DeclaringSyntaxReferences.Single().GetSyntax().ToString().Substring(0, 32)); 12793Assert.Equal("TupleElementFieldSymbol", m1Item1.GetType().Name); 12808Assert.Equal("Item1", m1Item1.TupleUnderlyingField.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12812Assert.Equal("TupleElementFieldSymbol", m2Item1.GetType().Name); 12827Assert.Equal("Item1", m2Item1.TupleUnderlyingField.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12829Assert.Equal("SourceFile([891..896))", m2Item1.TupleUnderlyingField.Locations.Single().ToString()); 12830Assert.Equal("SourceFile([196..198))", m2Item1.Locations.Single().ToString()); 12834Assert.Equal("TupleVirtualElementFieldSymbol", m2a2.GetType().Name); 12845Assert.Equal("a2", m2a2.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12846Assert.Equal("Item1", m2a2.TupleUnderlyingField.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 12867Assert.Equal("public override string ToString()", m1ToString.DeclaringSyntaxReferences.Single().GetSyntax().ToString().Substring(0, 33)); 13203Assert.Equal("System.ObsoleteAttribute", m10Tuple.GetAttributes().Single().ToString()); 13217Assert.Equal("System.ObsoleteAttribute", m10Item1.GetAttributes().Single().ToString()); 13218Assert.Equal("System.ObsoleteAttribute", m102Item20.GetAttributes().Single().ToString()); 13219Assert.Equal("System.ObsoleteAttribute", m102a.GetAttributes().Single().ToString()); 13256Assert.Equal("System.ObsoleteAttribute", m10M2.GetAttributes().Single().ToString()); 13268Assert.Equal("System.ObsoleteAttribute", m10P2.GetAttributes().Single().ToString()); 13280Assert.Equal("System.ObsoleteAttribute", m10E2.GetAttributes().Single().ToString()); 16542Assert.Equal(@"(1, ""hello"")", node.ToString()); 17214Assert.Equal(@"(1, ""hello"")", n1.ToString()); 17221Assert.Equal(@"(2, null)", n2.ToString()); 17228Assert.Equal(@"11", n3.ToString()); 17235Assert.Equal(@"null", n4.ToString()); 17242Assert.Equal(@"() => 12", n5.ToString()); 17275Assert.Equal(@"(1, ""hello"")", n1.ToString()); 17282Assert.Equal(@"(2, null)", n2.ToString()); 17289Assert.Equal(@"11", n3.ToString()); 17296Assert.Equal(@"null", n4.ToString()); 17303Assert.Equal(@"() => 12", n5.ToString()); 17334Assert.Equal(@"(1, ""hello"")", n1.ToString()); 17341Assert.Equal(@"(2, null)", n2.ToString()); 17375Assert.Equal("Alice", sym.Symbol.Name); 17404Assert.Equal("x1.Bob", x1Bob.ToString()); 17437Assert.Equal("x1 = (Bob, Bob)", x1.ToString()); 22620Assert.Equal(newText.ToString(), finalText); 24184Assert.Equal("tuple.elem2 = 23", nodes[0].Parent.Parent.ToString()); 24187Assert.Equal("elem2 = 10", nodes[1].Parent.ToString()); 24190Assert.Equal("(tuple.elem2)", nodes[2].Parent.Parent.Parent.ToString()); 24193Assert.Equal("(elem2)", nodes[3].Parent.Parent.ToString()); 25025Assert.Equal("x", x.Identifier.ToString()); 25054Assert.Equal("()", y.ToString()); 25059Assert.Equal("(int a)", z.ToString()); 25085Assert.Equal("(Alice: 1)", tuple.ToString()); 25336Assert.Equal(libWithVTRef.Display, tuple2.ContainingAssembly.MetadataName.ToString()); 25342Assert.Equal(libWithVTRef.Display, tuple3.ContainingAssembly.MetadataName.ToString()); 26226Assert.Equal("(A: 0, B: null)", node.ToString()); 26296Assert.Equal("impl.Do(((int x, int y) a) => a.x * a.y)", doSyntax.ToString()); 26329Assert.Equal("impl.Do(((int x, int y) a) => a.x * a.y)", doSyntax.ToString()); 26362Assert.Equal("impl.Do(((int, int) a) => a.Item1 * a.Item2)", doSyntax.ToString()); 26395Assert.Equal("impl.Do((dynamic a) => 1)", doSyntax.ToString()); 27463Assert.Equal(expectedCSharp, CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)); 27464Assert.Equal(expectedVisualBasic, VisualBasic.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)); 28074Assert.Equal(module is SourceModuleSymbol ? "SourceNamedTypeSymbol" : "PENamedTypeSymbolGeneric", type.GetType().Name); 28102Assert.Equal("SourceNamedTypeSymbol: (T1, T2)", print(tuple1)); 28104Assert.Equal("PENamedTypeSymbolGeneric: (T1, T2)", print(tuple1)); 28107Assert.Equal("ConstructedNamedTypeSymbol: (T1 Item1, T2 Item2)", print(tuple2)); 28131Assert.Equal("ConstructedNamedTypeSymbol: (T1, T2 Item2)", print(tuple3)); 28165Assert.Equal("SourceNamedTypeSymbol: (T1, T2)", print(tuple1)); 28167Assert.Equal("PENamedTypeSymbolGeneric: (T1, T2)", print(tuple1)); 28170Assert.Equal("ConstructedNamedTypeSymbol: (T1 Item1, T2 Item2)", print(tuple2)); 28173Assert.Equal("ConstructedNamedTypeSymbol: (T1, T2 Item2)", print(tuple3)); 28251Assert.Equal(isSourceSymbol ? "SourceNamedTypeSymbol" : (retargeting ? "RetargetingNamedTypeSymbol" : "PENamedTypeSymbolGeneric"), 28280Assert.Equal(name, item.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 28360Assert.Equal(name, item.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 28446Assert.Equal(name, item.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 28694Assert.Equal("SourceNamedTypeSymbol: (T1, T2)", print(type)); 28702Assert.Equal("PENamedTypeSymbolGeneric: (T1, T2)", print(type)); 28710Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32, System.Int32)", print(tuple1)); 28722Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32 Item1, System.Int32 Item2)", print(tuple2)); 28734Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32 a, System.Int32 b)", print(tuple3)); 28749Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32, System.Int32)", print(tuple3.TupleUnderlyingType)); 28762Assert.Equal(isSourceSymbol ? "SourceMemberFieldSymbolFromDeclarator" : "PEFieldSymbol", underlying.GetType().Name); 28773Assert.Equal("SubstitutedFieldSymbol", underlying.GetType().Name); 28808Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32)", print(tuple1)); 28830Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32 Item1, System.Int32 Item2, System.Int32 Item3, System.Int32 Item4, System.Int32 Item5, System.Int32 Item6, System.Int32 Item7, System.Int32 Item8)", print(tuple2)); 28853Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32 a, System.Int32 b, System.Int32 c, System.Int32 d, System.Int32 e, System.Int32 f, System.Int32 g, System.Int32 h)", print(tuple3)); 28891Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32)", print(tuple3.TupleUnderlyingType)); 28904Assert.Equal("ConstructedNamedTypeSymbol: (System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32, System.Int32)", print(tuple4)); 28933Assert.Equal("SubstitutedFieldSymbol", underlying.GetType().Name); 28975Assert.Equal(expectedAttribute, field.GetAttributes().Single().ToString());
CodeGen\FixedSizeBufferTests.cs (2)
577Assert.Equal("x", f.Name); 579Assert.Equal("int*", f.TypeWithAnnotations.ToString());
CodeGen\GotoTest.cs (2)
1150Assert.Equal("L0", symbol.Name); 1163Assert.Equal("C", symbol.Name);
CodeGen\IndexAndRangeTests.cs (5)
40Assert.Equal(methodName, symbol.Name); 42Assert.Equal(containingTypeName, symbol.ContainingType.Name); 1003Assert.Equal("S", property.ContainingType.Name); 3862Assert.Equal("c", receivers[0].ToString()); 3865Assert.Equal("c", receivers[1].ToString());
CodeGen\ObjectAndCollectionInitializerTests.cs (2)
1108Assert.Equal("new A {[x++] = { } }", node.ToString()); 3590Assert.Equal("new C(pp) { X = {[Index] = {[0] = 2, [1] = 3} } }", node.ToString());
Emit\CompilationEmitTests.cs (32)
279Assert.Equal( 325Assert.Equal( 378Assert.Equal( 432Assert.Equal( 485Assert.Equal( 534Assert.Equal( 3470Assert.Equal("v2.0.50727", metadataReader.MetadataVersion); 4017Assert.Equal(name, assembly.Name); 4020Assert.Equal(nameWithExtension, module.Name); 4031Assert.Equal(name, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4032Assert.Equal(nameWithExtension, peReader.GetString(peReader.GetModuleDefinition().Name)); 4053Assert.Equal("?", assembly.Name); 4056Assert.Equal(name + extension, module.Name); 4067Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4083Assert.Equal(name, assembly.Name); 4086Assert.Equal(name + extension, module.Name); 4097Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4098Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4114Assert.Equal(name, assembly.Name); 4117Assert.Equal(name + extension, module.Name); 4128Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4129Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4145Assert.Equal(name, assembly.Name); 4148Assert.Equal(name + extension, module.Name); 4159Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4160Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 4176Assert.Equal(name, assembly.Name); 4179Assert.Equal(name + extension, module.Name); 4190Assert.Equal(nameOverride, peReader.GetString(peReader.GetAssemblyDefinition().Name)); 4191Assert.Equal(module.Name, peReader.GetString(peReader.GetModuleDefinition().Name)); 5219Assert.Equal(ioExceptionMessage, (string)err.Arguments[0]); 5229Assert.Equal(ioExceptionMessage, (string)err.Arguments[0]);
Emit\EmitMetadataTests.cs (6)
601Assert.Equal(WellKnownMemberNames.InstanceConstructorName, ctor.Name); 622Assert.Equal(WellKnownMemberNames.StaticConstructorName, cctor.Name); 1406Assert.Equal(WellKnownMemberNames.EnumBackingFieldName, field.Name); 2382Assert.Equal(".text", sections[0].Name); 2393Assert.Equal(".reloc", sections[1].Name); 2520Assert.Equal(".text", sections[0].Name);
Emit\GeneratedNamesTests.cs (1)
37Assert.Equal(name, GeneratedNames.MakeSynthesizedDelegateName(actualByRefs, actualReturnsVoid, actualGeneration));
Emit\InAttributeModifierTests.cs (1)
4569Assert.Equal(typeName, modifier.Modifier.ToDisplayString());
Emit\NoPiaEmbedTypes.cs (37)
1188Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes[0].ToString()); 1189Assert.Equal(@"System.Runtime.InteropServices.GuidAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58258"")", attributes[1].ToString()); 1190Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute", attributes[2].ToString()); 1214Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes[0].ToString()); 1215Assert.Equal(@"System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""Test2"")", attributes[1].ToString()); 1274Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes[0].ToString()); 1275Assert.Equal(@"System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""Test9"")", attributes[1].ToString()); 1347Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes[0].ToString()); 1348Assert.Equal(@"System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""Test11"")", attributes[1].ToString()); 1909Assert.Equal("System.Runtime.InteropServices.CoClassAttribute(typeof(object))", interfaceType.ToString()); 1996Assert.Equal("System.Runtime.InteropServices.CoClassAttribute(typeof(object))", interfaceType.ToString()); 2207Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes[0].ToString()); 2208Assert.Equal("System.Runtime.InteropServices.ComEventInterfaceAttribute(typeof(InterfaceEvents), typeof(InterfaceEvents))", attributes[1].ToString()); 2209Assert.Equal(@"System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""Interface1_Event"")", attributes[2].ToString()); 2217Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes[0].ToString()); 2218Assert.Equal(@"System.Runtime.InteropServices.GuidAttribute(""84374891-a3b1-4f8f-8310-99ea58059b10"")", attributes[1].ToString()); 2219Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute", attributes[2].ToString()); 2713Assert.Equal("System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)", interfaceType.ToString()); 2718Assert.Equal("System.Runtime.InteropServices.InterfaceTypeAttribute(1)", interfaceType.ToString()); 2785Assert.Equal("System.Runtime.InteropServices.BestFitMappingAttribute(true)", interfaceType.ToString()); 2790Assert.Equal("System.Runtime.InteropServices.BestFitMappingAttribute(false, ThrowOnUnmappableChar = true)", interfaceType.ToString()); 2849Assert.Equal("System.FlagsAttribute", interfaceType.ToString()); 2910Assert.Equal(@"System.Reflection.DefaultMemberAttribute(""M1"")", interfaceType.ToString()); 2978Assert.Equal("System.Runtime.InteropServices.LCIDConversionAttribute(123)", attr.ToString()); 3044Assert.Equal("System.Runtime.InteropServices.DispIdAttribute(124)", attr.ToString()); 3121Assert.Equal("System.Runtime.InteropServices.DispIdAttribute(124)", attr.ToString()); 3550Assert.Equal("System.Runtime.InteropServices.DefaultParameterValueAttribute(123.356)", attr.ToString()); 3607Assert.Equal("System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.StdCall, SetLastError = true)", attr.ToString()); 5959Assert.Equal("System.Runtime.CompilerServices.DateTimeConstantAttribute(987654321)", p.GetAttributes().Single().ToString()); 6008Assert.Equal("x", p.Name); 6009Assert.Equal("x", p.MetadataName); 6012Assert.Equal("value", p.Name); 6013Assert.Equal("value", p.MetadataName); 6016Assert.Equal("Param", p.Name); 6017Assert.Equal("Param", p.MetadataName); 6042Assert.Equal("value", p.Name); 6043Assert.Equal("", p.MetadataName);
Emit\ResourceTests.cs (13)
94Assert.Equal(expected, versionData); 112Assert.Equal(expected, mftData); 120Assert.Equal(" ", fileVer.LegalCopyright); 194Assert.Equal(expected, versionData); 202Assert.Equal("Microsoft Corporation", fileVer.CompanyName); 436Assert.Equal(resourceFileName, rInfo.FileName); 536Assert.Equal(c_mod1.SourceModule.Name, rInfo.FileName); 584Assert.Equal(c_mod2.SourceModule.Name, rInfo.FileName); 593Assert.Equal(c_mod2.SourceModule.Name, rInfo.FileName); 654Assert.Equal(c_mod3.SourceModule.Name, rInfo.FileName); 689Assert.Equal(c_mod1.SourceModule.Name, rInfo.FileName); 698Assert.Equal(c_mod3.SourceModule.Name, rInfo.FileName); 882Assert.Equal(expected, versionData);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (57)
CodeGen\CodeGenMethodGroupConversionCachingTests.cs (1)
6322Assert.Equal("G", typeParameter.Name);
CodeGen\IndexAndRangeTests.cs (18)
92Assert.Equal("new Buffer10() { [Id(^1)] = Id(2) }", node.ToString()); 333Assert.Equal("new Buffer10() { [Id(^1)] = { F = { } } }", node.ToString()); 420Assert.Equal("new Buffer10() { [Id(^1)] = { F = { } } }", node.ToString()); 507Assert.Equal("new Buffer10() { [Id(^1)] = { F = { } } }", node.ToString()); 625Assert.Equal("new C() { F = {[Id(^1)] = Id(42), [Id(^2)] = Id(43)} }", node.ToString()); 1574Assert.Equal("new Buffer10Container() { [i1] = { [i2] = 42, [i3] = 43 } }", node.ToString()); 1809Assert.Equal("new Buffer10() { [Id(i1)] = { X = Id(1) }, [Id(i2)] = { }, [Id(i3)] = { X = Id(2) } }", node.ToString()); 2264Assert.Equal("new C() { F = { [Id(r)] = { [Id(1)] = Id(42), [Id(2)] = Id(43) } } }", node.ToString()); 2679Assert.Equal("new C() { F = { [Id(r)] = { [Id(r2)] = { } } } }", node.ToString()); 2842Assert.Equal("new C() { F = { [Id(r)] = { [Id(r2)] = { }, [Id(r3)] = { [Id(i4)] = Id(i5) } } } }", node.ToString()); 3020Assert.Equal("new C() { F = { [Id(i1)] = { [Id(i2)] = { } } } }", node.ToString()); 3134Assert.Equal("new C() { F = { [Id(i1)] = { [Id(i2)] = { }, [Id(i3)] = { [Id(i4)] = Id(i5) } } } }", node.ToString()); 3305Assert.Equal("new C() { F = { [Id(r1)] = { [Id(r2)] = { } } } }", node.ToString()); 3456Assert.Equal("new C() { F = { [Id(r1)] = { [Id(0)] = { X = Id(42) } } } }", node.ToString()); 3642Assert.Equal("new C(pp) { F = { [Id(0)] = { [Id(1)] = { } } } }", node.ToString()); 3732Assert.Equal("new C() { F = { [Id(0)] = { [Id(1)] = { } } } }", node.ToString()); 3818Assert.Equal("new C() { [Id(0)] = { [Id(1)] = { } } }", node.ToString()); 3891Assert.Equal("new C() { [Id(0)] = { [Id(1)] = { }, [Id(2)] = { F = Id(3) } } }", node.ToString());
Emit\EditAndContinue\EditAndContinueTests.cs (3)
12509Assert.Equal("20-01-01-08", BitConverter.ToString(value0)); 12519Assert.Equal("07-02-0E-0C", BitConverter.ToString(value1)); 12524Assert.Equal("07-03-0E-0C-02", BitConverter.ToString(value2));
Emit\EditAndContinue\SymbolMatcherTests.cs (13)
513Assert.Equal("x1", mappedX1.Name); 583Assert.Equal("x1", mappedX1.Name); 963Assert.Equal("I<System.Int32,System.Boolean>.Item", ((PropertySymbol)mappedProperty.GetInternalSymbol()).MetadataName); 1137Assert.Equal("y1", mappedY1.Name); 1138Assert.Equal("y2", mappedY2.Name); 1495Assert.Equal("<>9__0_0", mappedField1.Name); 1496Assert.Equal("<>9__0_1", mappedField2.Name); 1497Assert.Equal("<>9__0_2", mappedField3.Name); 1545Assert.Equal("<>f__AnonymousDelegate0", field0.GetType(emitContext).ToString()); 1549Assert.Equal("<>9__0_0", field1.Name); 1693Assert.Equal("<>9__0_0", mappedField1.Name); 1694Assert.Equal("<>9__0_1", mappedField2.Name); 1695Assert.Equal("<>9__0_2", mappedField3.Name);
Emit\NumericIntPtrTests.cs (14)
6016Assert.Equal(AsNative(sourceType), typeInfo.Type.ToString()); 6017Assert.Equal(AsNative(destType), typeInfo.ConvertedType.ToString()); 10381Assert.Equal("nint", type.ToDisplayString(SymbolDisplayFormat.TestFormat)); 10382Assert.Equal("System.IntPtr", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType))); 10383Assert.Equal("nint", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 10390Assert.Equal("nuint", type.ToDisplayString(SymbolDisplayFormat.TestFormat)); 10391Assert.Equal("System.UIntPtr", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.UseNativeIntegerUnderlyingType))); 10392Assert.Equal("nuint", type.ToDisplayString(SymbolDisplayFormat.TestFormat.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.UseSpecialTypes))); 11174Assert.Equal(type, cref.ToString()); 11197Assert.Equal("nint", cref.ToString()); 11225Assert.Equal(fieldName, cref.ToString()); 11250Assert.Equal("@nint", cref.ToString()); 11295Assert.Equal("nint.Zero", cref.ToString()); 11825symbolValidator: module => Assert.Equal("", NativeIntegerAttributesVisitor.GetString((PEModuleSymbol)module)),
PDB\CSharpDeterministicBuildCompilationTests.cs (2)
46Assert.Equal(langVersion, pdbOptions["language-version"]); 47Assert.Equal(sourceFileCount.ToString(), pdbOptions["source-file-count"]);
PDB\PDBEmbeddedSourceTests.cs (1)
130Assert.Equal(source, embeddedSource.Text.ToString());
PDB\PDBTests.cs (1)
606Assert.Equal("Main", mdReader.GetString(methodDef.Name));
PDB\PortablePdbTests.cs (4)
203Assert.Equal("d.pdb", codeViewData.Path); 207Assert.Equal("SHA512", checksumData.AlgorithmName); 264Assert.Equal("d.pdb", codeViewData.Path); 268Assert.Equal("SHA384", checksumData.AlgorithmName);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2528)
Attributes\AttributeTests.cs (96)
350Assert.Equal("System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(C))", attribute.ToString()); 492Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.UnitTests"")", attrs[0].ToString()); 494Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.CSharp"")", attrs[1].ToString()); 496Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.CSharp.UnitTests"")", attrs[2].ToString()); 498Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.CSharp.Test.Utilities"")", attrs[3].ToString()); 500Assert.Equal(@"System.Runtime.CompilerServices.InternalsVisibleToAttribute(""Roslyn.Compilers.VisualBasic"")", attrs[4].ToString()); 591Assert.Equal("a: true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 592Assert.Equal(@"b: new object[] { ""Hello"", ""World"" }", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 622Assert.Equal("a: 2", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 623Assert.Equal("b: 0", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 624Assert.Equal("c: 1", attributeData.GetAttributeArgumentSyntax(parameterIndex: 2).ToString()); 774Assert.Equal("[]", result.ToFullString()); 784Assert.Equal("", result.ToFullString()); 1125Assert.Equal(@"a: true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1126Assert.Equal(@"b: new object[] { ""Hello"", ""World"" }", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1129Assert.Equal(@"true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1130Assert.Equal(@"""Hello""", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1133Assert.Equal(@"false", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1134Assert.Equal(@"""World""", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1137Assert.Equal(@"true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1138Assert.Equal(@"Mark", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1141Assert.Equal(@"a: true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1142Assert.Equal(@"Mark", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1145Assert.Equal(@"a: false", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1146Assert.Equal(@"b: ""M5""", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1149Assert.Equal(@"a: true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1150Assert.Equal(@"b: ""M6""", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1189Assert.Equal(@"a: true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1190Assert.Equal(@"b: ""Hello""", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1228Assert.Equal(@"true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1229Assert.Equal(@"new object[] { ""Hello"" }", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1267Assert.Equal(@"a: true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1268Assert.Equal(@"new object[] { ""Hello"" }", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1305Assert.Equal(@"a: true", attributeData.GetAttributeArgumentSyntax(parameterIndex: 0).ToString()); 1306Assert.Equal(@"b: null", attributeData.GetAttributeArgumentSyntax(parameterIndex: 1).ToString()); 1436Assert.Equal(@"System.Reflection.AssemblyAlgorithmIdAttribute(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)", a.ToString()); 1440Assert.Equal(@"System.Reflection.AssemblyCultureAttribute("""")", a.ToString()); 1444Assert.Equal(@"System.Reflection.AssemblyDelaySignAttribute(true)", a.ToString()); 1448Assert.Equal(@"System.Reflection.AssemblyFlagsAttribute(System.Reflection.AssemblyNameFlags.Retargetable)", a.ToString()); 1452Assert.Equal(@"System.Reflection.AssemblyKeyFileAttribute(""MyKey.snk"")", a.ToString()); 1456Assert.Equal(@"System.Reflection.AssemblyKeyNameAttribute(""Key Name"")", a.ToString()); 1460Assert.Equal(@"System.Reflection.AssemblyVersionAttribute(""1.2.*"")", a.ToString()); 1464Assert.Equal(@"System.Reflection.AssemblyFileVersionAttribute(""4.3.2.100"")", a.ToString()); 1467Assert.Equal("Unexpected Attr", a.AttributeClass.Name); 1496Assert.Equal("A.XAttribute", attrs.First().AttributeClass.ToDisplayString()); 1607Assert.Equal("System.CLSCompliantAttribute", attrs.First().AttributeClass.ToDisplayString()); 1709Assert.Equal("AObjectAttribute(typeof(object), O = null)", attrs.First().ToString()); 1715Assert.Equal("AObjectAttribute({typeof(string)})", attrs.First().ToString()); 1720Assert.Equal(@"AObjectAttribute({1, ""two"", typeof(string), 3.1415926})", attrs.First().ToString()); 1723Assert.Equal(@"AObjectAttribute({{typeof(string)}})", attrs.First().ToString()); 1820Assert.Equal("B(3)", prop3.GetAttributes().Single().ToString()); 1828Assert.Equal("B(4)", prop4.GetAttributes().Single().ToString()); 2258Assert.Equal(constantExpected, field1.ConstantValue.ToString()); 2275Assert.Equal(constantExpected, field3.ConstantValue.ToString()); 2464Assert.Equal("A(2)", prop1.GetAttributes().Single().ToString()); 2634Assert.Equal("AA", GetSingleAttributeName(event1)); 2644Assert.Equal("BB", GetSingleAttributeName(event2)); 2667Assert.Equal("DD", GetSingleAttributeName(event4.AssociatedField)); 2671Assert.Equal("EE", GetSingleAttributeName(event5)); 2675Assert.Equal("FF", GetSingleAttributeName(event6)); 2680Assert.Equal("GG", GetSingleAttributeName(event7.AddMethod)); 2684Assert.Equal("HH", GetSingleAttributeName(event8.AddMethod)); 2690Assert.Equal("II", GetSingleAttributeName(event9.AddMethod.Parameters.Single())); 3105Assert.Equal("CustomAttribute.AttrName", attrs[0].AttributeClass.ToDisplayString()); 3114Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attrs[0].AttributeClass.ToDisplayString()); 3218Assert.Equal(@"CustomAttribute.DerivedAttribute({1, null, ""Hi""}, ObjectField = 2)", attrs.First().ToString()); 3266Assert.Equal("X.AttrAttribute", attrs[0].AttributeClass.ToDisplayString()); 3314Assert.Equal("X.AttrAttribute", attrs[0].AttributeClass.ToDisplayString()); 3366Assert.Equal("Z.Attr", attrs[0].AttributeClass.ToDisplayString()); 3418Assert.Equal("Z.Attr", attrs[0].AttributeClass.ToDisplayString()); 3796Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.ToDisplayString()); 3802Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.ToDisplayString()); 3808Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.ToDisplayString()); 3810Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.ToDisplayString()); 3817Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.ToDisplayString()); 3831Assert.Equal("CustomAttribute.AllInheritMultipleAttribute", attr.AttributeClass.ToDisplayString()); 3910Assert.Equal("AttributeTest.var", attr.ToString()); 4012Assert.Equal("AttributeTest.TestAttributeForMethod", attr.AttributeClass.ToDisplayString()); 4018Assert.Equal("AttributeTest.TestAttributeForParam", attr.AttributeClass.ToDisplayString()); 4023Assert.Equal("AttributeTest.TestAttributeForReturn", attr.AttributeClass.ToDisplayString()); 4031Assert.Equal("AttributeTest.TestAttributeForMethod", attr.AttributeClass.ToDisplayString()); 4036Assert.Equal("AttributeTest.TestAttributeForReturn", attr.AttributeClass.ToDisplayString()); 4092Assert.Equal(@"System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Event, Inherited = false, AllowMultiple = true)", attr.ToString()); 4098Assert.Equal(@"AttributeTest.A(AttributeTest.X.Three)", attrs.First().ToString()); 4104Assert.Equal(@"AttributeTest.A(5)", attrs.First().ToString()); 5756Assert.Equal("object[]", args[0].Type.ToDisplayString()); 5760Assert.Equal("int[]", args[1].Type.ToDisplayString()); 5766Assert.Equal("object[]", named["P"].Type.ToDisplayString()); 5770Assert.Equal("int[]", named["F"].Type.ToDisplayString()); 7581Assert.Equal("T", typeofArgSyntax.ToString()); 9955Assert.Equal("Bug1020038", m.ReferencedAssemblies[1].Name); 9974Assert.Equal("Bug1020038", m.ReferencedAssemblies[1].Name); 9998Assert.Equal("XAttribute", mm.TypeParameters.Single().GetAttributes().Single().ToString()); 11638Assert.Equal("SomeProperty = 1", firstArgument.ToString()); 11642Assert.Equal("F = null", secondArgument.ToString()); 11646Assert.Equal("G = 0 switch { _ => 1 }", thirdArgument.ToString());
Attributes\AttributeTests_Assembly.cs (40)
146Assert.Equal("1.2.3.4", ((SourceAssemblySymbol)other.Assembly).FileVersion); 156Assert.Equal("1.2", ((SourceAssemblySymbol)other.Assembly).FileVersion); 166Assert.Equal("65535.65535.65535.65535", ((SourceAssemblySymbol)other.Assembly).FileVersion); 269Assert.Equal("One Hundred Years of Solitude", ((SourceAssemblySymbol)other.Assembly).Title); 289Assert.Equal("A classic of magical realist literature", ((SourceAssemblySymbol)other.Assembly).Description); 299Assert.Equal("pt-BR", (other.Assembly.Identity.CultureName)); 520Assert.Equal("MossBrain", ((SourceAssemblySymbol)other.Assembly).Company); 526Assert.Equal("微软", ((SourceAssemblySymbol)other.Assembly).Company); 536Assert.Equal("Sound Cannon", ((SourceAssemblySymbol)other.Assembly).Product); 546Assert.Equal("مايكروسوفت", ((SourceAssemblySymbol)other.Assembly).Copyright); 556Assert.Equal("circle R", ((SourceAssemblySymbol)other.Assembly).Trademark); 562Assert.Equal("", ((SourceAssemblySymbol)other.Assembly).Trademark); 572Assert.Equal("1.2.3garbage", ((SourceAssemblySymbol)other.Assembly).InformationalVersion); 954Assert.Equal(strData, peReader.GetString(row.Culture)); 1090Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle"")", a.ToString()); 1093Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1096Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1099Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1102Assert.Equal("Unexpected Attr", a.AttributeClass.Name); 1211Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1214Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1217Assert.Equal("Unexpected Attr", a.AttributeClass.Name); 1290Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle"")", a.ToString()); 1293Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1296Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1299Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1302Assert.Equal("Unexpected Attr", a.AttributeClass.Name); 1337Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle (from source)"")", a.ToString()); 1340Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1343Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1346Assert.Equal(@"UserDefinedAssemblyAttrAllowMultipleAttribute(""UserDefinedAssemblyAttrAllowMultiple"")", a.ToString()); 1384Assert.Equal(@"System.Reflection.AssemblyTitleAttribute(""AssemblyTitle"")", a.ToString()); 1387Assert.Equal(@"System.Security.Permissions.FileIOPermissionAttribute(System.Security.Permissions.SecurityAction.RequestOptional)", a.ToString()); 1390Assert.Equal(@"UserDefinedAssemblyAttrNoAllowMultipleAttribute(""UserDefinedAssemblyAttrNoAllowMultiple"")", a.ToString()); 1399Assert.Equal("Unexpected Attr", a.AttributeClass.Name); 2130Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module1\")", list[0].ToString()); 2162Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module2\")", list[0].ToString()); 2192Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module3\")", list[0].ToString()); 2224Assert.Equal("System.Reflection.AssemblyDescriptionAttribute(\"Module1\")", list[0].ToString()); 2250Assert.Equal("System.Reflection.AssemblyFileVersionAttribute(\"4.3.2.1\")", attrlist.First().ToString());
Attributes\AttributeTests_IsByRefLike.cs (6)
675Assert.Equal("System.ObsoleteAttribute", attribute.AttributeClass.ToDisplayString()); 760Assert.Equal("Windows.Foundation.Metadata.DeprecatedAttribute", attribute.AttributeClass.ToDisplayString()); 813Assert.Equal("Windows.Foundation.Metadata.DeprecatedAttribute", attributes[1].AttributeClass.ToDisplayString()); 816Assert.Equal("System.ObsoleteAttribute", attribute.AttributeClass.ToDisplayString()); 1098Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), attributes[0].AttributeClass.ToDisplayString()); 1099Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, attributes[1].AttributeClass.ToDisplayString());
Attributes\AttributeTests_NativeInteger.cs (22)
279Assert.Equal("void B.F0( x, y)", type.GetMember("F0").ToDisplayString(FormatWithSpecialTypes)); 280Assert.Equal("void B.F1( a)", type.GetMember("F1").ToDisplayString(FormatWithSpecialTypes)); 353Assert.Equal("void B.F0(System.IntPtr x, System.UIntPtr y)", type.GetMember("F0").ToDisplayString(FormatWithSpecialTypes)); 354Assert.Equal("void B.F1(A<int, System.UIntPtr> a)", type.GetMember("F1").ToDisplayString(FormatWithSpecialTypes)); 355Assert.Equal("void B.F2(A<System.IntPtr, uint> a)", type.GetMember("F2").ToDisplayString(FormatWithSpecialTypes)); 436Assert.Equal("void B.F0(nint x, nuint y)", type.GetMember("F0").ToDisplayString(FormatWithSpecialTypes)); 437Assert.Equal("void B.F1(A<int, nuint> a)", type.GetMember("F1").ToDisplayString(FormatWithSpecialTypes)); 438Assert.Equal("void B.F2(A<nint, uint> a)", type.GetMember("F2").ToDisplayString(FormatWithSpecialTypes)); 513Assert.Equal("void B.F0(System.IntPtr x, System.UIntPtr y)", type.GetMember("F0").ToDisplayString(FormatWithSpecialTypes)); 514Assert.Equal("void B.F1(A<int, System.UIntPtr> a)", type.GetMember("F1").ToDisplayString(FormatWithSpecialTypes)); 515Assert.Equal("void B.F2(A<System.IntPtr, System.UIntPtr> a)", type.GetMember("F2").ToDisplayString(FormatWithSpecialTypes)); 631Assert.Equal("void B.F( a)", type.GetMember("F").ToDisplayString(FormatWithSpecialTypes)); 632Assert.Equal("void B.F0( a)", type.GetMember("F0").ToDisplayString(FormatWithSpecialTypes)); 633Assert.Equal("void B.F1( a)", type.GetMember("F1").ToDisplayString(FormatWithSpecialTypes)); 634Assert.Equal("void B.F2(A<System.IntPtr, nuint> a)", type.GetMember("F2").ToDisplayString(FormatWithSpecialTypes)); 635Assert.Equal("void B.F3( a)", type.GetMember("F3").ToDisplayString(FormatWithSpecialTypes)); 739Assert.Equal("void B.F1( w)", type.GetMember("F1").ToDisplayString(FormatWithSpecialTypes)); 740Assert.Equal("void B.F2( x)", type.GetMember("F2").ToDisplayString(FormatWithSpecialTypes)); 741Assert.Equal("void B.F3( y)", type.GetMember("F3").ToDisplayString(FormatWithSpecialTypes)); 742Assert.Equal("void B.F4( z)", type.GetMember("F4").ToDisplayString(FormatWithSpecialTypes)); 1058Assert.Equal("A<nint>", getConstraintType(type).ToDisplayString(FormatWithSpecialTypes)); 1060Assert.Equal("A<nuint[]>", getConstraintType(type).ToDisplayString(FormatWithSpecialTypes));
Attributes\AttributeTests_Nullable.cs (3)
580Assert.Equal("NullableAttribute", attributeType.Name); 581Assert.Equal(assemblyName, attributeType.ContainingAssembly.Name); 4207Assert.Equal(expectedDisplay, type.ToDisplayString(_displayFormat));
Attributes\AttributeTests_ReadOnlyStruct.cs (2)
665Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), attributes[0].AttributeClass.ToDisplayString()); 666Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, attributes[1].AttributeClass.ToDisplayString());
Attributes\AttributeTests_RefReadOnly.cs (2)
2557Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), attributes[0].AttributeClass.ToDisplayString()); 2558Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, attributes[1].AttributeClass.ToDisplayString());
Attributes\AttributeTests_Synthesized.cs (13)
376Assert.Equal(@"\{ }", GetDebuggerDisplayString(assembly, 0, 0)); 377Assert.Equal(@"\{ X0 = {X0} }", GetDebuggerDisplayString(assembly, 1, 1)); 378Assert.Equal(@"\{ X0 = {X0}, X1 = {X1} }", GetDebuggerDisplayString(assembly, 2, 2)); 379Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2} }", GetDebuggerDisplayString(assembly, 3, 3)); 380Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3} }", GetDebuggerDisplayString(assembly, 4, 4)); 381Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3}, X4 = {X4} }", GetDebuggerDisplayString(assembly, 5, 5)); 382Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3}, X4 = {X4}, X5 = {X5} }", GetDebuggerDisplayString(assembly, 6, 6)); 383Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3}, X4 = {X4}, X5 = {X5}, X6 = {X6} }", GetDebuggerDisplayString(assembly, 7, 7)); 384Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3}, X4 = {X4}, X5 = {X5}, X6 = {X6}, X7 = {X7} }", GetDebuggerDisplayString(assembly, 8, 8)); 385Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3}, X4 = {X4}, X5 = {X5}, X6 = {X6}, X7 = {X7}, X8 = {X8} }", GetDebuggerDisplayString(assembly, 9, 9)); 386Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3}, X4 = {X4}, X5 = {X5}, X6 = {X6}, X7 = {X7}, X8 = {X8}, X9 = {X9} }", GetDebuggerDisplayString(assembly, 10, 10)); 387Assert.Equal(@"\{ X0 = {X0}, X1 = {X1}, X2 = {X2}, X3 = {X3}, X4 = {X4}, X5 = {X5}, X6 = {X6}, X7 = {X7}, X8 = {X8}, X9 = {X9} ... }", GetDebuggerDisplayString(assembly, 11, 11)); 389Assert.Equal(@"\{ X10 = {X10}, X11 = {X11}, X12 = {X12}, X13 = {X13}, X14 = {X14}, X15 = {X15}, X16 = {X16}, X17 = {X17}, X20 = {X20}, X21 = {X21} ... }",
Attributes\AttributeTests_Tuples.cs (4)
256Assert.Equal(ToTestString(srcType.BaseType()), ToTestString(peType.BaseType())); 486Assert.Equal("Base1", field6Type.Name); 889Assert.Equal(name, argsReader.ReadSerializedString()); 986Assert.Equal(name, argsReader.ReadSerializedString());
Attributes\AttributeTests_WellKnownAttributes.cs (33)
901Assert.Equal("default str", theParameter.ImportConstantValue().StringValue); 2649Assert.Equal("\uFFFF", moduleName); 2653Assert.Equal("\uD800\uDC00", moduleName); 2657Assert.Equal("\uDBFF\uDFFF", moduleName); 2695Assert.Equal("mscorlib", metadataReader.GetString(moduleRefName)); 2706Assert.Equal("bar", metadataReader.GetString(import.Name)); 2823Assert.Equal("goo", moduleName); 2827Assert.Equal("a", moduleName); 2831Assert.Equal("b", moduleName); 2836Assert.Equal("c", moduleName); 8298Assert.Equal("TEST1", diag.Id); 8300Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 8331Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/CS0612", diag.Descriptor.HelpLinkUri); 8362Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 8393Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/CS0612", diag.Descriptor.HelpLinkUri); 8464Assert.Equal("TEST1", diag.Id); 8466Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/TEST1", diag.Descriptor.HelpLinkUri); 8512Assert.Equal("C", diag.Descriptor.HelpLinkUri); 8709Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/TEST1", diag.Descriptor.HelpLinkUri); 8752Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 8854Assert.Equal("https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/TEST1", diag.Descriptor.HelpLinkUri); 8956Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9139Assert.Equal($"https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9190Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9331Assert.Equal("C", diag.Descriptor.HelpLinkUri); 9469Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 9519Assert.Equal("https://msdn.microsoft.com/query/roslyn.query?appId=roslyn&k=k(CS0612)", diag.Descriptor.HelpLinkUri); 13180Assert.Equal("", CheckAttributePropagation(((NamedTypeSymbol)program.GetMember<MethodSymbol>("test1"). 13190Assert.Equal("", CheckAttributePropagation(((NamedTypeSymbol)program.GetMember<MethodSymbol>("Test3"). 13302Assert.Equal("DebuggerHiddenAttribute is missing\nDebuggerStepperBoundaryAttribute is missing\n", 13307Assert.Equal("DebuggerNonUserCodeAttribute is missing\nDebuggerHiddenAttribute is missing\nDebuggerStepperBoundaryAttribute is missing\nDebuggerStepThroughAttribute is missing\n", 13312Assert.Equal("DebuggerHiddenAttribute is missing\nDebuggerStepperBoundaryAttribute is missing\n", 13317Assert.Equal("DebuggerNonUserCodeAttribute is missing\nDebuggerHiddenAttribute is missing\nDebuggerStepperBoundaryAttribute is missing\nDebuggerStepThroughAttribute is missing\n",
Diagnostics\DiagnosticAnalyzerTests.cs (24)
361Assert.Equal(infoDiagDescriptor.Id, effectiveDiag.Id); 365Assert.Equal(noneDiagDescriptor.Id, effectiveDiag.Id); 369Assert.Equal(errorDiagDescriptor.Id, effectiveDiag.Id); 373Assert.Equal(warningDiagDescriptor.Id, effectiveDiag.Id); 3382Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3396Assert.Equal("A", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3406Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3425Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3440Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3449Assert.Equal("A", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3459Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3477Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3492Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3501Assert.Equal("A", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3510Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3529Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3540Assert.Equal("", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3550Assert.Equal("A, B", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3563Assert.Equal("A", namedTypeAnalyzer.GetSortedSymbolCallbacksString()); 3719Assert.Equal(((FieldAnalyzer)analyzer).Descriptor.Id, diagnostic.Id); 3903Assert.Equal(analyzer.Descriptor.Id, diagnostic.Id); 3906Assert.Equal(additionalFile.Path, location.GetLineSpan().Path); 4210Assert.Equal("C1", symbol.Name); 4251Assert.Equal(CancellationTestAnalyzer.DiagnosticId, diagnostic.Id);
Diagnostics\GetDiagnosticsTests.cs (3)
758Assert.Equal(RegisterSyntaxTreeCancellationAnalyzer.DiagnosticId, diagnostic.Id); 1447Assert.Equal(analyzerDiagnostic.ToString(), compilationDiagnostic.ToString()); 1550Assert.Equal("int x11 = 0;", localDecl.ToString());
FlowAnalysis\FlowTests.cs (3)
5846Assert.Equal("A(10, Prop = 40)", attributes[0].Item1.ToString()); 5847Assert.Equal("A(20, Prop = 50)", attributes[1].Item1.ToString()); 5848Assert.Equal("A(30, Prop = 60)", attributes[2].Item1.ToString());
FlowAnalysis\IterationJumpYieldStatementTests.cs (54)
47Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 80Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 263Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 577Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 635Assert.Equal("i, j", GetSymbolNamesJoined(analysis.VariablesDeclared)); 636Assert.Equal("i, j", GetSymbolNamesJoined(analysis.WrittenInside)); 637Assert.Equal("i", GetSymbolNamesJoined(analysis.ReadInside)); 656Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 657Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 658Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 659Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 660Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 661Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 692Assert.Equal("k", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 695Assert.Equal("k", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 696Assert.Equal("i, j", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 697Assert.Equal("k", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 698Assert.Equal("i, j", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 743Assert.Equal("c", GetSymbolNamesJoined(analysis.VariablesDeclared)); 744Assert.Equal("c", GetSymbolNamesJoined(analysis.WrittenInside)); 763Assert.Equal("v", GetSymbolNamesJoined(analysis.VariablesDeclared)); 764Assert.Equal("v", GetSymbolNamesJoined(analysis.WrittenInside)); 765Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 792Assert.Equal("v, x", GetSymbolNamesJoined(analysis.VariablesDeclared)); 794Assert.Equal("ary, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 796Assert.Equal("ary, a, v, x", GetSymbolNamesJoined(analysis.ReadInside)); 797Assert.Equal("v, x", GetSymbolNamesJoined(analysis.WrittenInside)); 799Assert.Equal("this, ary, a", GetSymbolNamesJoined(analysis.WrittenOutside)); 824Assert.Equal("x", GetSymbolNamesJoined(analysis.VariablesDeclared)); 825Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 826Assert.Equal("a, v", GetSymbolNamesJoined(analysis.DataFlowsIn)); 828Assert.Equal("a, v, x", GetSymbolNamesJoined(analysis.ReadInside)); 829Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 830Assert.Equal("ary", GetSymbolNamesJoined(analysis.ReadOutside)); 831Assert.Equal("this, ary, a, v", GetSymbolNamesJoined(analysis.WrittenOutside)); 856Assert.Equal("x", GetSymbolNamesJoined(analysis.VariablesDeclared)); 857Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 858Assert.Equal("a, v", GetSymbolNamesJoined(analysis.DataFlowsIn)); 860Assert.Equal("a, v, x", GetSymbolNamesJoined(analysis.ReadInside)); 861Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 862Assert.Equal("ary", GetSymbolNamesJoined(analysis.ReadOutside)); 863Assert.Equal("this, ary, a, v", GetSymbolNamesJoined(analysis.WrittenOutside)); 894Assert.Equal("i, i100", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 982Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 984Assert.Equal("x, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1007Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1009Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1010Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1012Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1039Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1040Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1067Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1110Assert.Equal("i1, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1112Assert.Equal("i1, i2, i3, i4, i5, f1, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside));
FlowAnalysis\PatternMatchingTest5.cs (4)
36Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 39Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 41Assert.Equal("o", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 42Assert.Equal("o, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside));
FlowAnalysis\PatternsVsRegions.cs (30)
35Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 36Assert.Equal("o", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 39Assert.Equal("o, i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 40Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 41Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 42Assert.Equal("args, o", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 61Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 62Assert.Equal("o", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 63Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 65Assert.Equal("o", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 66Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 67Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 68Assert.Equal("args, o", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 88Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 91Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 93Assert.Equal("args, o", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 94Assert.Equal("args, o, i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 113Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 114Assert.Equal("o", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 115Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 116Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 117Assert.Equal("o", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 118Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 119Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 120Assert.Equal("args, o", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 138Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 139Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 142Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 143Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 145Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside));
FlowAnalysis\RegionAnalysisTests.cs (1564)
59Assert.Equal("i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 61Assert.Equal("args, i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 62Assert.Equal("args, i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 63Assert.Equal("i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 66Assert.Equal("args, i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 94Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 96Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 97Assert.Equal("args, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 98Assert.Equal("args, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 100Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 101Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 102Assert.Equal("args, s, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 135Assert.Equal("i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 137Assert.Equal("args, i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 138Assert.Equal("args, i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 139Assert.Equal("i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 142Assert.Equal("args, i, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 163Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 164Assert.Equal("args, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 165Assert.Equal("args, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 232Assert.Equal("a, b, c, d, e, f", GetSymbolNamesJoined(analysis.DataFlowsIn)); 236Assert.Equal("a, b, c, d, e, f", GetSymbolNamesJoined(analysis.ReadInside)); 258Assert.Equal("s", GetSymbolNamesJoined(analysis.DataFlowsIn)); 259Assert.Equal("s", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 260Assert.Equal("s", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 279Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsOut)); 280Assert.Equal("this, x, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 281Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 299Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 300Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 301Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 302Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 303Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 304Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 305Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 306Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 387Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 388Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 389Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 390Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 409Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 410Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 411Assert.Equal("this, s, i, myvar", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 412Assert.Equal("this, s, i, myvar", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 433Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 435Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 436Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 437Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 438Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 440Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 461Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 465Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 467Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 468Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 469Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 486Assert.Equal("a, c", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 487Assert.Equal("this, x, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 488Assert.Equal("this, x, a, x, c", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 507Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 508Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 527Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 528Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 529Assert.Equal("args, a, b", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 549Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 550Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 569Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 570Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 571Assert.Equal("args, a, b", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 590Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 591Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 592Assert.Equal("args, a, b", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 612Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 613Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 632Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 633Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 634Assert.Equal("args, a, b", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 653Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 654Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 655Assert.Equal("args, a, b", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 675Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 676Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 695Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 696Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 697Assert.Equal("args, a, b", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 712Assert.Equal("f", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 713Assert.Equal("args, a, b, d", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 714Assert.Equal("args, a, b, d, f", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 729Assert.Equal("d", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 730Assert.Equal("args, a, b", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 731Assert.Equal("args, a, b, d", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 747Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 748Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 763Assert.Equal("a", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 764Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 765Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 781Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 782Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 797Assert.Equal("a", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 798Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 799Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 814Assert.Equal("a", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 815Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 816Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 835Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 836Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 855Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 856Assert.Equal("args", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 873Assert.Equal("args, x", GetSymbolNamesJoined(analysis.WrittenOutside)); 874Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 875Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 889Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 892Assert.Equal("args, x", GetSymbolNamesJoined(analysis.WrittenOutside)); 893Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 894Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 912Assert.Equal("args, x", GetSymbolNamesJoined(analysis.WrittenOutside)); 913Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 914Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 929Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 931Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 932Assert.Equal("args, x", GetSymbolNamesJoined(analysis.WrittenOutside)); 933Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 934Assert.Equal("args, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 953Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 955Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 957Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 959Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 960Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 961Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 982Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 984Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 985Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 986Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 987Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 989Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1009Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 1010Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1011Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 1012Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 1013Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 1014Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1015Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1016Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1017Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1041Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1043Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 1044Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 1045Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1046Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1048Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1081Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 1082Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1101Assert.Equal("ss", GetSymbolNamesJoined(dataFlows.AlwaysAssigned)); 1102Assert.Equal("s", GetSymbolNamesJoined(dataFlows.DataFlowsIn)); 1103Assert.Equal("ss", GetSymbolNamesJoined(dataFlows.DataFlowsOut)); 1104Assert.Equal("s, ss", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1105Assert.Equal("s, ss", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1125Assert.Equal("s", GetSymbolNamesJoined(dataFlows.DataFlowsIn)); 1127Assert.Equal("s, ss", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1128Assert.Equal("s, ss", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1148Assert.Equal("this", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1149Assert.Equal("this", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1173Assert.Equal("this, t", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1174Assert.Equal("this, t", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1196Assert.Equal("t", GetSymbolNamesJoined(dataFlows.DataFlowsIn)); 1198Assert.Equal("this, t", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1199Assert.Equal("this, t", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1222Assert.Equal("t", GetSymbolNamesJoined(dataFlows.DataFlowsIn)); 1224Assert.Equal("this, t, ret", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1225Assert.Equal("this, t, ret", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1247Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1249Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 1250Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 1251Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1254Assert.Equal("y, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1277Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1279Assert.Equal("z, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 1280Assert.Equal("z, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 1281Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1282Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1284Assert.Equal("z, y, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1307Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1309Assert.Equal("z, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 1310Assert.Equal("z, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 1311Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1312Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1314Assert.Equal("z, y, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1353Assert.Equal(GetSymbolNamesJoined(results1.AlwaysAssigned), 1355Assert.Equal(GetSymbolNamesJoined(results1.Captured), 1357Assert.Equal(GetSymbolNamesJoined(results1.CapturedInside), 1359Assert.Equal(GetSymbolNamesJoined(results1.CapturedOutside), 1361Assert.Equal(GetSymbolNamesJoined(results1.DataFlowsIn), 1363Assert.Equal(GetSymbolNamesJoined(results1.DataFlowsOut), 1365Assert.Equal("p, x, y", 1367Assert.Equal("p, x, y", 1369Assert.Equal(GetSymbolNamesJoined(results1.ReadInside), 1371Assert.Equal(GetSymbolNamesJoined(results1.ReadOutside), 1373Assert.Equal(GetSymbolNamesJoined(results1.WrittenInside), 1375Assert.Equal(GetSymbolNamesJoined(results1.WrittenOutside), 1404Assert.Equal(GetSymbolNamesJoined(results1.AlwaysAssigned), 1406Assert.Equal(GetSymbolNamesJoined(results1.Captured), 1408Assert.Equal(GetSymbolNamesJoined(results1.CapturedInside), 1410Assert.Equal(GetSymbolNamesJoined(results1.CapturedOutside), 1412Assert.Equal(GetSymbolNamesJoined(results1.DataFlowsIn), 1414Assert.Equal(GetSymbolNamesJoined(results1.DataFlowsOut), 1418Assert.Equal(GetSymbolNamesJoined(results1.ReadInside), 1420Assert.Equal(GetSymbolNamesJoined(results1.ReadOutside), 1422Assert.Equal(GetSymbolNamesJoined(results1.WrittenInside), 1424Assert.Equal(GetSymbolNamesJoined(results1.WrittenOutside), 1458Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1459Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1476Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 1477Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 1515Assert.Equal("this", dataFlows.ReadInside.Single().Name); 1569Assert.Equal("a", GetSymbolNamesJoined(analysis.WrittenInside)); 1570Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 1571Assert.Equal("args, a", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1588Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 1592Assert.Equal("x", GetSymbolNamesJoined(analysis.UnsafeAddressTaken)); 1599Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1604Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 1605Assert.Equal("px", GetSymbolNamesJoined(analysis.WrittenOutside)); 1622Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 1626Assert.Equal("x", GetSymbolNamesJoined(analysis.UnsafeAddressTaken)); 1629Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1632Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 1633Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1635Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 1638Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 1639Assert.Equal("x, px", GetSymbolNamesJoined(analysis.WrittenOutside)); 1666Assert.Equal("s", GetSymbolNamesJoined(analysis.UnsafeAddressTaken)); 1678Assert.Equal("s", GetSymbolNamesJoined(analysis.WrittenInside)); 1679Assert.Equal("px", GetSymbolNamesJoined(analysis.WrittenOutside)); 1707Assert.Equal("s", GetSymbolNamesJoined(analysis.UnsafeAddressTaken)); 1710Assert.Equal("s", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1711Assert.Equal("s", GetSymbolNamesJoined(analysis.DataFlowsOut)); 1716Assert.Equal("s", GetSymbolNamesJoined(analysis.ReadInside)); 1719Assert.Equal("s", GetSymbolNamesJoined(analysis.WrittenInside)); 1720Assert.Equal("s, px", GetSymbolNamesJoined(analysis.WrittenOutside)); 1743Assert.Equal("s", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 1748Assert.Equal("s", GetSymbolNamesJoined(analysis.UnsafeAddressTaken)); 1751Assert.Equal("s", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1754Assert.Equal("s", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 1755Assert.Equal("s", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1757Assert.Equal("s", GetSymbolNamesJoined(analysis.ReadInside)); 1760Assert.Equal("s", GetSymbolNamesJoined(analysis.WrittenInside)); 1761Assert.Equal("s, px", GetSymbolNamesJoined(analysis.WrittenOutside)); 1799Assert.Equal("s", GetSymbolNamesJoined(analysis.WrittenInside)); 1800Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenOutside)); 1821Assert.Equal("p", GetSymbolNamesJoined(analysis.Captured)); 1822Assert.Equal("p", GetSymbolNamesJoined(analysis.CapturedInside)); 1824Assert.Equal("i", GetSymbolNamesJoined(analysis.UnsafeAddressTaken)); 1827Assert.Equal("p", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1830Assert.Equal("i, p", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 1831Assert.Equal("i, p", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1833Assert.Equal("p", GetSymbolNamesJoined(analysis.ReadInside)); 1834Assert.Equal("i", GetSymbolNamesJoined(analysis.ReadOutside)); 1837Assert.Equal("i, p, d", GetSymbolNamesJoined(analysis.WrittenOutside)); 1871Assert.Equal("i", GetSymbolNamesJoined(analysis.WrittenOutside)); 1896Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1899Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 1900Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1902Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadInside)); 1906Assert.Equal("x, y, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 1931Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1937Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadInside)); 1941Assert.Equal("i, x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 1966Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1969Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 1970Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 1972Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadInside)); 1976Assert.Equal("x, y, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 2005Assert.Equal("z", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2008Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 2009Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 2011Assert.Equal("z", GetSymbolNamesJoined(analysis.ReadInside)); 2012Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 2015Assert.Equal("x, z, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 2040Assert.Equal("z", GetSymbolNamesJoined(analysis.Captured)); 2041Assert.Equal("z", GetSymbolNamesJoined(analysis.CapturedInside)); 2045Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2048Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 2049Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 2051Assert.Equal("x, z", GetSymbolNamesJoined(analysis.ReadInside)); 2055Assert.Equal("x, z, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 2079Assert.Equal("b1, x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2082Assert.Equal("b1, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 2083Assert.Equal("b1, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 2085Assert.Equal("b1, x", GetSymbolNamesJoined(analysis.ReadInside)); 2089Assert.Equal("b1, x", GetSymbolNamesJoined(analysis.WrittenOutside)); 2117Assert.Equal("b1", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2120Assert.Equal("b0, b1", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 2121Assert.Equal("b0, b1", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 2123Assert.Equal("b1", GetSymbolNamesJoined(analysis.ReadInside)); 2124Assert.Equal("b0", GetSymbolNamesJoined(analysis.ReadOutside)); 2127Assert.Equal("b0, b1", GetSymbolNamesJoined(analysis.WrittenOutside)); 2163Assert.Equal("list", GetSymbolNamesJoined(analysis.WrittenOutside)); 2190Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2193Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 2194Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 2196Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 2200Assert.Equal("x, list", GetSymbolNamesJoined(analysis.WrittenOutside)); 2245Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 2246Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 2250Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2253Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 2254Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 2256Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 2260Assert.Equal("x, list", GetSymbolNamesJoined(analysis.WrittenOutside)); 2277Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.VariablesDeclared)); 2286Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.ReadInside)); 2287Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.WrittenInside)); 2306Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.VariablesDeclared)); 2315Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.ReadInside)); 2316Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.WrittenInside)); 2339Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.VariablesDeclared)); 2348Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.ReadInside)); 2349Assert.Equal("x, y", GetSymbolNamesJoined(dataFlows.WrittenInside)); 2370Assert.Equal("args", GetSymbolNamesJoined(dataFlows.DataFlowsIn)); 2371Assert.Equal("args", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 2372Assert.Equal("args", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 2403Assert.Equal("x", GetSymbolNamesJoined(dataFlows.ReadInside)); 2405Assert.Equal("x", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 2406Assert.Equal("x", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 2438Assert.Equal("x", GetSymbolNamesJoined(dataFlows.WrittenInside)); 2439Assert.Equal("x", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 2440Assert.Equal("x", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 2471Assert.Equal("x", GetSymbolNamesJoined(dataFlows.ReadInside)); 2472Assert.Equal("x", GetSymbolNamesJoined(dataFlows.WrittenInside)); 2473Assert.Equal("x", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 2474Assert.Equal("x", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 2494Assert.Equal("a", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 2496Assert.Equal("a", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 2497Assert.Equal("a", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 2498Assert.Equal("a", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 2501Assert.Equal("a", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 2545Assert.Equal(currentX, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)); 2547Assert.Equal($"{currentX}, {currentY}", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)); 2549Assert.Equal("c, x1, y1, x2, y2", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)); 2550Assert.Equal($"{currentX}, {currentY}", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)); 2551Assert.Equal($"c, {otherX}, {otherY}", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)); 2576Assert.Equal("a, b", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)); 2578Assert.Equal("a, b", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)); 2581Assert.Equal("this, a, b", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)); 2611Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)); 2612Assert.Equal("c", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)); 2613Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)); 2614Assert.Equal("c", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)); 2615Assert.Equal("c, x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)); 2616Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)); 2617Assert.Equal("c, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)); 2645Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)); 2646Assert.Equal("c", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)); 2647Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)); 2648Assert.Equal("c", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)); 2649Assert.Equal("c, x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)); 2650Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)); 2651Assert.Equal("c, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)); 2677Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2697Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2712Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2730Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2731Assert.Equal("x, b", GetSymbolNamesJoined(analysis.WrittenInside)); 2732Assert.Equal("b", GetSymbolNamesJoined(analysis.VariablesDeclared)); 2771Assert.Equal("r, i", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2772Assert.Equal("ix, x, i, y", GetSymbolNamesJoined(analysis.DataFlowsOut)); 2773Assert.Equal("r, x, i, y, y2", GetSymbolNamesJoined(analysis.ReadInside)); 2774Assert.Equal("ix, x, i, y", GetSymbolNamesJoined(analysis.ReadOutside)); 2775Assert.Equal("ix, x, i, y, y2, rrr", GetSymbolNamesJoined(analysis.WrittenInside)); 2776Assert.Equal("ix, x, i, y, y2, rrr", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 2777Assert.Equal("this, r, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 2778Assert.Equal("y, y2, rrr", GetSymbolNamesJoined(analysis.VariablesDeclared)); 2793Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2794Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 2812Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2827Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2838Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2849Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 2850Assert.Equal("x, b", GetSymbolNamesJoined(analysis.WrittenInside)); 2851Assert.Equal("b", GetSymbolNamesJoined(analysis.VariablesDeclared)); 2880Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 2881Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 2882Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 2883Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 2884Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 2885Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 2886Assert.Equal("x, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 2911Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 2912Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 2913Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 2914Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 2915Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 2916Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 2917Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 2918Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 2971Assert.Equal("j, l", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 2972Assert.Equal("i, k", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 3011Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 3012Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 3015Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 3017Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 3040Assert.Equal("x, z, y", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 3041Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 3044Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 3046Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 3074Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 3075Assert.Equal("i, j, s", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 3077Assert.Equal("i, j", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 3079Assert.Equal("i, j", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 3080Assert.Equal("i, j, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 3146Assert.Equal("obj", GetSymbolNamesJoined(analysis.VariablesDeclared)); 3250Assert.Equal("b, x, y, z", GetSymbolNamesJoined(analysis.VariablesDeclared)); 3266Assert.Equal("x, y, z", GetSymbolNamesJoined(analysis.VariablesDeclared)); 3269Assert.Equal("x, z", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3295Assert.Equal("y", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3315Assert.Equal("a, b, x, y, z, c", GetSymbolNamesJoined(analysis.VariablesDeclared)); 3332Assert.Equal("a, a", GetSymbolNamesJoined(analysis.VariablesDeclared)); 3335Assert.Equal("Int32", intsym.Type.Name); 3336Assert.Equal("Int64", longsym.Type.Name); 3355Assert.Equal("j", GetSymbolNamesJoined(analysis.VariablesDeclared)); 3356Assert.Equal("i", GetSymbolNamesJoined(analysis.DataFlowsIn)); 3357Assert.Equal("j", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3358Assert.Equal("i, j", GetSymbolNamesJoined(analysis.ReadInside)); 3359Assert.Equal("i, j", GetSymbolNamesJoined(analysis.ReadOutside)); 3360Assert.Equal("j", GetSymbolNamesJoined(analysis.WrittenInside)); 3361Assert.Equal("args, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 3378Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 3398Assert.Equal("this", GetSymbolNamesJoined(analysis.DataFlowsIn)); 3399Assert.Equal("t, t1", GetSymbolNamesJoined(analysis.ReadOutside)); 3416Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3435Assert.Equal("s, i", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3471Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3472Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3473Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 3489Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3490Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3491Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 3510Assert.Equal("i", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3511Assert.Equal("i", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3512Assert.Equal("b", GetSymbolNamesJoined(analysis.ReadOutside)); 3531Assert.Equal("i", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3532Assert.Equal("i", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3533Assert.Equal("i", GetSymbolNamesJoined(analysis.ReadOutside)); 3557Assert.Equal("i", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3595Assert.Equal("y", GetSymbolNamesJoined(analysis.DataFlowsOut)); 3614Assert.Equal("x, a", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3629Assert.Equal("a", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3648Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3668Assert.Equal("this, t1", GetSymbolNamesJoined(analysis.ReadInside)); 3684Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3705Assert.Equal("c, d", GetSymbolNamesJoined(analysis.ReadInside)); 3706Assert.Equal("d, e, f", GetSymbolNamesJoined(analysis.WrittenInside)); 3707Assert.Equal("x, a, e, g", GetSymbolNamesJoined(analysis.ReadOutside)); 3708Assert.Equal("this, x, a, b, c, g, h, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 3726Assert.Equal("a, b, c, d", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3743Assert.Equal("e, f", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3763Assert.Equal("green, blue, red, yellow, brown", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3781Assert.Equal("a", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3803Assert.Equal("b", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 3825Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 3826Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 3829Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 3831Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 3858Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 3859Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 3860Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 3861Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 3862Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 3863Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 3864Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 3890Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 3891Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 3892Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 3893Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 3894Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 3895Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 3896Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 3923Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 3924Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 3925Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 3926Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 3927Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 3928Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 3988Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 3990Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 3993Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4020Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 4021Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 4022Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 4023Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 4024Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 4025Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 4026Assert.Equal("x, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4119Assert.Equal("t1", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 4120Assert.Equal("t1", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 4121Assert.Equal("this, t", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 4122Assert.Equal("t, t1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 4123Assert.Equal("this, t", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 4124Assert.Equal("t, t1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 4125Assert.Equal("t, t1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 4126Assert.Equal("this, t", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4144Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 4147Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 4149Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 4151Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4168Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 4169Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 4170Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 4171Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4208Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 4210Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 4212Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 4213Assert.Equal("this, p", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4307Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4331Assert.Equal("p, v", GetSymbolNamesJoined(analysis.DataFlowsIn)); 4334Assert.Equal("p, v", GetSymbolNamesJoined(analysis.ReadInside)); 4337Assert.Equal("p, v", GetSymbolNamesJoined(analysis.ReadOutside)); 4338Assert.Equal("this, p, v", GetSymbolNamesJoined(analysis.WrittenOutside)); 4467Assert.Equal("ret", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 4468Assert.Equal("p1, p2, local_1, non_nullable, ret", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 4469Assert.Equal("p1, local_0, non_nullable", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 4470Assert.Equal("p1, p2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 4471Assert.Equal("p1, p2, local_0, local_1, non_nullable", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 4472Assert.Equal("p1, p2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 4473Assert.Equal("p1, p2, local_1, non_nullable, ret", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 4474Assert.Equal("this, p1, p2, local_0, non_nullable", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4531Assert.Equal("p, t", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 4532Assert.Equal("p, t", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 4536Assert.Equal("value", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 4537Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 4538Assert.Equal("args, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 4539Assert.Equal("args, value, p, t", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 4540Assert.Equal("value", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 4541Assert.Equal("args, p", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 4542Assert.Equal("p, t", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 4543Assert.Equal("args, value", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 4656Assert.Equal("x1", GetSymbolNamesJoined(dataFlow.VariablesDeclared)); 4658Assert.Equal("x1", GetSymbolNamesJoined(dataFlow.DataFlowsOut)); 4659Assert.Equal("this", GetSymbolNamesJoined(dataFlow.DefinitelyAssignedOnEntry)); 4660Assert.Equal("this, x1", GetSymbolNamesJoined(dataFlow.DefinitelyAssignedOnExit)); 4662Assert.Equal("x1", GetSymbolNamesJoined(dataFlow.WrittenInside)); 4663Assert.Equal("this, x1, x4, x4, x6, x7, x7, x8, x9, x9, y10, x14, x15, x, x", 4665Assert.Equal("this, x, x4, x4, x6, x7, x7, x8, x9, x9, x10, " + 4703Assert.Equal("this", GetSymbolNamesJoined(dataFlow.DataFlowsIn)); 4705Assert.Equal("this", GetSymbolNamesJoined(dataFlow.DefinitelyAssignedOnEntry)); 4706Assert.Equal("this", GetSymbolNamesJoined(dataFlow.DefinitelyAssignedOnExit)); 4707Assert.Equal("this", GetSymbolNamesJoined(dataFlow.ReadInside)); 4709Assert.Equal("this", GetSymbolNamesJoined(dataFlow.ReadOutside)); 4710Assert.Equal("this", GetSymbolNamesJoined(dataFlow.WrittenOutside)); 5001Assert.Equal("this, i", GetSymbolNamesJoined(analysis.Captured)); 5002Assert.Equal("this", GetSymbolNamesJoined(analysis.CapturedInside)); 5003Assert.Equal("i", GetSymbolNamesJoined(analysis.CapturedOutside)); 5004Assert.Equal("this", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 5005Assert.Equal("this", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 5057Assert.Equal("this", GetSymbolNamesJoined(analysis.Captured)); 5058Assert.Equal("this", GetSymbolNamesJoined(analysis.CapturedInside)); 5083Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5085Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5086Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5087Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5090Assert.Equal("args, i, lambda", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5117Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 5118Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5119Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5146Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 5147Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5148Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5174Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 5175Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5176Assert.Equal("args, i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5192Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5194Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5195Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5196Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5199Assert.Equal("this, a, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5219Assert.Equal("this, x", GetSymbolNamesJoined(analysis.Captured)); 5220Assert.Equal("this, x", GetSymbolNamesJoined(analysis.CapturedInside)); 5222Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)); 5223Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 5224Assert.Equal("this, x, a, y, lambda", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 5250Assert.Equal("f", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 5251Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5252Assert.Equal("args, f", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5253Assert.Equal("f, arg, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 5278Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5279Assert.Equal("args, testDel", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5280Assert.Equal("testDel, x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 5281Assert.Equal("testDel, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 5305Assert.Equal("testDel, x, y", GetSymbolNamesJoined(results1.VariablesDeclared)); 5306Assert.Equal("testDel", GetSymbolNamesJoined(results1.AlwaysAssigned)); 5311Assert.Equal("testDel", GetSymbolNamesJoined(results1.DataFlowsOut)); 5313Assert.Equal("testDel", GetSymbolNamesJoined(results1.DefinitelyAssignedOnExit)); 5314Assert.Equal("x", GetSymbolNamesJoined(results1.ReadInside)); 5315Assert.Equal("testDel, p", GetSymbolNamesJoined(results1.ReadOutside)); 5316Assert.Equal("testDel, x, y", GetSymbolNamesJoined(results1.WrittenInside)); 5317Assert.Equal("p", GetSymbolNamesJoined(results1.WrittenOutside)); 5339Assert.Equal("x", GetSymbolNamesJoined(results1.AlwaysAssigned)); 5343Assert.Equal("p, y", GetSymbolNamesJoined(results1.DataFlowsIn)); 5345Assert.Equal("p, x, y", GetSymbolNamesJoined(results1.DefinitelyAssignedOnEntry)); 5346Assert.Equal("p, x, y", GetSymbolNamesJoined(results1.DefinitelyAssignedOnExit)); 5347Assert.Equal("p, y", GetSymbolNamesJoined(results1.ReadInside)); 5349Assert.Equal("x", GetSymbolNamesJoined(results1.WrittenInside)); 5350Assert.Equal("f, p, x, y", GetSymbolNamesJoined(results1.WrittenOutside)); 5373Assert.Equal("ary", GetSymbolNamesJoined(dataFlows.DataFlowsIn)); 5375Assert.Equal("this, ary", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 5376Assert.Equal("this, ary", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 5377Assert.Equal("ary, x", GetSymbolNamesJoined(dataFlows.ReadInside)); 5378Assert.Equal("x", GetSymbolNamesJoined(dataFlows.WrittenInside)); 5380Assert.Equal("this, ary", GetSymbolNamesJoined(dataFlows.WrittenOutside)); 5407Assert.Equal("d", GetSymbolNamesJoined(dataFlows.VariablesDeclared)); 5408Assert.Equal("d", GetSymbolNamesJoined(dataFlows.AlwaysAssigned)); 5409Assert.Equal("i", GetSymbolNamesJoined(dataFlows.Captured)); 5410Assert.Equal("i", GetSymbolNamesJoined(dataFlows.CapturedInside)); 5412Assert.Equal("i", GetSymbolNamesJoined(dataFlows.DataFlowsIn)); 5414Assert.Equal("this, i", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnEntry)); 5415Assert.Equal("this, i, d", GetSymbolNamesJoined(dataFlows.DefinitelyAssignedOnExit)); 5416Assert.Equal("i", GetSymbolNamesJoined(dataFlows.ReadInside)); 5417Assert.Equal("i, d", GetSymbolNamesJoined(dataFlows.WrittenInside)); 5419Assert.Equal("this, i", GetSymbolNamesJoined(dataFlows.WrittenOutside)); 5442Assert.Equal("num", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 5444Assert.Equal("num", GetSymbolNamesJoined(dataFlowAnalysisResults.CapturedOutside)); 5445Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5447Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5448Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5449Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5450Assert.Equal("num, f, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5452Assert.Equal("nums, num, f, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5540Assert.Equal("x", GetSymbolNamesJoined(flowAnalysis.ReadInside)); 5584Assert.Equal("x, y", GetSymbolNamesJoined(flowAnalysis.ReadInside)); 5585Assert.Equal("x, y", GetSymbolNamesJoined(flowAnalysis.WrittenInside)); 5586Assert.Equal("y", GetSymbolNamesJoined(flowAnalysis.VariablesDeclared)); 5627Assert.Equal("y", GetSymbolNamesJoined(flowAnalysis.ReadInside)); 5628Assert.Equal("y", GetSymbolNamesJoined(flowAnalysis.WrittenInside)); 5629Assert.Equal("y", GetSymbolNamesJoined(flowAnalysis.VariablesDeclared)); 5658Assert.Equal("q2, x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 5659Assert.Equal("q2", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 5660Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5662Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5663Assert.Equal("nums, q2", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5664Assert.Equal("nums, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5666Assert.Equal("q2, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 5667Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5690Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5692Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5693Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5694Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5695Assert.Equal("nums, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5697Assert.Equal("nums, q2, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5718Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5720Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5721Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5722Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5723Assert.Equal("nums, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5725Assert.Equal("nums, q2, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5745Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5747Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5748Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5749Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5750Assert.Equal("nums, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5752Assert.Equal("nums, q2, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5772Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5774Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5775Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5776Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5777Assert.Equal("nums, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5779Assert.Equal("nums, q2, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5804Assert.Equal("num", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 5806Assert.Equal("num", GetSymbolNamesJoined(dataFlowAnalysisResults.CapturedOutside)); 5807Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5809Assert.Equal("nums, num", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5810Assert.Equal("nums, num", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5811Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5812Assert.Equal("nums, num", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5814Assert.Equal("nums, num, q, n", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5839Assert.Equal("num", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 5840Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 5842Assert.Equal("nums, num", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5843Assert.Equal("nums, num", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5844Assert.Equal("nums", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5845Assert.Equal("num", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5847Assert.Equal("nums, num, q, n", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5869Assert.Equal("temp, x, z, w", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 5870Assert.Equal("temp", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 5876Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5877Assert.Equal("args, temp", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5878Assert.Equal("x, z, w", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 5880Assert.Equal("temp, x, z, w", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 5881Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5908Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 5909Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 5911Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 5913Assert.Equal("args, q1, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 5960Assert.Equal("y, x, b", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 5961Assert.Equal("b", GetSymbolNamesJoined(dataFlowAnalysisResults.CapturedInside)); 5962Assert.Equal("y, x", GetSymbolNamesJoined(dataFlowAnalysisResults.CapturedOutside)); 6014Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 6015Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.CapturedInside)); 6019Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 6021Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 6022Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 6023Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 6026Assert.Equal("i, f1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 6063Assert.Equal("i100", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 6132Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 6134Assert.Equal("this, p", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 6135Assert.Equal("this, p", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 6136Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 6139Assert.Equal("this, p", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 6171Assert.Equal("node", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 6173Assert.Equal("this, node", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 6174Assert.Equal("this, node", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 6175Assert.Equal("node", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 6178Assert.Equal("this, node", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 6235Assert.Equal("this, f", GetSymbolNamesJoined(flowAnalysis.WrittenOutside)); 6255Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 6257Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 6258Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 6259Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 6262Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 6318Assert.Equal("o", GetSymbolNamesJoined(analysis.VariablesDeclared)); 6355Assert.Equal("if (args == null) {}", statement.ToFullString()); 6359Assert.Equal("args, f3", GetSymbolNamesJoined(analysis.WrittenOutside)); 6382Assert.Equal("this.EditorOperations = 1;", statement.ToString()); 6426Assert.Equal(expectedtext, statement.ToFullString()); 6523Assert.Equal("a, b, c, d, e, f, g, h, i, j", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 6546Assert.Equal("a, b", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 6629Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 6632Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6634Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 6659Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 6662Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6664Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 6694Assert.Equal("x", GetSymbolNamesJoined(results.VariablesDeclared)); 6697Assert.Equal("x", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6698Assert.Equal("x", GetSymbolNamesJoined(results.ReadInside)); 6699Assert.Equal("x", GetSymbolNamesJoined(results.WrittenInside)); 6732Assert.Equal("x", GetSymbolNamesJoined(results.VariablesDeclared)); 6735Assert.Equal("x", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6736Assert.Equal("x", GetSymbolNamesJoined(results.ReadInside)); 6737Assert.Equal("x", GetSymbolNamesJoined(results.WrittenInside)); 6738Assert.Equal("a", GetSymbolNamesJoined(results.ReadOutside)); 6739Assert.Equal("a", GetSymbolNamesJoined(results.WrittenOutside)); 6762Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 6765Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 6791Assert.Equal("x", GetSymbolNamesJoined(results.Captured)); 6793Assert.Equal("x", GetSymbolNamesJoined(results.CapturedOutside)); 6796Assert.Equal("x", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 6797Assert.Equal("x", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6798Assert.Equal("x", GetSymbolNamesJoined(results.ReadInside)); 6799Assert.Equal("x", GetSymbolNamesJoined(results.WrittenInside)); 6800Assert.Equal("x", GetSymbolNamesJoined(results.ReadOutside)); 6801Assert.Equal("x", GetSymbolNamesJoined(results.WrittenOutside)); 6818Assert.Equal("arg", GetSymbolNamesJoined(results.Captured)); 6820Assert.Equal("arg", GetSymbolNamesJoined(results.CapturedOutside)); 6821Assert.Equal("arg", GetSymbolNamesJoined(results.DataFlowsIn)); 6823Assert.Equal("arg", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 6824Assert.Equal("arg, localValue", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6825Assert.Equal("localValue", GetSymbolNamesJoined(results.AlwaysAssigned)); 6826Assert.Equal("arg", GetSymbolNamesJoined(results.ReadInside)); 6827Assert.Equal("arg", GetSymbolNamesJoined(results.ReadOutside)); 6828Assert.Equal("localValue", GetSymbolNamesJoined(results.VariablesDeclared)); 6848Assert.Equal("x", GetSymbolNamesJoined(results.Captured)); 6850Assert.Equal("x", GetSymbolNamesJoined(results.CapturedOutside)); 6851Assert.Equal("x", GetSymbolNamesJoined(results.DataFlowsIn)); 6853Assert.Equal("this, x", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 6854Assert.Equal("this, x, y", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6855Assert.Equal("y", GetSymbolNamesJoined(results.AlwaysAssigned)); 6856Assert.Equal("x", GetSymbolNamesJoined(results.ReadInside)); 6858Assert.Equal("y", GetSymbolNamesJoined(results.VariablesDeclared)); 6878Assert.Equal("x", GetSymbolNamesJoined(results.Captured)); 6880Assert.Equal("x", GetSymbolNamesJoined(results.CapturedOutside)); 6881Assert.Equal("x", GetSymbolNamesJoined(results.DataFlowsIn)); 6883Assert.Equal("this", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 6884Assert.Equal("this, y", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6885Assert.Equal("y", GetSymbolNamesJoined(results.AlwaysAssigned)); 6886Assert.Equal("x", GetSymbolNamesJoined(results.ReadInside)); 6887Assert.Equal("x", GetSymbolNamesJoined(results.ReadOutside)); 6888Assert.Equal("y", GetSymbolNamesJoined(results.VariablesDeclared)); 6908Assert.Equal("x", GetSymbolNamesJoined(results.Captured)); 6910Assert.Equal("x", GetSymbolNamesJoined(results.CapturedOutside)); 6911Assert.Equal("y", GetSymbolNamesJoined(results.DataFlowsIn)); 6912Assert.Equal("x", GetSymbolNamesJoined(results.DataFlowsOut)); 6913Assert.Equal("this, y", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 6914Assert.Equal("this, x, y", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6915Assert.Equal("x", GetSymbolNamesJoined(results.AlwaysAssigned)); 6916Assert.Equal("y", GetSymbolNamesJoined(results.ReadInside)); 6917Assert.Equal("x", GetSymbolNamesJoined(results.ReadOutside)); 6918Assert.Equal("x", GetSymbolNamesJoined(results.WrittenInside)); 6919Assert.Equal("this, y", GetSymbolNamesJoined(results.WrittenOutside)); 6940Assert.Equal("this", GetSymbolNamesJoined(results.Captured)); 6941Assert.Equal("this", GetSymbolNamesJoined(results.CapturedInside)); 6943Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 6945Assert.Equal("this", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 6946Assert.Equal("this", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6947Assert.Equal("this", GetSymbolNamesJoined(results.ReadInside)); 6948Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 6949Assert.Equal("this", GetSymbolNamesJoined(results.ReadOutside)); 6950Assert.Equal("this", GetSymbolNamesJoined(results.WrittenOutside)); 6974Assert.Equal("x, y", GetSymbolNamesJoined(results.Captured)); 6975Assert.Equal("x, y", GetSymbolNamesJoined(results.CapturedInside)); 6980Assert.Equal("y", GetSymbolNamesJoined(results.DataFlowsOut)); 6981Assert.Equal("this, x", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 6982Assert.Equal("this, x, y", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 6983Assert.Equal("x, y", GetSymbolNamesJoined(results.ReadInside)); 6984Assert.Equal("x, y", GetSymbolNamesJoined(results.WrittenInside)); 6986Assert.Equal("this, x", GetSymbolNamesJoined(results.WrittenOutside)); 6987Assert.Equal("x, y", GetSymbolNamesJoined(results.AlwaysAssigned)); 7010Assert.Equal("x", GetSymbolNamesJoined(results.Captured)); 7011Assert.Equal("x", GetSymbolNamesJoined(results.CapturedInside)); 7013Assert.Equal("y", GetSymbolNamesJoined(results.VariablesDeclared)); 7015Assert.Equal("this", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 7016Assert.Equal("this, x, y", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 7017Assert.Equal("y", GetSymbolNamesJoined(results.ReadInside)); 7018Assert.Equal("x, y", GetSymbolNamesJoined(results.WrittenInside)); 7019Assert.Equal("x", GetSymbolNamesJoined(results.ReadOutside)); 7020Assert.Equal("this, x", GetSymbolNamesJoined(results.WrittenOutside)); 7021Assert.Equal("x, y", GetSymbolNamesJoined(results.AlwaysAssigned)); 7042Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.Captured)); 7043Assert.Equal("y", GetSymbolNamesJoined(analysis.CapturedInside)); 7044Assert.Equal("this, x", GetSymbolNamesJoined(analysis.CapturedOutside)); 7047Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 7048Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 7049Assert.Equal("y", GetSymbolNamesJoined(analysis.ReadInside)); 7051Assert.Equal("this, x", GetSymbolNamesJoined(analysis.ReadOutside)); 7052Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 7074Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.Captured)); 7075Assert.Equal("y", GetSymbolNamesJoined(analysis.CapturedInside)); 7076Assert.Equal("this, x", GetSymbolNamesJoined(analysis.CapturedOutside)); 7079Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 7080Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 7081Assert.Equal("y", GetSymbolNamesJoined(analysis.ReadInside)); 7083Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 7084Assert.Equal("this, x, a, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 7108Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7110Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7112Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7113Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7114Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7115Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7144Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7146Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7147Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7148Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7149Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7180Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7182Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7183Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7184Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7185Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7210Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7214Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7215Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7216Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7217Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7248Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7251Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7253Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7254Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7280Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7282Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7283Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7284Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7285Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7309Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7311Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7313Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7314Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7315Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7316Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7351Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7353Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7354Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7355Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7356Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7390Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7394Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7396Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7397Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7398Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7399Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 7462Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7466Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7468Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7469Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7470Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7472Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7473Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7492Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7496Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7498Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7499Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7500Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7502Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7503Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7522Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7526Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7528Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7529Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7530Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7532Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7533Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7554Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 7555Assert.Equal("x, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7559Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7560Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7561Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7562Assert.Equal("this, x, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7563Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7564Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7565Assert.Equal("x, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7566Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7589Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7591Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7592Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7593Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7596Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7619Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7621Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7622Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7623Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7626Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7649Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7651Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7652Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7653Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7654Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7656Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7675Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7679Assert.Equal("value", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7680Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7681Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7682Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7683Assert.Equal("value", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7684Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7685Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7686Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7709Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7711Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7712Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7713Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7716Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7739Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7741Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7742Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7743Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7746Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7765Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7769Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7770Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7771Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7772Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7773Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7774Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7775Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7776Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7795Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 7799Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7800Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7801Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7802Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7803Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7804Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7805Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7806Assert.Equal("this, value", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7823Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 7834Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7852Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 7863Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7920Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7921Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7925Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 7968Assert.Equal("test, a", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 7969Assert.Equal("test", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 7970Assert.Equal("this, test, a", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 7971Assert.Equal("this, test, a", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 7972Assert.Equal("a", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 7973Assert.Equal("test", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 7974Assert.Equal("test", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 7975Assert.Equal("this, test, a", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 8022Assert.Equal("k", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 8023Assert.Equal("j", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 8027Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 8028Assert.Equal("j", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 8029Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 8030Assert.Equal("j", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 8031Assert.Equal("j", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 8032Assert.Equal("p, i, k", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 8059Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 8063Assert.Equal("x", GetSymbolNamesJoined(analysis.UnsafeAddressTaken)); 8070Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 8075Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 8076Assert.Equal("px", GetSymbolNamesJoined(analysis.WrittenOutside)); 8194Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8226Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8262Assert.Equal("Local, Second", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8296Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8331Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8371Assert.Equal("Local, Second, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8404Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8407Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8409Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8412Assert.Equal("Local, Second, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8447Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8482Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8517Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8543Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 8544Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8545Assert.Equal("a", GetSymbolNamesJoined(results.ReadInside)); 8548Assert.Equal("a", GetSymbolNamesJoined(results.WrittenOutside)); 8549Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8573Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8574Assert.Equal("a", GetSymbolNamesJoined(results.DataFlowsOut)); 8576Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8578Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8579Assert.Equal("a", GetSymbolNamesJoined(results.ReadOutside)); 8581Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8611Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 8612Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8613Assert.Equal("a", GetSymbolNamesJoined(results.ReadInside)); 8616Assert.Equal("a", GetSymbolNamesJoined(results.WrittenOutside)); 8617Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8645Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8646Assert.Equal("a", GetSymbolNamesJoined(results.DataFlowsOut)); 8648Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8650Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8651Assert.Equal("a", GetSymbolNamesJoined(results.ReadOutside)); 8653Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8679Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 8680Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8681Assert.Equal("a", GetSymbolNamesJoined(results.ReadInside)); 8684Assert.Equal("a", GetSymbolNamesJoined(results.WrittenOutside)); 8685Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8709Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8710Assert.Equal("a", GetSymbolNamesJoined(results.DataFlowsOut)); 8712Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8714Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8715Assert.Equal("a", GetSymbolNamesJoined(results.ReadOutside)); 8717Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8747Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 8748Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8749Assert.Equal("a", GetSymbolNamesJoined(results.ReadInside)); 8752Assert.Equal("a", GetSymbolNamesJoined(results.WrittenOutside)); 8753Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8781Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8782Assert.Equal("a", GetSymbolNamesJoined(results.DataFlowsOut)); 8784Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8786Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8787Assert.Equal("a", GetSymbolNamesJoined(results.ReadOutside)); 8789Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8812Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8815Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8817Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8820Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8847Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8850Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8852Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8855Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8878Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8881Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8883Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8886Assert.Equal("Local", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8913Assert.Equal("a", GetSymbolNamesJoined(results.VariablesDeclared)); 8916Assert.Equal("a", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 8918Assert.Equal("a", GetSymbolNamesJoined(results.WrittenInside)); 8921Assert.Equal("Local, Sub", GetSymbolNamesJoined(results.UsedLocalFunctions)); 8951Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 8952Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 8956Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 8975Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 8977Assert.Equal("i, args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 8978Assert.Equal("i, args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 8979Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 8982Assert.Equal("i, lambda, args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 9000Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 9002Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 9003Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 9004Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 9007Assert.Equal("lambda, args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 9044Assert.Equal("c", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 9047Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 9056Assert.Equal(definitelyAssigned + ", args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 9059Assert.Equal("i1, i2, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 9060Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 9093Assert.Equal("c", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 9096Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnEntry)); 9105Assert.Equal(definitelyAssigned + ", args", GetSymbolNamesJoined(dataFlowAnalysisResults.DefinitelyAssignedOnExit)); 9108Assert.Equal("i1, i2, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 9109Assert.Equal("args", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 9126Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9141Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9156Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9172Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9188Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9204Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9220Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9237Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9293Assert.Equal("value", GetSymbolNamesJoined(results.DefinitelyAssignedOnEntry)); 9294Assert.Equal("value", GetSymbolNamesJoined(results.DefinitelyAssignedOnExit)); 9295Assert.Equal("value", GetSymbolNamesJoined(results.ReadInside)); 9298Assert.Equal("value", GetSymbolNamesJoined(results.WrittenOutside)); 9326Assert.Equal("value", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9327Assert.Equal("value", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 9328Assert.Equal("value", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 9329Assert.Equal("value", GetSymbolNamesJoined(analysis.ReadInside)); 9333Assert.Equal("value", GetSymbolNamesJoined(analysis.WrittenOutside)); 9361Assert.Equal("value", GetSymbolNamesJoined(analysis.DataFlowsIn)); 9362Assert.Equal("value", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 9363Assert.Equal("value", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 9364Assert.Equal("value", GetSymbolNamesJoined(analysis.ReadInside)); 9365Assert.Equal("result", GetSymbolNamesJoined(analysis.ReadOutside)); 9368Assert.Equal("value, result", GetSymbolNamesJoined(analysis.WrittenOutside)); 9644Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 9645Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 9649Assert.Equal(dataFlowsIn, GetSymbolNamesJoined(analysis.DataFlowsIn)); 9652Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 9653Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 9655Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 9659Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 9699Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 9700Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 9707Assert.Equal((thisIsAssignedOnEntry ? "this, " : "") + "x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 9708Assert.Equal((thisIsAssignedOnEntry ? "this, " : "") + "x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 9710Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 9711Assert.Equal("this", GetSymbolNamesJoined(analysis.ReadOutside)); 9714Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 9753Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 9754Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 9758Assert.Equal(dataFlowsIn, GetSymbolNamesJoined(analysis.DataFlowsIn)); 9761Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 9762Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 9764Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 9765Assert.Equal("this", GetSymbolNamesJoined(analysis.ReadOutside)); 9768Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 9911Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 9912Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 9916Assert.Equal(dataFlowsIn, GetSymbolNamesJoined(analysis.DataFlowsIn)); 9919Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 9920Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 9922Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 9926Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 10089Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 10092Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 10093Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 10095Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10099Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 10124Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 10125Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 10135Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10163Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 10164Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 10174Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10208Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 10211Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 10212Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 10214Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10218Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 10288Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 10291Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 10292Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 10294Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10298Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenOutside)); 10368Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 10371Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 10372Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 10374Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10378Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 10489Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10536Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 10539Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 10540Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 10542Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10546Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 10589Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 10592Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 10593Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 10595Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 10599Assert.Equal("this, x, y", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 10759Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 10760Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 10761Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 10766Assert.Equal(dataFlowsOut, GetSymbolNamesJoined(analysis.DataFlowsOut)); 10768Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 10769Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 10774Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 10775Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 10943Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 10944Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 10945Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 10950Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 10952Assert.Equal("this" + (xIsAssignedOnEntry ? ", x" : ""), GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 10953Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 10956Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 10958Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 10959Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 11023Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 11030Assert.Equal(dataFlowsOut, GetSymbolNamesJoined(analysis.DataFlowsOut)); 11032Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 11033Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 11038Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 11039Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenOutside)); 11109Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 11116Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 11119Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 11122Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 11124Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 11162Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 11169Assert.Equal(dataFlowsOut, GetSymbolNamesJoined(analysis.DataFlowsOut)); 11171Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 11172Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 11177Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 11178Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 11215Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 11222Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 11224Assert.Equal("this", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 11225Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 11228Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 11230Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 11231Assert.Equal("this", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 11343Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11344Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11351Assert.Equal("this, x, y, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 11352Assert.Equal("this, x, y, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 11354Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11358Assert.Equal("this, x, y, z", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 11410Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11411Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11418Assert.Equal("y, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 11419Assert.Equal("y, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 11421Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11425Assert.Equal("y, z", GetSymbolNamesJoined(analysis.WrittenOutside)); 11477Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11478Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11482Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 11485Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 11486Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 11488Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11492Assert.Equal("x, z", GetSymbolNamesJoined(analysis.WrittenOutside)); 11544Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11545Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11552Assert.Equal("z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 11553Assert.Equal("z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 11555Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11559Assert.Equal("z", GetSymbolNamesJoined(analysis.WrittenOutside)); 11585Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11586Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11590Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 11593Assert.Equal("this, x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 11594Assert.Equal("this, x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 11596Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11600Assert.Equal("this, x, z", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 11748Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11749Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11756Assert.Equal("this, x, y, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 11757Assert.Equal("this, x, y, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 11759Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11763Assert.Equal("this, x, y, z1, z2", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 11829Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11830Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11837Assert.Equal("y, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 11838Assert.Equal("y, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 11840Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11844Assert.Equal("y, z1, z2", GetSymbolNamesJoined(analysis.WrittenOutside)); 11953Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 11954Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 11961Assert.Equal("x, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 11962Assert.Equal("x, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 11964Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 11968Assert.Equal("x, z1, z2", GetSymbolNamesJoined(analysis.WrittenOutside)); 12077Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 12078Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 12085Assert.Equal("z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12086Assert.Equal("z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12088Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12092Assert.Equal("z1, z2", GetSymbolNamesJoined(analysis.WrittenOutside)); 12138Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 12139Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 12146Assert.Equal("this, x, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry, sort: true)); 12147Assert.Equal("this, x, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit, sort: true)); 12149Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12153Assert.Equal("this, x, z1, z2", GetSymbolNamesJoined(analysis.WrittenOutside, sort: true)); 12209Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 12210Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 12211Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 12216Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 12218Assert.Equal("z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12219Assert.Equal("x, z", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12222Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 12224Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12225Assert.Equal("z", GetSymbolNamesJoined(analysis.WrittenOutside)); 12342Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 12343Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 12344Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 12349Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 12351Assert.Equal("z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12352Assert.Equal("x, z1, z2", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12355Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 12357Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12358Assert.Equal("z1, z2", GetSymbolNamesJoined(analysis.WrittenOutside)); 12414Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 12421Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12422Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12428Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 12435Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12436Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenOutside)); 12455Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 12456Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 12463Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12464Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12469Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12470Assert.Equal("x, d", GetSymbolNamesJoined(analysis.WrittenOutside)); 12498Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 12505Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12506Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12512Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadOutside)); 12519Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12520Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenOutside)); 12546Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 12548Assert.Equal("x, i", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12549Assert.Equal("x, i", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12552Assert.Equal("x, i", GetSymbolNamesJoined(analysis.ReadOutside)); 12554Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12555Assert.Equal("x, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 12581Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsOut)); 12583Assert.Equal("x, i", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12584Assert.Equal("x, i", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12587Assert.Equal("x, i", GetSymbolNamesJoined(analysis.ReadOutside)); 12589Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12590Assert.Equal("x, i", GetSymbolNamesJoined(analysis.WrittenOutside)); 12615Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 12618Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12619Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12621Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12622Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12624Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12625Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12650Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 12653Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12654Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12656Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12657Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12659Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12660Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12688Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12689Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12692Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12695Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12720Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 12723Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12724Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12726Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12727Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12729Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12730Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12755Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 12758Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12759Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12761Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12762Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12764Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12765Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12790Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 12793Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12794Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12796Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12797Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12799Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12800Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12828Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12829Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12832Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12835Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12863Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12864Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12867Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12870Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12895Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 12898Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12899Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12901Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12902Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 12904Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12905Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12930Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 12933Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12934Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12936Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 12937Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 12939Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 12940Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 12968Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 12969Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 12972Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 12975Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13000Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13003Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13004Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13006Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13007Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13009Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 13010Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13035Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13038Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13039Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13041Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13042Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13044Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 13045Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13070Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13073Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13074Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13076Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13077Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13079Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 13080Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13108Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13109Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13112Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13115Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13143Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13144Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13147Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13150Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13184Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 13220Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13223Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13224Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13226Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13229Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 13230Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenOutside)); 13248Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 13258Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13263Assert.Equal("x", GetSymbolNamesJoined(analysis.WrittenInside)); 13289Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13292Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13293Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13295Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13296Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13299Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13324Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13327Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13328Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13330Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13331Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13334Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13362Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13363Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13366Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13369Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13392Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 13393Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 13397Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13400Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13401Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13403Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13404Assert.Equal("y", GetSymbolNamesJoined(analysis.ReadOutside)); 13407Assert.Equal("x, d, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13432Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13435Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13436Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13438Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13439Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13442Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13467Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13470Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13471Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13473Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13474Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13477Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13502Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13505Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13506Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13508Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13509Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13512Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13540Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13541Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13544Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13547Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13575Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13576Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13579Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13582Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13607Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13610Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13611Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13613Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13614Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13617Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13642Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13645Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13646Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13648Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13649Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13652Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13680Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13681Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13684Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13687Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13709Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 13710Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 13714Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13717Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13718Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13720Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13721Assert.Equal("y", GetSymbolNamesJoined(analysis.ReadOutside)); 13724Assert.Equal("x, d, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13749Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13752Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13753Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13755Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13756Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13759Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13784Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13787Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13788Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13790Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13791Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13794Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13819Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13822Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13823Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13825Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13826Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13829Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13857Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13858Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13861Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13864Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13892Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13893Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13896Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 13899Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13929Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13932Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13933Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13935Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13936Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 13939Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 13962Assert.Equal("x", GetSymbolNamesJoined(analysis.Captured)); 13963Assert.Equal("x", GetSymbolNamesJoined(analysis.CapturedInside)); 13967Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 13970Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 13971Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 13973Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 13974Assert.Equal("y", GetSymbolNamesJoined(analysis.ReadOutside)); 13977Assert.Equal("x, d, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 14007Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 14010Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 14011Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 14013Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 14014Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 14017Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 14047Assert.Equal("x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 14050Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 14051Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 14053Assert.Equal("x", GetSymbolNamesJoined(analysis.ReadInside)); 14054Assert.Equal(refModifier != "" ? "x, y" : "y", GetSymbolNamesJoined(analysis.ReadOutside)); 14057Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 14090Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnEntry)); 14091Assert.Equal("x", GetSymbolNamesJoined(analysis.DefinitelyAssignedOnExit)); 14094Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadOutside)); 14097Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)); 14121Assert.Equal("this", GetSymbolNamesJoined(flowAnalysis.ReadInside)); 14122Assert.Equal("this", GetSymbolNamesJoined(flowAnalysis.WrittenInside)); 14145Assert.Equal("this", GetSymbolNamesJoined(flowAnalysis.WrittenInside));
FlowAnalysis\StructTests.cs (3)
129Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 130Assert.Equal("s4", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 131Assert.Equal("s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned));
FlowAnalysis\TryLockUsingStatementTests.cs (198)
53Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 55Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 57Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 58Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 90Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 92Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 94Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 95Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 148Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 150Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 151Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 153Assert.Equal("this, para, by", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 205Assert.Equal("para, by", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 207Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 208Assert.Equal("para, by", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 210Assert.Equal("this, para, by", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 263Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 264Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 265Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 266Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 267Assert.Equal("para, by", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 268Assert.Equal("by", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 269Assert.Equal("this, para, by", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 305Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 307Assert.Equal("this, para", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 346Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 347Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 348Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 349Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 350Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 351Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 352Assert.Equal("this, para", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 410Assert.Equal("sb", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 412Assert.Equal("sb", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 413Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 452Assert.Equal("para, local", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 454Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 456Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 457Assert.Equal("para, local", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 458Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 492Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 494Assert.Equal("para, local", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 495Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 496Assert.Equal("para, local", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 497Assert.Equal("this, para", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 535Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 536Assert.Equal("ax", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 537Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 538Assert.Equal("ax", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 539Assert.Equal("para, local", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 540Assert.Equal("para", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 541Assert.Equal("this, para, local, ax", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 579Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 580Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 581Assert.Equal("p, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 582Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 583Assert.Equal("x, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 584Assert.Equal("this, p, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 618Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 619Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 620Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 621Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 622Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 623Assert.Equal("x, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 624Assert.Equal("this, p, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 662Assert.Equal("ax", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 663Assert.Equal("p, z, ax", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 664Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 668Assert.Equal("p, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 669Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 670Assert.Equal("p, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 671Assert.Equal("p, y, z, ax", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 672Assert.Equal("this, p, x, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 709Assert.Equal("s, ax, s, s", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 710Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 715Assert.Equal("s, ax, s, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 716Assert.Equal("this", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 743Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 780Assert.Equal("n", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 781Assert.Equal("n", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 782Assert.Equal("n", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 818Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 821Assert.Equal("ax", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 823Assert.Equal("y, ax", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 824Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 825Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 826Assert.Equal("this, x, y, s, ax", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 864Assert.Equal("s, ax, ex", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 865Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 866Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 867Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 869Assert.Equal("x, ax, ex", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 870Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 871Assert.Equal("x, s, ax, ex", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 872Assert.Equal("this, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 904Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 905Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 907Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 909Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 910Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 949Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 951Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 953Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 954Assert.Equal("this, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 996Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 997Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 998Assert.Equal("this, p", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1000Assert.Equal("this, p, i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1002Assert.Equal("y, i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1003Assert.Equal("this, p", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1053Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.VariablesDeclared), GetSymbolNamesJoined(dataFlowResults01.VariablesDeclared)); 1054Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.AlwaysAssigned), GetSymbolNamesJoined(dataFlowResults01.AlwaysAssigned)); 1055Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.DataFlowsIn), GetSymbolNamesJoined(dataFlowResults01.DataFlowsIn)); 1056Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.DataFlowsOut), GetSymbolNamesJoined(dataFlowResults01.DataFlowsOut)); 1057Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.ReadInside), GetSymbolNamesJoined(dataFlowResults01.ReadInside)); 1058Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.ReadOutside), GetSymbolNamesJoined(dataFlowResults01.ReadOutside)); 1059Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.WrittenInside), GetSymbolNamesJoined(dataFlowResults01.WrittenInside)); 1060Assert.Equal(GetSymbolNamesJoined(dataFlowResults02.WrittenOutside), GetSymbolNamesJoined(dataFlowResults01.WrittenOutside)); 1095Assert.Equal("e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 1096Assert.Equal("outp", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 1097Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 1098Assert.Equal("refp", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1099Assert.Equal("refp, outp", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 1100Assert.Equal("refp, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1101Assert.Equal("refp, outp, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1102Assert.Equal("refp, outp", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1103Assert.Equal("this, refp", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1138Assert.Equal("d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 1139Assert.Equal("outp, d", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 1140Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 1141Assert.Equal("refp", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1142Assert.Equal("outp", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 1143Assert.Equal("refp, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1144Assert.Equal("outp, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1145Assert.Equal("refp, outp", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1146Assert.Equal("refp, outp, e", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1185Assert.Equal("e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 1187Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 1188Assert.Equal("p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1190Assert.Equal("p, local, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1191Assert.Equal("e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1192Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1193Assert.Equal("p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1232Assert.Equal("d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)); 1233Assert.Equal("d", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 1234Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)); 1235Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)); 1237Assert.Equal("p, local, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)); 1238Assert.Equal("d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)); 1239Assert.Equal("p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)); 1240Assert.Equal("this, p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)); 1315Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 1355Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 1395Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)); 1420Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)); 1442Assert.Equal("c", GetSymbolNamesJoined(analysis.VariablesDeclared)); 1443Assert.Equal("c", GetSymbolNamesJoined(analysis.WrittenInside)); 1444Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside)); 1445Assert.Equal("this, x, c", GetSymbolNamesJoined(analysis.ReadInside)); 1447Assert.Equal("c", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 1448Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1471Assert.Equal("this, x, c", GetSymbolNamesJoined(analysis.WrittenOutside)); 1472Assert.Equal("this, x", GetSymbolNamesJoined(analysis.ReadInside)); 1473Assert.Equal("c", GetSymbolNamesJoined(analysis.ReadOutside)); 1475Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1504Assert.Equal("c", GetSymbolNamesJoined(analysis.VariablesDeclared)); 1505Assert.Equal("c", GetSymbolNamesJoined(analysis.WrittenInside)); 1506Assert.Equal("this, x", GetSymbolNamesJoined(analysis.WrittenOutside)); 1507Assert.Equal("this, x, c", GetSymbolNamesJoined(analysis.ReadInside)); 1509Assert.Equal("c", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 1510Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1541Assert.Equal("this, x, c", GetSymbolNamesJoined(analysis.WrittenOutside)); 1542Assert.Equal("this, x, c", GetSymbolNamesJoined(analysis.ReadInside)); 1545Assert.Equal("this, x, c", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1569Assert.Equal("this, x, c", GetSymbolNamesJoined(analysis.WrittenOutside)); 1570Assert.Equal("this, x", GetSymbolNamesJoined(analysis.ReadInside)); 1571Assert.Equal("c", GetSymbolNamesJoined(analysis.ReadOutside)); 1573Assert.Equal("this, x", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1599Assert.Equal("this", GetSymbolNamesJoined(analysis.WrittenOutside)); 1630Assert.Equal("name, obj", GetSymbolNamesJoined(analysis.WrittenOutside)); 1631Assert.Equal("name, obj", GetSymbolNamesJoined(analysis.ReadInside)); 1634Assert.Equal("name, obj", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1659Assert.Equal("obj", GetSymbolNamesJoined(analysis.WrittenInside)); 1660Assert.Equal("str", GetSymbolNamesJoined(analysis.WrittenOutside)); 1661Assert.Equal("str", GetSymbolNamesJoined(analysis.ReadInside)); 1662Assert.Equal("obj", GetSymbolNamesJoined(analysis.ReadOutside)); 1663Assert.Equal("obj", GetSymbolNamesJoined(analysis.AlwaysAssigned)); 1664Assert.Equal("str", GetSymbolNamesJoined(analysis.DataFlowsIn)); 1665Assert.Equal("obj", GetSymbolNamesJoined(analysis.DataFlowsOut)); 1693Assert.Equal("obj", GetSymbolNamesJoined(analysisDataflow.WrittenInside)); 1694Assert.Equal("str", GetSymbolNamesJoined(analysisDataflow.WrittenOutside)); 1695Assert.Equal("str", GetSymbolNamesJoined(analysisDataflow.ReadInside)); 1696Assert.Equal("obj", GetSymbolNamesJoined(analysisDataflow.ReadOutside)); 1697Assert.Equal("obj", GetSymbolNamesJoined(analysisDataflow.AlwaysAssigned)); 1698Assert.Equal("str", GetSymbolNamesJoined(analysisDataflow.DataFlowsIn)); 1732Assert.Equal("obj", GetSymbolNamesJoined(analysisDataflow.WrittenInside)); 1734Assert.Equal("obj", GetSymbolNamesJoined(analysisDataflow.ReadInside)); 1736Assert.Equal("obj", GetSymbolNamesJoined(analysisDataflow.AlwaysAssigned));
RefReadonlyParameterTests.cs (4)
1485Assert.Equal("Assembly2", modifier.ContainingAssembly.Name); 1497Assert.Equal("Assembly1", modifier.ContainingAssembly.Name); 6700Assert.Equal("I.M(in int)", m1.ExplicitInterfaceImplementations.Single().ToDisplayString()); 6707Assert.Equal("I.M(ref readonly int)", m2.ExplicitInterfaceImplementations.Single().ToDisplayString());
RefStructInterfacesTests.cs (2)
7985Assert.Equal("new S()", foreachSyntax.Expression.ToString()); 11067Assert.Equal("new S1()", foreachSyntax.Expression.ToString());
Semantics\CollectionExpressionTests.cs (40)
4793Assert.Equal("Program.AsCollection([1, 2, 3])", invocation.ToFullString()); 10287Assert.Equal("object[]", resultType); 10327Assert.Equal("List<int>", resultType); 14366Assert.Equal("(MyCollection<int>?)[1, 2, 3]", cast.ToFullString()); 14371Assert.Equal("[1, 2, 3]", value.ToFullString()); 14490Assert.Equal("(MyCollection<int>)/*<bind>*/[1, 2, 3]/*</bind>*/", cast.ToFullString()); 14495Assert.Equal("[1, 2, 3]/*</bind>*/", value.ToFullString()); 14573Assert.Equal("[2]", nestedCollection.ToFullString()); 14662Assert.Equal("[2]", nestedCollection.ToFullString()); 17096Assert.Equal("Create1", methodName); 19197Assert.Equal("Create", methodName); 19203Assert.Equal("Create", methodName); 19257Assert.Equal("Create", methodName); 19263Assert.Equal("Create", methodName); 19367Assert.Equal("Create", methodName); 19374Assert.Equal("Create", methodName); 28792Assert.Equal("[..values]", collection.ToString()); 29115Assert.Equal("[]", collection.ToString()); 29158Assert.Equal("[1, 2, 3]", collections[0].ToString()); 29163Assert.Equal("[]", collections[1].ToString()); 29205Assert.Equal("[1, 2, 3]", collection.ToString()); 32227Assert.Equal("[element]", collection.ToFullString()); 32233Assert.Equal("element", element.ToFullString()); 32324Assert.Equal("element1", element1.ToFullString()); 32330Assert.Equal("element2", element2.ToFullString()); 32366Assert.Equal("(string?)element1", element1.ToFullString()); 32372Assert.Equal("element2", element2.ToFullString()); 32411Assert.Equal("element1", element1.ToFullString()); 32417Assert.Equal("element2", element2.ToFullString()); 37387Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 37422Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 37459Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 37496Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 37533Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 37570Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 37613Assert.Equal("object.Object()", info.Symbol.ToDisplayString()); 41431Assert.Equal("y", expr.ToString()); 41486Assert.Equal("y", expr.ToString()); 41533Assert.Equal("y", expr.ToString()); 41585Assert.Equal("y", expr.ToString());
Semantics\ExperimentalAttributeTests.cs (36)
64Assert.Equal("DiagID1", diag.Id); 66Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 120Assert.Equal("DiagID1", diag.Id); 122Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 185Assert.Equal("DiagID1", diag.Id); 187Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 294Assert.Equal("DiagID1", diag.Id); 296Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 442Assert.Equal("DiagID1", diag.Id); 444Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 512Assert.Equal("DiagModule", diag.Id); 514Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1071Assert.Equal("DiagID1", diag.Id); 1073Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1100Assert.Equal("DiagID1", diag.Id); 1102Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1131Assert.Equal("DiagID1", diag.Id); 1133Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1162Assert.Equal("DiagID1", diag.Id); 1164Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1193Assert.Equal("DiagID1", diag.Id); 1195Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1812Assert.Equal("DiagID", diag.Id); 1814Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1853Assert.Equal("DiagID", diag.Id); 1855Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1894Assert.Equal("DiagID", diag.Id); 1896Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1920Assert.Equal("DiagID1", diag.Id); 1922Assert.Equal("https://example.org/DiagID1", diag.Descriptor.HelpLinkUri); 1946Assert.Equal("DiagID1", diag.Id); 1948Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri); 1977Assert.Equal("DiagID1", diag.Id); 1979Assert.Equal("", diag.Descriptor.HelpLinkUri); 2003Assert.Equal("DiagID1", diag.Id); 2005Assert.Equal(DefaultHelpLinkUri, diag.Descriptor.HelpLinkUri);
Semantics\InlineArrayTests.cs (17)
2360Assert.Equal("b[c]", c.Parent.Parent.Parent.ToString()); 2395Assert.Equal("b[c]", c.Parent.Parent.Parent.ToString()); 2429Assert.Equal("b[c]", c.Parent.Parent.Parent.ToString()); 2509Assert.Equal("x.F[0]", f.Parent.Parent.ToString()); 6022Assert.Equal("x.F[^10]", f.Parent.Parent.ToString()); 6188Assert.Equal("x.F[..5]", f.Parent.Parent.ToString()); 8107Assert.Equal("[0]", f.ToString()); 8824Assert.Equal("M3()[0]", m3.Parent.ToString()); 9192Assert.Equal("M3()[..]", m3.Parent.Parent.ToString()); 10536Assert.Equal("c.F[0]", f.Parent.Parent.ToString()); 11280Assert.Equal("c.F[..5]", f.Parent.Parent.ToString()); 15198Assert.Equal("=> x.F", f[^2].Parent.Parent.ToString()); 15205Assert.Equal("=> x.F", f[^1].Parent.Parent.ToString()); 16485Assert.Equal("M3()", m3.ToString()); 18547Assert.Equal("x.F", f.ToString()); 18873Assert.Equal("x.F", f.ToString()); 19210Assert.Equal("GetBuffer(x)", collection.ToString());
Semantics\LockTests.cs (1)
185Assert.Equal("l", localSymbol.Name);
Semantics\OutVarTests.cs (44)
20052Assert.Equal("System.Console.WriteLine(y)", yRef[2].Parent.Parent.Parent.ToString()); 32935Assert.Equal("int _", declaration1.ToString()); 32944Assert.Equal("var _", declaration2.ToString()); 33019Assert.Equal("int _", declaration1.ToString()); 33023Assert.Equal("int", declaration1.Type.ToString()); 33035Assert.Equal("var _", declaration2.ToString()); 33039Assert.Equal("var", declaration2.Type.ToString()); 33050Assert.Equal("int _", discard3Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 33091Assert.Equal("long _", declaration1.ToString()); 33095Assert.Equal("long", declaration1.Type.ToString()); 33133Assert.Equal("alias1 _", declaration1.ToString()); 33137Assert.Equal("alias1", declaration1.Type.ToString()); 33149Assert.Equal("var _", declaration2.ToString()); 33153Assert.Equal("var", declaration2.Type.ToString()); 33197Assert.Equal("alias1 _", declaration1.ToString()); 33201Assert.Equal("alias1", declaration1.Type.ToString()); 33213Assert.Equal("var _", declaration2.ToString()); 33218Assert.Equal("var", declaration2.Type.ToString()); 33459Assert.Equal("x", x.ToString()); 35132Assert.Equal("var", varType.ToString()); 35171Assert.Equal("var", varType.ToString()); 35215Assert.Equal("var", varType.ToString()); 35246Assert.Equal("var", varType.ToString()); 35285Assert.Equal("var", varType.ToString()); 35317Assert.Equal("var", varType.ToString()); 35353Assert.Equal("var", varType.ToString()); 35392Assert.Equal("var", varType.ToString()); 35422Assert.Equal("var", varType.ToString()); 35459Assert.Equal("var", varType.ToString()); 35806Assert.Equal("new T(out var z)", node.ToString()); 35852Assert.Equal("new T(out var z) {F1 = 1}", node.ToString()); 35936Assert.Equal(": this(out var x)", initializerSyntax.ToString()); 35955Assert.Equal("{ M(out var y); }", blockBodySyntax.ToString()); 35980Assert.Equal("=> M(out var z)", expressionBodySyntax.ToString()); 36076Assert.Equal("=> M(out var y)", expressionBodySyntax.ToString()); 36100Assert.Equal("{return M(out var x);}", blockBodySyntax.ToString()); 36124Assert.Equal("=> M(out var z)", propertyExpressionBodySyntax.ToString()); 36184Assert.Equal("=> M(out var z)", node3.ToString()); 36319Assert.Equal("M2(out var x)", invocation.ToString()); 36365Assert.Equal("M2(out var x)", invocation.ToString()); 36405Assert.Equal("M2(out var x)", invocation.ToString()); 36447Assert.Equal(@"M2(out var a, ""b"")", invocation.ToString()); 36482Assert.Equal("M2(out var x)", invocation.ToString()); 36520Assert.Equal(@"M2(out var a, ""b"")", invocation.ToString());
Semantics\ParamsCollectionTests.cs (4)
121Assert.Equal("Test()", nodes[0].ToString()); 134Assert.Equal("Test(1)", nodes[1].ToString()); 150Assert.Equal("Test(2, 3)", nodes[2].ToString()); 9029Assert.Equal("System.Diagnostics.CodeAnalysis.UnscopedRefAttribute", p1.GetAttributes().Single().ToString());
Semantics\PatternMatchingTestBase.cs (5)
82Assert.Equal(designation.Identifier.ValueText, symbol.Name); 143Assert.Equal(designation.Identifier.ValueText, symbol.Name); 169Assert.Equal(declarator.Identifier.ValueText, symbol.Name); 183Assert.Equal(designation.Identifier.ValueText, symbol.Name); 245Assert.Equal(designation.Identifier.ValueText, symbol.Name);
Semantics\PatternMatchingTests.cs (5)
3579Assert.Equal("o.Equals is()", node.ToString()); 4294Assert.Equal("int _", declaration1.ToString()); 4302Assert.Equal("var _", declaration2.ToString()); 4308Assert.Equal("int _", declaration3.ToString()); 4315Assert.Equal("var _", declaration4.ToString());
Semantics\PatternMatchingTests_ListPatterns.cs (20)
3331Assert.Equal(name, local.Name); 3338Assert.Equal(name, local.Name); 3643Assert.Equal(syntax, designation.ToString()); 3647Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString()); 3652Assert.Equal(type, typeInfo.Type.ToDisplayString()); 3653Assert.Equal(type, typeInfo.ConvertedType.ToDisplayString()); 3688Assert.Equal(syntax, clause.Parent.Parent.ToString()); 3691Assert.Equal(type, typeInfo.Type.ToDisplayString()); 3692Assert.Equal(type, typeInfo.ConvertedType.ToDisplayString()); 3723Assert.Equal("item", itemDesignation.ToString()); 3738Assert.Equal("slice", sliceDesignation.ToString()); 4096Assert.Equal(name, local.Name); 4183Assert.Equal(name, local.Name); 4260Assert.Equal(name, local.Name); 4375Assert.Equal(name, local.Name); 4413Assert.Equal(syntax, designation.ToString()); 4417Assert.Equal(declaredType, ((ILocalSymbol)symbol).Type.ToDisplayString()); 4422Assert.Equal(type, typeInfo.Type.ToDisplayString()); 4423Assert.Equal(type, typeInfo.ConvertedType.ToDisplayString()); 4567Assert.Equal(name, local.Name);
Semantics\PatternMatchingTests2.cs (19)
725Assert.Equal("int", ((ILocalSymbol)symbol).Type.ToDisplayString()); 731Assert.Equal("int", typeInfo.Type.ToDisplayString()); 2021Assert.Equal("return obj is global::Class1 @class && this.i == @class.i;", returnStatement.ToString()); 2023Assert.Equal("return obj is Class1 @class && this.i == @class.i;", modifiedReturnStatement.ToString()); 2062Assert.Equal("return obj is global::Class1 @class;", returnStatement.ToString()); 2064Assert.Equal("return obj is Class1 @class;", modifiedReturnStatement.ToString()); 2164Assert.Equal(ex.Source, pat.ToString()); 2254Assert.Equal("T2 (var t3, t4: T4 t4) { V5 : T6 t5 }", patterns[0].ToString()); 2259Assert.Equal("var t3", patterns[1].ToString()); 2264Assert.Equal("T4 t4", patterns[2].ToString()); 2269Assert.Equal("T6 t5", patterns[3].ToString()); 2298Assert.Equal("Point(3, 4.0)", patterns[0].ToString()); 2303Assert.Equal("3", patterns[1].ToString()); 2308Assert.Equal("4.0", patterns[2].ToString()); 2344Assert.Equal("Point(3, 4.0) { Missing: Xyzzy }", patterns[0].ToString()); 2349Assert.Equal("3", patterns[1].ToString()); 2355Assert.Equal("4.0", patterns[2].ToString()); 2361Assert.Equal("Xyzzy", patterns[3].ToString()); 2368Assert.Equal("Q7 t", patterns[4].ToString());
Semantics\PatternMatchingTests3.cs (53)
4116Assert.Equal("((N, N))", pattern.ToString()); 4122Assert.Equal("(N, N)", pattern.ToString()); 4129Assert.Equal("N", pattern.ToString()); 4138Assert.Equal("(((long), (long)))", pattern.ToString()); 4144Assert.Equal("((long), (long))", pattern.ToString()); 4151Assert.Equal("(long)", pattern.ToString()); 4158Assert.Equal("long", pattern.ToString()); 4165Assert.Equal("(int, int)", pattern.ToString()); 4173Assert.Equal("int", pattern.ToString()); 4180Assert.Equal("(System.Int64, System.Int32)", pattern.ToString()); 4186Assert.Equal("System.Int64", pattern.ToString()); 4193Assert.Equal("System.Int32", pattern.ToString()); 4200Assert.Equal("(>= A and <= Z) or (>= a and <= z)", pattern.ToString()); 4206Assert.Equal("(>= A and <= Z)", pattern.ToString()); 4212Assert.Equal(">= A and <= Z", pattern.ToString()); 4218Assert.Equal(">= A", pattern.ToString()); 4225Assert.Equal("<= Z", pattern.ToString()); 4232Assert.Equal("(>= a and <= z)", pattern.ToString()); 4238Assert.Equal(">= a and <= z", pattern.ToString()); 4244Assert.Equal(">= a", pattern.ToString()); 4251Assert.Equal("<= z", pattern.ToString()); 4258Assert.Equal("not (> c0 and < c9)", pattern.ToString()); 4264Assert.Equal("(> c0 and < c9)", pattern.ToString()); 4270Assert.Equal("> c0 and < c9", pattern.ToString()); 4276Assert.Equal("> c0", pattern.ToString()); 4283Assert.Equal("< c9", pattern.ToString()); 4343Assert.Equal("((N, N))", pattern.ToString()); 4349Assert.Equal("(N, N)", pattern.ToString()); 4356Assert.Equal("N", pattern.ToString()); 4365Assert.Equal("(((long), (long)))", pattern.ToString()); 4371Assert.Equal("((long), (long))", pattern.ToString()); 4378Assert.Equal("(long)", pattern.ToString()); 4385Assert.Equal("long", pattern.ToString()); 4392Assert.Equal("((N))", pattern.ToString()); 4400Assert.Equal("(int, int)", pattern.ToString()); 4407Assert.Equal("int", pattern.ToString()); 4414Assert.Equal("(System.Int64, System.Int32)", pattern.ToString()); 4420Assert.Equal("System.Int64", pattern.ToString()); 4427Assert.Equal("System.Int32", pattern.ToString()); 4434Assert.Equal("(>= A and <= Z) or (>= a and <= z)", pattern.ToString()); 4440Assert.Equal("(>= A and <= Z)", pattern.ToString()); 4446Assert.Equal(">= A and <= Z", pattern.ToString()); 4452Assert.Equal(">= A", pattern.ToString()); 4459Assert.Equal("<= Z", pattern.ToString()); 4466Assert.Equal("(>= a and <= z)", pattern.ToString()); 4472Assert.Equal(">= a and <= z", pattern.ToString()); 4478Assert.Equal(">= a", pattern.ToString()); 4485Assert.Equal("<= z", pattern.ToString()); 4492Assert.Equal("not (> c0 and < c9)", pattern.ToString()); 4498Assert.Equal("(> c0 and < c9)", pattern.ToString()); 4504Assert.Equal("> c0 and < c9", pattern.ToString()); 4510Assert.Equal("> c0", pattern.ToString()); 4517Assert.Equal("< c9", pattern.ToString());
Semantics\PatternMatchingTests4.cs (1)
4829Assert.Equal("x", x.ToString());
Semantics\PrimaryConstructorTests.cs (87)
422Assert.Equal("int x", parameters[0].ToString()); 425Assert.Equal("string y", parameters[1].ToString()); 1008Assert.Equal("= X", x.Parent.ToString()); 1073Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1086Assert.Equal("Base(X, Y)", baseWithargs.ToString()); 1186Assert.Equal("= 123", equalsValue.ToString()); 1195Assert.Equal(": this(X, Y)", baseWithargs.ToString()); 1222Assert.Equal("= 124", equalsValue.ToString()); 1301Assert.Equal("Test(X, out var y)", x.Parent.Parent.Parent.ToString()); 1312Assert.Equal("y", y.Parent.ToString()); 1313Assert.Equal("(Test(X, out var y), y)", y.Parent.Parent.ToString()); 1314Assert.Equal("Base(Test(X, out var y), y)", y.Parent.Parent.Parent.ToString()); 1325Assert.Equal("(Test(X, out var y), y)", test.Parent.Parent.Parent.ToString()); 1366Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1412Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1424Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1426Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 1472Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1485Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1488Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 1530Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1541Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1553Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1577Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 1619Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1630Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 1642Assert.Equal("C", classDeclarations[0].Identifier.ValueText); 1645Assert.Equal("C", classDeclarations[1].Identifier.ValueText); 1815Assert.Equal("Base(X)", x.Parent.Parent.Parent.ToString()); 1855Assert.Equal("Base(X)", x.Parent.Parent.Parent.ToString()); 1898Assert.Equal("Base(X)", x.Parent.Parent.Parent.ToString()); 1968Assert.Equal("Base(X, Y)", x.Parent.Parent.Parent.ToString()); 2119Assert.Equal("Base(GetInt(X, out var xx) + xx, Y)", baseWithargs.ToString()); 2222Assert.Equal(": this(X, Y, Z, 1)", baseWithargs.ToString()); 2301Assert.Equal("Base(GetInt(X, out var xx) + xx, Y)", baseWithargs.ToString()); 2361Assert.Equal(": base(X, Y, Z, 1)", baseWithargs.ToString()); 2426Assert.Equal("Base(X)", x.Parent.Parent.Parent.ToString()); 2475Assert.Equal("Error1(0, 1)", baseWithargs.ToString()); 2479Assert.Equal("Error1(0)", speculativeBase.ToString()); 2485Assert.Equal("Error2()", baseWithoutargs.ToString()); 2490Assert.Equal("Error3", baseWithoutParens.ToString()); 2642Assert.Equal("= X + 1", x.Parent.Parent.ToString()); 2653Assert.Equal("C", typeDeclaration.Identifier.ValueText); 2680Assert.Equal("= X + 1", x.Parent.Parent.ToString()); 2717Assert.Equal("= X + 1", x.Parent.Parent.ToString()); 2753Assert.Equal("() => X + 1", x.Parent.Parent.ToString()); 3223Assert.Equal("A", c.PrimaryConstructor.GetAttributes().Single().ToString()); 3379Assert.Equal("A", c.GetAttributes().Single().ToString()); 3400Assert.Equal("A", c.GetAttributes().Single().ToString()); 3444Assert.Equal("A", c1.PrimaryConstructor.GetAttributes().Single().ToString()); 3450Assert.Equal("A", c2.PrimaryConstructor.GetAttributes().Single().ToString()); 3506Assert.Equal("A", c1.PrimaryConstructor.GetAttributes().Single().ToString()); 3512Assert.Equal("B", c2.PrimaryConstructor.GetAttributes().Single().ToString()); 3536Assert.Equal(@"A(""someParam"")", c.PrimaryConstructor.GetAttributes().Single().ToString()); 4516Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 4519Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 4527Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 4530Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 4533Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 4541Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 4544Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 4549Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 4650Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 4653Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 4663Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 4666Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 4669Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 4679Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 4682Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 4687Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 4724Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 4727Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 4735Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 4738Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 4741Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 4749Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 4752Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 4757Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 5791Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 5794Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 6092Assert.Equal(identifier, x.Identifier.ValueText); 15717Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attr[0].ToString()); 15718Assert.Equal("System.Diagnostics.DebuggerBrowsableAttribute(System.Diagnostics.DebuggerBrowsableState.Never)", attr[1].ToString()); 15739Assert.Equal("System.Runtime.CompilerServices.NativeIntegerAttribute", attr[0].ToString()); 15760Assert.Equal("System.Runtime.CompilerServices.TupleElementNamesAttribute({\"i1\", \"i2\"})", attr[0].ToString()); 15781Assert.Equal("System.Runtime.CompilerServices.DynamicAttribute", attr[0].ToString()); 19773Assert.Equal("c[2]", indexer.ToString());
Semantics\RecordTests.cs (86)
1817Assert.Equal("Main", main.Identifier.ToString()); 2490Assert.Equal("X", x.ToString()); 3447Assert.Equal("record C1", namedTypeSymbol 3478Assert.Equal("record C1", namedTypeSymbol 3537Assert.Equal("record C1", namedTypeSymbol 3640Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 3743Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 3856Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 3969Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 4081Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 4194Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 4602Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 4705Assert.Equal("class A", comp.GlobalNamespace.GetTypeMember("A") 8131Assert.Equal("Main", main.Identifier.ToString()); 8631Assert.Equal("Main", main.Identifier.ToString()); 8736Assert.Equal("Main", main.Identifier.ToString()); 21145Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21158Assert.Equal("Base(X, Y)", baseWithargs.ToString()); 21259Assert.Equal("= 123", equalsValue.ToString()); 21269Assert.Equal(": this(X, Y)", baseWithargs.ToString()); 21296Assert.Equal("= 124", equalsValue.ToString()); 21375Assert.Equal("Test(X, out var y)", x.Parent!.Parent!.Parent!.ToString()); 21386Assert.Equal("y", y.Parent!.ToString()); 21387Assert.Equal("(Test(X, out var y), y)", y.Parent!.Parent!.ToString()); 21388Assert.Equal("Base(Test(X, out var y), y)", y.Parent!.Parent!.Parent!.ToString()); 21399Assert.Equal("(Test(X, out var y), y)", test.Parent!.Parent!.Parent!.ToString()); 21440Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21486Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21498Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21500Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21546Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21559Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21562Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21604Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21615Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21627Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21651Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21693Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21704Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 21716Assert.Equal("C", recordDeclarations[0].Identifier.ValueText); 21719Assert.Equal("C", recordDeclarations[1].Identifier.ValueText); 21889Assert.Equal("Base(X)", x.Parent!.Parent!.Parent!.ToString()); 21926Assert.Equal("Base(X)", x.Parent!.Parent!.Parent!.ToString()); 21966Assert.Equal("Base(X)", x.Parent!.Parent!.Parent!.ToString()); 22001Assert.Equal("Base(X)", x.Parent!.Parent!.Parent!.ToString()); 22080Assert.Equal("Base(X, Y)", x.Parent!.Parent!.Parent!.ToString()); 22231Assert.Equal("Base(GetInt(X, out var xx) + xx, Y)", baseWithargs.ToString()); 22334Assert.Equal(": this(X, Y, Z, 1)", baseWithargs.ToString()); 22413Assert.Equal("Base(GetInt(X, out var xx) + xx, Y)", baseWithargs.ToString()); 22473Assert.Equal(": base(X, Y, Z, 1)", baseWithargs.ToString()); 23372Assert.Equal("B", recordDeclaration.Identifier.ValueText); 24128Assert.Equal("B.Equals(B)", b.FindImplementationForInterfaceMember(b.InterfacesNoUseSiteDiagnostics()[1].GetMember("Equals")).ToDisplayString()); 24130Assert.Equal("C.Equals(C?)", c.FindImplementationForInterfaceMember(c.InterfacesNoUseSiteDiagnostics()[1].GetMember("Equals")).ToDisplayString()); 24644Assert.Equal("= X + 1", x.Parent!.Parent!.ToString()); 24655Assert.Equal("C", recordDeclaration.Identifier.ValueText); 24679Assert.Equal("= X + 1", x.Parent!.Parent!.ToString()); 24713Assert.Equal("= X + 1", x.Parent!.Parent!.ToString()); 24748Assert.Equal("() => X + 1", x.Parent!.Parent!.ToString()); 26090Assert.Equal("class A", 26979Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 26982Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 26990Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 26993Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 26996Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27004Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27007Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27012Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 27113Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 27116Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 27126Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 27129Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 27132Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27142Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27145Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27150Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 27187Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 27190Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 27198Assert.Equal("= 1", context.OperationBlocks[0].Syntax.ToString()); 27201Assert.Equal("Attr2(200)", context.OperationBlocks[1].Syntax.ToString()); 27204Assert.Equal("A(2)", context.OperationBlocks[2].Syntax.ToString()); 27212Assert.Equal("= 4", context.OperationBlocks[0].Syntax.ToString()); 27215Assert.Equal("Attr3(300)", context.OperationBlocks[1].Syntax.ToString()); 27220Assert.Equal(": base(5)", context.OperationBlocks[3].Syntax.ToString()); 28188Assert.Equal(identifier, x.Identifier.ValueText); 28264Assert.Equal(expected, actual); 28345Assert.Equal("I1", cref.ToString());
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (9)
ConvertToRecord\ConvertToRecordCodeRefactoringTests.cs (1)
95Assert.Equal(codeAction.EquivalenceKey, action.EquivalenceKey);
EditAndContinue\SyntaxUtilitiesTests.cs (2)
107Assert.Equal("0", leftNode.ToString()); 157Assert.Equal("3", leftNode.ToString());
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (6)
1426Assert.Equal("c", symbolRenamedOperation._symbol.Name); 1427Assert.Equal("C", symbolRenamedOperation._newName); 1451Assert.Equal("test", symbolRenamedOperation._symbol.Name); 1452Assert.Equal("ITest", symbolRenamedOperation._newName); 1481Assert.Equal("arg", symbolRenamedOperation._symbol.Name); 1482Assert.Equal("TArg", symbolRenamedOperation._newName);
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (10)
IOperation\IOperationTests.cs (5)
464Assert.Equal("(x, y, z) = (1, 2, 3)", assignments[0].ToString()); 470Assert.Equal("(x, y, z) = new C()", assignments[1].ToString()); 476Assert.Equal("var (a, b) = (1, 2)", assignments[2].ToString()); 559Assert.Equal("a.b", expr.ToString()); 564Assert.Equal("b", fieldOperation.Field.Name);
IOperation\IOperationTests_ILocalFunctionStatement.cs (2)
1800Assert.Equal("d1", localFunctionD1.Name); 1810Assert.Equal("d2", localFunctionD2.Name);
IOperation\IOperationTests_IVariableDeclaration.cs (3)
929Assert.Equal(@"10", literalExpr.ToString()); 936Assert.Equal(@"M2()", invocExpr.ToString()); 944Assert.Equal("M2", invocInfo.Symbol.MetadataName);
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (5)
ObjectFormatterTests.cs (5)
29Assert.Equal("ArrayList(4) { 1, 2, true, \"goo\" }", str); 56Assert.Equal("Queue(3) { 1, 2, 3 }", str); 68Assert.Equal("Stack(3) { 3, 2, 1 }", str); 80Assert.Equal("SortedList(3) { { 1, 5 }, { 2, 6 }, { 3, 4 } }", str); 86Assert.Equal("SortedList(1) { { int[1] { 3 }, int[1] { 4 } } }", str);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (113)
CommandLineRunnerTests.cs (7)
257Assert.Equal( 269Assert.Equal( 286Assert.Equal( 298Assert.Equal( 313Assert.Equal( 594Assert.Equal(expectedOutput, PathUtilities.GetDirectoryName(path, isUnixLike: false)); 829Assert.Equal(
InteractiveSessionTests.cs (11)
166Assert.Equal("True False True", script.EvaluateAsync().Result.ToString()); 287Assert.Equal("bar", dllImport.EntryPoint); 288Assert.Equal("goo", dllImport.Value); 657Assert.Equal("HostObjectToString impl", state3.ReturnValue); 672Assert.Equal("System.Object", state2.ReturnValue); 1564Assert.Equal("2", s1.ReturnValue); 1931Assert.Equal("Bang!", state1.Exception.Message); 1958Assert.Equal("Bang!", state2.Exception.Message); 1986Assert.Equal("Bang!", state3.Exception.Message); 2006Assert.Equal("Bang 1!", state1.Exception.Message); 2014Assert.Equal("Bang 2!", state2.Exception.Message);
ObjectFormatterTests.cs (66)
38Assert.Equal(@"Outer.Nested<int> { A=1, B=2 }", str); 41Assert.Equal(@"Outer.Nested<int>", str); 44Assert.Equal(@"A<int>.B<int>", str); 48Assert.Equal(@"A<int>.B<bool>.C.D<string, double>.E", str); 52Assert.Equal(@"Sort { aB=-1, ab=1, Ac=-1, Ad=1, ad=-1, aE=1, aF=-1...", str); 56Assert.Equal(@"Sort ...", str); 60Assert.Equal(@"Sort...", str); 63Assert.Equal(@"Sor...", str); 66Assert.Equal(@"So...", str); 69Assert.Equal(@"S...", str); 72Assert.Equal(@"Sort { aB=-1, ab=1, Ac=-1, Ad=1, ad=-1, aE=1, aF=-1, AG=1 }", str); 79Assert.Equal("(1, 2)", s_formatter.FormatObject(tup)); 86Assert.Equal("(1, 2)", s_formatter.FormatObject(tup)); 93Assert.Equal("ObjectFormatterFixtures.Signatures.ArrayParameters(int[], int[,], int[,,])", result); 101Assert.Equal("int[4] { 3, 4, 5, 6 }", str); 113Assert.Equal(@"RecursiveRootHidden { A=0, B=0 }", str); 150Assert.Equal(name, actualName); 155Assert.Equal(name, actualName); 268Assert.Equal("InheritedDebuggerDisplay(DebuggerDisplayValue)", str); 277Assert.Equal("TypeWithDebuggerDisplayAndProxy(DD) { A=0, B=0 }", str); 303Assert.Equal(ScriptingResources.StackOverflowWhileEvaluating, str); 333Assert.Equal("object[5] { 1, { ... }, ListNode { data={ ... }, next=ListNode { data=object[4] { 7, ListNode { ... }, 8, { ... } }, next=ListNode { ... } } }, object[5] { 4, 5, { ... }, 6, ListNode { data=null, next=null } }, 3 }", str); 371Assert.Equal("LongMembers { LongNa...", str); 374Assert.Equal($"LongMembers {{{Environment.NewLine} LongName0123456789...{Environment.NewLine} LongValue: \"012345...{Environment.NewLine}}}{Environment.NewLine}", str); 414Assert.Equal("int[2, 3, 4] { { { 0, 1, 2, 3 }, { 10, 11, 12, 13 }, { 20, 21, 22, 23 } }, { { 100, 101, 102, 103 }, { 110, 111, 112, 113 }, { 120, 121, 122, 123 } } }", str); 427Assert.Equal("int[2][,][,,,] { int[1, 2][,,,] { { int[1, 2, 3, 4] { { { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }, { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } } } }, null } }, null }", str); 431Assert.Equal("object[2..4, 9..12] { { null, null, null }, { null, null, null } }", str); 435Assert.Equal("object[1, 1] { { null } }", str); 439Assert.Equal("object[0, 0] { }", str); 451Assert.Equal("ObjectFormatterTests.CoreRangeIterator(Count = 10)", str); 485Assert.Equal("RangeIterator { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }", str); 514Assert.Equal($"Enumerable.{iteratorType}<int> {{ 0, 1, 2, 3, 4, !<Exception> ... }}", str); 525Assert.Equal("ThrowingDictionary(10) { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 } }", str); 544Assert.Equal("ThrowingDictionary(10) { { 1, 1 }, { 2, 2 }, !<Exception> ... }", str); 553Assert.Equal("BitArray(32) { true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }", str); 565Assert.Equal("Queue<int>(3) { 1, 2, 3 }", str); 577Assert.Equal("Stack<int>(3) { 3, 2, 1 }", str); 596Assert.Equal("Dictionary<string, int>(1) { { \"x\", 1 } }", str); 605Assert.Equal("KeyValuePair<int, string> { 1, \"x\" }", str); 614Assert.Equal("List<object>(3) { 1, 2, 'c' }", str); 626Assert.Equal("LinkedList<int>(3) { 1, 2, 3 }", str); 638Assert.Equal("SortedList<int, int>(3) { { 1, 5 }, { 2, 6 }, { 3, 4 } }", str); 644Assert.Equal("SortedList<int[], int[]>(1) { { int[1] { 3 }, int[1] { 4 } } }", str); 658Assert.Equal("SortedDictionary<int, int>(3) { { 0x00000001, 0x0000001a }, { 0x00000002, 0x0000002b }, { 0x00000003, 0x0000003c } }", str); 671Assert.Equal("HashSet<int>(Count = 2) { 1, 2 }", str); 682Assert.Equal("SortedSet<int>(2) { 1, 2 }", str); 693Assert.Equal("ConcurrentDictionary<string, int>(1) { { \"x\", 1 } }", str); 705Assert.Equal("ConcurrentQueue<object>(3) { 1, 2, 3 }", str); 717Assert.Equal("ConcurrentStack<object>(3) { 3, 2, 1 }", str); 728Assert.Equal("BlockingCollection<int>(2) { 1, 2 }", str); 748Assert.Equal("ReadOnlyCollection<int>(3) { 1, 2, 3 }", str); 759Assert.Equal("Lazy<int[]>(ThreadSafetyMode=None, IsValueCreated=false, IsValueFaulted=false, Value=null) { IsValueCreated=false, IsValueFaulted=false, Mode=None, Value=null }", str); 772Assert.Equal("Lazy<int[]>(ThreadSafetyMode=None, IsValueCreated=true, IsValueFaulted=false, Value=int[2] { 1, 2 }) { IsValueCreated=true, IsValueFaulted=false, Mode=None, Value=int[2] { 1, 2 } }", str); 793Assert.Equal( 815Assert.Equal("MockDesktopSpinLock(IsHeld = false) { IsHeld=false, IsHeldByCurrentThread=!<InvalidOperationException>, OwnerThreadID=null }", str); 831Assert.Equal("MockDesktopSpinLock(IsHeld = false) { IsHeld=false, IsHeldByCurrentThread=true, OwnerThreadID=0 }", str); 851Assert.Equal("DiagnosticBag(Count = 2) { =error CS0180: 'bar' cannot be both extern and abstract, =error CS1679: Invalid extern alias for '/reference'; 'goo' is not a valid identifier }", str); 868Assert.Equal("ArrayBuilder<int>(Count = 5) { 1, 2, 3, 4, 5 }", str); 887Assert.Equal("object..ctor()", signature); // Checking for exceptions, more than particular output. 947Assert.Equal(expected, actual); 971Assert.Equal(expected, actual); 995Assert.Equal(expected, actual); 1019Assert.Equal(expected, actual); 1052Assert.Equal(expected, actual); 1092Assert.Equal(expected, actual); 1117Assert.Equal(expected, actual);
PrintOptionsTests.cs (24)
50Assert.Equal("10", formatter.FormatObject(10, options)); 51Assert.Equal("int[10] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }", formatter.FormatObject(new int[10], options)); 52Assert.Equal(@"16 '\u0010'", formatter.FormatObject('\u0010', options)); 55Assert.Equal("0x0000000a", formatter.FormatObject(10, options)); 56Assert.Equal("int[0x0000000a] { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }", formatter.FormatObject(new int[10], options)); 57Assert.Equal(@"0x0010 '\u0010'", formatter.FormatObject('\u0010', options)); 66Assert.Equal("PrintOptions", s_formatter.FormatObject(options, options)); 69Assert.Equal("PrintOptions { Ellipsis=\"...\", EscapeNonPrintableCharacters=true, MaximumOutputLength=1024, MemberDisplayFormat=SingleLine, NumberRadix=10 }", s_formatter.FormatObject(options, options)); 72Assert.Equal(@"PrintOptions { 91Assert.Equal(@"""\t""", s_formatter.FormatObject("\t", options)); 92Assert.Equal(@"'\t'", s_formatter.FormatObject('\t', options)); 95Assert.Equal("\"\t\"", s_formatter.FormatObject("\t", options)); 96Assert.Equal("'\t'", s_formatter.FormatObject('\t', options)); 105Assert.Equal("1...", s_formatter.FormatObject(123456, options)); 108Assert.Equal("12...", s_formatter.FormatObject(123456, options)); 111Assert.Equal("123...", s_formatter.FormatObject(123456, options)); 114Assert.Equal("1234...", s_formatter.FormatObject(123456, options)); 117Assert.Equal("12345...", s_formatter.FormatObject(123456, options)); 120Assert.Equal("123456", s_formatter.FormatObject(123456, options)); 123Assert.Equal("123456", s_formatter.FormatObject(123456, options)); 133Assert.Equal("1.", s_formatter.FormatObject(123456, options)); 136Assert.Equal("1..", s_formatter.FormatObject(123456, options)); 139Assert.Equal("1", s_formatter.FormatObject(123456, options)); 142Assert.Equal("1", s_formatter.FormatObject(123456, options));
ScriptTests.cs (5)
37Assert.Equal("1 + 2", script.Code); 50Assert.Equal("1 + 2", script.Code); 64Assert.Equal(state.Script.Code, compilation.SyntaxTrees.First().GetText().ToString()); 1098Assert.Equal(textFromStream, text); 1119Assert.Equal(filename, firstFrame.GetFileName());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1210)
Semantics\ArglistTests.cs (1)
965Assert.Equal("TypedReference", info.Symbol.Name);
Semantics\AwaitExpressionTests.cs (1)
85Assert.Equal("await x", awaitExpression.ToString());
Semantics\BindingAsyncTasklikeMoreTests.cs (6)
438Assert.Equal("C.MyTask", method.ReturnTypeWithAnnotations.ToDisplayString()); 442Assert.Equal("C.MyTask<int>", method.ReturnTypeWithAnnotations.ToDisplayString()); 519Assert.Equal("MyTask", method.ReturnTypeWithAnnotations.ToDisplayString()); 523Assert.Equal("MyTask<int>", method.ReturnTypeWithAnnotations.ToDisplayString()); 598Assert.Equal("MyTask", method.ReturnTypeWithAnnotations.ToDisplayString()); 602Assert.Equal("MyTask<T>", method.ReturnTypeWithAnnotations.ToDisplayString());
Semantics\BindingAwaitTests.cs (6)
1901Assert.Equal(" IL_0056: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitOnCompleted<T1, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T1, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[0]); 1902Assert.Equal(" IL_00b9: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T2, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T2, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[1]); 1903Assert.Equal(" IL_011c: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T3, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T3, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[2]); 1904Assert.Equal(" IL_0182: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitOnCompleted<T4, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T4, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[3]); 1905Assert.Equal(" IL_01ea: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T5, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T5, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[4]); 1906Assert.Equal(" IL_0252: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T6, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T6, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[5]);
Semantics\BindingTests.cs (19)
2728Assert.Equal("A.B<string>.M0", identifierNameM0.Parent.ToString()); 2740Assert.Equal("A.B<string>.M1", identifierNameM1.Parent.ToString()); 2786Assert.Equal("(MyDelegate<int>)MyMethod", identifiers[0].Parent.ToString()); 2789Assert.Equal("(MyDelegate<long>)MyMethod", identifiers[1].Parent.ToString()); 2792Assert.Equal("(MyDelegate<float>)MyMethod", identifiers[2].Parent.ToString()); 2795Assert.Equal("(MyDelegate<double>)MyMethod", identifiers[3].Parent.ToString()); 2839Assert.Equal("b.M0", identifierNameM0.Parent.ToString()); 2851Assert.Equal("b.M1", identifierNameM1.Parent.ToString()); 3038Assert.Equal("app.Use", node1.ToString()); 3053Assert.Equal("ctx.Authentication.AuthenticateAsync", node.ToString()); 3118Assert.Equal("app.Use", node1.ToString()); 3133Assert.Equal("ctx.Authentication.AuthenticateAsync", node.ToString()); 3191Assert.Equal("app.Use", node1.ToString()); 3207Assert.Equal("ctx.Authentication.AuthenticateAsync", node.ToString()); 3276Assert.Equal("app.Use", node1.ToString()); 3292Assert.Equal("ctx.Authentication.AuthenticateAsync", node.ToString()); 3381Assert.Equal("MathMin(0, 1)", node1.ToString()); 3733Assert.Equal("x.E1.E", node1.ToString()); 3737Assert.Equal("x.E1", node2.ToString());
Semantics\ColorColorTests.cs (15)
1258Assert.Equal(WellKnownMemberNames.DelegateInvokeName, parentInfo.Symbol.Name); // Succeeded even though the receiver has an error. 1818Assert.Equal("Lifetime", memberAccess.Expression.ToString()); 1819Assert.Equal("Lifetime.Persistent", memberAccess.ToString()); 1883Assert.Equal("E.A", node1.ToString()); 1884Assert.Equal("E", node1.Expression.ToString()); 1894Assert.Equal("= E", node2.Parent.ToString()); 1940Assert.Equal("E.A", node1.ToString()); 1941Assert.Equal("E", node1.Expression.ToString()); 1951Assert.Equal("= E", node2.Parent.ToString()); 1997Assert.Equal("E.A", node1.ToString()); 1998Assert.Equal("E", node1.Expression.ToString()); 2008Assert.Equal("= E", node2.Parent.ToString()); 2047Assert.Equal("E.A", node1.ToString()); 2048Assert.Equal("E", node1.Expression.ToString()); 2057Assert.Equal("= E", node2.Parent.ToString());
Semantics\ConditionalOperatorTests.cs (7)
1349Assert.Equal(".test", memberBinding.ToString()); 1350Assert.Equal("receiver?.test", access.ToString()); 1404Assert.Equal(".test", memberBinding.ToString()); 1405Assert.Equal(".test()", invocation.ToString()); 1406Assert.Equal("receiver?.test()", access.ToString()); 1450Assert.Equal(".test", memberBinding.ToString()); 1451Assert.Equal("receiver?.test", access.ToString());
Semantics\ConstantTests.cs (55)
148Assert.Equal(expected, actual); 221Assert.Equal(expected, actual); 250Assert.Equal(expected, actual); 279Assert.Equal(expected, actual); 308Assert.Equal(expected, actual); 337Assert.Equal(expected, actual); 366Assert.Equal(expected, actual); 401Assert.Equal(expected, actual); 430Assert.Equal(expected, actual); 512Assert.Equal(expected, actual); 557Assert.Equal(expected, actual); 611Assert.Equal(expected, actual); 651Assert.Equal(expected, actual); 682Assert.Equal(expected, actual); 998Assert.Equal(expected, actual); 1333Assert.Equal(expected, actual); 1443Assert.Equal(expected, actual); 1669Assert.Equal(expected, actual); 1915Assert.Equal(expected, actual); 2236Assert.Equal(expected, actual); 2261Assert.Equal(expected, actual); 2295Assert.Equal(expected, actual); 2337Assert.Equal(expected, actual); 2370Assert.Equal(expected, actual); 2451Assert.Equal(expected, actual); 2769Assert.Equal(expected, actual); 3540Assert.Equal(expected, actual); 3567Assert.Equal(expected, actual); 3745Assert.Equal(expected, actual); 3769Assert.Equal(expected, actual); 4008Assert.Equal("c", charConstant.ToString(null, CultureInfo.InvariantCulture)); 4010Assert.Equal("4", byteConst.ToString(null, CultureInfo.InvariantCulture)); 4011Assert.Equal("-1", sbyteConst.ToString(null, CultureInfo.InvariantCulture)); 4013Assert.Equal("-1", shortConst.ToString(null, CultureInfo.InvariantCulture)); 4014Assert.Equal("65535", ushortConst.ToString(null, CultureInfo.InvariantCulture)); 4016Assert.Equal("-1", int32Const.ToString(null, CultureInfo.InvariantCulture)); 4017Assert.Equal("4294967295", uint32Const.ToString(null, CultureInfo.InvariantCulture)); 4019Assert.Equal("-1", nintConst.ToString(null, CultureInfo.InvariantCulture)); 4020Assert.Equal("4294967295", nuintConst.ToString(null, CultureInfo.InvariantCulture)); 4022Assert.Equal("-1", int64Const.ToString(null, CultureInfo.InvariantCulture)); 4023Assert.Equal("18446744073709551615", uint64Const.ToString(null, CultureInfo.InvariantCulture)); 4025Assert.Equal("0.3333333333333333333333333333", decimalConst.ToString(null, CultureInfo.InvariantCulture)); 4026Assert.Equal("0.33333", floatConst.ToString(null, CultureInfo.InvariantCulture)); 4027Assert.Equal("0.33333333", doubleConst.ToString(null, CultureInfo.InvariantCulture)); 4029Assert.Equal(@"""abcdefghijklmnopqrstuvwxyz""", stringConst.ToString(null, CultureInfo.InvariantCulture)); 4030Assert.Equal(@"""abcdefghijklmnopqrstuvwxyz""", stringConst.ToString("26", CultureInfo.InvariantCulture)); 4031Assert.Equal(@"""abcdefghijklmnopqrstuvwxyz""", stringConst.ToString("27", CultureInfo.InvariantCulture)); 4032Assert.Equal(@"""...""", stringConst.ToString("-1", CultureInfo.InvariantCulture)); 4033Assert.Equal(@"""...""", stringConst.ToString("2", CultureInfo.InvariantCulture)); 4034Assert.Equal(@"""...""", stringConst.ToString("3", CultureInfo.InvariantCulture)); 4035Assert.Equal(@"""abcd...""", stringConst.ToString("7", CultureInfo.InvariantCulture)); 4037Assert.Equal("12/31/9999 23:59:59", dateTimeConst.ToString(null, CultureInfo.InvariantCulture)); 4039Assert.Equal("True", boolConst.ToString(null, CultureInfo.InvariantCulture)); 4041Assert.Equal("bad", badConst.ToString(null, CultureInfo.InvariantCulture)); 4042Assert.Equal("null", nullConst.ToString(null, CultureInfo.InvariantCulture));
Semantics\DeconstructionTests.cs (45)
1842Assert.Equal("y = (x, x, x, x, x, x, x, x, x) = new C()", y.ToFullString()); 3768Assert.Equal("(int, int)", model.GetTypeInfo(literal1).Type.ToDisplayString()); 3771Assert.Equal("(int, int)", model.GetTypeInfo(literal2).Type.ToDisplayString()); 4174Assert.Equal("x1", x1.Name); 4179Assert.Equal("x2", x2.Name); 4259Assert.Equal("var (a,b)", declarations[0].ToString()); 4282Assert.Equal("var c", declarations[1].ToString()); 4300Assert.Equal("int d", declarations[2].ToString()); 4394Assert.Equal("var (a,b)", declarations[0].ToString()); 4413Assert.Equal("var c", declarations[1].ToString()); 4431Assert.Equal("int d", declarations[2].ToString()); 4518Assert.Equal("var (_, _)", declarations[0].ToString()); 4541Assert.Equal("var _", declarations[1].ToString()); 4562Assert.Equal("int _", declarations[2].ToString()); 4668Assert.Equal("var (a,b)", declarations[0].ToString()); 4687Assert.Equal("var c", declarations[1].ToString()); 4725Assert.Equal("var (a, a)", aa.ToString()); 4762Assert.Equal("var (a,b)", declarations[0].ToString()); 4781Assert.Equal("var c", declarations[1].ToString()); 4840Assert.Equal("var (_, _)", declarations[0].ToString()); 4859Assert.Equal("var _", declarations[1].ToString()); 4944Assert.Equal("al c", declaration.ToString()); 4990Assert.Equal("al c", declaration.ToString()); 5048Assert.Equal("al _", declaration.ToString()); 5208Assert.Equal("var (a,b)", declarations[0].ToString()); 5227Assert.Equal("var c", declarations[1].ToString()); 5245Assert.Equal("int d", declarations[2].ToString()); 5262Assert.Equal("((var (a,b), var c), int d)", tuples[0].ToString()); 5272Assert.Equal("(var (a,b), var c)", tuples[1].ToString()); 5352Assert.Equal("var (a,b)", declarations[0].ToString()); 5371Assert.Equal("var c", declarations[1].ToString()); 5389Assert.Equal("int d", declarations[2].ToString()); 5406Assert.Equal("((var (a,b), var c), int d)", tuples[0].ToString()); 5416Assert.Equal("(var (a,b), var c)", tuples[1].ToString()); 5489Assert.Equal("var (_, _)", declarations[0].ToString()); 5508Assert.Equal("var _", declarations[1].ToString()); 5529Assert.Equal("int _", declarations[2].ToString()); 5549Assert.Equal("((var (_, _), var _), int _)", tuples[0].ToString()); 5559Assert.Equal("(var (_, _), var _)", tuples[1].ToString()); 5676Assert.Equal("var ((a,b), c)", declarations[0].ToString()); 5695Assert.Equal("int d", declarations[1].ToString()); 5786Assert.Equal("var ((a,b), c)", declarations[0].ToString()); 5805Assert.Equal("int d", declarations[1].ToString()); 5889Assert.Equal("var ((_, _), _)", declarations[0].ToString()); 5908Assert.Equal("int _", declarations[1].ToString());
Semantics\ExpressionBodiedMemberTests.cs (24)
140Assert.Equal("i", semanticInfo.Symbol.Name); 157Assert.Equal("C", semanticInfo.Type.Name); 158Assert.Equal("c", semanticInfo.Symbol.Name); 173Assert.Equal("s", semanticInfo.Symbol.Name); 260Assert.Equal("T", semanticInfo.Type.Name); 261Assert.Equal("t", semanticInfo.Symbol.Name); 282Assert.Equal("Program", semanticInfo.Type.Name); 283Assert.Equal("Program", semanticInfo.ConvertedType.Name); 477Assert.Equal("P1", node.ToString()); 508Assert.Equal("P1", node.ToString()); 537Assert.Equal("P1", node.ToString()); 546Assert.Equal("P1", node2.ToString()); 577Assert.Equal("P1", node.ToString()); 586Assert.Equal("P1", node2.ToString()); 651Assert.Equal("P1", node.ToString()); 682Assert.Equal("P1", node.ToString()); 713Assert.Equal("P1", node.ToString()); 744Assert.Equal("P1", node.ToString()); 779Assert.Equal("P1", node.ToString()); 810Assert.Equal("P1", node.ToString()); 845Assert.Equal("P1", node.ToString()); 880Assert.Equal("P1", node.ToString()); 919Assert.Equal("P1", node.ToString()); 1026Assert.Equal($"{i}", nodes[i].ToString());
Semantics\ForEachTests.cs (1)
3248Assert.Equal("C", boundNode.Expression.Type.ToDisplayString());
Semantics\FunctionPointerTests.cs (1)
3965Assert.Equal("delegate*<__arglist, void>", parameterDecls[1].ToString());
Semantics\GenericConstraintsTests.cs (1)
2879Assert.Equal("M<int>()", value.ToFullString());
Semantics\GlobalUsingDirectiveTests.cs (38)
3853Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 3856Assert.Equal("global using alias1 = C2;", aliases[1].ToString()); 3859Assert.Equal("using alias1 = C3;", aliases[2].ToString()); 3862Assert.Equal("using alias1 = C4;", aliases[3].ToString()); 3879Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 3882Assert.Equal("using alias1 = C3;", aliases[1].ToString()); 3885Assert.Equal("using alias1 = C4;", aliases[2].ToString()); 3893Assert.Equal("global using alias1 = C2;", aliases[0].ToString()); 3910Assert.Equal("using alias1 = C3;", aliases[0].ToString()); 3913Assert.Equal("using alias1 = C4;", aliases[1].ToString()); 3921Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 3924Assert.Equal("global using alias1 = C2;", aliases[1].ToString()); 3943Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 3946Assert.Equal("global using alias1 = C2;", aliases[1].ToString()); 3963Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 3971Assert.Equal("global using alias1 = C2;", aliases[0].ToString()); 3993Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 3996Assert.Equal("global using alias1 = C2;", aliases[1].ToString()); 4009Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 4012Assert.Equal("global using alias1 = C2;", aliases[1].ToString()); 4015Assert.Equal("using alias1 = C3;", aliases[2].ToString()); 4018Assert.Equal("using alias1 = C4;", aliases[3].ToString()); 4029Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 4032Assert.Equal("using alias1 = C3;", aliases[1].ToString()); 4035Assert.Equal("using alias1 = C4;", aliases[2].ToString()); 4043Assert.Equal("global using alias1 = C2;", aliases[0].ToString()); 4054Assert.Equal("using alias1 = C3;", aliases[0].ToString()); 4057Assert.Equal("using alias1 = C4;", aliases[1].ToString()); 4065Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 4068Assert.Equal("global using alias1 = C2;", aliases[1].ToString()); 4081Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 4084Assert.Equal("global using alias1 = C2;", aliases[1].ToString()); 4095Assert.Equal("global using alias1 = C1;", aliases[0].ToString()); 4103Assert.Equal("global using alias1 = C2;", aliases[0].ToString()); 4122Assert.Equal("using alias1 = C3;", aliases[0].ToString()); 4125Assert.Equal("using alias1 = C4;", aliases[1].ToString()); 4154Assert.Equal("using alias1 = C3;", aliases[0].ToString()); 4157Assert.Equal("using alias1 = C4;", aliases[1].ToString());
Semantics\ImplicitObjectCreationTests.cs (13)
243Assert.Equal(constant, model.GetConstantValue(@new).Value?.ToString()); 1714Assert.Equal(expression, invocation.ToString()); 1981Assert.Equal("new(x)", def.ToString()); 2039Assert.Equal("new()", @new.ToString()); 2046Assert.Equal("new object()", newObject.ToString()); 2074Assert.Equal("new()", @new.ToString()); 2081Assert.Equal("new object()", newObject.ToString()); 2220Assert.Equal("new()", def.ToString()); 2568Assert.Equal("new()", def.ToString()); 3218Assert.Equal("(o, new())", first.Parent.Parent.ToString()); 3222Assert.Equal("(new(), o)", second.Parent.Parent.ToString()); 3226Assert.Equal("(c, new())", third.Parent.Parent.ToString()); 3230Assert.Equal("(new(), c)", fourth.Parent.Parent.ToString());
Semantics\IndexAndRangeTests.cs (2)
919Assert.Equal("^", expression.OperatorToken.ToFullString()); 940Assert.Equal("^", expression.OperatorToken.ToFullString());
Semantics\InitOnlyMemberTests.cs (5)
3161Assert.Equal("_p", symbolSpeculation.Symbol.Name); 3166Assert.Equal("Int32", typeSpeculation.Type.Name); 3198Assert.Equal("P1", node.ToString()); 4764Assert.Equal("corlibWithIsExternalInit", comp.GetTypeByMetadataName("System.Runtime.CompilerServices.IsExternalInit").ContainingAssembly.Name); 4773Assert.Equal(expectedAssemblyName, comp.GetTypeByMetadataName("System.Runtime.CompilerServices.IsExternalInit").ContainingAssembly.Name);
Semantics\InteractiveSemanticModelTests.cs (2)
266Assert.Equal("c", semanticInfo.Symbol.Name); 352Assert.Equal(expected, method);
Semantics\InterceptorsTests.cs (4)
6870Assert.Equal("path/to/Program.cs(7,9)", locationSpecifier!.GetDisplayLocation()); 6888Assert.Equal("path/to/Program.cs(8,9)", otherLocation.GetDisplayLocation()); 7193Assert.Equal("", tree.FilePath); 7199Assert.Equal("(7,9)", locationSpecifier.GetDisplayLocation());
Semantics\InterpolationTests.cs (1)
4803Assert.Equal(expression, syntax.ToString());
Semantics\IteratorTests.cs (3)
580Assert.Equal("yield return;", node.ToString()); 611Assert.Equal("new KeyValuePair<TKey, TValue>(kvp.Key, kvp.Value)", node.ToString()); 649Assert.Equal("new KeyValuePair<TKey, TValue>(kvp, kvp.Value)", node.ToString());
Semantics\LambdaDiscardParametersTests.cs (1)
115Assert.Equal("_", symbol1.Name);
Semantics\LambdaTests.cs (49)
847Assert.Equal("int", tinfo.Type.ToDisplayString()); 1515Assert.Equal("a.", node.Parent.ToString().Trim()); 1550Assert.Equal("a.", node.Parent.ToString().Trim()); 1584Assert.Equal("a.", node.Parent.ToString().Trim()); 1616Assert.Equal("a.", node.Parent.ToString().Trim()); 1981Assert.Equal("async delegate { await Task.Delay(0); }", node1.ToString()); 2122Assert.Equal("e", eReference.ToString()); 2124Assert.Equal("MyArgumentType", typeInfo.Type.Name); 2168Assert.Equal("x", eReference.ToString()); 2171Assert.Equal("String", typeInfo.Type.Name); 2214Assert.Equal("x", eReference.ToString()); 2217Assert.Equal("String", typeInfo.Type.Name); 2260Assert.Equal("x", eReference.ToString()); 2263Assert.Equal("String", typeInfo.Type.Name); 2306Assert.Equal("x", eReference.ToString()); 2309Assert.Equal("String", typeInfo.Type.Name); 2336Assert.Equal("c", eReference.ToString()); 2339Assert.Equal("Char", typeInfo.Type.Name); 2363Assert.Equal("a", eReference.ToString()); 2366Assert.Equal("String", typeInfo.Type.Name); 2418Assert.Equal("x", reference.ToString()); 2421Assert.Equal("String", typeInfo.Type.Name); 2464Assert.Equal("x", reference.ToString()); 2467Assert.Equal("String", typeInfo.Type.Name); 2510Assert.Equal("x", reference.ToString()); 2513Assert.Equal("String", typeInfo.Type.Name); 2543Assert.Equal("x", reference.ToString()); 2546Assert.Equal("String", typeInfo.Type.Name); 2576Assert.Equal("x", reference.ToString()); 2579Assert.Equal("String", typeInfo.Type.Name); 2613Assert.Equal("x", reference.ToString()); 2616Assert.Equal("String", typeInfo.Type.Name); 3000Assert.Equal("ContentType", contentType.ToString()); 3007Assert.Equal("b", b.ToString()); 3042Assert.Equal("ContentType", contentType.ToString()); 3049Assert.Equal("b", b.ToString()); 3978Assert.Equal("A", a.Identifier.Text); 3991Assert.Equal("A", a.Identifier.Text); 4095Assert.Equal("System.ObsoleteAttribute", symbol.GetAttributes().Single().ToString()); 7116Assert.Equal("r1 => r1", lambdas[0].ToString()); 7121Assert.Equal("r2 => r2", lambdas[1].ToString()); 8023Assert.Equal("(int a, int b = 1) => a + b", lambdas[0].Node.ToString()); 8033Assert.Equal("([Optional] int x) => x", lambdas[1].Node.ToString()); 8040Assert.Equal("([DefaultParameterValue(2)] int x) => x", lambdas[2].Node.ToString()); 8047Assert.Equal("([Optional, DefaultParameterValue(3)] int x) => x", lambdas[3].Node.ToString()); 8066Assert.Equal("= 1", equalsValue.ToString()); 8127Assert.Equal("const int N = 10;", decls[0].ToString()); 8131Assert.Equal("var lam = (int a = N) => a;", decls[1].ToString()); 8137Assert.Equal("var x = N;", decls[2].ToString());
Semantics\LocalFunctionTests.cs (11)
354Assert.Equal("X", x.Identifier.Text); 396Assert.Equal("A", a.Identifier.Text); 410Assert.Equal("A", a.Identifier.Text); 501Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 549Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 813Assert.Equal("A", ((SimpleNameSyntax)attribute.Name).Identifier.ValueText); 1064Assert.Equal("A", attrConstructor.ContainingType.Name); 4727Assert.Equal("int n = N", parameter.ToString()); 8743Assert.Equal("nameof(parameter)", invocation.ToString()); 10182Assert.Equal("P", property.Name); 10183Assert.Equal("MyAttribute", property.ContainingType.Name);
Semantics\LockTests.cs (2)
47Assert.Equal("o", localSymbol.Name); 578Assert.Equal(@"System.Collections.Generic.IEnumerable<char>", model.GetTypeInfo(lockStatements[0].Expression).Type.ToDisplayString());
Semantics\LookupTests.cs (8)
682Assert.Equal("base", baseExprNode.ToString()); 692Assert.Equal("A", baseExprType.Name); 698Assert.Equal("Goo", names.Single()); 1566Assert.Equal("object.F()", method.ToDisplayString()); 1569Assert.Equal("E.F(object)", reducedFrom.ToDisplayString()); 1600Assert.Equal("E.F(object)", method.ToDisplayString()); 1604Assert.Equal("object.F()", method.ToDisplayString()); 1607Assert.Equal("E.F(object)", reducedFrom.ToDisplayString());
Semantics\MethodBodyModelTests.cs (1)
797Assert.Equal(string.Empty, string.Join(Environment.NewLine, comp.GetDiagnostics()));
Semantics\MethodTypeInferenceTests.cs (4)
1122Assert.Equal("Book", bookType.Name); 1163Assert.Equal("Author", authorType.Name); 1203Assert.Equal("Book", bookResultType.Name); 1207Assert.Equal("Author", authorResultType.Name);
Semantics\NamedAndOptionalTests.cs (1)
820Assert.Equal("ss", symInfo.Symbol.Name);
Semantics\NameOfTests.cs (9)
695Assert.Equal("Goo", symbolInfo.CandidateSymbols[0].Name); 1000Assert.Equal(expression, argument.ToString()); 1005Assert.Equal(expression, argument2.ToString()); 1071Assert.Equal(expression, argument.ToString()); 1076Assert.Equal(expression, argument2.ToString()); 1157Assert.Equal(expression, argument.ToString()); 1162Assert.Equal(expression, argument2.ToString()); 1235Assert.Equal(expression, argument.ToString()); 1240Assert.Equal(expression, argument2.ToString());
Semantics\NativeIntegerTests.cs (13)
116Assert.Equal("Sub I.F1(x As System.IntPtr, y As System.IntPtr)", VisualBasic.SymbolDisplay.ToDisplayString(method.GetPublicSymbol(), SymbolDisplayFormat.TestFormat)); 121Assert.Equal("Sub I.F2(x As System.UIntPtr, y As System.UIntPtr)", VisualBasic.SymbolDisplay.ToDisplayString(method.GetPublicSymbol(), SymbolDisplayFormat.TestFormat)); 227Assert.Equal(signed ? "IntPtr" : "UIntPtr", type.Name); 242Assert.Equal(signed ? "IntPtr" : "UIntPtr", type.Name); 547Assert.Equal(member.Name, underlyingMember.Name); 9506Assert.Equal(sourceType, typeInfo.Type.ToString()); 9507Assert.Equal(destType, typeInfo.ConvertedType.ToString()); 15318Assert.Equal(type, cref.ToString()); 15339Assert.Equal("System.IntPtr", cref.ToString()); 15362Assert.Equal("nint", cref.ToString()); 15390Assert.Equal(fieldName, cref.ToString()); 15413Assert.Equal("nint", cref.ToString()); 15443Assert.Equal("nint", cref.ToString());
Semantics\NonTrailingNamedArgumentsTests.cs (20)
47Assert.Equal("M(a: 1, 2)", firstInvocation.ToString()); 52Assert.Equal("a: 1", firstNamedArgA.Parent.ToString()); 55Assert.Equal("a", firstASymbol.Symbol.Name); 59Assert.Equal("M(3, a: 4)", secondInvocation.ToString()); 64Assert.Equal("a: 4", secondNamedArgA.Parent.ToString()); 67Assert.Equal("a", secondASymbol.Symbol.Name); 369Assert.Equal("M(1, first: 2)", invocation.ToString()); 395Assert.Equal(@"C.M(a: 1, ""hi"")", invocation.ToString()); 425Assert.Equal("M(c: 1, 2)", invocation.ToString()); 457Assert.Equal("M(x: 1, 2)", invocation.ToString()); 486Assert.Equal("M(1, x: 2)", invocation.ToString()); 536Assert.Equal("M(x: 1, x: 2)", invocation.ToString()); 571Assert.Equal("M(x: 1, x: 2, 3)", invocation.ToString()); 600Assert.Equal("M(y: 1, 2)", invocation.ToString()); 654Assert.Equal("M(x: 1, 2)", invocation.ToString()); 681Assert.Equal("M(y: 1, x: 2)", invocation.ToString()); 712Assert.Equal("M(c: valueC, valueB)", firstInvocation.ToString()); 746Assert.Equal("M(c: valueC, valueB)", invocation.ToString()); 778Assert.Equal("M(c: valueC, valueB)", invocation.ToString()); 985Assert.Equal("MyAttribute(condition: true, 42)", invocation.ToString());
Semantics\NullableContextTests.cs (11)
351Assert.Equal("return obj;", syntax.ToString()); 390Assert.Equal("A.F = null", syntax.ToString()); 425Assert.Equal("(F = null)", syntax.ToString()); 1774Assert.Equal("return o1;", syntax.ToString()); 1779Assert.Equal("return o2;", syntax.ToString()); 1842Assert.Equal("obj", syntax.ToString()); 1888Assert.Equal(expectedText, syntax.ToString()); 1943Assert.Equal(expectedText, syntax.ToString()); 1980Assert.Equal(expectedText, value.ToString()); 2020Assert.Equal(expectedText, syntax.Identifier.ValueText); 2059Assert.Equal(expectedText, syntax.Identifier.ValueText);
Semantics\NullableConversionTests.cs (1)
806Assert.Equal("double.NaN", operand.ToFullString());
Semantics\NullableReferenceTypesTests.cs (395)
1745Assert.Equal(@"$""hello ""!", suppression.ToString()); 1749Assert.Equal(@"$""hello """, interpolated.ToString()); 1780Assert.Equal(@"$""hello ""!", suppression.ToString()); 1784Assert.Equal(@"$""hello """, interpolated.ToString()); 1954Assert.Equal("M2!", suppression.ToString()); 2267Assert.Equal("(string? x) => { return null; }!", suppression.ToString()); 2271Assert.Equal("(string? x) => { return null; }", lambda.ToString()); 2306Assert.Equal("(string? x) => { return null; }!", suppression.ToString()); 2310Assert.Equal("(string? x) => { return null; }", lambda.ToString()); 2338Assert.Equal("(string x) => { return string.Empty; }!", suppression.ToString()); 2343Assert.Equal("(string x) => { return string.Empty; }", lambda.ToString()); 2372Assert.Equal("(string x) => { return string.Empty; }!", suppression.ToString()); 2376Assert.Equal("(string x) => { return string.Empty; }", lambda.ToString()); 2470Assert.Equal(@"(string? x) => { return null; }!", suppression.ToString()); 3327Assert.Equal("x", reference.ToString()); 6459Assert.Equal(@"{{""a""}}", attribute.CommonConstructorArguments.Single().ToCSharpString()); 6481Assert.Equal(@"{{""a""}}", attribute.CommonConstructorArguments.Single().ToCSharpString()); 7760Assert.Equal("[]", specifier.ToString()); 7767Assert.Equal("[3]", newSpecifier.ToString()); 10527Assert.Equal("string", type1.ToString()); 10531Assert.Equal("string?", type2.ToString()); 17415Assert.Equal("I1<A>.M", method.Name); 17496Assert.Equal("I1<A>.M", method.Name); 17580Assert.Equal("I1<A>.M", method.Name); 17661Assert.Equal("I1<A>.M", method.Name); 33188Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 33206Assert.Equal(expectedType, symbol.TypeWithAnnotations.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 54280Assert.Equal("null", nullNode.ToString()); 54310Assert.Equal("null", nullNode.ToString()); 54343Assert.Equal("default", defaultNode.ToString()); 54380Assert.Equal("default", defaultNode.ToString()); 54508Assert.Equal("null", nullNode.ToString()); 54641Assert.Equal("new()", newNode.ToString()); 54676Assert.Equal("new(null)", newNode.ToString()); 54712Assert.Equal("null", nullNode.ToString()); 54823Assert.Equal("() => { }", lambdaNode.ToString()); 64094Assert.Equal("target", function1.Identifier.ValueText); 64098Assert.Equal("target", function2.Identifier.ValueText); 64104Assert.Equal("object?", object2.Parent.ToString()); 69988Assert.Equal("object _", discard1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 69992Assert.Equal("object? _", discard2.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 69996Assert.Equal("C<object> _", discard3.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 70000Assert.Equal("C<object?> _", discard4.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 70004Assert.Equal("C<object> _", discard5.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 70080Assert.Equal("var _", discard1.ToString()); 70085Assert.Equal("_", discard2.ToString()); 70090Assert.Equal("var _", discard3.ToString()); 70095Assert.Equal("_", discard4.ToString()); 70128Assert.Equal("var _", discard1.ToString()); 70138Assert.Equal("_", discard2.ToString()); 70141Assert.Equal("object _", model.GetSymbolInfo(discard2).Symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 70166Assert.Equal("_", discardPattern1.ToString()); 70173Assert.Equal("_", discardPattern2.ToString()); 75178Assert.Equal("B.implicit operator B?(int)", b.GetMember("op_Implicit").ToDisplayString()); 75180Assert.Equal("String? D1()", compilation.GetTypeByMetadataName("D1") 75184Assert.Equal("String D1()", compilation.GetTypeByMetadataName("D1") 75188Assert.Equal("String! D2()", compilation.GetTypeByMetadataName("D2") 75250Assert.Equal("B.implicit operator B?(int)", b.GetMember("op_Implicit").ToDisplayString()); 75253Assert.Equal("String? D1()", compilation.GetTypeByMetadataName("D1") 95850Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", b.GetAttributes().First().ToString()); 95853Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 95859Assert.Equal("void B.F2<T2>(T2 t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayFormat.TestFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeTypeConstraints))); 95860Assert.Equal("void B.F2<T2>(T2 t2) where T2 : class", f2.ToDisplayString(SymbolDisplayFormat.TestFormat.WithGenericsOptions(SymbolDisplayFormat.TestFormat.GenericsOptions | SymbolDisplayGenericsOptions.IncludeTypeConstraints). 95872Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 95904Assert.Equal("A<T1> where T1 : class!", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 95913Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(1)", t1.GetAttributes().Single().ToString()); 95917Assert.Equal("B<T2> where T2 : class?", b.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 95926Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 95964Assert.Equal("void F1<T1>(T1? t1) where T1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 95970Assert.Equal("void F2<T2>(T2 t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96011Assert.Equal("B<T1> where T1 : class?", b.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96020Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t1.GetAttributes().Single().ToString()); 96024Assert.Equal("void B<T1>.F2<T2>(T2 t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96033Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 96622Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96629Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 96636Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96643Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 96689Assert.Equal("void B.F1<T11>(T11? t1)", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96696Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96702Assert.Equal("void A<System.Int32>.F2<T2>(T2 t2) where T2 : class?", af2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96813Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96820Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 96827Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96834Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 96842Assert.Equal("void B.F3<T33>() where T33 : C1<C2?>!", bf3.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96845Assert.Equal("void B.F4<T44>() where T44 : C1<C2!>?", bf4.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96920Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96927Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 96934Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96941Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 96986Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 96993Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 97000Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97008Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", nullableAttribute.ToString()); 97065Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 97067Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97073Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97081Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", nullableAttribute.ToString()); 97127Assert.Equal("void B.IA.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97134Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 97141Assert.Equal("void B.IA.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97148Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 97186Assert.Equal("void B.IA.F1<T11>(T11? t1) where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97191Assert.Equal("void B.IA.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97217Assert.Equal("void B.F2<T2>() where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97224Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", f2.GetAttributes().Single().ToString()); 97250Assert.Equal("B<T2> where T2 : class?", b.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97259Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 97293Assert.Equal("void F2<T2>() where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97501Assert.Equal("void B.F1<T11>() where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97508Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 97515Assert.Equal("void B.F2<T22>() where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97522Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", bf2.GetAttributes().Single().ToString()); 97530Assert.Equal("void B.F3<T33>() where T33 : C1<C2?>!", bf3.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 97533Assert.Equal("void B.F4<T44>() where T44 : C1<C2!>?", bf4.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98495Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98502Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", f1.GetAttributes().Single().ToString()); 98533Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98540Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", f1.GetAttributes().Single().ToString()); 98585Assert.Equal("void B.F1<T1>(T1? t1)", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98592Assert.Equal("void B.F2<T2>(T2? t2)", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98624Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98644Assert.Equal("void B.F1<T1>() where T1 : notnull", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98699Assert.Equal("void B.F1<T1>(T1? t1) where T1 : struct", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98707Assert.Equal("void B.F2<T2>(T2? t2) where T2 : struct", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98743Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98750Assert.Equal("void B.F2<T2>(T2? t2) where T2 : class!", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98788Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98795Assert.Equal("void B.F2<T2>(T2? t2) where T2 : class?", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98827Assert.Equal("void B.F1<T1>(T1? t1) where T1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98865Assert.Equal("I<System.Object>.F1", af1.Name); 98866Assert.Equal("I<System.Object>.F1", af1.MetadataName); 98870Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A x) where TF1A : System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98874Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A x) where TF1A : System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98875Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", af1.GetAttributes().Single().ToString()); 98885Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : System.Object!", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98889Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(0)", at1.GetAttributes().Single().ToString()); 98891Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x)", impl.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98896Assert.Equal("I<System.Object>.F1", bf1.Name); 98897Assert.Equal("I<System.Object>.F1", bf1.MetadataName); 98900Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x)", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98904Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x)", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98905Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", bf1.GetAttributes().Single().ToString()); 98914Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x)", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98920Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", attributes[0].ToString()); 98922Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x)", impl.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98960Assert.Equal("I<A>.F1", af1.Name); 98961Assert.Equal("I<A>.F1", af1.MetadataName); 98965Assert.Equal("void A.I<A!>.F1<TF1A>(TF1A! x) where TF1A : A!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98969Assert.Equal("void A.I<A>.F1<TF1A>(TF1A! x) where TF1A : A!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98970Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", af1.GetAttributes().Single().ToString()); 98980Assert.Equal("void I<A!>.F1<TF1>(TF1 x) where TF1 : A!", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98984Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(0)", at1.GetAttributes().Single().ToString()); 98985Assert.Equal("void I<A>.F1<TF1>(TF1 x) where TF1 : A", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98989Assert.Equal("I<A>.F1", bf1.Name); 98990Assert.Equal("I<A>.F1", bf1.MetadataName); 98993Assert.Equal("void B.I<A?>.F1<TF1B>(TF1B x) where TF1B : A?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 98997Assert.Equal("void B.I<A>.F1<TF1B>(TF1B x) where TF1B : A?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99007Assert.Equal("void I<A?>.F1<TF1>(TF1 x) where TF1 : A?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99012Assert.Equal("void I<A>.F1<TF1>(TF1 x) where TF1 : A", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99049Assert.Equal("I<System.Object>.F1", af1.Name); 99050Assert.Equal("I<System.Object>.F1", af1.MetadataName); 99054Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A! x) where TF1A : class?, System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99058Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A! x) where TF1A : class?, System.Object!", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99067Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : class?, System.Object!", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99071Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : class?, System.Object", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99075Assert.Equal("I<System.Object>.F1", bf1.Name); 99076Assert.Equal("I<System.Object>.F1", bf1.MetadataName); 99079Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x) where TF1B : class?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99083Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x) where TF1B : class?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99091Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x) where TF1 : class?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99095Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : class?, System.Object", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99121Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99145Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99170Assert.Equal("void B.F1<T1>(T1? t1) where T1 : notnull, B!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99197Assert.Equal("void B.F1<T1>(T1? t1) where T1 : B!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99235Assert.Equal("I<System.Object>.F1", af1.Name); 99236Assert.Equal("I<System.Object>.F1", af1.MetadataName); 99240Assert.Equal("void A.I<System.Object!>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99244Assert.Equal("void A.I<System.Object>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99253Assert.Equal("void I<System.Object!>.F1<TF1>(TF1 x) where TF1 : System.Object!, B?", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99257Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : System.Object, B?", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99261Assert.Equal("I<System.Object>.F1", bf1.Name); 99262Assert.Equal("I<System.Object>.F1", bf1.MetadataName); 99265Assert.Equal("void B.I<System.Object?>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99269Assert.Equal("void B.I<System.Object>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99277Assert.Equal("void I<System.Object?>.F1<TF1>(TF1 x) where TF1 : B?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99281Assert.Equal("void I<System.Object>.F1<TF1>(TF1 x) where TF1 : System.Object, B?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99318Assert.Equal("I<System.Object,B>.F1", af1.Name); 99319Assert.Equal("I<System.Object,B>.F1", af1.MetadataName); 99322Assert.Equal("void A.I<System.Object!, B?>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99326Assert.Equal("void A.I<System.Object, B>.F1<TF1A>(TF1A! x) where TF1A : System.Object!, B?", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99335Assert.Equal("void I<System.Object!, B?>.F1<TF1>(TF1 x) where TF1 : System.Object!, B?", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99339Assert.Equal("void I<System.Object, B>.F1<TF1>(TF1 x) where TF1 : B", af1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99343Assert.Equal("I<System.Object,B>.F1", bf1.Name); 99344Assert.Equal("I<System.Object,B>.F1", bf1.MetadataName); 99347Assert.Equal("void B.I<System.Object?, B?>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99351Assert.Equal("void B.I<System.Object, B>.F1<TF1B>(TF1B x) where TF1B : B?", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99359Assert.Equal("void I<System.Object?, B?>.F1<TF1>(TF1 x) where TF1 : B?", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 99363Assert.Equal("void I<System.Object, B>.F1<TF1>(TF1 x) where TF1 : B", bf1.ExplicitInterfaceImplementations.Single().ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100129Assert.Equal("void I1.F1<TF1>()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100152Assert.Equal("void I1.F1<TF1, TF2>() where TF2 : class", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100181Assert.Equal("void I1.F1<TF1>() where TF1 : new()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100208Assert.Equal("void I1.F1<TF1>() where TF1 : class", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100235Assert.Equal("void I1.F1<TF1>() where TF1 : struct", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100262Assert.Equal("void I1.F1<TF1>() where TF1 : unmanaged", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100289Assert.Equal("void I1.F1<TF1>() where TF1 : I1", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100328Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 100331Assert.Equal("void I1.F1<TF1>() where TF1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100362Assert.Equal("void I1.F1<TF1>() where TF1 : I1?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100397Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 100400Assert.Equal("void I1.F1<TF1>()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100431Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 100434Assert.Equal("void I1.F1<TF1, TF2>() where TF1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100471Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 100474Assert.Equal("void I1.F1<TF1>() where TF1 : new()", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100509Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", i1.GetAttributes().Single().ToString()); 100512Assert.Equal("void I1.F1<TF1>() where TF1 : class!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100539Assert.Equal("void I1.F1<TF1>() where TF1 : struct", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100567Assert.Equal("void I1.F1<TF1>() where TF1 : unmanaged", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100595Assert.Equal("void I1.F1<TF1>() where TF1 : I1!", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100631Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 100634Assert.Equal("void I1.F1<TF1>() where TF1 : class?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100662Assert.Equal("void I1.F1<TF1>() where TF1 : I1?", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100689Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100711Assert.Equal("I1<TF1, TF2> where TF2 : class", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100739Assert.Equal("I1<TF1> where TF1 : new()", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100765Assert.Equal("I1<TF1> where TF1 : class", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100791Assert.Equal("I1<TF1> where TF1 : struct", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100817Assert.Equal("I1<TF1> where TF1 : unmanaged", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100843Assert.Equal("I1<TF1> where TF1 : I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100875Assert.Equal("I1<TF1> where TF1 : class?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100882Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 100914Assert.Equal("I1<TF1> where TF1 : I1<TF1>?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100942Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100949Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 100975Assert.Equal("I1<TF1, TF2> where TF1 : class?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 100982Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 101014Assert.Equal("I1<TF1> where TF1 : new()", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101021Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 101051Assert.Equal("I1<TF1> where TF1 : class!", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101058Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", i1.GetAttributes().Single().ToString()); 101086Assert.Equal("I1<TF1> where TF1 : struct", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101113Assert.Equal("I1<TF1> where TF1 : unmanaged", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101140Assert.Equal("I1<TF1> where TF1 : I1<TF1>!", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101169Assert.Equal("I1<TF1> where TF1 : class?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101176Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 101204Assert.Equal("I1<TF1> where TF1 : I1<TF1>?", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101236Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101269Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101276Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 101312Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101319Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 101356Assert.Equal("I1<TF1>", i1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 101363Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(2)", i1.GetAttributes().Single().ToString()); 103012Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103021Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(1)", t11.GetAttributes().Single().ToString()); 103025Assert.Equal("void A<System.Int32>.F1<T1>(T1? t1) where T1 : class", af1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103034Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(1)", t1.GetAttributes().Single().ToString()); 103038Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103048Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t22.GetAttributes().Single().ToString()); 103052Assert.Equal("void A<System.Int32>.F2<T2>(T2 t2) where T2 : class?", af2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103062Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", t2.GetAttributes().Single().ToString()); 103113Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", b.GetAttributes().First().ToString()); 103116Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103122Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103133Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", nullableAttribute.ToString()); 103190Assert.Equal("System.Runtime.CompilerServices.NullableContextAttribute(1)", b.GetAttributes().First().ToString()); 103193Assert.Equal("void B.F1<T11>(T11? t1) where T11 : class!", bf1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103199Assert.Equal("void B.F2<T22>(T22 t2) where T22 : class?", bf2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103210Assert.Equal("System.Runtime.CompilerServices.NullableAttribute(2)", nullableAttribute.ToString()); 103244Assert.Equal("void B<S>.F1<T1>(T1 t1)", f1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103247Assert.Equal("void B<S>.F2<T2>(T2 t2)", f2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103291Assert.Equal("void Test2.M1<S>() where S : System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103295Assert.Equal("void Test1<dynamic!>.M1<S>() where S : System.Object!", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103335Assert.Equal("void Test2.M1<S>()", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103339Assert.Equal("void Test1<dynamic>.M1<S>()", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103384Assert.Equal("void Test2.M1<S>() where S : Test1<System.Object!>!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103388Assert.Equal("void Test1<Test1<dynamic!>!>.M1<S>() where S : Test1<System.Object!>!", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103420Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 103424Assert.Equal("void Test1<dynamic!>.M1<S>(S x) where S : System.Object!, I1?", baseM1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104361Assert.Equal("void Test2.M1<S>(S x)", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104392Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104423Assert.Equal("void Test2.M1<S>(S x)", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104455Assert.Equal("void Test2.M1<S>(S x) where S : I1", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104488Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104521Assert.Equal("void Test2.M1<S>(S x) where S : I1!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104553Assert.Equal("void Test2.M1<S>(S x) where S : I1!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104585Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104618Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104648Assert.Equal("void Test2.M1<S>(S x) where S : class", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104679Assert.Equal("void Test2.M1<S>(S x) where S : class?, System.Object", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104710Assert.Equal("void Test2.M1<S>(S x) where S : class!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104742Assert.Equal("void Test2.M1<S>(S! x) where S : class!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104774Assert.Equal("void Test2.M1<S>(S! x) where S : class?, System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104807Assert.Equal("void Test2.M1<S>(S! x) where S : class, System.Object!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104838Assert.Equal("void Test2.M1<S>(S x) where S : notnull", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104870Assert.Equal("void Test2.M1<S>(S x) where S : notnull", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104901Assert.Equal("void Test2.M1<S>(S x) where S : struct", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104933Assert.Equal("void Test2.M1<S>(S x) where S : struct", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104963Assert.Equal("void Test2.M1<S>(S x) where S : System.Int32", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 104993Assert.Equal("void Test2.M1<S>(S x) where S : System.Int32", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105023Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, System.Int32?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105053Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, System.Int32?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105243Assert.Equal("void Test2.M1<S>(S x)", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105247Assert.Equal("void Test2.M2<S>(S x) where S : I1", m2.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105251Assert.Equal("void Test2.M3<S>(S x) where S : class", m3.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105255Assert.Equal("void Test2.M4<S>(S x) where S : class?, System.Object", m4.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105259Assert.Equal("void Test2.M5<S>(S x) where S : class!", m5.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105263Assert.Equal("void Test2.M6<S>(S x) where S : notnull", m6.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105267Assert.Equal("void Test2.M7<S>(S x)", m7.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105271Assert.Equal("void Test2.M8<S>(S x) where S : struct", m8.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105275Assert.Equal("void Test2.M9<S>(S x) where S : System.Int32", m9.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105279Assert.Equal("void Test2.M10<S>(S x) where S : System.Object, System.Int32?", m10.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105314Assert.Equal("void Test2.M1<S, U>(S x) where S : System.Object", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105349Assert.Equal("void Test2.M1<S, U>(S x) where S : System.Object, U", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105380Assert.Equal("void Test2.M1<S>(S x) where S : class?, System.Object", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105417Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105453Assert.Equal("void Test2.M1<S>(S x) where S : System.Object, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105490Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105526Assert.Equal("void Test2.M1<S>(S x) where S : System.Object!, I1?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105564Assert.Equal("void Test2<T>.M1<S>(S x) where S : T", t2m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105568Assert.Equal("void Test3.M1<S>(S x) where S : System.Object, Test3?", t3m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105611Assert.Equal("void Test3.M1<S>(S x) where S : System.Object, Test3?", t3m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105649Assert.Equal("void Test2<T>.M1<S>(S x) where S : T", t2m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105653Assert.Equal("void Test3.M1<S>(S x) where S : System.Int32", t3m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105690Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105726Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105763Assert.Equal("void Test2.M1<S>(S! x) where S : I1?, System.String!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105799Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105835Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String?", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105871Assert.Equal("void Test2.M1<S>(S! x) where S : I1?, System.String!", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 105907Assert.Equal("void Test2.M1<S>(S x) where S : I1?, System.String", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 106477Assert.Equal("void B.M1<TM1>(TM1 x) where TM1 : class", m1.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 109212Assert.Equal("C<T, U> where T : class! where U : T?", c.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 111853Assert.Equal("A<T> where T : class!", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 111872Assert.Equal("A<T> where T : class", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 111896Assert.Equal("A<T> where T : class?", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier))); 111897Assert.Equal("A<T> where T : class", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 111918Assert.Equal("A<T> where T : class?", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier))); 111919Assert.Equal("A<T> where T : class", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 111951Assert.Equal("A<T> where T : unmanaged!", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 111972Assert.Equal("A<T> where T : unmanaged", a.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNotNullableReferenceTypeModifier))); 122126Assert.Equal(baseline[i].attribute, f.GetAttributes().Single().ToString()); 122400Assert.Equal(typeParametersBaseline[i].attribute, t.GetAttributes().Single().ToString()); 143586Assert.Equal("c.Extension()", invocation.ToString()); 143587Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143627Assert.Equal("Extension<object?>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143667Assert.Equal("Extension<object?>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143705Assert.Equal("c.Extension()", invocation.ToString()); 143706Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143743Assert.Equal("c.Extension()", invocation.ToString()); 143744Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143776Assert.Equal("c.Extension()", invocation.ToString()); 143777Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143809Assert.Equal("c.Extension()", invocation.ToString()); 143810Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143847Assert.Equal("Extension<object>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 143886Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 144156Assert.Equal("Extension<object?>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 144187Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 144220Assert.Equal("Extension<object!>", model.GetSymbolInfo(invocation).Symbol.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 155724Assert.Equal("field", declarators[0].Value.ToString()); 155726Assert.Equal("C<T>.field", declarators[1].Value.ToString()); 155728Assert.Equal("C<T>.field", declarators[2].Value.ToString()); 155774Assert.Equal("M<T>(out x)", invocations[0].ToString()); 155777Assert.Equal("M<T>(out x)", invocations[1].ToString()); 156204Assert.Equal("i.Item", item.ToString()); 156205Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156208Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156240Assert.Equal("i[0]", item.ToString()); 156241Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156335Assert.Equal("i.Get()", item.ToString()); 156336Assert.Equal("object", ((IMethodSymbol)model.GetSymbolInfo(item).Symbol).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156373Assert.Equal("i.Item", item.ToString()); 156374Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156377Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156417Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156458Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156493Assert.Equal("object", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156525Assert.Equal("i[0]", item.ToString()); 156526Assert.Equal("object", ((IPropertySymbol)model.GetSymbolInfo(item).Symbol).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156620Assert.Equal("i.Get()", item.ToString()); 156621Assert.Equal("object", ((IMethodSymbol)model.GetSymbolInfo(item).Symbol).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156627Assert.Equal("object", ((IMethodSymbol)found).ReturnType.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156669Assert.Equal("object!", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156713Assert.Equal("object!", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 156750Assert.Equal("object!", ((IPropertySymbol)found).Type.ToDisplayString(TypeWithAnnotations.TestDisplayFormat)); 159389Assert.Equal("s", identifiers[0].ToString()); 159390Assert.Equal("Length", identifiers[1].ToString()); 159391Assert.Equal("s", identifiers[2].ToString()); 159435Assert.Equal("s", identifiers[0].ToString()); 159436Assert.Equal("Length", identifiers[1].ToString()); 159437Assert.Equal("s", identifiers[2].ToString());
Semantics\ObjectAndCollectionInitializerTests.cs (5)
3684Assert.Equal("List", listAssignment.Left.ToString()); 3734Assert.Equal("List", listAssignment.Left.ToString()); 3778Assert.Equal("[0]", listAssignment.Left.ToString()); 4011Assert.Equal("List<string>", name.ToString()); 4161Assert.Equal("I", typeInfo.ConvertedType.ToDisplayString());
Semantics\OperatorTests.cs (11)
2986Assert.Equal("!1", negOne.ToString()); 2992Assert.Equal("b++", boolPlusPlus.ToString()); 2998Assert.Equal("error++", errorPlusPlus.ToString()); 7057Assert.Equal("i2", syntax.Identifier.ValueText); 7212Assert.Equal("i2", syntax.Identifier.ValueText); 7655Assert.Equal(symbol1.Name, symbol1.MetadataName); 7659Assert.Equal("", symbol1.GetDocumentationCommentXml()); 8420Assert.Equal(expectedSymbol, actualSymbol); 8429Assert.Equal(symbol1.Name, symbol1.MetadataName); 8454Assert.Equal("", symbol1.GetDocumentationCommentXml()); 11338Assert.Equal("!invalidExpression", negNode.ToString());
Semantics\OverloadResolutionPerfTests.cs (1)
983Assert.Equal("o.F( ", expr.ToString());
Semantics\OverloadResolutionTests.cs (1)
7838Assert.Equal("(30,19): error CS0121: The call is ambiguous between the following methods or properties: 'A.B.X.Test(int)' and 'A.C.X.Test(int)'", DiagnosticFormatter.Instance.Format(comp.GetDiagnostics()[0], EnsureEnglishUICulture.PreferredOrNull));
Semantics\QueryTests.cs (48)
1460Assert.Equal("x", x.Name); 1461Assert.Equal("Cast", info0.CastInfo.Symbol.Name); 1468Assert.Equal("y", y.Name); 1469Assert.Equal("Cast", info1.CastInfo.Symbol.Name); 1470Assert.Equal("SelectMany", info1.OperationInfo.Symbol.Name); 1476Assert.Equal("z", z.Name); 1477Assert.Equal("Cast", info2.CastInfo.Symbol.Name); 1478Assert.Equal("SelectMany", info2.OperationInfo.Symbol.Name); 1669Assert.Equal("x", x.Name); 1670Assert.Equal("Cast", info0.CastInfo.Symbol.Name); 1677Assert.Equal("y", y.Name); 1678Assert.Equal("Cast", info1.CastInfo.Symbol.Name); 1679Assert.Equal("SelectMany", info1.OperationInfo.Symbol.Name); 1685Assert.Equal("z", z.Name); 1686Assert.Equal("Cast", info2.CastInfo.Symbol.Name); 1687Assert.Equal("SelectMany", info2.OperationInfo.Symbol.Name); 1727Assert.Equal("Cast", info0.CastInfo.Symbol.Name); 1729Assert.Equal("x", model.GetDeclaredSymbol(q.FromClause).Name); 1732Assert.Equal("Cast", info1.CastInfo.Symbol.Name); 1733Assert.Equal("SelectMany", info1.OperationInfo.Symbol.Name); 1734Assert.Equal("y", model.GetDeclaredSymbol(q.Body.Clauses[0]).Name); 1767Assert.Equal("i", model.GetDeclaredSymbol(q.FromClause).Name); 1777Assert.Equal("OrderByDescending", oinfo0.Symbol.Name); 1780Assert.Equal("ThenBy", oinfo1.Symbol.Name); 2183Assert.Equal("Select", m.ReducedFrom.Name); 2238Assert.Equal("x", info.Symbol.Name); 2244Assert.Equal("w", info.Symbol.Name); 2276Assert.Equal("w", symbol.Name); 2329Assert.Equal("x8", symbol.Name); 2396Assert.Equal("SelectMany", queryInfoForFrom2.OperationInfo.Symbol.Name); 2432Assert.Equal(names[count++], symbolInfo.Symbol.Name); 2903Assert.Equal("x", x.Name); 2907Assert.Equal("Select", infoSelect.Symbol.Name); 2936Assert.Equal("x", x.Name); 2940Assert.Equal("Select", infoSelect.Symbol.Name); 3383Assert.Equal("Assembly", typeInfo2.Type.Name); 3392Assert.Equal("Assembly", typeInfo1.Type.Name); 3429Assert.Equal("Cast", info0.CastInfo.Symbol.Name); 3431Assert.Equal("x", speculativeModel.GetDeclaredSymbol(q.FromClause).Name); 3434Assert.Equal("Cast", info1.CastInfo.Symbol.Name); 3435Assert.Equal("SelectMany", info1.OperationInfo.Symbol.Name); 3436Assert.Equal("y", speculativeModel.GetDeclaredSymbol(q.Body.Clauses[0]).Name); 3474Assert.Equal("x", x.Name); 3481Assert.Equal("Select", selectClauseSymbolInfo.Symbol.Name); 3485Assert.Equal("List1", selectClauseTypeInfo.Type.Name); 3522Assert.Equal("x8", symbol.Name); 3562Assert.Equal("w", symbol.Name); 3610Assert.Equal(names[count++], symbolInfo.Symbol.Name);
Semantics\RawInterpolationTests_Handler.cs (1)
3133Assert.Equal(expression, syntax.ToString());
Semantics\RecordStructTests.cs (17)
403Assert.Equal("record struct Point", point.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 410Assert.Equal("struct Point", point.ToDisplayString(SymbolDisplayFormat.TestFormat.AddKindOptions(SymbolDisplayKindOptions.IncludeTypeKeyword))); 2595Assert.Equal("= X + 1", x.Parent!.Parent!.ToString()); 2606Assert.Equal("C", recordDeclaration.Identifier.ValueText); 2630Assert.Equal("= X + 1", x.Parent!.Parent!.ToString()); 2664Assert.Equal("= X + 1", x.Parent!.Parent!.ToString()); 2699Assert.Equal("() => X + 1", x.Parent!.Parent!.ToString()); 3244Assert.Equal(identifier, x.Identifier.ValueText); 3286Assert.Equal("I1", cref.ToString()); 3334Assert.Equal("I2", cref.ToString()); 3385Assert.Equal("I2", cref.ToString()); 6517Assert.Equal("= 0", context.OperationBlocks[0].Syntax.ToString()); 6520Assert.Equal("Attr1(100)", context.OperationBlocks[1].Syntax.ToString()); 10761Assert.Equal("Error1(0, 1)", baseWithargs.ToString()); 10765Assert.Equal("Error1(0)", speculativeBase.ToString()); 10771Assert.Equal("Error2()", baseWithoutargs.ToString()); 10776Assert.Equal("Error3", baseWithoutParens.ToString());
Semantics\RefEscapingTests.cs (28)
5718Assert.Equal(@"(local, """")", tuple2.ToString()); 5719Assert.Equal(@"(global, s) = (local, """")", tuple2.Parent.ToString()); 5720Assert.Equal("(System.Span<int> local, string)", model.GetTypeInfo(tuple2).Type.ToString()); 5721Assert.Equal("(System.Span<int>, string)", model.GetTypeInfo(tuple2).ConvertedType.ToString()); 5724Assert.Equal(@"(local, null)", tuple3.ToString()); 5725Assert.Equal(@"(global, s) = (local, null)", tuple3.Parent.ToString()); 5727Assert.Equal("(System.Span<int>, string)", model.GetTypeInfo(tuple3).ConvertedType.ToString()); 5730Assert.Equal(@"(local, """")", tuple6.ToString()); 5731Assert.Equal(@"(c, s) = (local, """")", tuple6.Parent.ToString()); 5732Assert.Equal("(System.Span<int> local, string)", model.GetTypeInfo(tuple6).Type.ToString()); 5733Assert.Equal("(C, string)", model.GetTypeInfo(tuple6).ConvertedType.ToString()); 5736Assert.Equal("(local, null)", tuple7.ToString()); 5737Assert.Equal("(c, s) = (local, null)", tuple7.Parent.ToString()); 5739Assert.Equal("(C, string)", model.GetTypeInfo(tuple7).ConvertedType.ToString()); 5818Assert.Equal(@"(local, """")", tuple2.ToString()); 5819Assert.Equal(@"(global, s) = (local, """")", tuple2.Parent.ToString()); 5820Assert.Equal("(System.Span<int> local, string)", model.GetTypeInfo(tuple2).Type.ToString()); 5821Assert.Equal("(System.Span<int>, string)", model.GetTypeInfo(tuple2).ConvertedType.ToString()); 5824Assert.Equal(@"(local, null)", tuple3.ToString()); 5825Assert.Equal(@"(global, s) = (local, null)", tuple3.Parent.ToString()); 5827Assert.Equal("(System.Span<int>, string)", model.GetTypeInfo(tuple3).ConvertedType.ToString()); 5830Assert.Equal(@"(local, """")", tuple6.ToString()); 5831Assert.Equal(@"(c, s) = (local, """")", tuple6.Parent.ToString()); 5832Assert.Equal("(System.Span<int> local, string)", model.GetTypeInfo(tuple6).Type.ToString()); 5833Assert.Equal("(C, string)", model.GetTypeInfo(tuple6).ConvertedType.ToString()); 5836Assert.Equal("(local, null)", tuple7.ToString()); 5837Assert.Equal("(c, s) = (local, null)", tuple7.Parent.ToString()); 5839Assert.Equal("(C, string)", model.GetTypeInfo(tuple7).ConvertedType.ToString());
Semantics\RefFieldTests.cs (15)
11562Assert.Equal(expectedDisplayString, parameter.ToDisplayString(displayFormatWithScoped)); 11577Assert.Equal(expectedDisplayString, parameter.ToDisplayString(displayFormatWithScoped)); 15284Assert.Equal(expectedDisplayString, local.ToDisplayString(displayFormatWithScoped)); 15293Assert.Equal(expectedDisplayString, local.ToDisplayString(displayFormatWithScoped)); 16120Assert.Equal("M2(r => r)", invocations[0].ToString()); 16123Assert.Equal("M2((scoped R r) => r)", invocations[1].ToString()); 16161Assert.Equal("delegate { }", anonymousMethod.ToString()); 16200Assert.Equal("delegate { }", anonymousMethod.ToString()); 16296Assert.Equal("(r1, t1) => F((r2, t2) => r2, t1)", lambdas[0].ToString()); 16297Assert.Equal("r1", lambdas[0].ParameterList.Parameters[0].Identifier.ToString()); 16300Assert.Equal("t1", lambdas[0].ParameterList.Parameters[1].Identifier.ToString()); 16303Assert.Equal("(r2, t2) => r2", lambdas[1].ToString()); 16304Assert.Equal("r2", lambdas[1].ParameterList.Parameters[0].Identifier.ToString()); 16307Assert.Equal("t2", lambdas[1].ParameterList.Parameters[1].Identifier.ToString()); 16344Assert.Equal("o2 => throw null!", lambda.ToString());
Semantics\ScriptSemanticsTests.cs (14)
375Assert.Equal("Goo", goo.Name); 1184Assert.Equal("WriteLine", node5.Name.ToString()); 1196Assert.Equal("WriteLine", node5.Name.ToString()); 1211Assert.Equal("WriteLine", node5.Name.ToString()); 1220Assert.Equal("WriteLine", node5.Name.ToString()); 1229Assert.Equal("WriteLine", node5.Name.ToString()); 1241Assert.Equal("WriteLine", node5.Name.ToString()); 1253Assert.Equal("WriteLine", node5.Name.ToString()); 1272Assert.Equal("WriteLine", node1.Name.ToString()); 1273Assert.Equal("WriteLine", node2.Name.ToString()); 1311Assert.Equal("WriteLine", node5.Name.ToString()); 1325Assert.Equal("WriteLine", node5.Name.ToString()); 1340Assert.Equal("WriteLine", node5.Name.ToString()); 1355Assert.Equal("WriteLine", node5.Name.ToString());
Semantics\SemanticAnalyzerTests.cs (1)
1399Assert.Equal("capacity", call.ArgumentNamesOpt[0]);
Semantics\SemanticErrorTests.cs (3)
7490Assert.Equal("i[1,2]", node.ToString()); 13329Assert.Equal("i.R[1]", node.ToString()); 24229Assert.Equal("base?.ToString()", node.ToString());
Semantics\StackAllocInitializerTests.cs (17)
1051Assert.Equal("obj1", obj1.Identifier.Text); 1055Assert.Equal("Test", obj1Value.ConvertedType.Name); 1059Assert.Equal("obj2", obj2.Identifier.Text); 1067Assert.Equal("obj3", obj3.Identifier.Text); 1070Assert.Equal("Span", obj3Value.Type.Name); 1071Assert.Equal("Span", obj3Value.ConvertedType.Name); 1075Assert.Equal("obj4", obj4.Identifier.Text); 1083Assert.Equal("obj5", obj5.Identifier.Text); 1153Assert.Equal("obj1", obj1.Identifier.Text); 1157Assert.Equal("Span", obj1Value.Type.Name); 1158Assert.Equal("Span", obj1Value.ConvertedType.Name); 1162Assert.Equal("obj2", obj2.Identifier.Text); 1170Assert.Equal("obj3", obj3.Identifier.Text); 1173Assert.Equal("Span", obj3Value.Type.Name); 1174Assert.Equal("Span", obj3Value.ConvertedType.Name); 1178Assert.Equal("obj4", obj4.Identifier.Text); 1186Assert.Equal("obj5", obj5.Identifier.Text);
Semantics\StackAllocSpanExpressionsTests.cs (17)
57Assert.Equal("obj1", obj1.Identifier.Text); 61Assert.Equal("Test", obj1Value.ConvertedType.Name); 65Assert.Equal("obj2", obj2.Identifier.Text); 73Assert.Equal("obj3", obj3.Identifier.Text); 76Assert.Equal("Span", obj3Value.Type.Name); 77Assert.Equal("Span", obj3Value.ConvertedType.Name); 81Assert.Equal("obj4", obj4.Identifier.Text); 89Assert.Equal("obj5", obj5.Identifier.Text); 131Assert.Equal("obj1", obj1.Identifier.Text); 135Assert.Equal("Span", obj1Value.Type.Name); 136Assert.Equal("Span", obj1Value.ConvertedType.Name); 140Assert.Equal("obj2", obj2.Identifier.Text); 148Assert.Equal("obj3", obj3.Identifier.Text); 151Assert.Equal("Span", obj3Value.Type.Name); 152Assert.Equal("Span", obj3Value.ConvertedType.Name); 156Assert.Equal("obj4", obj4.Identifier.Text); 164Assert.Equal("obj5", obj5.Identifier.Text);
Semantics\SuppressAccessibilityChecksTests.cs (14)
57Assert.Equal("A", semanticModel.GetTypeInfo(invocation).Type.Name); 58Assert.Equal("M", semanticModel.GetSymbolInfo(invocation).Symbol.Name); 62Assert.Equal("A", semanticModel.GetTypeInfo(invocation).Type.Name); 64Assert.Equal("M", semanticModel.GetSymbolInfo(invocation).CandidateSymbols.Single().Name); 76Assert.Equal("Int32", 79Assert.Equal("_num", 98Assert.Equal("A", creationExpression.Type.Name); 129Assert.Equal("_p", symbolInfo.Symbol.Name); 171Assert.Equal("A", semanticModel.GetTypeInfo(invocation).Type.Name); 172Assert.Equal("M", semanticModel.GetSymbolInfo(invocation).Symbol.Name); 177Assert.Equal("Int32", semanticModel.GetSpeculativeTypeInfo(position, speculativeInvocation, SpeculativeBindingOption.BindAsExpression).Type.Name); 178Assert.Equal("InternalExtension", semanticModel.GetSpeculativeSymbolInfo(position, speculativeInvocation, SpeculativeBindingOption.BindAsExpression).Symbol.Name); 236Assert.Equal("_p", symbolSpeculation.Symbol.Name); 241Assert.Equal("Int32", typeSpeculation.Type.Name);
Semantics\TargetTypedDefaultTests.cs (36)
48Assert.Equal("0", model.GetConstantValue(def).Value.ToString()); 148Assert.Equal("0", model.GetConstantValue(def).Value.ToString()); 197Assert.Equal("default", def.ToString()); 245Assert.Equal("default", def.ToString()); 254Assert.Equal("null", nullSyntax.ToString()); 282Assert.Equal("default", def.ToString()); 291Assert.Equal("null", nullSyntax.ToString()); 327Assert.Equal("default", default1.ToString()); 333Assert.Equal("default", default2.ToString()); 521Assert.Equal("default", def.ToString()); 530Assert.Equal("null", nullSyntax.ToString()); 567Assert.Equal("default", def.ToString()); 576Assert.Equal("null", nullSyntax.ToString()); 610Assert.Equal("default", def.ToString()); 619Assert.Equal("null", nullSyntax.ToString()); 668Assert.Equal("default", def.ToString()); 749Assert.Equal("default", def.ToString()); 758Assert.Equal("null", nullSyntax.ToString()); 1143Assert.Equal("default", def.ToString()); 1147Assert.Equal("0", model.GetConstantValue(def).Value.ToString()); 1632Assert.Equal("s += default", defaultLiteral.Parent.ToString()); 1740Assert.Equal("default", @default.ToString()); 1806Assert.Equal("default", @default.ToString()); 1877Assert.Equal("default", @default.ToString()); 1912Assert.Equal("default", first.ToString()); 2090Assert.Equal("default", def.ToString()); 2334Assert.Equal("default", def.ToString()); 2341Assert.Equal("null", nullSyntax.ToString()); 2415Assert.Equal("(o, default)", first.Parent.Parent.ToString()); 2420Assert.Equal("(default, o)", second.Parent.Parent.ToString()); 2425Assert.Equal("(s, default)", third.Parent.Parent.ToString()); 2430Assert.Equal("(default, s)", fourth.Parent.Parent.ToString()); 2458Assert.Equal("default", def.ToString()); 3345Assert.Equal("default", def.ToString()); 3384Assert.Equal("default", def.ToString()); 3515Assert.Equal("default", def.ToString());
Semantics\TopLevelStatementsTests.cs (61)
52Assert.Equal("<Main>$", entryPoint.Name); 709Assert.Equal("Program", local.ContainingSymbol.ContainingSymbol.Name); 1709Assert.Equal("System.Console.WriteLine(Test)", nameRef.Parent.Parent.Parent.ToString()); 1717Assert.Equal("using alias1 = Test;", nameRef.Parent.ToString()); 1733Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 1739Assert.Equal("System.Console.WriteLine(Test)", nameRef.Parent.Parent.Parent.ToString()); 1744Assert.Equal("using alias2 = Test;", nameRef.Parent.ToString()); 1749Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 1755Assert.Equal("System.Console.WriteLine(Test)", nameRef.Parent.Parent.Parent.ToString()); 1885Assert.Equal("using alias1 = Test;", nameRef.Parent.ToString()); 1901Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 1907Assert.Equal("System.Console.WriteLine(Test)", nameRef.Parent.Parent.Parent.ToString()); 1912Assert.Equal("using alias2 = Test;", nameRef.Parent.ToString()); 1917Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 1923Assert.Equal("System.Console.WriteLine(Test)", nameRef.Parent.Parent.Parent.ToString()); 2103Assert.Equal("using alias1 = Test;", nameRef.Parent.ToString()); 2116Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 2121Assert.Equal("System.Console.WriteLine(Test())", nameRef.Parent.Parent.Parent.Parent.ToString()); 2126Assert.Equal("using alias2 = Test;", nameRef.Parent.ToString()); 2131Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 2136Assert.Equal("System.Console.WriteLine(Test())", nameRef.Parent.Parent.Parent.Parent.ToString()); 2269Assert.Equal("using alias1 = Test;", nameRef.Parent.ToString()); 2282Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 2287Assert.Equal("System.Console.WriteLine(Test())", nameRef.Parent.Parent.Parent.Parent.ToString()); 2292Assert.Equal("using alias2 = Test;", nameRef.Parent.ToString()); 2297Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 2302Assert.Equal("System.Console.WriteLine(Test())", nameRef.Parent.Parent.Parent.Parent.ToString()); 2449Assert.Equal("using alias1 = Test;", nameRef.Parent.ToString()); 2464Assert.Equal("goto Test;", nameRef.Parent.ToString()); 2479Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 2484Assert.Equal("goto Test;", nameRef.Parent.ToString()); 2489Assert.Equal("using alias2 = Test;", nameRef.Parent.ToString()); 2494Assert.Equal(": Test", nameRef.Parent.Parent.ToString()); 2500Assert.Equal("goto Test;", nameRef.Parent.ToString()); 3944Assert.Equal("using alias1 = args;", nameRef.Parent.ToString()); 3956Assert.Equal("System.Console.WriteLine(args)", nameRef.Parent.Parent.Parent.ToString()); 3975Assert.Equal(": args", nameRef.Parent.Parent.ToString()); 3980Assert.Equal("System.Console.WriteLine(args)", nameRef.Parent.Parent.Parent.ToString()); 3985Assert.Equal("using alias2 = args;", nameRef.Parent.ToString()); 3990Assert.Equal(": args", nameRef.Parent.Parent.ToString()); 3995Assert.Equal("System.Console.WriteLine(args)", nameRef.Parent.Parent.Parent.ToString()); 4093Assert.Equal("using alias1 = args;", nameRef.Parent.ToString()); 4105Assert.Equal(": args", nameRef.Parent.Parent.ToString()); 4110Assert.Equal("System.Console.WriteLine(args)", nameRef.Parent.Parent.Parent.ToString()); 4115Assert.Equal("using alias2 = args;", nameRef.Parent.ToString()); 4120Assert.Equal(": args", nameRef.Parent.Parent.ToString()); 4125Assert.Equal("System.Console.WriteLine(args)", nameRef.Parent.Parent.Parent.ToString()); 6200Assert.Equal("something.dll", importData.ModuleName); 6201Assert.Equal("a", importData.EntryPointName); 6236Assert.Equal("A", semanticModel.GetTypeInfo(invocation).Type.Name); 6238Assert.Equal("M", semanticModel.GetSymbolInfo(invocation).CandidateSymbols.Single().Name); 6244Assert.Equal("A", semanticModel.GetTypeInfo(invocation).Type.Name); 6245Assert.Equal("M", semanticModel.GetSymbolInfo(invocation).Symbol.Name); 6656Assert.Equal("System.Console.WriteLine(1);", context.Symbol.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 6663Assert.Equal("System.Console.WriteLine(2);", context.Symbol.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 8795Assert.Equal(text2, tree.GetText().ToString()); 8810Assert.Equal(node1.ToString(), node2.ToString()); 8811Assert.Equal(node1.ToFullString(), node2.ToFullString()); 9055Assert.Equal("<Main>$", entryPoint.Name); 9110Assert.Equal("<Main>$", entryPoint.Name); 9152Assert.Equal("<Main>$", entryPoint.Name);
Semantics\TryCatchTests.cs (3)
47Assert.Equal("e", localSymbol.Name); 48Assert.Equal("System.IO.IOException", localSymbol.Type.ToDisplayString()); 51Assert.Equal("string.operator !=(string, string)", filterExprInfo.Symbol.ToDisplayString());
Semantics\UnsafeTests.cs (11)
5215Assert.Equal(expected, actual); 7277Assert.Equal("p", declaredSymbol.Name); 7325Assert.Equal("&()", syntax.ToString()); //NOTE: not actually lambda 7363Assert.Equal("&(()=>5)", syntax.ToString()); 7861Assert.Equal("p", receiverSymbol.Name); 7928Assert.Equal("s", receiverSymbol.Name); 8172Assert.Equal("p", receiverSymbol.Name); 8184Assert.Equal("i", indexSymbol.Name); 8239Assert.Equal("f", receiverSymbol.Name); 8297Assert.Equal("f", receiverSymbol.Name); 11340Assert.Equal("count", countSymbol.Name);
Semantics\UsingStatementTests.cs (2)
66Assert.Equal("i", declaredLocal.Name); 1871Assert.Equal(variables[i++].ToString(), symbol.ToDisplayString());
SourceGeneration\GeneratorDriverTests.cs (43)
869Assert.Equal("abc", item1); 872Assert.Equal("def", item2); 1512Assert.Equal("// generated", runResults.Results.Single().GeneratedSources.Single().SourceText.ToString()); 2406Assert.Equal("C", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2411Assert.Equal("D", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2422Assert.Equal("C", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2427Assert.Equal("D", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2439Assert.Equal("E", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2444Assert.Equal("D", ((ClassDeclarationSyntax)step.Outputs[0].Value).Identifier.ValueText); 2631Assert.Equal("AnalyzerConfig", step.Name); 2647Assert.Equal("AnalyzerConfig", step.Name); 2669Assert.Equal("AnalyzerConfig", step.Name); 2713Assert.Equal("path1.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2729Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2745Assert.Equal("path3.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2766Assert.Equal("path1.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2782Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2798Assert.Equal("path3.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2822Assert.Equal("path1.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2838Assert.Equal("path4.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2854Assert.Equal("path3.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2903Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2920Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2941Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2958Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 2983Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 3000Assert.Equal("path.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 3025Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 3042Assert.Equal("path2.txt", Assert.IsType<InMemoryAdditionalText>(consumedInput.Value).Path); 4297Assert.Equal("class Compilation1{} //generator1", result.GeneratedTrees[0].ToString()); 4298Assert.Equal("class Compilation1{} //generator2", result.GeneratedTrees[1].ToString()); 4307Assert.Equal("class Compilation2{} //generator1", result.GeneratedTrees[0].ToString()); 4308Assert.Equal("class Compilation1{} //generator2", result.GeneratedTrees[1].ToString()); 4316Assert.Equal("class Compilation2{} //generator1", result.GeneratedTrees[0].ToString()); 4317Assert.Equal("class Compilation3{} //generator2", result.GeneratedTrees[1].ToString()); 4325Assert.Equal("class Compilation4{} //generator1", result.GeneratedTrees[0].ToString()); 4326Assert.Equal("class Compilation4{} //generator2", result.GeneratedTrees[1].ToString()); 4367Assert.Equal("class Compilation1{} //generator1", result.GeneratedTrees[0].ToString()); 4577(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen1", result.Key); Assert.Equal("value1", result.Value); }, 4578(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen2", result.Key); Assert.Equal("value2", result.Value); } 4595(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen", result.Key); Assert.Equal("value1", result.Value); }, 4596(r) => { var result = Assert.Single(r.HostOutputs); Assert.Equal("gen", result.Key); Assert.Equal("value2", result.Value); } 4615Assert.Equal("failed", exception.Message);
SourceGeneration\StateTableTests.cs (14)
382Assert.Equal("Batch", step.Name); 445Assert.Equal("Batch", step.Name); 492Assert.Equal("Batch", step.Name); 559Assert.Equal("Batch", step.Name); 641Assert.Equal("Transform", step.Name); 676Assert.Equal("Transform", step.Name); 714Assert.Equal("Transform", step.Name); 753Assert.Equal("Transform", step.Name); 880Assert.Equal("TestStep", step.Name); 886Assert.Equal("TestStep", step.Name); 892Assert.Equal("TestStep", step.Name); 898Assert.Equal("TestStep", step.Name); 904Assert.Equal("TestStep", step.Name); 910Assert.Equal("TestStep", step.Name);
SourceGeneration\SyntaxAwareGeneratorTests.cs (12)
390Assert.Equal("Test Exception", results.Results[0].Exception?.Message); 432Assert.Equal("Test Exception", results.Results[0].Exception?.Message); 522Assert.Equal("Test Exception", results.Results[0].Exception?.Message); 1274Assert.Equal("fieldD", Assert.Single(fieldsCalledFor)); 1416Assert.Equal("fieldA", syntaxFieldsCalledFor[0]); 1417Assert.Equal("fieldB", syntaxFieldsCalledFor[1]); 1418Assert.Equal("fieldC", syntaxFieldsCalledFor[2]); 1479Assert.Equal("fieldC", Assert.Single(syntaxFieldsCalledFor)); 1865Assert.Equal("Test Exception", results.Results[0].Exception?.Message); 1906Assert.Equal("Test Exception", results.Results[0].Exception?.Message); 1952Assert.Equal("Test Exception", results.Results[0].Exception?.Message); 2056Assert.Equal("Simulated cancellation from external source", results.Results[0].Exception!.Message);
Utilities\ValueSetTests.cs (59)
37Assert.Equal($"[{i1}..{int.MaxValue}]", values.ToString()); 47Assert.Equal($"[{i1}..{int.MaxValue}]", values.ToString()); 66Assert.Equal((i1 == int.MaxValue) ? "" : $"[{i1 + 1}..{int.MaxValue}]", values.ToString()); 76Assert.Equal($"[{i1 + 1}..{int.MaxValue}]", values.ToString()); 95Assert.Equal($"[{int.MinValue}..{i1}]", values.ToString()); 105Assert.Equal($"[{int.MinValue}..{i1}]", values.ToString()); 124Assert.Equal((i1 == int.MinValue) ? "" : $"[{int.MinValue}..{i1 - 1}]", values.ToString()); 134Assert.Equal($"[{int.MinValue}..{i1 - 1}]", values.ToString()); 153Assert.Equal($"[{i1}..{i1}]", values.ToString()); 163Assert.Equal($"[{i1}..{i1}]", values.ToString()); 176Assert.Equal($"[{i1}..{i2}]", values1.ToString()); 192Assert.Equal($"", values1.ToString()); 208Assert.Equal($"[{int.MinValue}..{i1}],[{i2}..{int.MaxValue}]", values1.ToString()); 223Assert.Equal($"[{int.MinValue}..{int.MaxValue}]", values1.ToString()); 239Assert.Equal($"[{int.MinValue}..{i1}],[{i2}..{int.MaxValue}]", values1.ToString()); 242Assert.Equal($"[{i1 + 1}..{i2 - 1}]", values2.ToString()); 255Assert.Equal($"[{i1}..{i2}]", values.ToString()); 296Assert.Equal(FormattableString.Invariant($"[{d1:G17}..{d2:G17}]"), values.ToString()); 308Assert.Equal("['A'..'Z'],['a'..'z']", letters.ToString()); 314Assert.Equal("[-Inf..-Inf]", ForDouble.Related(LessThan, double.MinValue).ToString()); 316Assert.Equal(FormattableString.Invariant($"[-Inf..{-double.Epsilon:G17}]"), lt.ToString()); 318Assert.Equal(FormattableString.Invariant($"[{double.Epsilon:G17}..Inf]"), gt.ToString()); 320Assert.Equal("[0..0]", eq.ToString()); 322Assert.Equal("NaN", none.ToString()); 329Assert.Equal("[-Inf..-Inf]", ForFloat.Related(LessThan, float.MinValue).ToString()); 331Assert.Equal(FormattableString.Invariant($"[-Inf..{-float.Epsilon:G9}]"), lt.ToString()); 333Assert.Equal(FormattableString.Invariant($"[{float.Epsilon:G9}..Inf]"), gt.ToString()); 335Assert.Equal("[0..0]", eq.ToString()); 337Assert.Equal("NaN", none.ToString()); 344Assert.Equal("NaN", ForDouble.Related(Equal, double.NaN).ToString()); 345Assert.Equal("NaN", ForFloat.Related(Equal, float.NaN).ToString()); 348Assert.Equal("[Inf..Inf]", ForDouble.Related(Equal, double.PositiveInfinity).ToString()); 349Assert.Equal("[Inf..Inf]", ForFloat.Related(Equal, float.PositiveInfinity).ToString()); 350Assert.Equal("[-Inf..-Inf]", ForDouble.Related(Equal, double.NegativeInfinity).ToString()); 351Assert.Equal("[-Inf..-Inf]", ForFloat.Related(Equal, float.NegativeInfinity).ToString()); 409Assert.Equal("[11..99]", s.ToString()); 435Assert.Equal("NaN,[3.1400000000000001..31.399999999999999]", s3.ToString()); 444Assert.Equal($"[{long.MinValue}..1]", s1.ToString()); 463Assert.Equal($"[-4..1]", s2.ToString()); 479Assert.Equal("[10..100]", ForSByte.Related(GreaterThanOrEqual, 10).Intersect(ForSByte.Related(LessThanOrEqual, 100)).ToString()); 480Assert.Equal("[10..100]", ForShort.Related(GreaterThanOrEqual, 10).Intersect(ForShort.Related(LessThanOrEqual, 100)).ToString()); 481Assert.Equal("[10..100]", ForUInt.Related(GreaterThanOrEqual, 10).Intersect(ForUInt.Related(LessThanOrEqual, 100)).ToString()); 482Assert.Equal("[10..100]", ForULong.Related(GreaterThanOrEqual, 10).Intersect(ForULong.Related(LessThanOrEqual, 100)).ToString()); 483Assert.Equal("[10..100]", ForUShort.Related(GreaterThanOrEqual, 10).Intersect(ForUShort.Related(LessThanOrEqual, 100)).ToString()); 484Assert.Equal("[10..100]", ForFloat.Related(GreaterThanOrEqual, 10).Intersect(ForFloat.Related(LessThanOrEqual, 100)).ToString()); 485Assert.Equal("[-100..-10]", ForFloat.Related(GreaterThanOrEqual, -100).Intersect(ForFloat.Related(LessThanOrEqual, -10)).ToString()); 486Assert.Equal("[-10..10]", ForFloat.Related(GreaterThanOrEqual, -10).Intersect(ForFloat.Related(LessThanOrEqual, 10)).ToString()); 514Assert.Equal("[-79228162514264337593543950335..-0.0000000000000000000000000001]", ForDecimal.Related(LessThan, 0.0m).ToString()); 515Assert.Equal("[-79228162514264337593543950335..0.0000000000000000000000000000]", ForDecimal.Related(LessThanOrEqual, 0.0m).ToString()); 516Assert.Equal("[0.0000000000000000000000000001..79228162514264337593543950335]", ForDecimal.Related(GreaterThan, 0.0m).ToString()); 517Assert.Equal("[0.0000000000000000000000000000..79228162514264337593543950335]", ForDecimal.Related(GreaterThanOrEqual, 0.0m).ToString()); 523Assert.Equal("Small,[-2147483648..9]", ForNint.Related(LessThan, 10).ToString()); 524Assert.Equal("Small,[-2147483648..10]", ForNint.Related(LessThanOrEqual, 10).ToString()); 525Assert.Equal("[11..2147483647],Large", ForNint.Related(GreaterThan, 10).ToString()); 526Assert.Equal("[10..2147483647],Large", ForNint.Related(GreaterThanOrEqual, 10).ToString()); 532Assert.Equal("[0..9]", ForNuint.Related(LessThan, 10).ToString()); 533Assert.Equal("[0..10]", ForNuint.Related(LessThanOrEqual, 10).ToString()); 534Assert.Equal("[11..4294967295],Large", ForNuint.Related(GreaterThan, 10).ToString()); 535Assert.Equal("[10..4294967295],Large", ForNuint.Related(GreaterThanOrEqual, 10).ToString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1274)
Compilation\CompilationAPITests.cs (12)
885Assert.Equal("C#", bind.Language); 1694Assert.Equal("?", compilation.Assembly.Name); 1695Assert.Equal("?", compilation.Assembly.Identity.Name); 1702Assert.Equal("?", compilation.Assembly.Name); 1703Assert.Equal("?", compilation.Assembly.Identity.Name); 1709Assert.Equal("ModuleAssemblyName", compilation.AssemblyName); 1710Assert.Equal("ModuleAssemblyName", compilation.Assembly.Name); 1711Assert.Equal("ModuleAssemblyName", compilation.Assembly.Identity.Name); 1904Assert.Equal("alias", comp.References.Last().Properties.Aliases.Single()); 2612Assert.Equal("<anonymous type: int m1>", type.ToDisplayString()); 2635Assert.Equal("<anonymous type: int m1, int m2>", type.ToDisplayString()); 2648Assert.Equal("<anonymous type: int m1, bool m2>", type.ToDisplayString());
Compilation\CSharpCompilationOptionsTests.cs (1)
299Assert.Equal("Script", new CSharpCompilationOptions(OutputKind.ConsoleApplication, scriptClassName: null).ScriptClassName);
Compilation\GetSemanticInfoTests.cs (64)
46Assert.Equal("x", sym.Symbol.Name); 609Assert.Equal("Identity", conv.ToString()); 979Assert.Equal("Boolean", info.Type.Name); 1003Assert.Equal("Boolean", info.ConvertedType.Name); 1052Assert.Equal("", exprSyntaxList[4].ToFullString()); 1053Assert.Equal("", exprSyntaxList[5].ToFullString()); 1171Assert.Equal("value", parameterSymbol.Name); 1200Assert.Equal("value", parameterSymbol.Name); 1534Assert.Equal("Fld", candidate.Name); 1563Assert.Equal("Test", symbol.Name); 1613Assert.Equal("T", symbol.Name); 1709Assert.Equal("x", symbol.Name); 1744Assert.Equal("value", symbol.Name); 1779Assert.Equal("this", symbol.Name); 2359Assert.Equal("x", parameterSymbol.Name); 2402Assert.Equal("A", symbolInfo.Symbol.Name); 2409Assert.Equal("B", symbolInfo.Symbol.Name); 2413Assert.Equal("D", symbolInfo.Symbol.Name); 2419Assert.Equal("B", symbolInfo.Symbol.Name); 2425Assert.Equal("B", symbolInfo.Symbol.Name); 2728Assert.Equal("c", symbol.Name); 3359Assert.Equal("ImplicitUserDefined", conversion.ToString()); 3424Assert.Equal("ImplicitUserDefined", conversion.ToString()); 3553Assert.Equal("System", expr.ToString()); 3581Assert.Equal("MessageBox(IntPtr.Zero, \"\", \"\", 1)", expr.ToString()); 3584Assert.Equal("C.MessageBox(System.IntPtr, string, string, uint)", symbolInfo.Symbol.ToDisplayString()); 3760Assert.Equal("System.Void", symbolInfo.Symbol.ToString()); 4059Assert.Equal("Any", method1.Name); 4072Assert.Equal("Any", method2.Name); 4109Assert.Equal("x", localDecl1.Variables.Single().Identifier.ValueText); 4111Assert.Equal("q", localDecl2.Variables.Single().Identifier.ValueText); 4164Assert.Equal("x", localDecl1.Variables.Single().Identifier.ValueText); 4166Assert.Equal("q", localDecl2.Variables.Single().Identifier.ValueText); 4942Assert.Equal("X", symbolInfo.Symbol.Name); 4946Assert.Equal("Z", symbolInfo.Symbol.Name); 4950Assert.Equal("A", symbolInfo.Symbol.Name); 4954Assert.Equal("B", symbolInfo.Symbol.Name); 4997Assert.Equal("X", symbolInfo.Symbol.Name); 5001Assert.Equal("x", symbolInfo.Symbol.Name); 5005Assert.Equal("Y", symbolInfo.Symbol.Name); 5009Assert.Equal("Z", symbolInfo.Symbol.Name); 5026Assert.Equal("Z", symbolInfo.Symbol.Name); 5040Assert.Equal("Z", symbolInfo.Symbol.Name); 5056Assert.Equal("Z", symbolInfo.Symbol.Name); 5072Assert.Equal("Z", symbolInfo.Symbol.Name); 5088Assert.Equal("Z", symbolInfo.Symbol.Name); 5104Assert.Equal("Z", symbolInfo.Symbol.Name); 5121Assert.Equal("Z", symbolInfo.Symbol.Name); 5138Assert.Equal("Z", symbolInfo.Symbol.Name); 5154Assert.Equal("Z", symbolInfo.Symbol.Name); 5170Assert.Equal("Z", symbolInfo.Symbol.Name); 5187Assert.Equal("Z", symbolInfo.Symbol.Name); 5204Assert.Equal("Z", symbolInfo.Symbol.Name); 5221Assert.Equal("Z", symbolInfo.Symbol.Name); 5237Assert.Equal("Z", symbolInfo.Symbol.Name); 5253Assert.Equal("Z", symbolInfo.Symbol.Name); 5269Assert.Equal("Z", symbolInfo.Symbol.Name); 5285Assert.Equal("Z", symbolInfo.Symbol.Name); 5302Assert.Equal("Z", symbolInfo.Symbol.Name); 5319Assert.Equal("Z", symbolInfo.Symbol.Name); 5336Assert.Equal("Z", symbolInfo.Symbol.Name); 5353Assert.Equal("Z", symbolInfo.Symbol.Name); 5370Assert.Equal("Z", symbolInfo.Symbol.Name); 5387Assert.Equal("Z", symbolInfo.Symbol.Name);
Compilation\GetUnusedImportDirectivesTests.cs (2)
198Assert.Equal("Console", info.Symbol.Name); 200Assert.Equal("System", info.Symbol.ContainingSymbol.Name);
Compilation\IndexedProperties_BindingTests.cs (1)
144Assert.Equal(name, sym.Symbol.Name);
Compilation\ReferenceManagerTests.cs (12)
915Assert.Equal(p2, dr1.FilePath); 916Assert.Equal(p3, dr2.FilePath); 917Assert.Equal(p3, dr3.FilePath); 2063Assert.Equal("B, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ce65828c82a341f2", libBv1.Assembly.Identity.GetDisplayName()); 2064Assert.Equal("B, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ce65828c82a341f2", libBv2.Assembly.Identity.GetDisplayName()); 2171Assert.Equal("System.Numerics.Vectors, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", vectors40.Assembly.Identity.GetDisplayName()); 2178Assert.Equal("System.Numerics.Vectors, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", vectors41.Assembly.Identity.GetDisplayName()); 2539Assert.Equal("B", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(bRef)).Name); 2612Assert.Equal("B", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(b3RefY)).Name); 2782Assert.Equal("D", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(dRef)).Name); 2814Assert.Equal("B", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(bRef)).Name); 2815Assert.Equal("D", ((AssemblySymbol)c.GetAssemblyOrModuleSymbol(dRef)).Name);
Compilation\SemanticModelAPITests.cs (89)
156Assert.Equal("Slice", symbolInfo.Symbol.Name); 409Assert.Equal(string.Empty, symbol.Name); 430Assert.Equal(string.Empty, symbol.Name); 1049Assert.Equal("do, id, Prop, short", results); 1080Assert.Equal("ary, field, local, p1, p2", results); 1121Assert.Equal("baseField, BaseProp, id, ret", results); 1165Assert.Equal("a1, a1, a2, a2, a3, a3, GetGoo, igoo, sField", results); 1272Assert.Equal("", aliasTarget.Name); 1434Assert.Equal("String", typeInfo.Type.Name); 1435Assert.Equal("Object", typeInfo.ConvertedType.Name); 1472Assert.Equal("Int16", typeInfo.Type.Name); 1473Assert.Equal("Int32", typeInfo.ConvertedType.Name); 1520Assert.Equal("Int16", typeInfo.Type.Name); 1521Assert.Equal("Int32", typeInfo.ConvertedType.Name); 1568Assert.Equal("E", typeInfo.Type.Name); 1569Assert.Equal("E", typeInfo.ConvertedType.Name); 1608Assert.Equal("Int16", typeInfo.Type.Name); 1609Assert.Equal("Int32", typeInfo.ConvertedType.Name); 1693Assert.Equal("String", typeInfo.Type.Name); 1694Assert.Equal("Object", typeInfo.ConvertedType.Name); 1733Assert.Equal("var", aliasSymbol.Name); 1789Assert.Equal("z", local.Name); 1791Assert.Equal("Int32", ((ILocalSymbol)local).Type.Name); 1795Assert.Equal("Int32", typeInfo.Type.Name); 1801Assert.Equal("z", info.Symbol.Name); 1808Assert.Equal("y", info2.Symbol.Name); 1842Assert.Equal("z", local.Name); 1844Assert.Equal("Int32", ((ILocalSymbol)local).Type.Name); 1855Assert.Equal("y", local.Name); 1857Assert.Equal("String", ((ILocalSymbol)local).Type.Name); 1888Assert.Equal("label", label.Name); 1931Assert.Equal("case 0:", labelSymbol.Name); 1966Assert.Equal("z", parameterSymbol.Name); 2044Assert.Equal("Int32", typeInfo.Type.Name); 2287Assert.Equal("p", symbol.Name); 2395Assert.Equal("z", local.Name); 2397Assert.Equal("Int32", ((ILocalSymbol)local).Type.Name); 2401Assert.Equal("Int32", typeInfo.Type.Name); 2407Assert.Equal("z", info.Symbol.Name); 2578Assert.Equal("z", local.Name); 2580Assert.Equal("Int32", ((ILocalSymbol)local).Type.Name); 2592Assert.Equal("y", local.Name); 2594Assert.Equal("String", ((ILocalSymbol)local).Type.Name); 2606Assert.Equal("y", local.Name); 2608Assert.Equal("Int32", ((ILocalSymbol)local).Type.Name); 2614Assert.Equal("x", paramSymbol.Name); 2615Assert.Equal("Int32", paramSymbol.Type.Name); 2649Assert.Equal("label", label.Name); 2687Assert.Equal("z", parameterSymbol.Name); 2716Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2721Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2730Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2735Assert.Equal(expectedTypeDisplayString, symbol.ToDisplayString()); 2904Assert.Equal("A", symbol.ToDisplayString()); 2905Assert.Equal("System.ArgumentException", symbol.Target.ToDisplayString()); 2926Assert.Equal("int", symbol.ToDisplayString()); 2939Assert.Equal("object", symbol.ToDisplayString()); 2945Assert.Equal("object", symbol.ToDisplayString()); 2966Assert.Equal("int", symbol.ToDisplayString()); 2979Assert.Equal("A", symbol.ToDisplayString()); 2985Assert.Equal("A", symbol.ToDisplayString()); 3011Assert.Equal("int", symbol.ToDisplayString()); 3024Assert.Equal("A.B", symbol.ToDisplayString()); 3029Assert.Equal("A.B", symbol.ToDisplayString()); 3034Assert.Equal("A", symbol.ToDisplayString()); 3040Assert.Equal("A.B", symbol.ToDisplayString()); 3052Assert.Equal("A.M()", symbol.ToDisplayString()); 3057Assert.Equal("A.M()", symbol.ToDisplayString()); 3062Assert.Equal("A", symbol.ToDisplayString()); 3068Assert.Equal("A.M()", symbol.ToDisplayString()); 3129Assert.Equal("x", syntax.Identifier.ValueText); 3133Assert.Equal("x", symbol.Name); 3743Assert.Equal("s", identifier.Identifier.ValueText); 3849Assert.Equal("Alias", symbol.Name); 3854Assert.Equal("lib", target.ContainingAssembly.Name); 4145Assert.Equal(@"$""Number 3""", actual[0].ToString()); 4148Assert.Equal(@"$""{""Level 5""} {S1}""", actual[1].ToString()); 4153Assert.Equal(@"$""Testing""", actual[3].ToString()); 4156Assert.Equal(@"$""ConstantInterpolatedString""", actual[4].ToString()); 4159Assert.Equal(@"$""Level 5""", actual[5].ToString()); 4162Assert.Equal(@"$""Radio Noise""", actual[6].ToString()); 4165Assert.Equal(@"$""Level 5""", actual[7].ToString()); 4278Assert.Equal(@"$""""""Number 3""""""", actual[0].ToString()); 4282Assert.Equal(@"$""""""{""""""Level 5""""""} {S1}""""""", actual[1].ToString()); 4289Assert.Equal(@"$""""""Testing""""""", actual[3].ToString()); 4293Assert.Equal(@"$""""""ConstantInterpolatedString""""""", actual[4].ToString()); 4297Assert.Equal(@"$""""""Level 5""""""", actual[5].ToString()); 4301Assert.Equal(@"$""""""Radio Noise""""""", actual[6].ToString()); 4305Assert.Equal(@"$""""""Level 5""""""", actual[7].ToString());
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (127)
83Assert.Equal("B", symbol.Name); 108Assert.Equal("", symbol.Name); 129Assert.Equal("D", symbol.Name); 152Assert.Equal("C", symbol.Name); 261Assert.Equal("C", typeSymbol.Name); 282Assert.Equal("M", methodSymbol.Name); 305Assert.Equal("P", propertySymbol.Name); 385Assert.Equal("E", eventSymbol.Name); 412Assert.Equal("E", eventSymbol.Name); 434Assert.Equal("Iter3", symbol.Name); 456Assert.Equal("Prop", symbol.Name); 479Assert.Equal(WellKnownMemberNames.Indexer, symbol.Name); 480Assert.Equal("Item", symbol.MetadataName); 503Assert.Equal("Iter3", symbol.Name); 525Assert.Equal("Prop", symbol.Name); 548Assert.Equal(WellKnownMemberNames.Indexer, symbol.Name); 549Assert.Equal("Item", symbol.MetadataName); 572Assert.Equal("x", symbol.Name); 594Assert.Equal("x", symbol.Name); 598Assert.Equal("y", symbol.Name); 622Assert.Equal("label1", symbol1.Name); 627Assert.Equal("label2", symbol2.Name); 726Assert.Equal("case 0:", labelSymbol.Name); 758Assert.Equal("default", labelSymbol.Name); 780Assert.Equal("x", symbol.Name); 802Assert.Equal("x", symbol.Name); 806Assert.Equal("y", symbol.Name); 826Assert.Equal("x", symbol.Name); 842Assert.Equal("x", symbol.Name); 862Assert.Equal("x", symbol.Name); 866Assert.Equal("y", symbol.Name); 886Assert.Equal("T", symbol.Name); 906Assert.Equal("T", symbol.Name); 945Assert.Equal("St", structSymbol.Name); 950Assert.Equal("field", fSymbol.Name); 951Assert.Equal("T", fSymbol.Type.Name); 957Assert.Equal("Em", enumSymbol.Name); 971Assert.Equal("V", ptsym.Name); 975Assert.Equal("ReturnEnum", mSymbol.Name); 983Assert.Equal("p1", mSymbol.Parameters[0].Name); 984Assert.Equal("St", mSymbol.Parameters[0].Type.Name); 989Assert.Equal("p1", psym.Name); 2258Assert.Equal("String", info.Type.Name); 2260Assert.Equal("F", info.Symbol.Name); 2294Assert.Equal("String", info.Type.Name); 2297Assert.Equal("F", info.CandidateSymbols[0].Name); 2333Assert.Equal("F", info.CandidateSymbols[0].Name); 2369Assert.Equal("F", info.CandidateSymbols[0].Name); 2433Assert.Equal("C", info.Type.Name); 2465Assert.Equal("C", info.Type.Name); 2473Assert.Equal("Int32", info.Type.Name); 2504Assert.Equal("System", info.Symbol.Name); 2540Assert.Equal("D", info.Type.Name); 2541Assert.Equal("N", info.Type.ContainingNamespace.Name); 2569Assert.Equal("String", info.Type.Name); 2600Assert.Equal("System", info.Symbol.Name); 2623Assert.Equal("Double", info.ConvertedType.Name); 2647Assert.Equal("Double", info.ConvertedType.Name); 2651Assert.Equal("Double", info.ConvertedType.Name); 2679Assert.Equal("Double", info.ConvertedType.Name); 2706Assert.Equal("Double", info.ConvertedType.Name); 2710Assert.Equal("Int64", info.ConvertedType.Name); 2819Assert.Equal("N1", n1.Name); 2845Assert.Equal("C", classNode.Identifier.ValueText); 2850Assert.Equal("M", explicitMethodNode.Identifier.ValueText); 2855Assert.Equal("I.M", explicitMethodSymbol.Name); 2859Assert.Equal("P", explicitPropertyNode.Identifier.ValueText); 2863Assert.Equal("I.P", explicitPropertySymbol.Name); 2870Assert.Equal("get", explicitPropertyGetterNode.Keyword.ValueText); 2875Assert.Equal("I.get_P", explicitPropertyGetterSymbol.Name); 2880Assert.Equal("set", explicitPropertySetterNode.Keyword.ValueText); 2885Assert.Equal("I.set_P", explicitPropertySetterSymbol.Name); 3218Assert.Equal("Int32", info.ConvertedType.Name); 3241Assert.Equal("strin", info.Type.Name); 3275Assert.Equal("D1", initInfo.ConvertedType.Name); 3277Assert.Equal("C.N(int)", initInfo.Symbol.ToDisplayString()); 3287Assert.Equal("D2", argInfo.ConvertedType.Name); 3290Assert.Equal("C.N()", argInfo.Symbol.ToDisplayString()); 3482Assert.Equal("aaa", symbol.Name); 3505Assert.Equal("aaa", symbol.Name); 3532Assert.Equal("aaa", symbol1.Name); 3538Assert.Equal("bbb", symbol2.Name); 3569Assert.Equal("aaa", symbol.Name); 3591Assert.Equal("Goo", symbol.Name); 3616Assert.Equal("Goo", symbol.Name); 3640Assert.Equal("EnumX", enumTypeSymbol.Name); 3644Assert.Equal("FieldM", symbol.Name); 3648Assert.Equal("FieldM", fSymbol.Name); 3673Assert.Equal("x", parameter.Name); 3742Assert.Equal("System", declSymbol.Name); 3928Assert.Equal("System", alias1.Target.ToDisplayString()); 3932Assert.Equal("System.IO", alias2.Target.ToDisplayString()); 4296Assert.Equal("O", aliasSymbol.Name); 4298Assert.Equal("ObsoleteAttribute", aliasSymbol.Target.Name); 4342Assert.Equal("O", aliasSymbol.Name); 4344Assert.Equal("ObsoleteAttribute", aliasSymbol.Target.Name); 4365Assert.Equal("O", aliasSymbol.Name); 4367Assert.Equal("ObsoleteAttribute", aliasSymbol.Target.Name); 4387Assert.Equal("O", aliasSymbol.Name); 4389Assert.Equal("ObsoleteAttribute", aliasSymbol.Target.Name); 4695Assert.Equal("A<object>.B<?>", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4710Assert.Equal("A<?, ?, ?>.B<object>", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4725Assert.Equal("A<?>.B<?>", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4800Assert.Equal("(int, int)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4801Assert.Equal("(1, 2)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4823Assert.Equal("(int Alice, int Bob)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4824Assert.Equal("(Alice: 1, Bob: 2)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4846Assert.Equal("(short, int)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4847Assert.Equal("(1, 1)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4869Assert.Equal("(short, string)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4870Assert.Equal("(1, null)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4892Assert.Equal("(short Alice, string Bob)", type.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4893Assert.Equal("(Alice:1, Bob:null)", type.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4915Assert.Equal("(int Alice, int Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4916Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4938Assert.Equal("(int Alice, short Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4939Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4961Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4962Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 4996Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 4997Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 5042Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 5043Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 5091Assert.Equal("(short Alice, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 5092Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString()); 5114Assert.Equal("(short, string Bob).Bob", element.ToDisplayString(SymbolDisplayFormat.CSharpErrorMessageFormat)); 5115Assert.Equal("Bob", element.DeclaringSyntaxReferences.Single().GetSyntax().ToString());
Compilation\SemanticModelGetSemanticInfoTests.cs (62)
2022Assert.Equal("ulong.operator +(ulong, ulong)", semanticInfo.Symbol.ToString()); 4622Assert.Equal("j", symbol.Name); 4690Assert.Equal("C", symbol.Name); 4727Assert.Equal("Y", symbol.Name); 4763Assert.Equal("B", symbol.Name); 4799Assert.Equal("D", symbol.Name); 4831Assert.Equal("B", symbol.Name); 5667Assert.Equal("str", lambdaSym.Parameters[0].Name); 5703Assert.Equal("str", lambdaSym.Parameters[0].Name); 6232Assert.Equal("args", semanticInfo.Symbol.Name); 6439Assert.Equal("C.Goo(int)", semanticInfo.ImplicitConversion.Method.ToString()); 6712Assert.Equal("int", semanticInfo.Type.ToString()); 6713Assert.Equal("int", semanticInfo.ConvertedType.ToString()); 6738Assert.Equal("D", semanticInfo.ConvertedType.ToString()); 6758Assert.Equal("D", semanticInfo.ConvertedType.ToString()); 6842Assert.Equal("int", semanticInfo.Type.ToString()); 6843Assert.Equal("short", semanticInfo.ConvertedType.ToString()); 8333Assert.Equal("x", semanticInfo.Symbol.Name); 8351Assert.Equal("AttributeUsageAttribute", semanticInfo.Type.Name); 9236Assert.Equal("B", type.Name); 9266Assert.Equal("B", type.Name); 9314Assert.Equal("A", aliasInfo.Name); 9674Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.Description.Description(string)", semanticInfo.Symbol.ToDisplayString()); 9679Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.Description.Description(string)", semanticInfo.MethodGroup[0].ToDisplayString()); 9725Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.DescriptionAttribute.DescriptionAttribute(string)", semanticInfo.Symbol.ToDisplayString()); 9730Assert.Equal("ValidWithSuffix_And_ValidWithoutSuffix.DescriptionAttribute.DescriptionAttribute(string)", semanticInfo.MethodGroup[0].ToDisplayString()); 10941Assert.Equal("Program", semanticInfo.Type.Name); 11650Assert.Equal("global", aliasInfo.Name); 11684Assert.Equal("global", aliasInfo.Name); 12194Assert.Equal("Stat", semanticInfo.CandidateSymbols.First().Name); 12264Assert.Equal("X", semanticInfo.CandidateSymbols.First().Name); 12330Assert.Equal("T", semanticInfo.CandidateSymbols.First().Name); 12530Assert.Equal("Conv.implicit operator int(Conv)", semanticInfo.ImplicitConversion.Method.ToString()); 14388Assert.Equal("InterfaceType", semanticInfo.CandidateSymbols.First().Name); 15083Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15085Assert.Equal("int", semanticInfo.ConvertedType.ToDisplayString()); 15089Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15122Assert.Equal("string.ToString()", sortedCandidates[0].ToDisplayString()); 15124Assert.Equal("string.ToString(System.IFormatProvider)", sortedCandidates[1].ToDisplayString()); 15129Assert.Equal("string.ToString()", sortedMethodGroup[0].ToDisplayString()); 15130Assert.Equal("string.ToString(System.IFormatProvider)", sortedMethodGroup[1].ToDisplayString()); 15151Assert.Equal("string", semanticInfo.Type.ToDisplayString()); 15153Assert.Equal("string", semanticInfo.ConvertedType.ToDisplayString()); 15157Assert.Equal("string.ToString()", semanticInfo.Symbol.ToDisplayString()); 15182Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15184Assert.Equal("int", semanticInfo.ConvertedType.ToDisplayString()); 15188Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15213Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15215Assert.Equal("?", semanticInfo.ConvertedType.ToDisplayString()); 15219Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15244Assert.Equal("int", semanticInfo.Type.ToDisplayString()); 15246Assert.Equal("int", semanticInfo.ConvertedType.ToDisplayString()); 15250Assert.Equal("string.Length", semanticInfo.Symbol.ToDisplayString()); 15275Assert.Equal("char", semanticInfo.Type.ToDisplayString()); 15277Assert.Equal("char", semanticInfo.ConvertedType.ToDisplayString()); 15281Assert.Equal("string.this[int]", semanticInfo.Symbol.ToDisplayString()); 15308Assert.Equal("BaselineLog", semanticInfo.Symbol.ToDisplayString()); 15337Assert.Equal("dynamic", semanticInfo.Type.ToDisplayString()); 15339Assert.Equal("dynamic", semanticInfo.ConvertedType.ToDisplayString()); 15378Assert.Equal(expectedNames[i++], infoSymbol?.Name); 15382Assert.Equal(expectedNames[i++], infoSymbol2.Name); 15436Assert.Equal("C", info.Type.Name);
Compilation\SemanticModelGetSemanticInfoTests_LateBound.cs (6)
40Assert.Equal("C", semanticInfo.Type.Name); 64Assert.Equal("C", semanticInfo.Type.Name); 85Assert.Equal("C", semanticInfo.Type.Name); 111Assert.Equal("C", semanticInfo.Type.Name); 716Assert.Equal("dynamic.operator " + op + "(dynamic, dynamic)", semanticInfo.Symbol.ToString()); 829Assert.Equal("dynamic.operator " + op.Substring(0, op.Length - 1) + "(dynamic, dynamic)", semanticInfo.Symbol.ToString());
Compilation\SymbolVisitorTests.cs (6)
573Assert.Equal(expectedOutput, resultOutput); 624Assert.Equal(expectedOutput, resultOutput); 676Assert.Equal(expectedOutput, resultOutput); 721Assert.Equal(expectedOutput, resultOutput); 765Assert.Equal(expectedOutput, resultOutput); 810Assert.Equal(expectedOutput, resultOutput);
DeclarationTests.cs (7)
65Assert.Equal(string.Empty, decl1.Name); 66Assert.Equal(string.Empty, decl2.Name); 95Assert.Equal("C", ct1.Name); 96Assert.Equal("C", ct2.Name); 104Assert.Equal("C", c1.Name); 132Assert.Equal(string.Empty, mr.Name); 165Assert.Equal(string.Empty, mr.Name);
DocumentationComments\CrefTests.cs (9)
2140Assert.Equal("A", actualSymbol.Name); 5719Assert.Equal(WellKnownMemberNames.AdditionOperatorName, symbol.Name); 6047Assert.Equal("T", typeParameterSyntax.ToString()); 6071Assert.Equal("GetValueOrDefault", methodNameSyntax.ToString()); 6220Assert.Equal("A", alias.Name); 6253Assert.Equal("A", alias.Name); 6675Assert.Equal("U", name.ToString()); 6926Assert.Equal("T:System.ValueTuple`2", cref); 6950Assert.Equal("F:System.ValueTuple`2.Item1", cref);
DocumentationComments\DocumentationCommentCompilerTests.cs (140)
64Assert.Equal(expected, actual); 93Assert.Equal(expected, actual); 118Assert.Equal(expected, actual); 147Assert.Equal(expected, actual); 176Assert.Equal(expected, actual); 205Assert.Equal(expected, actual); 234Assert.Equal(expected, actual); 263Assert.Equal(expected, actual); 296Assert.Equal(expected, actual); 325Assert.Equal(expected, actual); 350Assert.Equal(expected, actual); 375Assert.Equal(expected, actual); 402Assert.Equal(expected, actual); 432Assert.Equal(expected, actual); 462Assert.Equal(expected, actual); 493Assert.Equal(expected, actual); 524Assert.Equal(expected, actual); 555Assert.Equal(expected, actual); 586Assert.Equal(expected, actual); 661Assert.Equal(expected, actual); 710Assert.Equal(expected, actual); 743Assert.Equal(expected, actual); 779Assert.Equal(expectedA, actualA); 798Assert.Equal(expectedB, actualB); 827Assert.Equal(expected, actual); 865Assert.Equal(expected, actual); 906Assert.Equal(expected, actualA); 911Assert.Equal(expected, actualB); 995Assert.Equal(expected, actualB); 1046Assert.Equal(expected, actualB); 1097Assert.Equal(expected, actualB); 1151Assert.Equal(expected, actualB); 1199Assert.Equal(expected, actualB); 1255Assert.Equal(expected, actualB); 1582Assert.Equal(expected, actualB); 1633Assert.Equal(expected, actualB); 1722Assert.Equal(expected, actualB); 1774Assert.Equal(expected, actualB); 1829Assert.Equal(expected, actualB); 1878Assert.Equal(expected, actualB); 1935Assert.Equal(expected, actualB); 2215Assert.Equal(expected, actual); 2260Assert.Equal(expected, actual); 2292Assert.Equal(expected, actual); 2320Assert.Equal(expected, actual); 3268Assert.Equal(expected, actual); 3298Assert.Equal(expected, actual); 3341Assert.Equal(expected, actual); 3381Assert.Equal(expected, actual); 3465Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 3500Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 3538Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 3575Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 3613Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 3676Assert.Equal(expected, actual); 3719Assert.Equal(expected, actual); 3765Assert.Equal(expected, actual); 3793Assert.Equal(expected, actual); 3830Assert.Equal(expected, actual); 3866Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 3902Assert.Equal(string.Format(expectedTemplate, xmlFilePath1), actual); 3937Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 3970Assert.Equal(string.Format(expectedTemplate, xmlFilePath1), actual); 4003Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFilePath)), actual); 4037Assert.Equal(string.Format(expectedTemplate, xmlFilePath2), actual); 4069Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 4103Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 4156Assert.Equal(string.Format(expectedTemplate, xmlFilePath), actual); 4195Assert.Equal(expected, actual); 4234Assert.Equal(string.Format(expectedTemplate, xmlFilePath1), actual); 4310Assert.Equal(expected, actual); 4347Assert.Equal(expected, actual); 4382Assert.Equal(expected, actual); 4429Assert.Equal(expected, actual); 4470Assert.Equal(expected, actual); 4505Assert.Equal(expected, actual); 4567Assert.Equal(expected, actual); 4609Assert.Equal(expected, actual); 4713Assert.Equal(expected, actual); 4786Assert.Equal(expected, actual); 4841Assert.Equal(expected, actual); 4879Assert.Equal(expected, actual); 4920Assert.Equal(expected, actual); 4956Assert.Equal(expected, actual); 4993Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFilePath)), actual); 5042Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFilePath)), actual); 5203Assert.Equal(expected, actual); 5237Assert.Equal(expectedText, actualText); 5276Assert.Equal(expectedText, actualText); 5291Assert.Equal(string.Format(expectedTextTemplate, xmlFilePath), actualText); 5341Assert.Equal(expected1, actual1); 5360Assert.Equal(expected2, actual2); 5388Assert.Equal(expected, actual); 5422Assert.Equal(expected, actual); 5451Assert.Equal(expected, actual); 5570Assert.Equal(expected, actual); 5621Assert.Equal(expected, actual); 5691Assert.Equal(expected, actual); 5749Assert.Equal(expected, actual); 5777Assert.Equal(expected, actual); 5810Assert.Equal(expected, actual); 5843Assert.Equal(expected, actual); 5920Assert.Equal(expected, actual); 5950Assert.Equal(expected, actual); 5982Assert.Equal(string.Format(expectedTemplate, TestHelpers.AsXmlCommentText(xmlFile.Path)), actual); 6034Assert.Equal(expectedText, actualText); 6097Assert.Equal(expected, actual); 6166Assert.Equal(expected, actual); 6214Assert.Equal(expected, actual); 6253Assert.Equal(expected, actual); 6280Assert.Equal(expected, actual); 6341Assert.Equal(expected, actual); 6367Assert.Equal(expected, actual); 6419Assert.Equal(expected, actual); 6448Assert.Equal(expected, actual); 6515Assert.Equal(expected, actual); 6543Assert.Equal(expected, actual); 6576Assert.Equal(expected, actual); 6619Assert.Equal(expected, actual); 6675Assert.Equal(expected, actual); 6752Assert.Equal(expected, actual); 6781Assert.Equal(expected, actual); 6817Assert.Equal(expected, actual); 6849Assert.Equal(expected, actual); 6892Assert.Equal(expected, actual); 6935Assert.Equal(expected, actual); 6945Assert.Equal(expected, actual); 6971Assert.Equal(expected, actual); 7018Assert.Equal(expected, actual); 7059Assert.Equal(expected, actual); 7100Assert.Equal(expected, actual); 7151Assert.Equal(expected, actual); 7187Assert.Equal(expected, actual); 7253Assert.Equal(expected, actual); 7292Assert.Equal(expected, actual); 7374Assert.Equal(expected, actual); 7492Assert.Equal(expected, actual); 7525Assert.Equal(expected, actual); 7559Assert.Equal(expected, actual); 7621Assert.Equal(expected, actual);
DocumentationComments\DocumentationModeTests.cs (2)
358Assert.Equal(expectedText, actualText); 392Assert.Equal(expectedText, actualText);
DocumentationComments\PartialTypeDocumentationCommentTests.cs (1)
57Assert.Equal(
DocumentationComments\TypeDocumentationCommentTests.cs (2)
53Assert.Equal("T:Color", _compilation.GlobalNamespace.GetTypeMembers("Color").Single().GetDocumentationCommentId()); 71Assert.Equal("T:Acme.Widget", _widgetClass.GetDocumentationCommentId());
SymbolDisplay\ObjectDisplayTests.cs (131)
24Assert.Equal("1", FormatPrimitive((byte)1)); 25Assert.Equal(@"123", FormatPrimitive((byte)123)); 26Assert.Equal("255", FormatPrimitive((byte)-1)); 27Assert.Equal("1", FormatPrimitive((sbyte)1)); 28Assert.Equal(@"123", FormatPrimitive((sbyte)123)); 29Assert.Equal("-1", FormatPrimitive((sbyte)-1)); 30Assert.Equal("1", FormatPrimitive((ushort)1)); 31Assert.Equal(@"123", FormatPrimitive((ushort)123)); 32Assert.Equal("65535", FormatPrimitive((ushort)-1)); 33Assert.Equal("1", FormatPrimitive((short)1)); 34Assert.Equal(@"123", FormatPrimitive((short)123)); 35Assert.Equal("-1", FormatPrimitive((short)-1)); 36Assert.Equal("1", FormatPrimitive((uint)1)); 37Assert.Equal(@"123", FormatPrimitive((uint)123)); 38Assert.Equal("4294967295", FormatPrimitive((uint)-1)); 39Assert.Equal("1", FormatPrimitive((int)1)); 40Assert.Equal(@"123", FormatPrimitive((int)123)); 41Assert.Equal("-1", FormatPrimitive((int)-1)); 42Assert.Equal("1", FormatPrimitive((ulong)1)); 43Assert.Equal(@"123", FormatPrimitive((ulong)123)); 44Assert.Equal("18446744073709551615", FormatPrimitive((ulong)-1)); 45Assert.Equal("1", FormatPrimitive((long)1)); 46Assert.Equal(@"123", FormatPrimitive((long)123)); 47Assert.Equal("-1", FormatPrimitive((long)-1)); 49Assert.Equal("0x01", FormatPrimitiveUsingHexadecimalNumbers((byte)1)); 50Assert.Equal(@"0x7f", FormatPrimitiveUsingHexadecimalNumbers((byte)0x7f)); 51Assert.Equal("0xff", FormatPrimitiveUsingHexadecimalNumbers((byte)-1)); 52Assert.Equal("0x01", FormatPrimitiveUsingHexadecimalNumbers((sbyte)1)); 53Assert.Equal(@"0x7f", FormatPrimitiveUsingHexadecimalNumbers((sbyte)0x7f)); 54Assert.Equal("0xffffffff", FormatPrimitiveUsingHexadecimalNumbers((sbyte)-1)); // As in dev11. 55Assert.Equal(@"0xfffffffe", FormatPrimitiveUsingHexadecimalNumbers((sbyte)(-2))); 56Assert.Equal("0x0001", FormatPrimitiveUsingHexadecimalNumbers((ushort)1)); 57Assert.Equal(@"0x007f", FormatPrimitiveUsingHexadecimalNumbers((ushort)0x7f)); 58Assert.Equal("0xffff", FormatPrimitiveUsingHexadecimalNumbers((ushort)-1)); 59Assert.Equal("0x0001", FormatPrimitiveUsingHexadecimalNumbers((short)1)); 60Assert.Equal(@"0x007f", FormatPrimitiveUsingHexadecimalNumbers((short)0x7f)); 61Assert.Equal("0xffffffff", FormatPrimitiveUsingHexadecimalNumbers((short)-1)); // As in dev11. 62Assert.Equal(@"0xfffffffe", FormatPrimitiveUsingHexadecimalNumbers((short)(-2))); 63Assert.Equal("0x00000001", FormatPrimitiveUsingHexadecimalNumbers((uint)1)); 64Assert.Equal(@"0x0000007f", FormatPrimitiveUsingHexadecimalNumbers((uint)0x7f)); 65Assert.Equal("0xffffffff", FormatPrimitiveUsingHexadecimalNumbers((uint)-1)); 66Assert.Equal("0x00000001", FormatPrimitiveUsingHexadecimalNumbers((int)1)); 67Assert.Equal(@"0x0000007f", FormatPrimitiveUsingHexadecimalNumbers((int)0x7f)); 68Assert.Equal("0xffffffff", FormatPrimitiveUsingHexadecimalNumbers((int)-1)); 69Assert.Equal(@"0xfffffffe", FormatPrimitiveUsingHexadecimalNumbers((int)(-2))); 70Assert.Equal("0x0000000000000001", FormatPrimitiveUsingHexadecimalNumbers((ulong)1)); 71Assert.Equal(@"0x000000000000007f", FormatPrimitiveUsingHexadecimalNumbers((ulong)0x7f)); 72Assert.Equal("0xffffffffffffffff", FormatPrimitiveUsingHexadecimalNumbers((ulong)-1)); 73Assert.Equal("0x0000000000000001", FormatPrimitiveUsingHexadecimalNumbers((long)1)); 74Assert.Equal(@"0x000000000000007f", FormatPrimitiveUsingHexadecimalNumbers((long)0x7f)); 75Assert.Equal("0xffffffffffffffff", FormatPrimitiveUsingHexadecimalNumbers((long)-1)); 76Assert.Equal(@"0xfffffffffffffffe", FormatPrimitiveUsingHexadecimalNumbers((long)(-2))); 83Assert.Equal(@"true", FormatPrimitive(true)); 84Assert.Equal(@"false", FormatPrimitive(false)); 90Assert.Equal(@"null", FormatPrimitive(null)); 96Assert.Equal(@"2", FormatPrimitive((decimal)2)); 102Assert.Equal(@"2", FormatPrimitive((float)2)); 108Assert.Equal(@"2", FormatPrimitive((double)2)); 114Assert.Equal("120 'x'", ObjectDisplay.FormatLiteral('x', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints)); 115Assert.Equal("120 x", ObjectDisplay.FormatLiteral('x', ObjectDisplayOptions.IncludeCodePoints)); 116Assert.Equal("0x0078 'x'", ObjectDisplay.FormatLiteral('x', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 117Assert.Equal("0x0078 x", ObjectDisplay.FormatLiteral('x', ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 119Assert.Equal("39 '\\''", ObjectDisplay.FormatLiteral('\'', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints)); 120Assert.Equal("39 '", ObjectDisplay.FormatLiteral('\'', ObjectDisplayOptions.IncludeCodePoints)); 121Assert.Equal("0x001e '\\u001e'", ObjectDisplay.FormatLiteral('\u001e', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 122Assert.Equal("0x001e \u001e", ObjectDisplay.FormatLiteral('\u001e', ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 124Assert.Equal("0x0008 '\\b'", ObjectDisplay.FormatLiteral('\b', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 125Assert.Equal("0x0009 '\\t'", ObjectDisplay.FormatLiteral('\t', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 126Assert.Equal("0x000a '\\n'", ObjectDisplay.FormatLiteral('\n', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 127Assert.Equal("0x000b '\\v'", ObjectDisplay.FormatLiteral('\v', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 128Assert.Equal("0x000d '\\r'", ObjectDisplay.FormatLiteral('\r', ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters | ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 129Assert.Equal("0x000d \r", ObjectDisplay.FormatLiteral('\r', ObjectDisplayOptions.IncludeCodePoints | ObjectDisplayOptions.UseHexadecimalNumbers)); 187Assert.Equal("", ObjectDisplay.FormatLiteral("", ObjectDisplayOptions.None)); 188Assert.Equal(@"a", ObjectDisplay.FormatLiteral(@"a", ObjectDisplayOptions.None)); 189Assert.Equal(@"ab", ObjectDisplay.FormatLiteral(@"ab", ObjectDisplayOptions.None)); 190Assert.Equal(@"\", ObjectDisplay.FormatLiteral(@"\", ObjectDisplayOptions.None)); 191Assert.Equal(@"\a", ObjectDisplay.FormatLiteral(@"\a", ObjectDisplayOptions.None)); 192Assert.Equal(@"a\b", ObjectDisplay.FormatLiteral(@"a\b", ObjectDisplayOptions.None)); 193Assert.Equal(@"ab\c", ObjectDisplay.FormatLiteral(@"ab\c", ObjectDisplayOptions.None)); 194Assert.Equal(@"ab\cd", ObjectDisplay.FormatLiteral(@"ab\cd", ObjectDisplayOptions.None)); 195Assert.Equal(@"ab\cd\", ObjectDisplay.FormatLiteral(@"ab\cd\", ObjectDisplayOptions.None)); 196Assert.Equal(@"ab\cd\e", ObjectDisplay.FormatLiteral(@"ab\cd\e", ObjectDisplayOptions.None)); 197Assert.Equal(@"\\\\", ObjectDisplay.FormatLiteral(@"\\\\", ObjectDisplayOptions.None)); 199Assert.Equal(@"""""", ObjectDisplay.FormatLiteral("", ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters)); 200Assert.Equal(@"""\""\""""", ObjectDisplay.FormatLiteral(@"""""", ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters)); 201Assert.Equal(@"""'""", ObjectDisplay.FormatLiteral(@"'", ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters)); 202Assert.Equal(@"""ab""", ObjectDisplay.FormatLiteral(@"ab", ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters)); 203Assert.Equal(@"""\\""", ObjectDisplay.FormatLiteral(@"\", ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters)); 205Assert.Equal("\"x\"", ObjectDisplay.FormatLiteral("x", ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters)); 206Assert.Equal("x", ObjectDisplay.FormatLiteral("x", ObjectDisplayOptions.None)); 224Assert.Equal( 237Assert.Equal( 243Assert.Equal(arabic, s); 247Assert.Equal(hebrew, s); 275Assert.Equal("@\"\n\"", ObjectDisplay.FormatLiteral("\n", ObjectDisplayOptions.UseQuotes)); 276Assert.Equal("@\"\"\"\n\"", ObjectDisplay.FormatLiteral("\"\n", ObjectDisplayOptions.UseQuotes)); 285Assert.Equal("12,5", decimalValue.ToString()); 286Assert.Equal("12.5", ObjectDisplay.FormatLiteral(decimalValue, ObjectDisplayOptions.None)); 287Assert.Equal("12.5", ObjectDisplay.FormatLiteral(decimalValue, ObjectDisplayOptions.None, CultureInfo.InvariantCulture)); 288Assert.Equal("12,5", ObjectDisplay.FormatLiteral(decimalValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture)); 289Assert.Equal("12.5M", ObjectDisplay.FormatLiteral(decimalValue, ObjectDisplayOptions.IncludeTypeSuffix)); 292Assert.Equal("12,5", doubleValue.ToString()); 293Assert.Equal("12.5", ObjectDisplay.FormatLiteral(doubleValue, ObjectDisplayOptions.None)); 294Assert.Equal("12.5", ObjectDisplay.FormatLiteral(doubleValue, ObjectDisplayOptions.None, CultureInfo.InvariantCulture)); 295Assert.Equal("12,5", ObjectDisplay.FormatLiteral(doubleValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture)); 296Assert.Equal("12.5D", ObjectDisplay.FormatLiteral(doubleValue, ObjectDisplayOptions.IncludeTypeSuffix)); 299Assert.Equal("12,5", singleValue.ToString()); 300Assert.Equal("12.5", ObjectDisplay.FormatLiteral(singleValue, ObjectDisplayOptions.None)); 301Assert.Equal("12.5", ObjectDisplay.FormatLiteral(singleValue, ObjectDisplayOptions.None, CultureInfo.InvariantCulture)); 302Assert.Equal("12,5", ObjectDisplay.FormatLiteral(singleValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture)); 303Assert.Equal("12.5F", ObjectDisplay.FormatLiteral(singleValue, ObjectDisplayOptions.IncludeTypeSuffix)); 306Assert.Equal("12", intValue.ToString()); 307Assert.Equal("12", ObjectDisplay.FormatLiteral(intValue, ObjectDisplayOptions.None)); 308Assert.Equal("12", ObjectDisplay.FormatLiteral(intValue, ObjectDisplayOptions.None, CultureInfo.InvariantCulture)); 309Assert.Equal("12", ObjectDisplay.FormatLiteral(intValue, ObjectDisplayOptions.None, CultureInfo.CurrentCulture)); 317Assert.Equal("true", FormatPrimitiveIncludingTypeSuffix(boolValue)); 320Assert.Equal("42", FormatPrimitiveIncludingTypeSuffix(sbyteValue)); 323Assert.Equal("42", FormatPrimitiveIncludingTypeSuffix(byteValue)); 326Assert.Equal("42", FormatPrimitiveIncludingTypeSuffix(shortValue)); 329Assert.Equal("42", FormatPrimitiveIncludingTypeSuffix(ushortValue)); 332Assert.Equal("42", FormatPrimitiveIncludingTypeSuffix(intValue)); 335Assert.Equal("42U", FormatPrimitiveIncludingTypeSuffix(uintValue)); 338Assert.Equal("42L", FormatPrimitiveIncludingTypeSuffix(longValue)); 341Assert.Equal("42UL", FormatPrimitiveIncludingTypeSuffix(ulongValue)); 344Assert.Equal("3.14159F", FormatPrimitiveIncludingTypeSuffix(floatValue)); 347Assert.Equal("26.2D", FormatPrimitiveIncludingTypeSuffix(doubleValue)); 350Assert.Equal("12.5M", FormatPrimitiveIncludingTypeSuffix(decimalValue, useHexadecimalNumbers: true)); 358Assert.Equal("a\tb", ObjectDisplay.FormatPrimitive(value, ObjectDisplayOptions.None)); 359Assert.Equal("\"a\tb\"", ObjectDisplay.FormatPrimitive(value, ObjectDisplayOptions.UseQuotes)); 360Assert.Equal("a\\tb", ObjectDisplay.FormatPrimitive(value, ObjectDisplayOptions.EscapeNonPrintableCharacters)); 361Assert.Equal("\"a\\tb\"", ObjectDisplay.FormatPrimitive(value, ObjectDisplayOptions.UseQuotes | ObjectDisplayOptions.EscapeNonPrintableCharacters));
SymbolDisplay\SymbolDisplayTests.cs (32)
4571Assert.Equal("Gen<V>.M(LibG<V>)", msym1.ToDisplayString()); 4577Assert.Equal(msym1.ToDisplayString(), msym2.ToDisplayString()); 4885Assert.Equal("Outer.Inner<T>", CSharp.SymbolDisplay.ToDisplayString(type, SymbolDisplayFormat.TestFormat)); 4886Assert.Equal("void Outer.M<U>()", CSharp.SymbolDisplay.ToDisplayString(method, SymbolDisplayFormat.TestFormat)); 4887Assert.Equal("System.String Outer.P { set; }", CSharp.SymbolDisplay.ToDisplayString(property, SymbolDisplayFormat.TestFormat)); 4888Assert.Equal("System.Int32 Outer.F", CSharp.SymbolDisplay.ToDisplayString(field, SymbolDisplayFormat.TestFormat)); 4889Assert.Equal("event Outer.EEventHandler Outer.E", CSharp.SymbolDisplay.ToDisplayString(@event, SymbolDisplayFormat.TestFormat)); 4890Assert.Equal("Outer.D", CSharp.SymbolDisplay.ToDisplayString(@delegate, SymbolDisplayFormat.TestFormat)); 4891Assert.Equal("Missing Outer.Error()", CSharp.SymbolDisplay.ToDisplayString(error, SymbolDisplayFormat.TestFormat)); 4898Assert.Equal("1", SymbolDisplay.FormatPrimitive(1, quoteStrings: false, useHexadecimalNumbers: false)); 4899Assert.Equal("1", SymbolDisplay.FormatPrimitive((uint)1, quoteStrings: false, useHexadecimalNumbers: false)); 4900Assert.Equal("1", SymbolDisplay.FormatPrimitive((byte)1, quoteStrings: false, useHexadecimalNumbers: false)); 4901Assert.Equal("1", SymbolDisplay.FormatPrimitive((sbyte)1, quoteStrings: false, useHexadecimalNumbers: false)); 4902Assert.Equal("1", SymbolDisplay.FormatPrimitive((short)1, quoteStrings: false, useHexadecimalNumbers: false)); 4903Assert.Equal("1", SymbolDisplay.FormatPrimitive((ushort)1, quoteStrings: false, useHexadecimalNumbers: false)); 4904Assert.Equal("1", SymbolDisplay.FormatPrimitive((long)1, quoteStrings: false, useHexadecimalNumbers: false)); 4905Assert.Equal("1", SymbolDisplay.FormatPrimitive((ulong)1, quoteStrings: false, useHexadecimalNumbers: false)); 4906Assert.Equal("x", SymbolDisplay.FormatPrimitive('x', quoteStrings: false, useHexadecimalNumbers: false)); 4907Assert.Equal("true", SymbolDisplay.FormatPrimitive(true, quoteStrings: false, useHexadecimalNumbers: false)); 4908Assert.Equal("1.5", SymbolDisplay.FormatPrimitive(1.5, quoteStrings: false, useHexadecimalNumbers: false)); 4909Assert.Equal("1.5", SymbolDisplay.FormatPrimitive((float)1.5, quoteStrings: false, useHexadecimalNumbers: false)); 4910Assert.Equal("1.5", SymbolDisplay.FormatPrimitive((decimal)1.5, quoteStrings: false, useHexadecimalNumbers: false)); 4911Assert.Equal("null", SymbolDisplay.FormatPrimitive(null, quoteStrings: false, useHexadecimalNumbers: false)); 4912Assert.Equal("abc", SymbolDisplay.FormatPrimitive("abc", quoteStrings: false, useHexadecimalNumbers: false)); 4950Assert.Equal("M(e1 = A, e2 = A)", method.ToDisplayString(memberFormat)); // Alphabetically first candidate chosen for both enums. 5118Assert.Equal("M1", m1.ToDisplayString(format)); 5122Assert.Equal("P1", p1.ToDisplayString(format)); 5126Assert.Equal("E1", e1.ToDisplayString(format)); 5451Assert.Equal("this.M(@this)", invocation.ToString()); 5454Assert.Equal("this", actualThis.ToString()); 5464Assert.Equal("@this", escapedThis.ToString()); 6257Assert.Equal("T?", type.ToDisplayString(format));
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (9)
1008Assert.Equal("d.Dispose()", invocationSyntax.ToString()); 1011Assert.Equal("d.Dispose", memberAccessSyntax.ToString()); 1014Assert.Equal("d", identifierSyntax.ToString()); 1015Assert.Equal("d", identifierSyntax.Identifier.Text); 1019Assert.Equal("Dispose", memberNameSyntax.ToString()); 1020Assert.Equal("Dispose", memberNameSyntax.Identifier.Text); 1029Assert.Equal("d", localD.Name); 1030Assert.Equal("Disposable", localD.Type.Name); 1034Assert.Equal("Dispose", methodDispose.Name);
Symbols\AnonymousTypesSemanticsTests.cs (13)
592Assert.Equal("object.Equals(object)", method.ToDisplayString()); 660Assert.Equal("object.ToString()", method.ToDisplayString()); 681Assert.Equal("object.GetHashCode()", method.ToDisplayString()); 702Assert.Equal("<anonymous type: int f1, string f2>..ctor(int, string)", method.ToDisplayString()); 780Assert.Equal("x", info1.Symbol.ToDisplayString()); 849Assert.Equal("x", info1.Symbol.ToDisplayString()); 854Assert.Equal("y", info2.Symbol.ToDisplayString()); 1068Assert.Equal(name, type.Name); 1069Assert.Equal(metadataName, type.MetadataName); 1075Assert.Equal(name, type.Name); 1076Assert.Equal(metadataName, type.MetadataName); 1540Assert.Equal("<anonymous type: int a>.a", info.Symbol.ToDisplayString()); 2028Assert.Equal("get_" + fieldName, getter.Name);
Symbols\AnonymousTypesSymbolTests.cs (8)
1020Assert.Equal(typeViewName, type.ToDisplayString()); 1021Assert.Equal("object", type.BaseType().ToDisplayString()); 1045Assert.Equal(genericParameters[i], typeParameter.ToDisplayString()); 1108Assert.Equal("get_" + name, getter.Name); 1125Assert.Equal(signature, method.ToDisplayString()); 1134Assert.Equal(retType, method.ReturnTypeWithAnnotations.ToDisplayString()); 1154Assert.Equal(attr.CtorName, actual[index].AttributeConstructor.ToDisplayString()); 1159Assert.Equal(
Symbols\AssemblyAndNamespaceTests.cs (7)
36Assert.Equal(String.Empty, sym.GlobalNamespace.Name); 60Assert.Equal("Test.dll", sym.Name); 62Assert.Equal("Test.dll", sym.ToDisplayString()); 63Assert.Equal(String.Empty, sym.GlobalNamespace.Name); 71Assert.Equal("Test", sym.ContainingAssembly.Name); 72Assert.Equal("Test", sym.ContainingSymbol.Name); 83Assert.Equal("Module: Test.dll", ext.ToString());
Symbols\CheckedUserDefinedOperatorsTests.cs (20)
56Assert.Equal("C.operator checked " + op + "(C)", opSymbol.ToDisplayString()); 357Assert.Equal("C.operator checked " + op + "(C, C)", opSymbol.ToDisplayString()); 382Assert.Equal("C.operator checked " + op + "()", opSymbol.ToDisplayString()); 458Assert.Equal("C.operator +(C)", opSymbol.ToDisplayString()); 485Assert.Equal("C.operator +(C)", opSymbol.ToDisplayString()); 909Assert.Equal("C.operator " + op + "(C)", opSymbol.ToDisplayString()); 945Assert.Equal("C.operator true(C)", opSymbol1.ToDisplayString()); 951Assert.Equal("C.operator false(C)", opSymbol2.ToDisplayString()); 1273Assert.Equal("C.operator checked " + op + "(C, C)", opSymbol.ToDisplayString()); 1527Assert.Equal("C.operator checked " + op + "(C)", opSymbol.ToDisplayString()); 1554Assert.Equal("C.operator checked " + op + "()", opSymbol.ToDisplayString()); 1636Assert.Equal("C.operator checked +(C, C)", opSymbol.ToDisplayString()); 1663Assert.Equal("C.operator +(C, C)", opSymbol.ToDisplayString()); 2186Assert.Equal("C.operator " + op + "(C, int)", opSymbol.ToDisplayString()); 2442Assert.Equal("C.operator checked +()", opSymbol.ToDisplayString()); 2469Assert.Equal("C.operator +()", opSymbol.ToDisplayString()); 2507Assert.Equal("C.explicit operator checked int(C)", opSymbol.ToDisplayString()); 2759Assert.Equal("C.explicit operator checked int(C, C)", opSymbol.ToDisplayString()); 2782Assert.Equal("C.explicit operator checked int()", opSymbol.ToDisplayString()); 3193Assert.Equal("C.implicit operator int(C)", opSymbol.ToDisplayString());
Symbols\CompilationCreationTests.cs (3)
2414Assert.Equal(typeC301.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat), 2418Assert.Equal(typeC6.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat), 2514Assert.Equal("C3.dll", module3.Name);
Symbols\CovariantReturnTests.cs (2)
2633Assert.Equal("System.Linq.Expressions.Expression(Of System.Func(Of Derived, String))", typeInfo.ConvertedType.ToDisplayString()); 2637Assert.Equal("System.Linq.Expressions.Expression(Of System.Func(Of Derived, System.Func(Of String)))", typeInfo.ConvertedType.ToDisplayString());
Symbols\DefaultInterfaceImplementationTests.cs (8)
11088Assert.Equal("Test2(1)", m2.GetAttributes()[0].ToString()); 11089Assert.Equal("Test2(2)", m2.GetAttributes()[1].ToString()); 11106Assert.Equal("Test2(1)", m2Impl.GetAttributes()[0].ToString()); 11107Assert.Equal("Test2(2)", m2Impl.GetAttributes()[1].ToString()); 11195Assert.Equal("Test2(1)", m2.GetAttributes()[0].ToString()); 11196Assert.Equal("Test2(2)", m2.GetAttributes()[1].ToString()); 11213Assert.Equal("Test2(1)", m2Impl.GetAttributes()[0].ToString()); 11214Assert.Equal("Test2(2)", m2Impl.GetAttributes()[1].ToString());
Symbols\DestructorTests.cs (1)
414Assert.Equal(WellKnownMemberNames.DestructorName, finalizeSyntax.ToString());
Symbols\ExtensionMethodTests.cs (9)
3152Assert.Equal("obj.InstanceMethod", firstInvocationExpression.ToString()); 3155Assert.Equal("InstanceMethod", firstInvocationSymbol.Name); 3158Assert.Equal("obj.ExtensionMethod", secondInvocationExpression.ToString()); 3161Assert.Equal("ExtensionMethod", secondInvocationSymbol.Name); 3779Assert.Equal("other.GetEnumerableDisposable1<T, TEnumerator>", member.ToString()); 3867Assert.Equal("Instance.SetMember", instance.Parent.ToString()); 3914Assert.Equal("Instance.SetMember", instance.Parent.ToString()); 3959Assert.Equal("Instance.SetMember", instance.Parent.ToString()); 4009Assert.Equal("Instance.SetMember", instance.Parent.ToString());
Symbols\FunctionPointerTypeSymbolTests.cs (6)
1264Assert.Equal("delegate*<C.D>", functionPointerTypeSyntax.ToString()); 1520Assert.Equal("delegate*<ref readonly int>", f1.ToDisplayString()); 1522Assert.Equal("delegate*<ref int>", f2.ToDisplayString()); 1822Assert.Equal("ptr = &M1", decls[0].ToString()); 1831Assert.Equal("ptr2 = &M1", decls[1].ToString()); 1868Assert.Equal("ptr = &M1", variableDeclaratorSyntax.ToString());
Symbols\GenericConstraintTests.cs (52)
3231Assert.Equal("I<U> B.F<U>() where U : class", method.ToDisplayString(SymbolDisplayFormat.TestFormatWithConstraints)); 3754Assert.Equal("I2", i2.Name); 3757Assert.Equal("I2", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3788Assert.Equal("I2`2", i2.Name); 3791Assert.Equal("I2`2", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3822Assert.Equal("I2", i2.Name); 3825Assert.Equal("I2`1", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3856Assert.Equal("I2`01", i2.Name); 3859Assert.Equal("I2`01", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3905Assert.Equal("I2`1", i2.Name); 3908Assert.Equal("I2`1", i2.ToDisplayString(SymbolDisplayFormat.QualifiedNameArityFormat)); 3930Assert.Equal("I3", t.Name); 3937Assert.Equal("I3`1", t.Name); 3944Assert.Equal("I3", t.Name); 3951Assert.Equal("I3`1", t.Name); 3958Assert.Equal("I3", t.Name); 3972Assert.Equal("I3", t.Name); 3986Assert.Equal("I", t.Name); 3993Assert.Equal("I", t.Name); 4000Assert.Equal("I", t.Name); 4007Assert.Equal("I", t.Name); 4014Assert.Equal("I", t.Name); 4028Assert.Equal("I2`1", t.Name); 4035Assert.Equal("I2`1", t.Name); 4042Assert.Equal("I2", t.Name); 4049Assert.Equal("I2`1", t.Name); 4056Assert.Equal("I2", t.Name); 4070Assert.Equal("I2", t.Name); 4084Assert.Equal("I4`2", t.Name); 4091Assert.Equal("I4`2", t.Name); 4098Assert.Equal("I4`2", t.Name); 4105Assert.Equal("I4", t.Name); 4112Assert.Equal("I4", t.Name); 4133Assert.Equal("I4", t.Name); 4142Assert.Equal("I3", t.Name); 4153Assert.Equal("I3", t.Name); 4164Assert.Equal("I3", t.Name); 4178Assert.Equal("I3", t.Name); 4192Assert.Equal("I", t.Name); 4199Assert.Equal("I", t.Name); 4210Assert.Equal("I", t.Name); 4217Assert.Equal("I", t.Name); 4231Assert.Equal("I2`1", t.Name); 4238Assert.Equal("I2`1", t.Name); 4275Assert.Equal("I4`2", t.Name); 4286Assert.Equal("I4`2", t.Name); 4844Assert.Equal("IA<A<T1>.B<object>>", typeParameter.ConstraintTypes()[0].ToDisplayString()); 4849Assert.Equal("A<T2[]>.B<T1>", typeParameter.ConstraintTypes()[0].ToDisplayString()); 4855Assert.Equal("IA<A<X>.B<object>>", typeParameter.ConstraintTypes()[0].ToDisplayString()); 4860Assert.Equal("A<Y[]>.B<X>", typeParameter.ConstraintTypes()[0].ToDisplayString()); 7395Assert.Equal("Base.Nest", model.GetTypeInfo(nest).Type.ToDisplayString()); 7420Assert.Equal("Base.Nest", model.GetTypeInfo(nest).Type.ToDisplayString());
Symbols\ImplicitClassTests.cs (2)
119Assert.Equal("A", model.GetDeclaredSymbol(namespaceDecl).Name); 120Assert.Equal("Goo", model.GetDeclaredSymbol(methodDecl).Name);
Symbols\IndexerTests.cs (3)
2137Assert.Equal("A", peIndexer.MetadataName); 2847Assert.Equal(WellKnownMemberNames.Indexer, idxSymbol2.Symbol.Name); 2848Assert.Equal("Item", idxSymbol2.Symbol.MetadataName);
Symbols\Metadata\MetadataMemberTests.cs (3)
264Assert.Equal("pwzFilePath", p1.Name); 284Assert.Equal("ppbSignatureBlob", p5.Name); 361Assert.Equal("value", p2.Name);
Symbols\Metadata\PE\LoadingAttributes.cs (22)
497Assert.Equal("object[]", t.ToDisplayString()); 504Assert.Equal("object[]", t.ToDisplayString()); 510Assert.Equal("int[]", t.ToDisplayString()); 567Assert.Equal(expected, actual.ToString()); 572Assert.Equal(expected.Key, actual.Key.ToString()); 573Assert.Equal(expected.Value, actual.Value.Value.ToString()); 625Assert.Equal("System.Runtime.InteropServices.ClassInterfaceType", a.CommonConstructorArguments[0].Type.ToDisplayString()); 707Assert.Equal("object", ((Symbol)attrSym.CommonConstructorArguments[0].ValueInternal).ToString()); 1004Assert.Equal("sbyte[]", attrSym.CommonConstructorArguments[0].Type.ToDisplayString()); 1008Assert.Equal("System.Collections.Generic.IList<>", (attrSym.CommonNamedArguments[0].Value.Value as INamedTypeSymbol).ToString()); 1069Assert.Equal("char[]", a.CommonConstructorArguments[0].Type.ToDisplayString()); 1074Assert.Equal("string[]", a.CommonConstructorArguments[1].Type.ToDisplayString()); 1079Assert.Equal("ushort[]", na0[1].Type.ToDisplayString()); 1081Assert.Equal("ushort", elem[1].Type.ToDisplayString()); 1094Assert.Equal("ulong[]", a.CommonNamedArguments[0].Value.Type.ToDisplayString()); 1162Assert.Equal("AttributeUse.IFoo<System.Int16, System.UInt16>", (attrSym.CommonConstructorArguments[0].Value as INamedTypeSymbol).ToDisplayString(SymbolDisplayFormat.TestFormat)); 1211Assert.Equal("System.Linq.Expressions.Expression.BinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat)); 1216Assert.Equal("System.Linq.Expressions.Expression.TypeBinaryExpressionProxy", ((ITypeSymbol)attr1.CommonConstructorArguments[0].Value).ToDisplayString(SymbolDisplayFormat.TestFormat)); 1310Assert.Equal("System.Runtime.CompilerServices.DecimalConstantAttribute(0, 128, 0, 0, 7)", peModule.GetCustomAttributesForToken(field.Handle).Single().ToString()); 1314Assert.Equal("System.Runtime.CompilerServices.DecimalConstantAttribute(0, 128, 0, 0, 7)", peModule.GetCustomAttributesForToken(parameter.Handle).Single().ToString()); 1514Assert.Equal(expected, c.GetTypeByMetadataName("Test").GetAttributes().Single().ToString()); 1518Assert.Equal(expected, m.GlobalNamespace.GetTypeMember("Test").GetAttributes().Single().ToString());
Symbols\Metadata\PE\LoadingFields.cs (6)
45Assert.Equal("F1", f1.Name); 64Assert.Equal("F2", f2.Name); 73Assert.Equal("F3", f3.Name); 81Assert.Equal("F4", f4.Name); 89Assert.Equal("F5", f5.Name); 97Assert.Equal("F6", f6.Name);
Symbols\Metadata\PE\LoadingNamespacesAndTypes.cs (8)
30Assert.Equal(baseLine.ToString(), dumpXML.ToString()); 34Assert.Equal(baseLine.ToString(), dumpXML.ToString()); 44Assert.Equal(baseLine.ToString(), dumpXML.ToString()); 48Assert.Equal(baseLine.ToString(), dumpXML.ToString()); 276Assert.Equal("Dictionary", dictionary.Name); 285Assert.Equal("ValueCollection", ((NamedTypeSymbol)valueCollection[0]).Name); 374Assert.Equal("With Spaces", assembly.Name); 375Assert.Equal("With Spaces", assembly.MetadataName);
Symbols\Metadata\PE\MissingTypeReferences.cs (13)
49Assert.Equal("Object", @base.Name); 67Assert.Equal("C1", @base.Name); 83Assert.Equal(@base.GetUseSiteDiagnostic().ToString(), genericBase.GetUseSiteDiagnostic().ToString()); 84Assert.Equal(@base.ErrorInfo.ToString(), genericBase.ErrorInfo.ToString()); 104Assert.Equal("C4", @base.Name); 133Assert.Equal("MissingC1", @base.Name); 148Assert.Equal("MissingC2", @base.Name); 163Assert.Equal("MissingC3", @base.Name); 180Assert.Equal("MissingC4", @base.Name); 197Assert.Equal("MissingC5", @base.Name); 216Assert.Equal("MissingC7", @base.Name); 234Assert.Equal("MissingC8", @base.Name); 256Assert.Equal("MissingC9", @base.Name);
Symbols\Metadata\PE\NoPia.cs (4)
161Assert.Equal("f9c2d51d-4f44-45f0-9eda-c9d599b58257", missing.Scope); 203Assert.Equal("27e3e649-994b-4f58-b3c6-f8089a5f2c01", missing.Guid); 531Assert.Equal("27e3e649-994b-4f58-b3c6-f8089a5f2c01", missing.Guid); 547Assert.Equal("f9c2d51d-4f44-45f0-9eda-c9d599b58257", missing.Scope);
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (2)
146Assert.Equal("f9c2d51d-4f44-45f0-9eda-c9d599b58257", missing.Scope); 241Assert.Equal("f9c2d51d-4f44-45f0-9eda-c9d599b58257", missing.Scope);
Symbols\Metadata\PE\TypeForwarders.cs (6)
1563Assert.Equal("Original", result.Trim()); 1571Assert.Equal("Substituted", result.Trim()); 1804Assert.Equal(expectedType.Split('+').Last(), reader.GetString(exportedTypeRow.Name)); //Only the actual type name. 1805Assert.Equal("", reader.GetString(exportedTypeRow.Namespace)); //Empty - presumably there's enough info on the containing type. 1812Assert.Equal(expectedType, reader.GetString(exportedTypeRow.Name)); 1813Assert.Equal(expectedNamespace, reader.GetString(exportedTypeRow.Namespace));
Symbols\MockSymbolTests.cs (4)
73Assert.Equal("Elvis", mms1.NamespaceName); 74Assert.Equal("Lives", mms1.Name); 80Assert.Equal("Elvis.Is", mms2.NamespaceName); 81Assert.Equal("Cool", mms2.Name);
Symbols\PartialPropertiesTests.cs (4)
796Assert.Equal("something.dll", importData.ModuleName); 797Assert.Equal(accessor.MetadataName, importData.EntryPointName); // e.g. 'get_P' 850Assert.Equal("a", moduleName); 854Assert.Equal("b", moduleName);
Symbols\RelaxedShiftOperatorTests.cs (12)
104Assert.Equal("x " + op + " y", shift.ToString()); 105Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 148Assert.Equal("x " + op + " y", shift.ToString()); 149Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 192Assert.Equal("x " + op + " y", shift.ToString()); 193Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 236Assert.Equal("x " + op + " y", shift.ToString()); 237Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 280Assert.Equal("x " + op + " y", shift.ToString()); 281Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString()); 324Assert.Equal("x " + op + " y", shift.ToString()); 325Assert.Equal("C1.operator " + op + "(C1, C2)", model.GetSymbolInfo(shift).Symbol.ToDisplayString());
Symbols\RequiredMembersTests.cs (1)
95Assert.Equal(nameof(CompilerFeatureRequiredFeatures.RequiredMembers), unsupportedCompilerFeatureToken);
Symbols\Retargeting\NoPia.cs (7)
469Assert.Equal("f9c2d51d-4f44-45f0-9eda-c9d599b58257", missing.Scope); 509Assert.Equal("27e3e649-994b-4f58-b3c6-f8089a5f2c01", missing.Guid); 770Assert.Equal("f9c2d51d-4f44-45f0-9eda-c9d599b58257", missing.Scope); 810Assert.Equal("27e3e649-994b-4f58-b3c6-f8089a5f2c01", missing.Guid); 1074Assert.Equal("f9c2d51d-4f44-45f0-9eda-c9d599b58257", missing.Scope); 1114Assert.Equal("27e3e649-994b-4f58-b3c6-f8089a5f2c01", missing.Guid); 2676Assert.Equal("Pia.dll", test.ContainingModule.Name);
Symbols\Retargeting\RetargetCustomAttributes.cs (6)
308Assert.Equal("object[]", args[0].Type.ToDisplayString()); 312Assert.Equal("int[]", args[1].Type.ToDisplayString()); 318Assert.Equal("object[]", named["P"].Type.ToDisplayString()); 322Assert.Equal("int[]", named["F"].Type.ToDisplayString()); 351Assert.Equal("A[missing]", a.ToString()); 393Assert.Equal("A", a.ToString());
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
176Assert.Equal("volatileFld", volatileFld.Name);
Symbols\Retargeting\RetargetingTests.cs (7)
740Assert.Equal(c1.Name, c1r.Name); 743Assert.Equal(c1.MetadataName, c1r.MetadataName); 1223Assert.Equal(a.Name, b.Name); 1231Assert.Equal(a.Name, b.Name); 1246Assert.Equal(a.Name, b.Name); 1254Assert.Equal(a.Name, b.Name); 1263Assert.Equal(a.Name, b.Name);
Symbols\Source\BaseClassTests.cs (26)
84Assert.Equal("error CS0268: Imported type 'C2' is invalid. It contains a circular base type dependency.", 111Assert.Equal("error CS0146: Circular base type dependency involving 'A<A<T>.E>.E' and 'A<T>.E'", 140Assert.Equal("error CS0146: Circular base type dependency involving 'A<int>.C' and 'B.D'", 1000Assert.Equal("error CS0268: Imported type 'I2' is invalid. It contains a circular base type dependency.", 1045Assert.Equal("error CS0268: Imported type 'ClassA' is invalid. It contains a circular base type dependency.", 1053Assert.Equal("error CS0268: Imported type 'ClassB' is invalid. It contains a circular base type dependency.", 1106Assert.Equal("error CS0268: Imported type 'ClassA' is invalid. It contains a circular base type dependency.", 1114Assert.Equal("error CS0268: Imported type 'ClassB' is invalid. It contains a circular base type dependency.", 1141Assert.Equal("error CS0146: Circular base type dependency involving 'ClassA' and 'ClassB'", 1147Assert.Equal("error CS0268: Imported type 'ClassB' is invalid. It contains a circular base type dependency.", 1198Assert.Equal("error CS0268: Imported type 'ClassA' is invalid. It contains a circular base type dependency.", 1204Assert.Equal("error CS0268: Imported type 'ClassB' is invalid. It contains a circular base type dependency.", 1441Assert.Equal("if", nif.Name); 1442Assert.Equal("@if", nif.ToString()); 1444Assert.Equal("float", cfloat.Name); 1445Assert.Equal("@if.@float", cfloat.ToString()); 1447Assert.Equal("int", cint.Name); 1448Assert.Equal("@if.@int<@if.@break>", cint.ToString()); 1450Assert.Equal("break", ibreak.Name); 1451Assert.Equal("@if.@break", ibreak.ToString()); 1466Assert.Equal("if", nif.Name); 1467Assert.Equal("@if", nif.ToString()); 1469Assert.Equal("float", cfloat.Name); 1470Assert.Equal("@if.@float", cfloat.ToString()); 1472Assert.Equal("int", cint.Name); 1473Assert.Equal("@if.@int<@if.@break>", cint.ToString());
Symbols\Source\CustomModifierCopyTests.cs (3)
890Assert.Equal("Bug813305.IBug813305.M(dynamic)", method.ToDisplayString()); 1296Assert.Equal("(object a, object b) Base.P", baseProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat)); 1303Assert.Equal("(object a, object b) C.P", classProperty1.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
144Assert.Equal(name, sym.Name);
Symbols\Source\DelegateTests.cs (43)
229Assert.Equal("out", dout.Name); 230Assert.Equal("@out", dout.ToString()); 343Assert.Equal("x", invokeParameters[0].Name); 344Assert.Equal("y", invokeParameters[1].Name); 345Assert.Equal("z", invokeParameters[2].Name); 350Assert.Equal("x", beginInvokeParameters[0].Name); 351Assert.Equal("y", beginInvokeParameters[1].Name); 352Assert.Equal("z", beginInvokeParameters[2].Name); 353Assert.Equal("callback", beginInvokeParameters[3].Name); 354Assert.Equal("object", beginInvokeParameters[4].Name); 359Assert.Equal("y", endInvokeParameters[0].Name); 360Assert.Equal("z", endInvokeParameters[1].Name); 361Assert.Equal("result", endInvokeParameters[2].Name); 397Assert.Equal("result", invokeParameters[0].Name); 402Assert.Equal("result", beginInvokeParameters[0].Name); 403Assert.Equal("callback", beginInvokeParameters[1].Name); 404Assert.Equal("object", beginInvokeParameters[2].Name); 409Assert.Equal("result", endInvokeParameters[0].Name); 410Assert.Equal("__result", endInvokeParameters[1].Name); 428Assert.Equal("__result", invokeParameters[0].Name); 433Assert.Equal("__result", beginInvokeParameters[0].Name); 434Assert.Equal("callback", beginInvokeParameters[1].Name); 435Assert.Equal("object", beginInvokeParameters[2].Name); 440Assert.Equal("__result", endInvokeParameters[0].Name); 441Assert.Equal("result", endInvokeParameters[1].Name); 459Assert.Equal("result", invokeParameters[0].Name); 460Assert.Equal("__result", invokeParameters[1].Name); 465Assert.Equal("result", invokeParameters[0].Name); 466Assert.Equal("__result", invokeParameters[1].Name); 467Assert.Equal("callback", beginInvokeParameters[2].Name); 468Assert.Equal("object", beginInvokeParameters[3].Name); 473Assert.Equal("result", endInvokeParameters[0].Name); 474Assert.Equal("__result", endInvokeParameters[1].Name); 475Assert.Equal("____result", endInvokeParameters[2].Name); 493Assert.Equal("callback", invokeParameters[0].Name); 494Assert.Equal("object", invokeParameters[1].Name); 499Assert.Equal("callback", beginInvokeParameters[0].Name); 500Assert.Equal("object", beginInvokeParameters[1].Name); 501Assert.Equal("__callback", beginInvokeParameters[2].Name); 502Assert.Equal("__object", beginInvokeParameters[3].Name); 507Assert.Equal("result", endInvokeParameters[0].Name); 740Assert.Equal("delegate { }", anonymousMethod.ToString()); 767Assert.Equal("delegate { }", anonymousMethod.ToString());
Symbols\Source\EventTests.cs (3)
44Assert.Equal("main1, Test1", actual); 436Assert.Equal("f => f.Print()", lambdaSyntax.ToFullString()); 482Assert.Equal("f => f.Print()", lambdaSyntax.ToFullString());
Symbols\Source\ExternAliasTests.cs (2)
489Assert.Equal("A", externAliasSymbol.Name); 495Assert.Equal("C", usingAliasSymbol.Name);
Symbols\Source\FieldTests.cs (6)
204Assert.Equal("M", s.Name); 237Assert.Equal("in", ein.Name); 238Assert.Equal("C1.@in", ein.ToString()); 240Assert.Equal("out", dout.Name); 241Assert.Equal("@out", dout.ToString()); 257Assert.Equal("x", mem.Name);
Symbols\Source\FileModifierTests.cs (4)
4126Assert.Equal("System.Void@<tree 0>", typeInfo.Type!.ToDisplayString(SymbolDisplayFormat.TestFormat.WithCompilerInternalOptions(SymbolDisplayCompilerInternalOptions.IncludeContainingFileForFileTypes))); 4245Assert.Equal("C", sourceTypeCByMetadataName.MetadataName); 4260Assert.Equal("C", metadataTypeCByMetadataName.MetadataName); 4591Assert.Equal("trees[1]", ex.ParamName);
Symbols\Source\LocalTests.cs (1)
61Assert.Equal("x", expressionSyntax.ToString());
Symbols\Source\LocationTests.cs (1)
35Assert.Equal("MetadataFile(CommonLanguageRuntimeLibrary)", obj.Locations[0].ToString());
Symbols\Source\MethodTests.cs (60)
75Assert.Equal( 118Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m.Name); 122Assert.Equal("x", x.Name); 124Assert.Equal("Int32", x.Type.Name); // fully qualified to work around a metadata reader bug 519Assert.Equal("I1", itfc.Name); 599Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 606Assert.Equal("M0", m1.Name); 613Assert.Equal("M2", m2.Name); 620Assert.Equal("M3", m3.Name); 627Assert.Equal("M4", m4.Name); 634Assert.Equal("M5", m5.Name); 642Assert.Equal("M6", m6.Name); 660Assert.Equal("M1", mm.Name); 667Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 671Assert.Equal("M0", m1.Name); 678Assert.Equal("M2", m2.Name); 685Assert.Equal("M3", m3.Name); 692Assert.Equal("M4", m4.Name); 699Assert.Equal("M5", m5.Name); 707Assert.Equal("M6", m6.Name); 792Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 799Assert.Equal("M0", m1.Name); 806Assert.Equal("M2", m2.Name); 813Assert.Equal("M3", m3.Name); 820Assert.Equal("M4", m4.Name); 827Assert.Equal("M5", m5.Name); 835Assert.Equal("M6", m6.Name); 852Assert.Equal("M1", mm.Name); 859Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 866Assert.Equal("M0", m1.Name); 873Assert.Equal("M2", m2.Name); 880Assert.Equal("M3", m3.Name); 887Assert.Equal("M4", m4.Name); 894Assert.Equal("M5", m5.Name); 902Assert.Equal("M6", m6.Name); 981Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 983Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 985Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 1090Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 1092Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 1094Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 1181Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 1186Assert.Equal("M0", m2.Name); 1192Assert.Equal("M1", m3.Name); 1197Assert.Equal("M2", m4.Name); 1218Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m0.Name); 1223Assert.Equal("GM0", mm.Name); 1228Assert.Equal("GM1", m2.Name); 1275Assert.Equal(WellKnownMemberNames.InstanceConstructorName, m1.Name); 1280Assert.Equal("M0", m2.Name); 1286Assert.Equal("M1", m3.Name); 1628Assert.Equal("@void.return", mreturn.Name); 1629Assert.Equal("C1.@void.@return(@void)", mreturn.ToString()); 1631Assert.Equal("void", rvoid.Name); 1632Assert.Equal("@void", rvoid.ToString()); 1634Assert.Equal("return", mvoidreturn.Name); 1635Assert.Equal("@void.@return(@void)", mvoidreturn.ToString()); 1637Assert.Equal("in", pin.Name); 1638Assert.Equal("@in", pin.ToDisplayString( 1643Assert.Equal("float", mfloat.Name);
Symbols\Source\NullablePublicAPITests.cs (1)
2636Assert.Equal("s", symbol.Name);
Symbols\Source\PropertyTests.cs (6)
412Assert.Equal(prop.Locations[0].ToString(), backField.Locations[0].ToString()); 431Assert.Equal(prop.Locations[0].ToString(), backField.Locations[0].ToString()); 451Assert.Equal("in", ein.Name); 452Assert.Equal("C1.@in", ein.ToString()); 454Assert.Equal("out", dout.Name); 455Assert.Equal("@out", dout.ToString());
Symbols\Source\RecordTests.cs (2)
1061Assert.Equal(v1.VisualizeIL("C.Equals(C)"), v2.VisualizeIL("C.Equals(C)")); 1062Assert.Equal(v1.VisualizeIL("C.Equals(object)"), v2.VisualizeIL("C.Equals(object)"));
Symbols\Source\UsingAliasTests.cs (42)
53Assert.Equal("O", alias1.ToDisplayString()); 54Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 60Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 61Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 66Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 67Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 113Assert.Equal("O", alias1.ToDisplayString()); 114Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 120Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 121Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 126Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 127Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 166Assert.Equal("System.Object", info1.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 170Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 175Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 176Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 181Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 182Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 224Assert.Equal("System.Object", info1.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 228Assert.Equal("O=System.Object", alias1.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 233Assert.Equal("System.Object", b2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 234Assert.Equal("System.Object", info2.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 239Assert.Equal("System.Object", b3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 240Assert.Equal("System.Object", info3.Type.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 315Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 316Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 321Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 322Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 361Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 362Assert.Equal("System.Object", info2.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 367Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 368Assert.Equal("System.Object", info3.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 390Assert.Equal("O", alias.ToDisplayString()); 391Assert.Equal("O=System.Object", alias.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 411Assert.Equal("O", alias.ToDisplayString()); 412Assert.Equal("O=System.Object", alias.ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 489Assert.Equal("O=System.Object", symbols[0].ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 510Assert.Equal("O=System.Object", symbols[0].ToDisplayString(format: SymbolDisplayFormat.TestFormat)); 525Assert.Equal("for", alias.Name); 526Assert.Equal("@for", alias.ToString()); 699Assert.Equal("Short.MyClass", node.Parent.ToString()); 742Assert.Equal("Short.MyClass", node.Parent.ToString());
Symbols\StaticAbstractMembersInInterfacesTests.cs (32)
8455Assert.Equal("T.M01()", node.ToString()); 9043Assert.Equal(prefixOp + "x" + postfixOp, node.ToString()); 9358Assert.Equal("x ? true : false", node.ToString()); 9757Assert.Equal("x " + op + " x", node.ToString()); 10754Assert.Equal("x " + op + " 1", node.ToString()); 10947Assert.Equal("x " + op + " 1", node.ToString()); 11137Assert.Equal("x " + op + " y", node.ToString()); 11331Assert.Equal("x " + op + op + " y", node1.ToString()); 11585Assert.Equal("x " + op + op + " y", node1.ToString()); 11962Assert.Equal("x " + op + "= 1", node.ToString()); 12141Assert.Equal("x " + op + " x", node.ToString()); 13182Assert.Equal("T.P01", node.ToString()); 13268Assert.Equal("T.P01", node.ToString()); 13390Assert.Equal("T.P01", node.ToString()); 14091Assert.Equal("T.E01", node.ToString()); 14100Assert.Equal("T.E01", node.ToString()); 14716Assert.Equal("T.M01", node.ToString()); 15122Assert.Equal("T.M01", node.ToString()); 15390Assert.Equal("T.M01", node.ToString()); 19562Assert.Equal("default", node.ToString()); 19645Assert.Equal("default", node.ToString()); 19737Assert.Equal("default", node.ToString()); 19826Assert.Equal("default", node.ToString()); 28775Assert.Equal("default", node.ToString()); 30282Assert.Equal("return " + (needCast ? "(int)" : "") + @"x;", node.ToString()); 30473Assert.Equal("x " + op + " x", node.ToString()); 30939Assert.Equal("return " + (needCast ? "(T)" : "") + @"x;", node.ToString()); 32196Assert.Equal("C.operator " + op + "(C)", opSymbol.ToDisplayString()); 32235Assert.Equal("C.operator true(C)", opSymbol1.ToDisplayString()); 32241Assert.Equal("C.operator false(C)", opSymbol2.ToDisplayString()); 32444Assert.Equal("C.operator " + op + "(C, int)", opSymbol.ToDisplayString()); 32631Assert.Equal("C<T>.implicit operator int(T)", opSymbol.ToDisplayString());
Symbols\SymbolDistinguisherTests.cs (34)
44Assert.Equal("C [file.cs(2)]", distinguisher.First.ToString()); 45Assert.Equal("C [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 50Assert.Equal("C.M() [file.cs(4)]", distinguisher.First.ToString()); 51Assert.Equal("C.M() [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 56Assert.Equal("C.P [file.cs(5)]", distinguisher.First.ToString()); 57Assert.Equal("C.P [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 62Assert.Equal("C.F [file.cs(6)]", distinguisher.First.ToString()); 63Assert.Equal("C.F [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 68Assert.Equal("C.E [file.cs(7)]", distinguisher.First.ToString()); 69Assert.Equal("C.E [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 86Assert.Equal("C [file2.cs(1)]", distinguisher.First.ToString()); 87Assert.Equal("C [file1.cs(1)]", distinguisher.Second.ToString()); 107Assert.Equal("C [file.cs(1)]", distinguisher.First.ToString()); 108Assert.Equal(string.Format("C [Metadata.dll]"), distinguisher.Second.ToString()); 126Assert.Equal("C [Source, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.First.ToString()); 127Assert.Equal("C [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 149Assert.Equal(@"C [a\..\file.cs(1)]", distinguisher.First.ToString()); // File path comes out of tree. 150Assert.Equal("C [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 167Assert.Equal("C [Source, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.First.ToString()); 168Assert.Equal("C [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 193Assert.Equal("ref C [file.cs(2)]", distinguisher.First.ToString()); 194Assert.Equal("ref C [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 218Assert.Equal("C[] [file.cs(2)]", distinguisher.First.ToString()); 219Assert.Equal("C[] [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 243Assert.Equal("S* [file.cs(2)]", distinguisher.First.ToString()); 244Assert.Equal("S* [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 269Assert.Equal("params C[] [file.cs(2)]", distinguisher.First.ToString()); 270Assert.Equal("params C[] [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 290Assert.Equal("T [file.cs(1)]", distinguisher.First.ToString()); 291Assert.Equal("T [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 307Assert.Equal("dynamic", distinguisher.First.ToString()); 308Assert.Equal("dynamic [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.Second.ToString()); 322Assert.Equal("int [Error, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", distinguisher.First.ToString()); 323Assert.Equal("int [mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]", distinguisher.Second.ToString());
Symbols\SymbolErrorTests.cs (5)
2588Assert.Equal("B", baseType.Name); 2593Assert.Equal("BB", baseType.Name); 2598Assert.Equal("CC", baseType.Name); 16916Assert.Equal("B", fieldType.Name); 16953Assert.Equal("B", fieldType.Name);
Symbols\TypeResolutionTests.cs (4)
131Assert.Equal("System.StringComparison", strcmpSym.ToDisplayString()); 135Assert.Equal("System.Collections.Generic.List<int>[][*,*,*]", arraySym.ToDisplayString()); 139Assert.Equal("char**", ptrSym.ToDisplayString()); 143Assert.Equal(testType1 + ".C<int, bool>.D.E<double, float>.F<byte>", nestedSym1.ToDisplayString());
Symbols\TypeTests.cs (22)
684Assert.Equal(name, symbol.Name); 969Assert.Equal("MyClass..ctor(), MyClass..ctor(System.Int32 DummyInt)", actual); 1020Assert.Equal("SubGenericClass<T>..ctor(), void SubGenericClass<T>.Meth3(GC1<T> t), void SubGenericClass<T>.Meth4(System.NonexistentType t)", actual); 1390Assert.Equal("Bar.GetGoo()", getGoo.ToString()); 1422Assert.Equal("Gen1", gen1Class.Name); 1423Assert.Equal("Gen1`3", gen1Class.MetadataName); 1425Assert.Equal("NonGen", nonGenClass.Name); 1426Assert.Equal("NonGen", nonGenClass.MetadataName); 1429Assert.Equal("IEquatable", equatable.Name); 1430Assert.Equal("IEquatable`1", equatable.MetadataName); 1457Assert.Equal(WellKnownMemberNames.TopLevelStatementsEntryPointTypeName, errSymbol.Name); 1571Assert.Equal("decimal?", memType.ToDisplayString()); 1628Assert.Equal("E?", memType.ToDisplayString()); 1709Assert.Equal("System.PlatformID?", memType.ToDisplayString()); 1725Assert.Equal("System.Collections.DictionaryEntry?", memType.ToDisplayString()); 1770Assert.Equal("System.PlatformID?", memType.ToDisplayString()); 1777Assert.Equal("NS.IGoo<float, System.PlatformID>", tinfo.Type.ToDisplayString()); 1781Assert.Equal("float?", tinfo.Type.ToDisplayString()); 1786Assert.Equal("decimal?", tinfo.ConvertedType.ToDisplayString()); 2461Assert.Equal(string.Empty, namedType.Name); 2467Assert.Equal("F", method.Name); 2627Assert.Equal(string.Empty, namedType.Name);
Symbols\UnsignedRightShiftTests.cs (21)
126Assert.Equal("x >>> y", unsignedShift.ToString()); 127Assert.Equal("x >> y", shift.ToString()); 131Assert.Equal("op_UnsignedRightShift", unsignedShiftSymbol.Name); 132Assert.Equal("op_RightShift", shiftSymbol.Name); 629Assert.Equal("z1 >>>= y", unsignedShift.ToString()); 630Assert.Equal("z1 >>= y", shift.ToString()); 634Assert.Equal("op_UnsignedRightShift", unsignedShiftSymbol.Name); 635Assert.Equal("op_RightShift", shiftSymbol.Name); 1179Assert.Equal("x >>> y", unsignedShift.ToString()); 1180Assert.Equal("x >> y", shift.ToString()); 1184Assert.Equal("op_UnsignedRightShift", unsignedShiftSymbol.Name); 1185Assert.Equal("op_RightShift", shiftSymbol.Name); 1587Assert.Equal("z1 >>>= y", unsignedShift.ToString()); 1588Assert.Equal("z1 >>= y", shift.ToString()); 1592Assert.Equal("op_UnsignedRightShift", unsignedShiftSymbol.Name); 1593Assert.Equal("op_RightShift", shiftSymbol.Name); 1985Assert.Equal("x >>> y", unsignedShift.ToString()); 2237Assert.Equal("x >>> y", unsignedShift.ToString()); 2379Assert.Equal("x >>>= y", unsignedShift.ToString()); 2513Assert.Equal("x >>> y", unsignedShift.ToString()); 2610Assert.Equal("x >>>= y", unsignedShift.ToString());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2434)
Diagnostics\DiagnosticTest.cs (4)
74Assert.Equal("MOCK0001", di1.MessageIdentifier); 75Assert.Equal("The first error", di1.GetMessage(englishCulture)); 80Assert.Equal("MOCK1002", di2.MessageIdentifier); 81Assert.Equal("The second warning about Elvis and Mort", di2.GetMessage(englishCulture));
Diagnostics\LocationsTests.cs (16)
50Assert.Equal(expectedPath, mappedSpan.Path); 53Assert.Equal("", actualDisplayPath); 57Assert.Equal(string.Format("[{0};{1}]", expectedPath, hasMappedPath ? syntaxTree.FilePath : null), actualDisplayPath); 95Assert.Equal("c:\\goo.cs", flpsX.Path); 102Assert.Equal("d:\\banana.cs", flpsX.Path); 109Assert.Equal("c:\\goo.cs", flpsXToCloseBrace.Path); 116Assert.Equal("d:\\banana.cs", flpsXToCloseBrace.Path); 496Assert.Equal("SourceFile([91..93))", loc1.ToString()); 498Assert.Equal("SourceFile([148..150))", loc2.ToString()); 507Assert.Equal("test.txt(3,2): warning CS0000: msg", CSharpDiagnosticFormatter.Instance.Format(diagnostic, EnsureEnglishUICulture.PreferredOrNull)); 524Assert.Equal("test.txt(3,2): warning CS0000: msg", CSharpDiagnosticFormatter.Instance.Format(diagnosticWithoutMapping, EnsureEnglishUICulture.PreferredOrNull)); 527Assert.Equal("test2.txt(4,3): warning CS0000: msg", CSharpDiagnosticFormatter.Instance.Format(diagnosticWithMapping, EnsureEnglishUICulture.PreferredOrNull)); 530Assert.Equal(filePath, lineInfo.Path); 535Assert.Equal(filePath, mappedLineInfo.Path); 540Assert.Equal(filePath, lineInfo.Path); 545Assert.Equal(mappedFilePath, mappedLineInfo.Path);
IncrementalParsing\IncrementalParsingTests.cs (17)
654Assert.Equal("//", fullText); 706Assert.Equal(newText.ToString(), finalText); 720Assert.Equal(newText.ToString(), output); 1262Assert.Equal(parsedTree.GetCompilationUnitRoot().ToFullString(), incrementalTree.GetCompilationUnitRoot().ToFullString()); 1478Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 1533Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 1620Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 1726Assert.Equal(parsedTree.GetCompilationUnitRoot().ChildNodesAndTokens()[0].AsNode().ToFullString(), incrementalTree.GetCompilationUnitRoot().ChildNodesAndTokens()[0].AsNode().ToFullString()); 1832Assert.Equal(parsedTree.GetCompilationUnitRoot().ToFullString(), incrementalTree.GetCompilationUnitRoot().ToFullString()); 2507Assert.Equal(oldText.ToString(), startTree.GetCompilationUnitRoot().ToFullString()); 2648Assert.Equal(fullText, incText); 2662Assert.Equal(fullText, incText); 2796Assert.Equal(text, oldRoot.ToFullString()); 2810Assert.Equal(oldClassC.ToFullString(), newClassC.ToFullString()); 2821Assert.Equal(oldToken.ToFullString(), newToken.ToFullString()); 3452Assert.Equal(pd.ElementAt(i).Inspect(), id.ElementAt(i).Inspect()); 3464Assert.Equal(oldText.ToString(), startTree.GetCompilationUnitRoot().ToFullString());
IncrementalParsing\NodeValidators.cs (10)
24Assert.Equal(pointerName.ElementType.ToString(), name); 31Assert.Equal(predefName.ToString(), typeName); 38Assert.Equal(arrayType.ElementType.ToString(), arrayName); 47Assert.Equal(aliasName.Alias.ToString(), alias); 48Assert.Equal(aliasName.Name.ToString(), name); 56Assert.Equal(dottedName.Left.ToString(), left); 57Assert.Equal(dottedName.Right.ToString(), right); 65Assert.Equal(genericName.Identifier.ToString(), name); 70Assert.Equal(genericName.TypeArgumentList.Arguments[i].ToString(), str); 80Assert.Equal(genericName.ToString(), name);
LexicalAndXml\DocumentationCommentLexerTestBase.cs (2)
62Assert.Equal(expectedToken.Text, actualToken.Text); //This first, since it's easiest to debug. 63Assert.Equal(expectedToken.ValueText, actualToken.ValueText);
LexicalAndXml\LexicalTests.cs (328)
109Assert.Equal(text, token.ToFullString()); 128Assert.Equal(text, token.ToFullString()); 147Assert.Equal(text, token.ToFullString()); 166Assert.Equal(text, token.ToFullString()); 173Assert.Equal(text, trivia.ToFullString()); 174Assert.Equal(text, trivia.ToString()); 188Assert.Equal(text, token.ToFullString()); 210Assert.Equal(text, token.ToFullString()); 232Assert.Equal(text, token.ToFullString()); 250Assert.Equal(text, token.ToFullString()); 270Assert.Equal(text, token.ToFullString()); 294Assert.Equal(text, token.ToFullString()); 318Assert.Equal(text, token.ToFullString()); 338Assert.Equal(text, token.ToFullString()); 360Assert.Equal(text, token.ToFullString()); 382Assert.Equal(text, token.ToFullString()); 404Assert.Equal(text, token.ToFullString()); 425Assert.Equal(text, token.ToFullString()); 452Assert.Equal(text, token.ToFullString()); 487Assert.Equal("@: More text", token.Text); 492Assert.Equal(""" 513Assert.Equal("@: /*", token.ToString()); 524Assert.Equal("Identifier", token.Text); 541Assert.Equal(text, token.ToFullString()); 567Assert.Equal(""" 581Assert.Equal("#endif", token.ToFullString()); 597Assert.Equal(text, token.ToFullString()); 616Assert.Equal(text, token.Text); 619Assert.Equal(text, token.ValueText); 631Assert.Equal(text, token.Text); 634Assert.Equal(text, token.ValueText); 646Assert.Equal(text, token.Text); 649Assert.Equal(text, token.ValueText); 661Assert.Equal(text, token.Text); 664Assert.Equal(text, token.ValueText); 676Assert.Equal(text, token.Text); 679Assert.Equal(text, token.ValueText); 691Assert.Equal(text, token.Text); 694Assert.Equal("x", token.ValueText); 706Assert.Equal(text, token.Text); 709Assert.Equal("if", token.ValueText); 721Assert.Equal(text, token.Text); 738Assert.Equal(text, token.Text); 755Assert.Equal(text, token.Text); 772Assert.Equal(text, token.Text); 789Assert.Equal(text, token.Text); 806Assert.Equal(text, token.Text); 823Assert.Equal(text, token.ToFullString()); 845Assert.Equal(text, token.Text); 848Assert.Equal(value, token.ValueText); 865Assert.Equal(text, token.Text); 886Assert.Equal(text, token.Text); 889Assert.Equal(text, token.ValueText); 965Assert.Equal(text, token.Text); 968Assert.Equal(text, token.ValueText); 980Assert.Equal(text, token.Text); 983Assert.Equal("literal", token.ValueText); 995Assert.Equal(text, token.Text); 998Assert.Equal("҉ ҉̵̞̟̠̖̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̐̑̒̓̔̊̋̌̍̎̏̐̑̒̓̔̿̿̿… ͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿̿̚ ҉ ҉҉̡̢̡̢̛̛̖̗̘̙̜̝̞̟̠̖̗̘̙̜̝̞̟̠̊̋̌̍̎̏̐̑̒̓̔̊̋̌… ̒̓̔̕̚ ̍̎̏̐̑̒̓̔̕̚̕̚ ̡̢̛̗̘̙̜̝̞̟̠̊̋̌̍̎̏̚ ̡̢̡̢̛̛̖̗̘̙̜̝̞̟̠̖̗̘̙̜̝̞̟̠̊̋̌̍̎̏̐̑̒̓̔̊̋̌̍̎… ̕̚̕̚ ̔̕̚̕̚҉ ҉̵̞̟̠̖̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̐̑̒̓̔̊̋̌̍̎̏̐̑̒̓̔̿̿̿… ͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿̿̚ ҉", token.ValueText); 1010Assert.Equal(text, token.Text); 1013Assert.Equal("literal", token.ValueText); 1025Assert.Equal(text, token.Text); 1028Assert.Equal("multi line\r\nliteral", token.ValueText); 1044Assert.Equal("literal", token.ValueText); 1056Assert.Equal(text, token.Text); 1060Assert.Equal("literal", token.ValueText); 1072Assert.Equal(text, token.Text); 1076Assert.Equal("literal", token.ValueText); 1089Assert.Equal(text, token.Text); 1092Assert.Equal(value, token.ValueText); 1105Assert.Equal(text, token.Text); 1108Assert.Equal(value, token.ValueText); 1121Assert.Equal(text, token.Text); 1124Assert.Equal(value, token.ValueText); 1137Assert.Equal(text, token.Text); 1141Assert.Equal(value, token.ValueText); 1156Assert.Equal(text, token.Text); 1160Assert.Equal(value, token.ValueText); 1175Assert.Equal(text, token.Text); 1178Assert.Equal(value, token.ValueText); 1193Assert.Equal(text, token.Text); 1196Assert.Equal(value, token.ValueText); 1209Assert.Equal(text, token.Text); 1212Assert.Equal(value, token.ValueText); 1225Assert.Equal(text, token.Text); 1228Assert.Equal(value, token.ValueText); 1241Assert.Equal(text, token.Text); 1244Assert.Equal(value, token.ValueText); 1257Assert.Equal(text, token.Text); 1260Assert.Equal(value, token.ValueText); 1273Assert.Equal(text, token.Text); 1276Assert.Equal(value, token.ValueText); 1289Assert.Equal(text, token.Text); 1292Assert.Equal(value, token.ValueText); 1305Assert.Equal(text, token.Text); 1308Assert.Equal(value, token.ValueText); 1321Assert.Equal(text, token.Text); 1324Assert.Equal(value, token.ValueText); 1337Assert.Equal(text, token.Text); 1341Assert.Equal(value, token.ValueText); 1354Assert.Equal(text, token.Text); 1357Assert.Equal(value, token.ValueText); 1370Assert.Equal(text, token.Text); 1373Assert.Equal(value, token.ValueText); 1386Assert.Equal(text, token.Text); 1389Assert.Equal(value, token.ValueText); 1402Assert.Equal(text, token.Text); 1405Assert.Equal(value, token.ValueText); 1418Assert.Equal(text, token.Text); 1421Assert.Equal(value, token.ValueText); 1434Assert.Equal(text, token.Text); 1437Assert.Equal(value, token.ValueText); 1450Assert.Equal(text, token.Text); 1453Assert.Equal(value, token.ValueText); 1466Assert.Equal(text, token.Text); 1469Assert.Equal(value, token.ValueText); 1482Assert.Equal(text, token.Text); 1486Assert.Equal(value, token.ValueText); 1498Assert.Equal(text, token.Text); 1515Assert.Equal(text, token.Text); 1519Assert.Equal(value, token.ValueText); 1532Assert.Equal("'a", token.Text); 1536Assert.Equal(value, token.ValueText); 1548Assert.Equal("'", token.Text); 1566Assert.Equal("'ab", token.Text); 1571Assert.Equal(value, token.ValueText); 1586Assert.Equal("'\uFFFF'", token.Text); 1589Assert.Equal(value, token.ValueText); 1604Assert.Equal(text, token.Text); 1619Assert.Equal(text, token.Text); 1634Assert.Equal(text, token.Text); 1649Assert.Equal(text, token.Text); 1664Assert.Equal(text, token.ToFullString()); 1680Assert.Equal(text, token.ToFullString()); 1696Assert.Equal(text, token.ToFullString()); 1712Assert.Equal(text, token.Text); 1713Assert.Equal("class", token.ValueText); 1728Assert.Equal(text, token.Text); 1729Assert.Equal("class", token.ValueText); 1744Assert.Equal(text, token.Text); 1760Assert.Equal(text, token.Text); 1776Assert.Equal(text, token.Text); 1792Assert.Equal(text, token.Text); 1808Assert.Equal(text, token.Text); 1823Assert.Equal(text, token.Text); 1838Assert.Equal(text, token.Text); 1853Assert.Equal(text, token.Text); 1868Assert.Equal(text, token.Text); 1883Assert.Equal(text, token.Text); 1898Assert.Equal(text, token.Text); 1920Assert.Equal(text, token.Text); 1936Assert.Equal(text, token.Text); 1950Assert.Equal(text, token.Text); 1966Assert.Equal(text, token.Text); 1980Assert.Equal(text, token.Text); 1995Assert.Equal(text, token.Text); 2011Assert.Equal(text, token.Text); 2027Assert.Equal(text, token.Text); 2043Assert.Equal(text, token.Text); 2059Assert.Equal(text, token.Text); 2075Assert.Equal(text, token.Text); 2091Assert.Equal(text, token.Text); 2107Assert.Equal(text, token.Text); 2123Assert.Equal(text, token.Text); 2139Assert.Equal(text, token.Text); 2155Assert.Equal(text, token.Text); 2171Assert.Equal(text, token.Text); 2187Assert.Equal(text, token.Text); 2203Assert.Equal(text, token.Text); 2219Assert.Equal(text, token.Text); 2235Assert.Equal(text, token.Text); 2251Assert.Equal(text, token.Text); 2267Assert.Equal(text, token.Text); 2277Assert.Equal(text, token.Text); 2293Assert.Equal(text, token.Text); 2303Assert.Equal(text, token.Text); 2319Assert.Equal(text, token.Text); 2329Assert.Equal(text, token.Text); 2345Assert.Equal(text, token.Text); 2355Assert.Equal(text, token.Text); 2371Assert.Equal(text, token.Text); 2381Assert.Equal(text, token.Text); 2397Assert.Equal(text, token.Text); 2406Assert.Equal(text, token.Text); 2422Assert.Equal(text, token.Text); 2432Assert.Equal(text, token.Text); 2448Assert.Equal(text, token.Text); 2458Assert.Equal(text, token.Text); 2473Assert.Equal(text, token.Text); 2488Assert.Equal(text, token.Text); 2498Assert.Equal(text, token.Text); 2514Assert.Equal(text, token.Text); 2523Assert.Equal(text, token.Text); 2539Assert.Equal(text, token.Text); 2549Assert.Equal(text, token.Text); 2565Assert.Equal(text, token.Text); 2575Assert.Equal(text, token.Text); 2590Assert.Equal(text, token.Text); 2605Assert.Equal(text, token.Text); 2621Assert.Equal(text, token.Text); 2637Assert.Equal(text, token.Text); 2653Assert.Equal(text, token.Text); 2669Assert.Equal(text, token.Text); 2683Assert.Equal(text, token.Text); 2698Assert.Equal(text, token.Text); 2713Assert.Equal(text, token.Text); 2729Assert.Equal(text, token.Text); 2744Assert.Equal(text, token.Text); 2760Assert.Equal(text, token.Text); 2776Assert.Equal(text, token.Text); 2792Assert.Equal(text, token.Text); 2808Assert.Equal(text, token.Text); 2824Assert.Equal(text, token.Text); 2840Assert.Equal(text, token.Text); 2856Assert.Equal(text, token.Text); 2872Assert.Equal(text, token.Text); 2888Assert.Equal(text, token.Text); 2904Assert.Equal(text, token.Text); 2920Assert.Equal(text, token.Text); 2936Assert.Equal(text, token.Text); 2952Assert.Equal(text, token.Text); 2968Assert.Equal(text, token.Text); 2984Assert.Equal(text, token.Text); 3000Assert.Equal(text, token.Text); 3016Assert.Equal(text, token.Text); 3032Assert.Equal("error CS1021: Integral constant is too large", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3033Assert.Equal(text, token.Text); 3048Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3049Assert.Equal(text, token.Text); 3063Assert.Equal(text, token.Text); 3072Assert.Equal(text, token.Text); 3081Assert.Equal(text, token.Text); 3090Assert.Equal(text, token.Text); 3099Assert.Equal(text, token.Text); 3108Assert.Equal(text, token.Text); 3117Assert.Equal(text, token.Text); 3131Assert.Equal(text, token.Text); 3145Assert.Equal(text, token.Text); 3154Assert.Equal(text, token.Text); 3163Assert.Equal(text, token.Text); 3172Assert.Equal(text, token.Text); 3186Assert.Equal(text, token.Text); 3195Assert.Equal(text, token.Text); 3204Assert.Equal(text, token.Text); 3214Assert.Equal(text, token.Text); 3236Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3237Assert.Equal(text, token.Text); 3247Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3248Assert.Equal(text, token.Text); 3262Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3263Assert.Equal(text, token.Text); 3273Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3274Assert.Equal(text, token.Text); 3284Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3285Assert.Equal(text, token.Text); 3295Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3296Assert.Equal(text, token.Text); 3306Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3307Assert.Equal(text, token.Text); 3317Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3318Assert.Equal(text, token.Text); 3328Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3329Assert.Equal(text, token.Text); 3339Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3340Assert.Equal(text, token.Text); 3350Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3351Assert.Equal(text, token.Text); 3361Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3362Assert.Equal(text, token.Text); 3373Assert.Equal("error CS1013: Invalid number", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3374Assert.Equal(text, token.Text); 3389Assert.Equal("3", token.Text); 3405Assert.Equal(text, token.Text); 3421Assert.Equal(text, token.Text); 3437Assert.Equal(text, token.Text); 3458Assert.Equal(text, token.Text); 3468Assert.Equal(text, token.Text); 3478Assert.Equal(text.Substring(0, text.Length - 1), token.Text); 3488Assert.Equal("@", token.Text); 3494Assert.Equal("@0x0", token.Text); 3500Assert.Equal("@0X012345678", token.Text); 3506Assert.Equal("@0x9abcdefA", token.Text); 3512Assert.Equal("@0xBCDEF", token.Text); 3518Assert.Equal("@", token.Text); 3524Assert.Equal("@", token.Text); 3530Assert.Equal("@", token.Text); 3536Assert.Equal("@", token.Text); 3542Assert.Equal("@0xffff0000ffff0000ffff0000", token.Text); 3561Assert.Equal("error CS2043: 'id#' syntax is no longer supported. Use '$id' instead.", errors[0].ToString(EnsureEnglishUICulture.PreferredOrNull)); 3562Assert.Equal(text, token.Text); 3572Assert.Equal(text, token.Text); 3582Assert.Equal(text.Substring(0, text.Length - 1), token.Text); 3592Assert.Equal(text.Substring(0, text.Length - 1), token.Text); 3603Assert.Equal(text, token.Text); 3615Assert.Equal("token", token.Text); 3620Assert.Equal(" \t\v\f\u00A0", leading[0].ToString()); 3626Assert.Equal("\u00A0\f\v\t ", trailing[0].ToString()); 3633Assert.Equal("token", token.Text); 3638Assert.Equal("\u001A", leading[0].ToString()); 3644Assert.Equal("\u001A", trailing[0].ToString()); 3653Assert.Equal("to\uFEFFken\uFEFF", token.Text); 3659Assert.Equal("\uFEFF", leading[0].ToString()); 3665Assert.Equal(" \uFEFF", trailing[0].ToString()); 3786Assert.Equal(expectedBits, ToHexString((decimal)token.Value)); 4175Assert.Equal("======= Trailing", trivia.ToFullString()); 4184Assert.Equal(""" 4193Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4215Assert.Equal("======= Trailing", trivia.ToFullString()); 4224Assert.Equal(""" 4233Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4384Assert.Equal("||||||| Mid", trivia.ToFullString()); 4393Assert.Equal("======= Trailing", trivia.ToFullString()); 4402Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4423Assert.Equal("||||||| Mid", trivia.ToFullString()); 4432Assert.Equal(""" 4439Assert.Equal("======= Trailing", trivia.ToFullString()); 4448Assert.Equal(""" 4455Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4479Assert.Equal("||||||| Mid", trivia.ToFullString()); 4488Assert.Equal(""" 4495Assert.Equal("======= Trailing", trivia.ToFullString()); 4504Assert.Equal(""" 4513Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString()); 4537Assert.Equal("||||||| Mid", trivia.ToFullString()); 4546Assert.Equal(""" 4555Assert.Equal("======= Trailing", trivia.ToFullString()); 4564Assert.Equal(""" 4571Assert.Equal(">>>>>>> Actually the end", trivia.ToFullString());
LexicalAndXml\PreprocessorTests.cs (33)
108Assert.Equal(text, fullText); 194Assert.Equal(exp.Text, ((DefineDirectiveTriviaSyntax)dt).Name.ValueText); // Text 200Assert.Equal(exp.Text, ((ErrorDirectiveTriviaSyntax)dt).EndOfDirectiveToken.ToFullString()); 206Assert.Equal(exp.Text, ((LoadDirectiveTriviaSyntax)dt).File.ValueText); 212Assert.Equal(exp.Text, ((UndefDirectiveTriviaSyntax)dt).Name.ValueText); 218Assert.Equal(exp.Text, ((ReferenceDirectiveTriviaSyntax)dt).File.ValueText); 237Assert.Equal(String.Empty, ld.Line.Text); 272Assert.Equal(exp.Text, actualText); 341Assert.Equal(warningNumber, token.ValueText); 346Assert.Equal(warningNumber, token.ValueText); 428Assert.Equal(expected.Text, actual.GetMessage(CultureInfo.InvariantCulture)); 1687Assert.Equal("A", td.Identifier.ToString()); 2104Assert.Equal($"#region A//B{Environment.NewLine}", regionDirective.ToFullString()); 2107Assert.Equal("A//B", regionText.ToFullString()); 2126Assert.Equal($"#region A/\\B{Environment.NewLine}", regionDirective.ToFullString()); 2129Assert.Equal("A/\\B", regionText.ToFullString()); 2214Assert.Equal($"#region \"{Environment.NewLine}", regionDirective.ToFullString()); 2217Assert.Equal("\"", regionText.ToFullString()); 2235Assert.Equal($"#region \" {Environment.NewLine}", regionDirective.ToFullString()); 2238Assert.Equal("\" ", regionText.ToFullString()); 2256Assert.Equal($"#region \"goo\"{Environment.NewLine}", regionDirective.ToFullString()); 2259Assert.Equal("\"goo\"", regionText.ToFullString()); 2277Assert.Equal($"#region \"goo\" {Environment.NewLine}", regionDirective.ToFullString()); 2280Assert.Equal("\"goo\" ", regionText.ToFullString()); 2298Assert.Equal($"#region \"\"{Environment.NewLine}", regionDirective.ToFullString()); 2301Assert.Equal("\"\"", regionText.ToFullString()); 2319Assert.Equal($"#region \"\" {Environment.NewLine}", regionDirective.ToFullString()); 2322Assert.Equal("\"\" ", regionText.ToFullString()); 2340Assert.Equal($"#region \"\"\"{Environment.NewLine}", regionDirective.ToFullString()); 2343Assert.Equal("\"\"\"", regionText.ToFullString()); 2361Assert.Equal($"#region \"\"\" {Environment.NewLine}", regionDirective.ToFullString()); 2364Assert.Equal("\"\"\" ", regionText.ToFullString()); 3219Assert.Equal(expectedErrorStringFileName, actualErrorStringFileName);
LexicalAndXml\RawStringLiteralLexingTests.cs (3)
193Assert.Equal(input, token.ToFullString()); 197Assert.Equal(expectedValue, token.ValueText); 221Assert.All(diagnostics, d => Assert.Equal(spans.Single().Key, d.Id));
LexicalAndXml\SyntaxTokenParserTests.cs (1)
423Assert.Equal(text, leadingTrivia[i].ToFullString());
LexicalAndXml\XmlDocCommentTests.cs (245)
78Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 84Assert.Equal(text, node.ToFullString()); 98Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 103Assert.Equal(text, leading[0].ToFullString()); 115Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 130Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 135Assert.Equal(text, leading[0].ToFullString()); 146Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 153Assert.Equal($"/// <goo />{Environment.NewLine}", node.ToFullString()); 168Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 174Assert.Equal(text, node.ToFullString()); 192Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 199Assert.Equal("/** <goo /> */", node.ToFullString()); 215Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 221Assert.Equal(text, node.ToFullString()); 238Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 244Assert.Equal(text, node.ToFullString()); 261Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 267Assert.Equal(text, node.ToFullString()); 278Assert.Equal("x'y'z", attr.TextTokens[0].ToString()); 288Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 294Assert.Equal(text, node.ToFullString()); 305Assert.Equal("x\"y\"z", attr.TextTokens[0].ToString()); 316Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 322Assert.Equal(text, node.ToFullString()); 328Assert.Equal($"<goo {Environment.NewLine}/// />", doc.Content[1].ToFullString()); 340Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 346Assert.Equal($"/// <goo {Environment.NewLine}/// />{Environment.NewLine}", node.ToFullString()); 352Assert.Equal($"<goo {Environment.NewLine}/// />", doc.Content[1].ToFullString()); 365Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 371Assert.Equal(text, node.ToFullString()); 377Assert.Equal($"<goo {Environment.NewLine} * />", doc.Content[1].ToFullString()); 391Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 397Assert.Equal($"/** <goo {Environment.NewLine} * />{Environment.NewLine} */", node.ToFullString()); 403Assert.Equal($"<goo {Environment.NewLine} * />", doc.Content[1].ToFullString()); 418Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 424Assert.Equal(text, node.ToFullString()); 445Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 451Assert.Equal(text, node.ToFullString()); 473Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 479Assert.Equal(text, node.ToFullString()); 502Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 508Assert.Equal(text, node.ToFullString()); 532Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 538Assert.Equal(text, node.ToFullString()); 561Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 567Assert.Equal(text, node.ToFullString()); 591Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 597Assert.Equal(text, node.ToFullString()); 622Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 628Assert.Equal(text, node.ToFullString()); 645Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 651Assert.Equal(text, node.ToFullString()); 658Assert.Equal("goo.bar", element.Name.ToString()); 667Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 673Assert.Equal(text, node.ToFullString()); 680Assert.Equal("goo:bar", element.Name.ToString()); 689Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 695Assert.Equal(text, node.ToFullString()); 702Assert.Equal("abc-def", element.Name.ToString()); 711Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 717Assert.Equal(text, node.ToFullString()); 724Assert.Equal("goo123", element.Name.ToString()); 733Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 739Assert.Equal(text, node.ToFullString()); 753Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 759Assert.Equal(text, node.ToFullString()); 766Assert.Equal("goo", element.StartTag.Name.ToString()); 767Assert.Equal("goo", element.EndTag.Name.ToString()); 771Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[0].ToString()); 772Assert.Equal(" bar", textsyntax.ChildNodesAndTokens()[1].ToString()); 773Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[2].ToString()); 774Assert.Equal(" ", textsyntax.ChildNodesAndTokens()[3].ToString()); 787Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 793Assert.Equal(text, node.ToFullString()); 800Assert.Equal("goo", element.StartTag.Name.ToString()); 801Assert.Equal("goo", element.EndTag.Name.ToString()); 805Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[0].ToString()); 806Assert.Equal(" bar", textsyntax.ChildNodesAndTokens()[1].ToString()); 807Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[2].ToString()); 808Assert.Equal(" ", textsyntax.ChildNodesAndTokens()[3].ToString()); 820Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 826Assert.Equal(text, node.ToFullString()); 834Assert.Equal(" this is a test", cdata.TextTokens[0].ToString()); 835Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 836Assert.Equal(" of &some; cdata /// */ /**", cdata.TextTokens[2].ToString()); 837Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 838Assert.Equal(" \"']]<>/></text", cdata.TextTokens[4].ToString()); 851Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 857Assert.Equal(text, node.ToFullString()); 865Assert.Equal(" this is a test", cdata.TextTokens[0].ToString()); 866Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 867Assert.Equal(" of &some; cdata", cdata.TextTokens[2].ToString()); 868Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 869Assert.Equal(" \"']]<>/></text", cdata.TextTokens[4].ToString()); 879Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 885Assert.Equal(text, node.ToFullString()); 894Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 904Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 910Assert.Equal($"/// <![CDATA[ incomplete{Environment.NewLine}", node.ToFullString()); 919Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 920Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 930Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 936Assert.Equal("/// <![CDATA[ incomplete\u0085", node.ToFullString()); 945Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 946Assert.Equal("\u0085", cdata.TextTokens[1].ToString()); 955Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 961Assert.Equal(text, node.ToFullString()); 970Assert.Equal(" incomplete", cdata.TextTokens[0].ToString()); 982Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 988Assert.Equal(text, node.ToFullString()); 996Assert.Equal(" this is a test", comment.TextTokens[0].ToString()); 997Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 998Assert.Equal(" of &some; comment", comment.TextTokens[2].ToString()); 999Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 1000Assert.Equal(" \"']]<>/></text", comment.TextTokens[4].ToString()); 1013Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1019Assert.Equal(text, node.ToFullString()); 1027Assert.Equal(" this is a test", comment.TextTokens[0].ToString()); 1028Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1029Assert.Equal(" of &some; comment", comment.TextTokens[2].ToString()); 1030Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 1031Assert.Equal(" \"']]<>/></text", comment.TextTokens[4].ToString()); 1041Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1047Assert.Equal(text, node.ToFullString()); 1056Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1066Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1072Assert.Equal($"/// <!-- incomplete{Environment.NewLine}", node.ToFullString()); 1081Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1082Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1091Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1097Assert.Equal(text, node.ToFullString()); 1106Assert.Equal(" incomplete", comment.TextTokens[0].ToString()); 1118Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1124Assert.Equal(text, node.ToFullString()); 1132Assert.Equal("ProcessingInstruction", ProcessingInstruction.Name.LocalName.Text); 1134Assert.Equal(" this is a test", ProcessingInstruction.TextTokens[0].ToString()); 1135Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1136Assert.Equal(" of &a; ProcessingInstruction /// */ /**", ProcessingInstruction.TextTokens[2].ToString()); 1137Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1138Assert.Equal(" \"']]>/>?</text", ProcessingInstruction.TextTokens[4].ToString()); 1151Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1157Assert.Equal(text, node.ToFullString()); 1164Assert.Equal("prefix", ProcessingInstruction.Name.Prefix.Prefix.Text); 1165Assert.Equal(":", ProcessingInstruction.Name.Prefix.ColonToken.Text); 1166Assert.Equal("localname", ProcessingInstruction.Name.LocalName.Text); 1168Assert.Equal(" this is a test <!--", ProcessingInstruction.TextTokens[0].ToString()); 1169Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1170Assert.Equal(" of &a; ProcessingInstruction", ProcessingInstruction.TextTokens[2].ToString()); 1171Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1172Assert.Equal(" \"']]>/></text>]]>", ProcessingInstruction.TextTokens[4].ToString()); 1182Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1188Assert.Equal(text, node.ToFullString()); 1196Assert.Equal("incomplete", ProcessingInstruction.Name.LocalName.Text); 1208Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1214Assert.Equal("/// <?name incomplete\u0085", node.ToFullString()); 1222Assert.Equal("name", ProcessingInstruction.Name.LocalName.Text); 1225Assert.Equal(" incomplete", ProcessingInstruction.TextTokens[0].ToString()); 1226Assert.Equal("\u0085", ProcessingInstruction.TextTokens[1].ToString()); 1235Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1241Assert.Equal(text, node.ToFullString()); 1249Assert.Equal("name", ProcessingInstruction.Name.LocalName.Text); 1252Assert.Equal(" incomplete", ProcessingInstruction.TextTokens[0].ToString()); 1263Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1269Assert.Equal(text, node.ToFullString()); 1288Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1292Assert.Equal("class C { }", classdecl.ToString()); 1308Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1314Assert.Equal(text, node.ToFullString()); 1332Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1338Assert.Equal(text, node.ToFullString()); 1357Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1363Assert.Equal(text, node.ToFullString()); 1381Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1387Assert.Equal(text, node.ToFullString()); 1406Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1412Assert.Equal(text, node.ToFullString()); 1430Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1436Assert.Equal(text, node.ToFullString()); 1455Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1461Assert.Equal(text, node.ToFullString()); 1479Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1485Assert.Equal(text, node.ToFullString()); 1504Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1515Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1526Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1537Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1548Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1559Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1565Assert.Equal(text, node.ToFullString()); 1587Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1593Assert.Equal(text, node.ToFullString()); 1615Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1621Assert.Equal(text, node.ToFullString()); 1641Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1647Assert.Equal(text, node.ToFullString()); 1655Assert.Equal(Environment.NewLine, xmltext.ChildNodesAndTokens()[0].ToString()); 1658Assert.Equal("x", xmltext.ChildNodesAndTokens()[1].ToString()); 1661Assert.Equal(Environment.NewLine, xmltext.ChildNodesAndTokens()[2].ToString()); 1672Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1689Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1708Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1747Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1787Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1828Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1863Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1898Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1933Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1968Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2005Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2043Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2079Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2110Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2143Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2173Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2204Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2239Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2254Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2282Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2324Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2345Assert.Equal(@" Some text 2356Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2380Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2398Assert.Equal($"///</Goo>{Environment.NewLine}", xmlText.TextTokens.ToFullString()); 2410Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2428Assert.Equal("/**</Goo>", xmlText.TextTokens.ToFullString()); 2439Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2462Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2489Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2514Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2539Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2565Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2591Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2606Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2620Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2635Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2653Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2676Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2694Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2720Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2743Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 2767Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 3020Assert.Equal( 3340Assert.Equal(innerText, elementInnerText); 3402Assert.Equal(attributes[attribute.Name.LocalName.Value as string], attribute.TextTokens.ToString());
Parsing\DeclarationParsingTests.cs (519)
36Assert.Equal(text, file.ToString()); 47Assert.Equal("a", ea.Identifier.ToString()); 59Assert.Equal(text, file.ToString()); 69Assert.Equal("a", ud.Name.ToString()); 81Assert.Equal(text, file.ToString()); 91Assert.Equal("a", ud.Name.ToString()); 103Assert.Equal(text, file.ToFullString()); 118Assert.Equal(text, file.ToString()); 133Assert.Equal(text, file.ToString()); 148Assert.Equal(text, file.ToString()); 158Assert.Equal("a.b", ud.Name.ToString()); 170Assert.Equal(text, file.ToString()); 180Assert.Equal("a.b", ud.Name.ToString()); 192Assert.Equal(text, file.ToString()); 202Assert.Equal("a<int?>", ud.Name.ToString()); 214Assert.Equal(text, file.ToString()); 223Assert.Equal("a", ud.Alias.Name.ToString()); 226Assert.Equal("b", ud.Name.ToString()); 238Assert.Equal(text, file.ToString()); 247Assert.Equal("a", ud.Alias.Name.ToString()); 250Assert.Equal("b<c>", ud.Name.ToString()); 262Assert.Equal(text, file.ToString()); 271Assert.Equal("assembly", ad.Target.Identifier.ToString()); 275Assert.Equal("a", ad.Attributes[0].Name.ToString()); 288Assert.Equal(text, file.ToString()); 297Assert.Equal("@assembly", ad.Target.Identifier.ToString()); 298Assert.Equal("assembly", ad.Target.Identifier.ValueText); 304Assert.Equal("a", ad.Attributes[0].Name.ToString()); 317Assert.Equal(text, file.ToString()); 326Assert.Equal(@"as\u0073embly", ad.Target.Identifier.ToString()); 327Assert.Equal("assembly", ad.Target.Identifier.ValueText); 333Assert.Equal("a", ad.Attributes[0].Name.ToString()); 346Assert.Equal(text, file.ToString()); 355Assert.Equal("module", ad.Target.Identifier.ToString()); 360Assert.Equal("a", ad.Attributes[0].Name.ToString()); 373Assert.Equal(text, file.ToString()); 382Assert.Equal("@module", ad.Target.Identifier.ToString()); 388Assert.Equal("a", ad.Attributes[0].Name.ToString()); 401Assert.Equal(text, file.ToString()); 410Assert.Equal("assembly", ad.Target.Identifier.ToString()); 415Assert.Equal("a", ad.Attributes[0].Name.ToString()); 431Assert.Equal(text, file.ToString()); 440Assert.Equal("assembly", ad.Target.Identifier.ToString()); 444Assert.Equal("a", ad.Attributes[0].Name.ToString()); 448Assert.Equal("b", ad.Attributes[0].ArgumentList.Arguments[0].ToString()); 449Assert.Equal("c", ad.Attributes[0].ArgumentList.Arguments[1].ToString()); 462Assert.Equal(text, file.ToString()); 471Assert.Equal("assembly", ad.Target.Identifier.ToString()); 475Assert.Equal("a", ad.Attributes[0].Name.ToString()); 479Assert.Equal("b = c", ad.Attributes[0].ArgumentList.Arguments[0].ToString()); 482Assert.Equal("b", ad.Attributes[0].ArgumentList.Arguments[0].NameEquals.Name.ToString()); 485Assert.Equal("c", ad.Attributes[0].ArgumentList.Arguments[0].Expression.ToString()); 498Assert.Equal(text, file.ToString()); 507Assert.Equal("assembly", ad.Target.Identifier.ToString()); 512Assert.Equal("a", ad.Attributes[0].Name.ToString()); 516Assert.Equal("b", ad.Attributes[1].Name.ToString()); 530Assert.Equal(text, file.ToString()); 538Assert.Equal("assembly", ad.Target.Identifier.ToString()); 542Assert.Equal("a", ad.Attributes[0].Name.ToString()); 550Assert.Equal("assembly", ad.Target.Identifier.ToString()); 554Assert.Equal("b", ad.Attributes[0].Name.ToString()); 567Assert.Equal(text, file.ToString()); 574Assert.Equal("a", ns.Name.ToString()); 589Assert.Equal(text, file.ToString()); 596Assert.Equal("a", ns.Name.ToString()); 610Assert.Equal(text, file.ToString()); 617Assert.Equal("a.b.c", ns.Name.ToString()); 632Assert.Equal(text, file.ToString()); 639Assert.Equal("a", ns.Name.ToString()); 642Assert.Equal("using b.c;", ns.Usings[0].ToString()); 655Assert.Equal(text, file.ToString()); 662Assert.Equal("a", ns.Name.ToString()); 665Assert.Equal("using b.c;", ns.Usings[0].ToString()); 677Assert.Equal(text, file.ToString()); 684Assert.Equal("a", ns.Name.ToString()); 687Assert.Equal("extern alias b;", ns.Externs[0].ToString()); 700Assert.Equal(text, file.ToString()); 707Assert.Equal("a", ns.Name.ToString()); 710Assert.Equal("extern alias b;", ns.Externs[0].ToString()); 722Assert.Equal(text, file.ToFullString()); 729Assert.Equal("a", ns.Name.ToString()); 732Assert.Equal("using b;", ns.Usings[0].ToString()); 746Assert.Equal(text, file.ToString()); 753Assert.Equal("a", ns.Name.ToString()); 761Assert.Equal("b", ns2.Name.ToString()); 777Assert.Equal(text, file.ToString()); 787Assert.Equal("a", cs.Identifier.ToString()); 803Assert.Equal(text, file.ToString()); 814Assert.Equal("a", cs.Identifier.ToString()); 830Assert.Equal(text, file.ToString()); 841Assert.Equal("a", cs.Identifier.ToString()); 857Assert.Equal(text, file.ToString()); 868Assert.Equal("a", cs.Identifier.ToString()); 884Assert.Equal(text, file.ToString()); 895Assert.Equal("a", cs.Identifier.ToString()); 911Assert.Equal(text, file.ToString()); 922Assert.Equal("a", cs.Identifier.ToString()); 938Assert.Equal(text, file.ToString()); 949Assert.Equal("a", cs.Identifier.ToString()); 965Assert.Equal(text, file.ToString()); 971Assert.Equal("[attr]", cs.AttributeLists[0].ToString()); 976Assert.Equal("a", cs.Identifier.ToString()); 992Assert.Equal(text, file.ToString()); 998Assert.Equal("[attr1]", cs.AttributeLists[0].ToString()); 999Assert.Equal("[attr2]", cs.AttributeLists[1].ToString()); 1004Assert.Equal("a", cs.Identifier.ToString()); 1020Assert.Equal(text, file.ToString()); 1026Assert.Equal("[attr1, attr2]", cs.AttributeLists[0].ToString()); 1031Assert.Equal("a", cs.Identifier.ToString()); 1047Assert.Equal(text, file.ToString()); 1057Assert.Equal("a", cs.Identifier.ToString()); 1062Assert.Equal("b", cs.BaseList.Types[0].Type.ToString()); 1078Assert.Equal(text, file.ToString()); 1088Assert.Equal("a", cs.Identifier.ToString()); 1093Assert.Equal("b", cs.BaseList.Types[0].Type.ToString()); 1094Assert.Equal("c", cs.BaseList.Types[1].Type.ToString()); 1110Assert.Equal(text, file.ToString()); 1120Assert.Equal("a", cs.Identifier.ToString()); 1121Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1128Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1135Assert.Equal("c", bound.Type.ToString()); 1150Assert.Equal(text, file.ToString()); 1162Assert.Equal("a", cs.Identifier.ToString()); 1169Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1176Assert.Equal("c", bound.Type.ToString()); 1213Assert.Equal(text, file.ToString()); 1223Assert.Equal("a", cs.Identifier.ToString()); 1224Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1231Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1257Assert.Equal(text, file.ToString()); 1267Assert.Equal("a", cs.Identifier.ToString()); 1268Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1275Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1298Assert.Equal(text, file.ToString()); 1308Assert.Equal("a", cs.Identifier.ToString()); 1309Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1316Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1339Assert.Equal(text, file.ToString()); 1349Assert.Equal("a", cs.Identifier.ToString()); 1350Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1357Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1371Assert.Equal("c", typeBound.Type.ToString()); 1395Assert.Equal(text, file.ToString()); 1405Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1413Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1420Assert.Equal("c", typeBound.Type.ToString()); 1424Assert.Equal("b", cs.ConstraintClauses[1].Name.ToString()); 1450Assert.Equal(text, file.ToString()); 1460Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1468Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1475Assert.Equal("c", typeBound.Type.ToString()); 1479Assert.Equal("b", cs.ConstraintClauses[1].Name.ToString()); 1496Assert.Equal(text, file.ToString()); 1506Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1514Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1521Assert.Equal("c", typeBound.Type.ToString()); 1540Assert.Equal(text, file.ToString()); 1550Assert.Equal("a", cs.Identifier.ToString()); 1551Assert.Equal("<b>", cs.TypeParameterList.ToString()); 1556Assert.Equal("c", cs.BaseList.Types[0].Type.ToString()); 1557Assert.Equal("d", cs.BaseList.Types[1].Type.ToString()); 1562Assert.Equal("b", cs.ConstraintClauses[0].Name.ToString()); 1576Assert.Equal("e", typeBound.Type.ToString()); 1600Assert.Equal(text, file.ToString()); 1610Assert.Equal("a", cs.Identifier.ToString()); 1625Assert.Equal(text, file.ToString()); 1636Assert.Equal("<B>", gn.ToString()); 1637Assert.Equal("A", cs.Identifier.ToString()); 1640Assert.Equal("B", gn.Parameters[0].Identifier.ToString()); 1655Assert.Equal(text, file.ToString()); 1667Assert.Equal("<[B] out C>", gn.ToString()); 1668Assert.Equal("A", cs.Identifier.ToString()); 1670Assert.Equal("B", gn.Parameters[0].AttributeLists[0].Attributes[0].Name.ToString()); 1687Assert.Equal(text, file.ToString()); 1697Assert.Equal("a", cs.Identifier.ToString()); 1712Assert.Equal(text, file.ToString()); 1722Assert.Equal("a", cs.Identifier.ToString()); 1737Assert.Equal("b", cs.Identifier.ToString()); 1752Assert.Equal(text, file.ToString()); 1762Assert.Equal("a", cs.Identifier.ToString()); 1778Assert.Equal("b", cs.Identifier.ToString()); 1793Assert.Equal(text, file.ToString()); 1803Assert.Equal("a", cs.Identifier.ToString()); 1819Assert.Equal("b", cs.Identifier.ToString()); 1834Assert.Equal(text, file.ToString()); 1844Assert.Equal("a", cs.Identifier.ToString()); 1861Assert.Equal("b", cs.Identifier.ToString()); 1876Assert.Equal(text, file.ToString()); 1886Assert.Equal("a", cs.Identifier.ToString()); 1903Assert.Equal("b", cs.Identifier.ToString()); 1918Assert.Equal(text, file.ToString()); 1928Assert.Equal("a", cs.Identifier.ToString()); 1944Assert.Equal("b", cs.Identifier.ToString()); 1959Assert.Equal(text, file.ToString()); 1969Assert.Equal("a", cs.Identifier.ToString()); 1985Assert.Equal("b", cs.Identifier.ToString()); 2000Assert.Equal(text, file.ToString()); 2007Assert.Equal("a", ds.ReturnType.ToString()); 2009Assert.Equal("b", ds.Identifier.ToString()); 2027Assert.Equal(text, file.ToString()); 2034Assert.Equal("ref a", ds.ReturnType.ToString()); 2036Assert.Equal("b", ds.Identifier.ToString()); 2055Assert.Equal(text, file.ToString()); 2062Assert.Equal("ref readonly a", ds.ReturnType.ToString()); 2064Assert.Equal("b", ds.Identifier.ToString()); 2102Assert.Equal(text, file.ToString()); 2109Assert.Equal(typeText, ds.ReturnType.ToString()); 2111Assert.Equal("b", ds.Identifier.ToString()); 2148Assert.Equal(text, file.ToString()); 2155Assert.Equal("a", ds.ReturnType.ToString()); 2157Assert.Equal("b", ds.Identifier.ToString()); 2165Assert.Equal(typeText, ds.ParameterList.Parameters[0].Type.ToString()); 2167Assert.Equal("c", ds.ParameterList.Parameters[0].Identifier.ToString()); 2183Assert.Equal(text, file.ToString()); 2190Assert.Equal("a", ds.ReturnType.ToString()); 2192Assert.Equal("b", ds.Identifier.ToString()); 2200Assert.Equal("c", ds.ParameterList.Parameters[0].Type.ToString()); 2202Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2218Assert.Equal(text, file.ToString()); 2225Assert.Equal("a", ds.ReturnType.ToString()); 2227Assert.Equal("b", ds.Identifier.ToString()); 2235Assert.Equal("c", ds.ParameterList.Parameters[0].Type.ToString()); 2237Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2242Assert.Equal("e", ds.ParameterList.Parameters[1].Type.ToString()); 2244Assert.Equal("f", ds.ParameterList.Parameters[1].Identifier.ToString()); 2260Assert.Equal(text, file.ToString()); 2267Assert.Equal("a", ds.ReturnType.ToString()); 2269Assert.Equal("b", ds.Identifier.ToString()); 2278Assert.Equal("c", ds.ParameterList.Parameters[0].Type.ToString()); 2280Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2296Assert.Equal(text, file.ToString()); 2303Assert.Equal("a", ds.ReturnType.ToString()); 2305Assert.Equal("b", ds.Identifier.ToString()); 2314Assert.Equal("c", ds.ParameterList.Parameters[0].Type.ToString()); 2316Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2332Assert.Equal(text, file.ToString()); 2339Assert.Equal("a", ds.ReturnType.ToString()); 2341Assert.Equal("b", ds.Identifier.ToString()); 2350Assert.Equal("c", ds.ParameterList.Parameters[0].Type.ToString()); 2352Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2368Assert.Equal(text, file.ToString()); 2376Assert.Equal("a", ds.ReturnType.ToString()); 2378Assert.Equal("b", ds.Identifier.ToString()); 2402Assert.Equal(text, file.ToString()); 2409Assert.Equal("a", ds.ReturnType.ToString()); 2411Assert.Equal("b", ds.Identifier.ToString()); 2417Assert.Equal("[attr]", ds.ParameterList.Parameters[0].AttributeLists[0].ToString()); 2420Assert.Equal("c", ds.ParameterList.Parameters[0].Type.ToString()); 2422Assert.Equal("d", ds.ParameterList.Parameters[0].Identifier.ToString()); 2438Assert.Equal(text, file.ToString()); 2448Assert.Equal("a", cs.Identifier.ToString()); 2460Assert.Equal("b", ds.ReturnType.ToString()); 2462Assert.Equal("c", ds.Identifier.ToString()); 2480Assert.Equal(text, file.ToString()); 2490Assert.Equal("a", cs.Identifier.ToString()); 2503Assert.Equal("b", ms.ReturnType.ToString()); 2505Assert.Equal("X", ms.Identifier.ToString()); 2526Assert.Equal(text, file.ToString()); 2536Assert.Equal("a", cs.Identifier.ToString()); 2548Assert.Equal("ref b", ms.ReturnType.ToString()); 2550Assert.Equal("X", ms.Identifier.ToString()); 2572Assert.Equal(text, file.ToString()); 2582Assert.Equal("a", cs.Identifier.ToString()); 2594Assert.Equal("ref readonly b", ms.ReturnType.ToString()); 2596Assert.Equal("X", ms.Identifier.ToString()); 2617Assert.Equal(text, file.ToString()); 2627Assert.Equal("a", cs.Identifier.ToString()); 2647Assert.Equal(text, file.ToString()); 2657Assert.Equal("a", cs.Identifier.ToString()); 2675Assert.Equal(text, file.ToString()); 2685Assert.Equal("a", cs.Identifier.ToString()); 2702Assert.Equal("b", ms.ReturnType.ToString()); 2704Assert.Equal("X", ms.Identifier.ToString()); 2743Assert.Equal(text, file.ToString()); 2753Assert.Equal("a", cs.Identifier.ToString()); 2767Assert.Equal("void", ms.ReturnType.ToString()); 2769Assert.Equal("M", ms.Identifier.ToString()); 2790Assert.Equal(text, file.ToString()); 2800Assert.Equal("a", structDecl.Identifier.ToString()); 2814Assert.Equal("void", ms.ReturnType.ToString()); 2816Assert.Equal("M", ms.Identifier.ToString()); 2837Assert.Equal(text, file.ToString()); 2847Assert.Equal("a", structDecl.Identifier.ToString()); 2864Assert.Equal("int", rt.Type.ToString()); 2866Assert.Equal("M", ms.Identifier.ToString()); 2887Assert.Equal(text, file.ToString()); 2897Assert.Equal("a", structDecl.Identifier.ToString()); 2911Assert.Equal("int", propertySyntax.Type.ToString()); 2913Assert.Equal("M", propertySyntax.Identifier.ToString()); 2928Assert.Equal(text, file.ToString()); 2938Assert.Equal("a", structDecl.Identifier.ToString()); 2951Assert.Equal("int", propertySyntax.Type.ToString()); 2953Assert.Equal("P", propertySyntax.Identifier.ToString()); 2973Assert.Equal(text, file.ToString()); 2989Assert.Equal(text, file.ToString()); 2999Assert.Equal("a", cs.Identifier.ToString()); 3012Assert.Equal("b", ms.ReturnType.ToString()); 3014Assert.Equal("X", ms.Identifier.ToString()); 3021Assert.Equal("c", ms.ParameterList.Parameters[0].Type.ToString()); 3023Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 3041Assert.Equal(text, file.ToString()); 3051Assert.Equal("a", cs.Identifier.ToString()); 3064Assert.Equal("b", ms.ReturnType.ToString()); 3066Assert.Equal("X", ms.Identifier.ToString()); 3075Assert.Equal("c", ms.ParameterList.Parameters[0].Type.ToString()); 3077Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 3082Assert.Equal("e", ms.ParameterList.Parameters[1].Type.ToString()); 3084Assert.Equal("f", ms.ParameterList.Parameters[1].Identifier.ToString()); 3102Assert.Equal(text, file.ToString()); 3112Assert.Equal("a", cs.Identifier.ToString()); 3125Assert.Equal("b", ms.ReturnType.ToString()); 3127Assert.Equal("X", ms.Identifier.ToString()); 3137Assert.Equal("c", ms.ParameterList.Parameters[0].Type.ToString()); 3139Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 3167Assert.Equal(text, file.ToString()); 3177Assert.Equal("a", cs.Identifier.ToString()); 3190Assert.Equal("b", ms.ReturnType.ToString()); 3192Assert.Equal("X", ms.Identifier.ToString()); 3241Assert.Equal(text, file.ToString()); 3251Assert.Equal("a", cs.Identifier.ToString()); 3264Assert.Equal(typeText, ms.ReturnType.ToString()); 3266Assert.Equal("M", ms.Identifier.ToString()); 3306Assert.Equal(text, file.ToString()); 3316Assert.Equal("a", cs.Identifier.ToString()); 3329Assert.Equal("b", ms.ReturnType.ToString()); 3331Assert.Equal("X", ms.Identifier.ToString()); 3338Assert.Equal(typeText, ms.ParameterList.Parameters[0].Type.ToString()); 3340Assert.Equal("c", ms.ParameterList.Parameters[0].Identifier.ToString()); 3358Assert.Equal(text, file.ToString()); 3368Assert.Equal("a", cs.Identifier.ToString()); 3381Assert.Equal("b<c>", ms.ReturnType.ToString()); 3383Assert.Equal("M", ms.Identifier.ToString()); 3404Assert.Equal(text, file.ToString()); 3414Assert.Equal("a", cs.Identifier.ToString()); 3427Assert.Equal("b", ms.ReturnType.ToString()); 3430Assert.Equal("X", ms.Identifier.ToString()); 3431Assert.Equal("<c>", ms.TypeParameterList.ToString()); 3441Assert.Equal("b", ms.ConstraintClauses[0].Name.ToString()); 3448Assert.Equal("d", typeBound.Type.ToString()); 3471Assert.Equal(text, file.ToFullString()); 3485Assert.Equal(text, file.ToString()); 3495Assert.Equal("a", cs.Identifier.ToString()); 3520Assert.Equal(text, file.ToString()); 3530Assert.Equal("a", cs.Identifier.ToString()); 3567Assert.Equal(text, file.ToString()); 3577Assert.Equal("a", cs.Identifier.ToString()); 3604Assert.Equal(text, file.ToString()); 3614Assert.Equal("a", cs.Identifier.ToString()); 3627Assert.Equal("b", fs.Declaration.Type.ToString()); 3630Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3664Assert.Equal(text, file.ToString()); 3674Assert.Equal("a", cs.Identifier.ToString()); 3687Assert.Equal(typeText, fs.Declaration.Type.ToString()); 3690Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3704Assert.Equal(text, file.ToString()); 3714Assert.Equal("a", cs.Identifier.ToString()); 3728Assert.Equal("b", fs.Declaration.Type.ToString()); 3731Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3758Assert.Equal(text, file.ToString()); 3768Assert.Equal("a", cs.Identifier.ToString()); 3783Assert.Equal("b", fs.Declaration.Type.ToString()); 3786Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3814Assert.Equal(text, file.ToString()); 3824Assert.Equal("a", cs.Identifier.ToString()); 3838Assert.Equal("b", fs.Declaration.Type.ToString()); 3841Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3846Assert.Equal("d", fs.Declaration.Variables[0].Initializer.Value.ToString()); 3859Assert.Equal(text, file.ToString()); 3869Assert.Equal("a", cs.Identifier.ToString()); 3882Assert.Equal("b", fs.Declaration.Type.ToString()); 3885Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3890Assert.Equal("e", fs.Declaration.Variables[0].Initializer.Value.ToString()); 3903Assert.Equal(text, file.ToString()); 3913Assert.Equal("a", cs.Identifier.ToString()); 3926Assert.Equal("b", fs.Declaration.Type.ToString()); 3929Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3935Assert.Equal("{ }", fs.Declaration.Variables[0].Initializer.Value.ToString()); 3948Assert.Equal(text, file.ToString()); 3958Assert.Equal("a", cs.Identifier.ToString()); 3971Assert.Equal("b", fs.Declaration.Type.ToString()); 3976Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 3981Assert.Equal("d", fs.Declaration.Variables[1].Identifier.ToString()); 3986Assert.Equal("e", fs.Declaration.Variables[2].Identifier.ToString()); 4002Assert.Equal(text, file.ToString()); 4012Assert.Equal("a", cs.Identifier.ToString()); 4025Assert.Equal("b", fs.Declaration.Type.ToString()); 4030Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 4035Assert.Equal("x", fs.Declaration.Variables[0].Initializer.Value.ToString()); 4038Assert.Equal("d", fs.Declaration.Variables[1].Identifier.ToString()); 4043Assert.Equal("y", fs.Declaration.Variables[1].Initializer.Value.ToString()); 4046Assert.Equal("e", fs.Declaration.Variables[2].Identifier.ToString()); 4051Assert.Equal("z", fs.Declaration.Variables[2].Initializer.Value.ToString()); 4065Assert.Equal(text, file.ToString()); 4075Assert.Equal("a", cs.Identifier.ToString()); 4089Assert.Equal("b", fs.Declaration.Type.ToString()); 4092Assert.Equal("c", fs.Declaration.Variables[0].Identifier.ToString()); 4097Assert.Equal("10", fs.Declaration.Variables[0].ArgumentList.Arguments[0].ToString()); 4111Assert.Equal(text, file.ToString()); 4121Assert.Equal("a", cs.Identifier.ToString()); 4134Assert.Equal("b", ps.Type.ToString()); 4136Assert.Equal("c", ps.Identifier.ToString()); 4165Assert.Equal(text, file.ToString()); 4175Assert.Equal("a", cs.Identifier.ToString()); 4188Assert.Equal("ref b", ps.Type.ToString()); 4190Assert.Equal("c", ps.Identifier.ToString()); 4220Assert.Equal(text, file.ToString()); 4230Assert.Equal("a", cs.Identifier.ToString()); 4243Assert.Equal("ref readonly b", ps.Type.ToString()); 4245Assert.Equal("c", ps.Identifier.ToString()); 4293Assert.Equal(text, file.ToString()); 4303Assert.Equal("a", cs.Identifier.ToString()); 4316Assert.Equal(typeText, ps.Type.ToString()); 4318Assert.Equal("c", ps.Identifier.ToString()); 4347Assert.Equal(text, file.ToString()); 4357Assert.Equal("a", cs.Identifier.ToString()); 4370Assert.Equal("b", ps.Type.ToString()); 4372Assert.Equal("c", ps.Identifier.ToString()); 4401Assert.Equal(text, file.ToString()); 4411Assert.Equal("a", cs.Identifier.ToString()); 4424Assert.Equal("b", ps.Type.ToString()); 4426Assert.Equal("c", ps.Identifier.ToString()); 4446Assert.Equal("d", ps.Initializer.Value.ToString()); 4485Assert.Equal(text, file.ToString()); 4495Assert.Equal("a", cs.Identifier.ToString()); 4508Assert.Equal("b", ps.Type.ToString()); 4510Assert.Equal("c", ps.Identifier.ToString()); 4541Assert.Equal(text, file.ToString()); 4551Assert.Equal("a", cs.Identifier.ToString()); 4564Assert.Equal("b", es.Type.ToString()); 4566Assert.Equal("c", es.Identifier.ToString()); 4597Assert.Equal(text, file.ToString()); 4607Assert.Equal("a", cs.Identifier.ToString()); 4621Assert.Equal("b", ps.Type.ToString()); 4623Assert.Equal("c", ps.Identifier.ToString()); 4681Assert.Equal(text, file.ToString()); 4691Assert.Equal("a", cs.Identifier.ToString()); 4704Assert.Equal("b", ps.Type.ToString()); 4707Assert.Equal("I", ps.ExplicitInterfaceSpecifier.Name.ToString()); 4708Assert.Equal("c", ps.Identifier.ToString()); 4737Assert.Equal(text, file.ToString()); 4747Assert.Equal("a", cs.Identifier.ToString()); 4761Assert.Equal("b", es.Type.ToString()); 4763Assert.Equal("c", es.Identifier.ToString()); 4791Assert.Equal(text, file.ToString()); 4801Assert.Equal("a", cs.Identifier.ToString()); 4816Assert.Equal("b", es.Type.ToString()); 4818Assert.Equal("c", es.Identifier.ToString()); 4874Assert.Equal(text, file.ToString()); 4884Assert.Equal("a", cs.Identifier.ToString()); 4898Assert.Equal("b", es.Type.ToString()); 4901Assert.Equal("I", es.ExplicitInterfaceSpecifier.Name.ToString()); 4902Assert.Equal("c", es.Identifier.ToString()); 4931Assert.Equal(text, file.ToString()); 4941Assert.Equal("a", cs.Identifier.ToString()); 4954Assert.Equal("b", ps.Type.ToString()); 4956Assert.Equal("this", ps.ThisKeyword.ToString()); 4967Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 4969Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 4998Assert.Equal(text, file.ToString()); 5008Assert.Equal("a", cs.Identifier.ToString()); 5021Assert.Equal("ref b", ps.Type.ToString()); 5023Assert.Equal("this", ps.ThisKeyword.ToString()); 5034Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 5036Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5066Assert.Equal(text, file.ToString()); 5076Assert.Equal("a", cs.Identifier.ToString()); 5089Assert.Equal("ref readonly b", ps.Type.ToString()); 5091Assert.Equal("this", ps.ThisKeyword.ToString()); 5102Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 5104Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5133Assert.Equal(text, file.ToString()); 5143Assert.Equal("a", cs.Identifier.ToString()); 5156Assert.Equal("b", ps.Type.ToString()); 5158Assert.Equal("this", ps.ThisKeyword.ToString()); 5171Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 5173Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5178Assert.Equal("e", ps.ParameterList.Parameters[1].Type.ToString()); 5180Assert.Equal("f", ps.ParameterList.Parameters[1].Identifier.ToString()); 5209Assert.Equal(text, file.ToString()); 5219Assert.Equal("a", cs.Identifier.ToString()); 5232Assert.Equal("b", ps.Type.ToString()); 5234Assert.Equal("I", ps.ExplicitInterfaceSpecifier.Name.ToString()); 5235Assert.Equal(".", ps.ExplicitInterfaceSpecifier.DotToken.ToString()); 5236Assert.Equal("this", ps.ThisKeyword.ToString()); 5247Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 5249Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5277Assert.Equal(text, file.ToString()); 5287Assert.Equal("a", cs.Identifier.ToString()); 5300Assert.Equal("b", ps.ReturnType.ToString()); 5314Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 5316Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5321Assert.Equal("e", ps.ParameterList.Parameters[1].Type.ToString()); 5323Assert.Equal("f", ps.ParameterList.Parameters[1].Identifier.ToString()); 5357Assert.Equal(text, file.ToString()); 5367Assert.Equal("a", cs.Identifier.ToString()); 5380Assert.Equal("b", ps.ReturnType.ToString()); 5394Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 5396Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5401Assert.Equal("e", ps.ParameterList.Parameters[1].Type.ToString()); 5403Assert.Equal("f", ps.ParameterList.Parameters[1].Identifier.ToString()); 5471Assert.Equal(text, file.ToString()); 5481Assert.Equal("a", cs.Identifier.ToString()); 5494Assert.Equal("b", ps.ReturnType.ToString()); 5508Assert.Equal("c", ps.ParameterList.Parameters[0].Type.ToString()); 5510Assert.Equal("d", ps.ParameterList.Parameters[0].Identifier.ToString()); 5534Assert.Equal(text, file.ToString()); 5544Assert.Equal("a", cs.Identifier.ToString()); 5561Assert.Equal("b", ms.Type.ToString()); 5569Assert.Equal("c", ms.ParameterList.Parameters[0].Type.ToString()); 5571Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 5582Assert.Equal(text, file.ToString()); 5592Assert.Equal("a", cs.Identifier.ToString()); 5609Assert.Equal("b", ms.Type.ToString()); 5617Assert.Equal("c", ms.ParameterList.Parameters[0].Type.ToString()); 5619Assert.Equal("d", ms.ParameterList.Parameters[0].Identifier.ToString()); 5631Assert.Equal(text, file.ToString()); 5643Assert.Equal(text, file.ToString()); 5655Assert.Equal(text, file.ToString()); 5882Assert.Equal(text, file.ToFullString());
Parsing\DeconstructionTests.cs (2)
1883Assert.Equal("(T, T)[]", declaration.Type.ToString()); 1884Assert.Equal("id", declaration.Variables.ToString());
Parsing\ExpressionParsingTests.cs (252)
39Assert.Equal(text, expr.ToString()); 421Assert.Equal("Text with ", expr.Contents[0].ToString()); 422Assert.Equal(" parts and new line expressions!", expr.Contents[2].ToString()); 434Assert.Equal(text, expr.ToString()); 446Assert.Equal(text, expr.ToString()); 532Assert.Equal("\"stuff\"", us.Token.ValueText); 571Assert.Equal(text, expr.ToString()); 578Assert.Equal("a", us.Operand.ToString()); 602Assert.Equal(text, expr.ToString()); 609Assert.Equal("a", us.Operand.ToString()); 628Assert.Equal(text, expr.ToString()); 635Assert.Equal("(a)", b.Left.ToString()); 636Assert.Equal("b", b.Right.ToString()); 674Assert.Equal(text, expr.ToString()); 681Assert.Equal("(a)", a.Left.ToString()); 682Assert.Equal("b", a.Right.ToString()); 709Assert.Equal(text, expr.ToString()); 716Assert.Equal("(a)", e.Expression.ToString()); 717Assert.Equal("b", e.Name.ToString()); 734Assert.Equal(text, expr.ToString()); 738Assert.Equal("a.b", e.Expression.ToString()); 739Assert.Equal(".c.d?[1]?.e()?.f", e.WhenNotNull.ToString()); 767Assert.Equal(text, expr.ToString()); 771Assert.Equal("a.b", e.Expression.ToString()); 773Assert.Equal(".c.d?[1]?.e()?.f", cons.ToString()); 777Assert.Equal(".c.d", e.Expression.ToString()); 779Assert.Equal("[1]?.e()?.f", cons.ToString()); 783Assert.Equal("[1]", e.Expression.ToString()); 785Assert.Equal(".e()?.f", cons.ToString()); 789Assert.Equal(".e()", e.Expression.ToString()); 791Assert.Equal(".f", cons.ToString()); 807Assert.Equal("a", arg.ToString()); 818Assert.Equal(text, expr.ToString()); 881Assert.Equal(text, expr.ToString()); 890Assert.Equal("a", fs.Expression.ToString()); 891Assert.Equal("b", fs.Type.ToString()); 902Assert.Equal(text, expr.ToString()); 909Assert.Equal("a", ts.Condition.ToString()); 910Assert.Equal("b", ts.WhenTrue.ToString()); 911Assert.Equal("c", ts.WhenFalse.ToString()); 932Assert.Equal(text, expr.ToString()); 941Assert.Equal("a", cs.Type.ToString()); 942Assert.Equal("b", cs.Expression.ToString()); 953Assert.Equal(text, expr.ToString()); 962Assert.Equal("a", cs.Expression.ToString()); 963Assert.Equal("b", cs.ArgumentList.Arguments[0].ToString()); 974Assert.Equal(text, expr.ToString()); 983Assert.Equal("a", cs.Expression.ToString()); 984Assert.Equal("ref b", cs.ArgumentList.Arguments[0].ToString()); 988Assert.Equal("b", cs.ArgumentList.Arguments[0].Expression.ToString()); 999Assert.Equal(text, expr.ToString()); 1008Assert.Equal("a", cs.Expression.ToString()); 1009Assert.Equal("out b", cs.ArgumentList.Arguments[0].ToString()); 1013Assert.Equal("b", cs.ArgumentList.Arguments[0].Expression.ToString()); 1024Assert.Equal(text, expr.ToString()); 1033Assert.Equal("a", cs.Expression.ToString()); 1034Assert.Equal("B: b", cs.ArgumentList.Arguments[0].ToString()); 1036Assert.Equal("B", cs.ArgumentList.Arguments[0].NameColon.Name.ToString()); 1038Assert.Equal("b", cs.ArgumentList.Arguments[0].Expression.ToString()); 1049Assert.Equal(text, expr.ToString()); 1058Assert.Equal("a", ea.Expression.ToString()); 1059Assert.Equal("b", ea.ArgumentList.Arguments[0].ToString()); 1070Assert.Equal(text, expr.ToString()); 1079Assert.Equal("a", ea.Expression.ToString()); 1080Assert.Equal("ref b", ea.ArgumentList.Arguments[0].ToString()); 1084Assert.Equal("b", ea.ArgumentList.Arguments[0].Expression.ToString()); 1095Assert.Equal(text, expr.ToString()); 1104Assert.Equal("a", ea.Expression.ToString()); 1105Assert.Equal("out b", ea.ArgumentList.Arguments[0].ToString()); 1109Assert.Equal("b", ea.ArgumentList.Arguments[0].Expression.ToString()); 1120Assert.Equal(text, expr.ToString()); 1129Assert.Equal("a", ea.Expression.ToString()); 1130Assert.Equal("B: b", ea.ArgumentList.Arguments[0].ToString()); 1141Assert.Equal(text, expr.ToString()); 1151Assert.Equal("a", oc.Type.ToString()); 1163Assert.Equal(text, expr.ToString()); 1172Assert.Equal("b", oc.ArgumentList.Arguments[0].ToString()); 1174Assert.Equal("a", oc.Type.ToString()); 1186Assert.Equal(text, expr.ToString()); 1195Assert.Equal("B: b", oc.ArgumentList.Arguments[0].ToString()); 1197Assert.Equal("a", oc.Type.ToString()); 1209Assert.Equal(text, expr.ToString()); 1219Assert.Equal("a", oc.Type.ToString()); 1237Assert.Equal(text, expr.ToString()); 1242Assert.Equal("a", oc.Type.ToString()); 1260Assert.Equal(text, expr.ToString()); 1265Assert.Equal("a", oc.Type.ToString()); 1273Assert.Equal("b", oc.Initializer.Expressions[0].ToString()); 1284Assert.Equal(text, expr.ToString()); 1289Assert.Equal("a", oc.Type.ToString()); 1297Assert.Equal("b", oc.Initializer.Expressions[0].ToString()); 1298Assert.Equal("c", oc.Initializer.Expressions[1].ToString()); 1299Assert.Equal("d", oc.Initializer.Expressions[2].ToString()); 1310Assert.Equal(text, expr.ToString()); 1315Assert.Equal("a", oc.Type.ToString()); 1323Assert.Equal("B = b", oc.Initializer.Expressions[0].ToString()); 1334Assert.Equal(text, expr.ToString()); 1339Assert.Equal("a", oc.Type.ToString()); 1347Assert.Equal("B = { X = x }", oc.Initializer.Expressions[0].ToString()); 1350Assert.Equal("B", b.Left.ToString()); 1362Assert.Equal(text, expr.ToString()); 1366Assert.Equal("a[1]", ac.Type.ToString()); 1840Assert.Equal(text, expr.ToString()); 1844Assert.Equal("a[]", ac.Type.ToString()); 1851Assert.Equal("b", ac.Initializer.Expressions[0].ToString()); 1862Assert.Equal(text, expr.ToString()); 1866Assert.Equal("a[]", ac.Type.ToString()); 1873Assert.Equal("b", ac.Initializer.Expressions[0].ToString()); 1874Assert.Equal("c", ac.Initializer.Expressions[1].ToString()); 1875Assert.Equal("d", ac.Initializer.Expressions[2].ToString()); 1886Assert.Equal(text, expr.ToString()); 1890Assert.Equal("a[][,][,,]", ac.Type.ToString()); 1897Assert.Equal("b", ac.Initializer.Expressions[0].ToString()); 1908Assert.Equal(text, expr.ToString()); 1917Assert.Equal("b", ac.Initializer.Expressions[0].ToString()); 1928Assert.Equal(text, expr.ToString()); 1937Assert.Equal("a", ac.Initializers[0].ToString()); 1938Assert.Equal("b", ac.Initializers[1].ToString()); 1949Assert.Equal(text, expr.ToString()); 1962Assert.Equal("int a", am.ParameterList.Parameters[0].ToString()); 1980Assert.Equal(text, expr.ToString()); 2010Assert.Equal(text, expr.ToString()); 2035Assert.Equal(text, expr.ToString()); 2040Assert.Equal("a", lambda.Parameter.Identifier.ToString()); 2042Assert.Equal("b", lambda.Body.ToString()); 2053Assert.Equal(text, expr.ToString()); 2058Assert.Equal("a", lambda.Parameter.Identifier.ToString()); 2060Assert.Equal("ref b", lambda.Body.ToString()); 2071Assert.Equal(text, expr.ToString()); 2076Assert.Equal("a", lambda.Parameter.Identifier.ToString()); 2080Assert.Equal("{ }", lambda.Body.ToString()); 2091Assert.Equal(text, expr.ToString()); 2100Assert.Equal("b", lambda.Body.ToString()); 2111Assert.Equal(text, expr.ToString()); 2120Assert.Equal("ref b", lambda.Body.ToString()); 2131Assert.Equal(text, expr.ToString()); 2142Assert.Equal("{ }", lambda.Body.ToString()); 2153Assert.Equal(text, expr.ToString()); 2164Assert.Equal("a", ps.Identifier.ToString()); 2166Assert.Equal("b", lambda.Body.ToString()); 2177Assert.Equal(text, expr.ToString()); 2188Assert.Equal("a", ps.Identifier.ToString()); 2191Assert.Equal("a2", ps2.Identifier.ToString()); 2193Assert.Equal("b", lambda.Body.ToString()); 2204Assert.Equal(text, expr.ToString()); 2215Assert.Equal("T", ps.Type.ToString()); 2216Assert.Equal("a", ps.Identifier.ToString()); 2218Assert.Equal("b", lambda.Body.ToString()); 2229Assert.Equal(text, expr.ToString()); 2240Assert.Equal("T", ps.Type.ToString()); 2241Assert.Equal("a", ps.Identifier.ToString()); 2245Assert.Equal("b", lambda.Body.ToString()); 2256Assert.Equal(text, expr.ToString()); 2276Assert.Equal(text, expr.ToString()); 2286Assert.Equal("arg2", tuple.Arguments[1].NameColon.Name.ToString()); 2297Assert.Equal(text, expr.ToString()); 2308Assert.Equal("a", fs.Identifier.ToString()); 2311Assert.Equal("A", fs.Expression.ToString()); 2318Assert.Equal("b", ss.Expression.ToString()); 2330Assert.Equal(text, expr.ToString()); 2341Assert.Equal("T", fs.Type.ToString()); 2342Assert.Equal("a", fs.Identifier.ToString()); 2345Assert.Equal("A", fs.Expression.ToString()); 2351Assert.Equal("b", ss.Expression.ToString()); 2363Assert.Equal(text, expr.ToString()); 2375Assert.Equal("a", fs.Identifier.ToString()); 2378Assert.Equal("A", fs.Expression.ToString()); 2384Assert.Equal("b", ss.Expression.ToString()); 2391Assert.Equal("c", qs.Body.Continuation.Identifier.ToString()); 2401Assert.Equal("d", ss.Expression.ToString()); 2414Assert.Equal(text, expr.ToString()); 2425Assert.Equal("a", fs.Identifier.ToString()); 2428Assert.Equal("A", fs.Expression.ToString()); 2436Assert.Equal("b", ws.Condition.ToString()); 2442Assert.Equal("c", ss.Expression.ToString()); 2454Assert.Equal(text, expr.ToString()); 2465Assert.Equal("a", fs.Identifier.ToString()); 2468Assert.Equal("A", fs.Expression.ToString()); 2476Assert.Equal("b", fs.Identifier.ToString()); 2479Assert.Equal("B", fs.Expression.ToString()); 2485Assert.Equal("c", ss.Expression.ToString()); 2497Assert.Equal(text, expr.ToString()); 2508Assert.Equal("a", fs.Identifier.ToString()); 2511Assert.Equal("A", fs.Expression.ToString()); 2520Assert.Equal("b", ls.Identifier.ToString()); 2524Assert.Equal("B", ls.Expression.ToString()); 2530Assert.Equal("c", ss.Expression.ToString()); 2542Assert.Equal(text, expr.ToString()); 2553Assert.Equal("a", fs.Identifier.ToString()); 2556Assert.Equal("A", fs.Expression.ToString()); 2569Assert.Equal("b", os.Expression.ToString()); 2575Assert.Equal("c", ss.Expression.ToString()); 2587Assert.Equal(text, expr.ToString()); 2598Assert.Equal("a", fs.Identifier.ToString()); 2601Assert.Equal("A", fs.Expression.ToString()); 2613Assert.Equal("b", os.Expression.ToString()); 2618Assert.Equal("b2", os.Expression.ToString()); 2624Assert.Equal("c", ss.Expression.ToString()); 2636Assert.Equal(text, expr.ToString()); 2647Assert.Equal("a", fs.Identifier.ToString()); 2650Assert.Equal("A", fs.Expression.ToString()); 2666Assert.Equal("b", os.Expression.ToString()); 2672Assert.Equal("c", ss.Expression.ToString()); 2684Assert.Equal(text, expr.ToString()); 2695Assert.Equal("a", fs.Identifier.ToString()); 2698Assert.Equal("A", fs.Expression.ToString()); 2714Assert.Equal("b", os.Expression.ToString()); 2720Assert.Equal("c", ss.Expression.ToString()); 2732Assert.Equal(text, expr.ToString()); 2742Assert.Equal("a", fs.Identifier.ToString()); 2745Assert.Equal("A", fs.Expression.ToString()); 2753Assert.Equal("b", gbs.GroupExpression.ToString()); 2758Assert.Equal("c", gbs.ByExpression.ToString()); 2771Assert.Equal(text, expr.ToString()); 2781Assert.Equal("a", fs.Identifier.ToString()); 2784Assert.Equal("A", fs.Expression.ToString()); 2791Assert.Equal("b", gbs.GroupExpression.ToString()); 2795Assert.Equal("c", gbs.ByExpression.ToString()); 2801Assert.Equal("d", qs.Body.Continuation.Identifier.ToString()); 2811Assert.Equal("e", ss.Expression.ToString()); 2824Assert.Equal(text, expr.ToString()); 2835Assert.Equal("a", fs.Identifier.ToString()); 2838Assert.Equal("A", fs.Expression.ToString()); 2847Assert.Equal("b", js.Identifier.ToString()); 2851Assert.Equal("B", js.InExpression.ToString()); 2856Assert.Equal("a", js.LeftExpression.ToString()); 2861Assert.Equal("b", js.RightExpression.ToString()); 2868Assert.Equal("c", ss.Expression.ToString()); 2880Assert.Equal(text, expr.ToString()); 2891Assert.Equal("Ta", fs.Type.ToString()); 2892Assert.Equal("a", fs.Identifier.ToString()); 2895Assert.Equal("A", fs.Expression.ToString()); 2902Assert.Equal("Tb", js.Type.ToString()); 2904Assert.Equal("b", js.Identifier.ToString()); 2908Assert.Equal("B", js.InExpression.ToString()); 2912Assert.Equal("a", js.LeftExpression.ToString()); 2916Assert.Equal("b", js.RightExpression.ToString()); 2923Assert.Equal("c", ss.Expression.ToString()); 2935Assert.Equal(text, expr.ToString()); 2946Assert.Equal("a", fs.Identifier.ToString()); 2949Assert.Equal("A", fs.Expression.ToString()); 2957Assert.Equal("b", js.Identifier.ToString()); 2961Assert.Equal("B", js.InExpression.ToString()); 2965Assert.Equal("a", js.LeftExpression.ToString()); 2969Assert.Equal("b", js.RightExpression.ToString()); 2974Assert.Equal("c", js.Into.Identifier.ToString()); 2980Assert.Equal("d", ss.Expression.ToString()); 2992Assert.Equal(text, expr.ToString()); 3001Assert.Equal("x", gs.GroupExpression.ToString()); 3002Assert.Equal("y", gs.ByExpression.ToString()); 3043Assert.Equal(text, expr.ToString()); 4765Assert.Equal(text, expr.ToString());
Parsing\InterpolatedStringExpressionTests.cs (2)
15Assert.Equal("$\"\"", SyntaxFactory.InterpolatedStringExpression(SyntaxFactory.Token(SyntaxKind.InterpolatedStringStartToken)).ToFullString()); 21Assert.Equal("$\"goo\"", SyntaxFactory.InterpolatedStringExpression(
Parsing\InterpolationTests.cs (2)
14Assert.Equal("{a}", SyntaxFactory.Interpolation(SyntaxFactory.IdentifierName("a")).ToFullString()); 20Assert.Equal("{a,b:c}", SyntaxFactory.Interpolation(
Parsing\LocalFunctionParsingTests.cs (4)
1351Assert.Equal("int", s1.ReturnType.ToString()); 1352Assert.Equal("local", s1.Identifier.ToString()); 1361Assert.Equal("int", s1.ReturnType.ToString()); 1362Assert.Equal("local", s1.Identifier.ToString());
Parsing\NameParsingTests.cs (50)
39Assert.Equal(text, name.ToString()); 52Assert.Equal(text, name.ToFullString()); 66Assert.Equal(string.Empty, name.ToString()); 81Assert.Equal(string.Empty, name.ToString()); 96Assert.Equal(string.Empty, name.ToString()); 111Assert.Equal(string.Empty, name.ToString()); 124Assert.Equal(text, name.ToString()); 139Assert.Equal(text, name.ToString()); 152Assert.Equal(text, name.ToString()); 165Assert.Equal(text, name.ToString()); 194Assert.Equal(text, name.ToString()); 215Assert.Equal(text, name.ToString()); 231Assert.Equal(text, name.ToString()); 249Assert.Equal(text, name.ToString()); 308Assert.Equal(text, name.ToString()); 325Assert.Equal(text, name.ToString()); 339Assert.Equal(text, name.ToString()); 353Assert.Equal(text, name.ToString()); 370Assert.Equal(text, name.ToString()); 389Assert.Equal(text, name.ToString()); 449Assert.Equal(text, name.ToString()); 478Assert.Equal(text, tname.ToString()); 491Assert.Equal(text, tname.ToString()); 506Assert.Equal(text, tname.ToString()); 520Assert.Equal(text, tname.ToString()); 546Assert.Equal(text, tname.ToString()); 568Assert.Equal(text, tname.ToString()); 590Assert.Equal(text, tname.ToString()); 621Assert.Equal(text, tname.ToString()); 625Assert.Equal("goo", gname.Identifier.ToString()); 636Assert.Equal(text, tname.ToString()); 646Assert.Equal(text, tname.ToString()); 650Assert.Equal("goo", gname.Identifier.ToString()); 661Assert.Equal(text, tname.ToString()); 672Assert.Equal(text, tname.ToString()); 676Assert.Equal("goo", gname.Identifier.ToString()); 687Assert.Equal(text, tname.ToString()); 698Assert.Equal(text, tname.ToString()); 702Assert.Equal("goo", gname.Identifier.ToString()); 719Assert.Equal(text, tname.ToString()); 730Assert.Equal(text, tname.ToString()); 734Assert.Equal("goo", gname.Identifier.ToString()); 745Assert.Equal(text, tname.ToString()); 755Assert.Equal(text, tname.ToString()); 759Assert.Equal("goo", gname.Identifier.ToString()); 771Assert.Equal(text, tname.ToString()); 782Assert.Equal(text, tok.ToString()); 784Assert.Equal("\u0915\u094d\u0937", tok.ValueText); //formatting character \u200d removed 798Assert.Equal(text, tok.ToString()); 800Assert.Equal("xy", tok.ValueText); // formatting character SOFT HYPHEN (U+00AD) removed
Parsing\ParserErrorMessageTests.cs (1)
2634Assert.Equal("error CS1029: #error: '\u0444\u0430\u0439\u043B'", CSharpDiagnosticFormatter.Instance.Format(error.WithLocation(Location.None), EnsureEnglishUICulture.PreferredOrNull));
Parsing\ParserRegressionTests.cs (6)
227Assert.Equal("202", actualErrors.Count().ToString()); 228Assert.Equal("(1,1201): error CS1056: Unexpected character '\\u003C'", actualErrors.ElementAt(200).ToString(EnsureEnglishUICulture.PreferredOrNull)); 229Assert.Equal("(1,1207): error CS1056: Unexpected character '\\u003E\\u003E\\u003E\\u003E'", actualErrors.ElementAt(201).ToString(EnsureEnglishUICulture.PreferredOrNull)); 245Assert.Equal("202", actualErrors.Count().ToString()); 246Assert.Equal("(1,2001): error CS1056: Unexpected character '\\U0000003C'", actualErrors.ElementAt(200).ToString(EnsureEnglishUICulture.PreferredOrNull)); 247Assert.Equal("(1,2011): error CS1056: Unexpected character '\\u003E\\u003E\\u003E\\u003E'", actualErrors.ElementAt(201).ToString(EnsureEnglishUICulture.PreferredOrNull));
Parsing\ParsingErrorRecoveryTests.cs (337)
241Assert.Equal(text, file.ToFullString()); 256Assert.Equal(text, file.ToFullString()); 272Assert.Equal(text, file.ToFullString()); 288Assert.Equal(text, file.ToFullString()); 304Assert.Equal(text, file.ToFullString()); 320Assert.Equal(text, file.ToFullString()); 335Assert.Equal(text, file.ToFullString()); 350Assert.Equal(text, file.ToFullString()); 365Assert.Equal(text, file.ToFullString()); 381Assert.Equal(text, file.ToFullString()); 397Assert.Equal(text, file.ToFullString()); 412Assert.Equal(text, file.ToFullString()); 428Assert.Equal(text, file.ToFullString()); 449Assert.Equal(text, file.ToFullString()); 465Assert.Equal(text, file.ToFullString()); 481Assert.Equal(text, file.ToFullString()); 497Assert.Equal(text, file.ToFullString()); 513Assert.Equal(text, file.ToFullString()); 527Assert.Equal(text, file.ToFullString()); 541Assert.Equal(text, file.ToFullString()); 555Assert.Equal(text, file.ToFullString()); 570Assert.Equal(text, file.ToFullString()); 598Assert.Equal(text, file.ToFullString()); 608Assert.Equal(text, file.ToFullString()); 624Assert.Equal(text, file.ToFullString()); 639Assert.Equal(text, file.ToFullString()); 654Assert.Equal(text, file.ToFullString()); 668Assert.Equal(text, file.ToFullString()); 683Assert.Equal(text, file.ToFullString()); 698Assert.Equal(text, file.ToFullString()); 714Assert.Equal(text, file.ToFullString()); 731Assert.Equal(text, file.ToFullString()); 749Assert.Equal(text, file.ToFullString()); 765Assert.Equal(text, file.ToFullString()); 779Assert.Equal(text, file.ToFullString()); 793Assert.Equal(text, file.ToFullString()); 807Assert.Equal(text, file.ToFullString()); 821Assert.Equal(text, file.ToFullString()); 835Assert.Equal(text, file.ToFullString()); 845Assert.Equal(text, file.ToFullString()); 858Assert.Equal(text, file.ToFullString()); 875Assert.Equal(text, file.ToFullString()); 891Assert.Equal(text, file.ToFullString()); 908Assert.Equal(text, file.ToFullString()); 925Assert.Equal(text, file.ToFullString()); 940Assert.Equal(text, file.ToFullString()); 954Assert.Equal(text, file.ToFullString()); 969Assert.Equal(text, file.ToFullString()); 984Assert.Equal(text, file.ToFullString()); 998Assert.Equal(text, file.ToFullString()); 1011Assert.Equal(text, file.ToFullString()); 1025Assert.Equal(text, file.ToFullString()); 1038Assert.Equal(text, file.ToFullString()); 1052Assert.Equal(text, file.ToFullString()); 1066Assert.Equal(text, file.ToFullString()); 1079Assert.Equal(text, file.ToFullString()); 1093Assert.Equal(text, file.ToFullString()); 1106Assert.Equal(text, file.ToFullString()); 1120Assert.Equal(text, file.ToFullString()); 1136Assert.Equal(text, file.ToFullString()); 1151Assert.Equal(text, file.ToFullString()); 1165Assert.Equal(text, file.ToFullString()); 1179Assert.Equal(text, file.ToFullString()); 1195Assert.Equal(text, file.ToFullString()); 1210Assert.Equal(text, file.ToFullString()); 1224Assert.Equal(text, file.ToFullString()); 1238Assert.Equal(text, file.ToFullString()); 1255Assert.Equal(text, file.ToFullString()); 1271Assert.Equal(text, file.ToFullString()); 1286Assert.Equal(text, file.ToFullString()); 1300Assert.Equal(text, file.ToFullString()); 1315Assert.Equal(text, file.ToFullString()); 1330Assert.Equal(text, file.ToFullString()); 1344Assert.Equal(text, file.ToFullString()); 1359Assert.Equal(text, file.ToFullString()); 1374Assert.Equal(text, file.ToFullString()); 1388Assert.Equal(text, file.ToFullString()); 1406Assert.Equal(text, file.ToFullString()); 1423Assert.Equal(text, file.ToFullString()); 1441Assert.Equal(text, file.ToFullString()); 1456Assert.Equal(text, file.ToFullString()); 1470Assert.Equal(text, file.ToFullString()); 1485Assert.Equal(text, file.ToFullString()); 1500Assert.Equal(text, file.ToFullString()); 1514Assert.Equal(text, file.ToFullString()); 1529Assert.Equal(text, file.ToFullString()); 1547Assert.Equal(text, file.ToFullString()); 1565Assert.Equal(text, file.ToFullString()); 1584Assert.Equal(text, file.ToFullString()); 1604Assert.Equal(text, file.ToFullString()); 1623Assert.Equal(text, file.ToFullString()); 1643Assert.Equal(text, file.ToFullString()); 1660Assert.Equal(text, file.ToFullString()); 1677Assert.Equal(text, file.ToFullString()); 1695Assert.Equal(text, file.ToFullString()); 1713Assert.Equal(text, file.ToFullString()); 1732Assert.Equal(text, file.ToFullString()); 1750Assert.Equal(text, file.ToFullString()); 1770Assert.Equal(text, file.ToFullString()); 1787Assert.Equal(text, file.ToFullString()); 1804Assert.Equal(text, file.ToFullString()); 1822Assert.Equal(text, file.ToFullString()); 1839Assert.Equal(text, file.ToFullString()); 1858Assert.Equal(text, file.ToFullString()); 1877Assert.Equal(text, file.ToFullString()); 1897Assert.Equal(text, file.ToFullString()); 1916Assert.Equal(text, file.ToFullString()); 1937Assert.Equal(text, file.ToFullString()); 1955Assert.Equal(text, file.ToFullString()); 1972Assert.Equal(text, file.ToFullString()); 1989Assert.Equal(text, file.ToFullString()); 2006Assert.Equal(text, file.ToFullString()); 2021Assert.Equal(text, file.ToFullString()); 2060Assert.Equal(text, file.ToFullString()); 2080Assert.Equal(text, file.ToFullString()); 2099Assert.Equal(text, file.ToFullString()); 2120Assert.Equal(text, file.ToFullString()); 2138Assert.Equal(text, file.ToFullString()); 2169Assert.Equal(text, file.ToFullString()); 2187Assert.Equal(text, file.ToFullString()); 2204Assert.Equal(text, file.ToFullString()); 2223Assert.Equal(text, file.ToFullString()); 2263Assert.Equal(text, file.ToFullString()); 2284Assert.Equal(text, file.ToFullString()); 2304Assert.Equal(text, file.ToFullString()); 2326Assert.Equal(text, file.ToFullString()); 2345Assert.Equal(text, file.ToFullString()); 2363Assert.Equal(text, file.ToFullString()); 2380Assert.Equal(text, file.ToFullString()); 2396Assert.Equal(text, file.ToFullString()); 2411Assert.Equal(text, file.ToFullString()); 2427Assert.Equal(text, file.ToFullString()); 2442Assert.Equal(text, file.ToFullString()); 2456Assert.Equal(text, file.ToFullString()); 2473Assert.Equal(text, file.ToFullString()); 2492Assert.Equal(text, file.ToFullString()); 2510Assert.Equal(text, file.ToFullString()); 2527Assert.Equal(text, file.ToFullString()); 2543Assert.Equal(text, file.ToFullString()); 2560Assert.Equal(text, file.ToFullString()); 2576Assert.Equal(text, file.ToFullString()); 2591Assert.Equal(text, file.ToFullString()); 2609Assert.Equal(text, file.ToFullString()); 2623Assert.Equal(text, file.ToFullString()); 2638Assert.Equal(text, file.ToFullString()); 2652Assert.Equal(text, file.ToFullString()); 2668Assert.Equal(text, file.ToFullString()); 2682Assert.Equal(text, file.ToFullString()); 2696Assert.Equal(text, file.ToFullString()); 2710Assert.Equal(text, file.ToFullString()); 2724Assert.Equal(text, file.ToFullString()); 2738Assert.Equal(text, file.ToFullString()); 2752Assert.Equal(text, file.ToFullString()); 2767Assert.Equal(text, file.ToFullString()); 2782Assert.Equal(text, file.ToFullString()); 2796Assert.Equal(text, file.ToFullString()); 2810Assert.Equal(text, file.ToFullString()); 2824Assert.Equal(text, file.ToFullString()); 2839Assert.Equal(text, file.ToFullString()); 2854Assert.Equal(text, file.ToFullString()); 2869Assert.Equal(text, file.ToFullString()); 2886Assert.Equal(text, file.ToFullString()); 2902Assert.Equal(text, file.ToFullString()); 2920Assert.Equal(text, file.ToFullString()); 2936Assert.Equal(text, file.ToFullString()); 2952Assert.Equal(text, file.ToFullString()); 2968Assert.Equal(text, file.ToFullString()); 2984Assert.Equal(text, file.ToFullString()); 3000Assert.Equal(text, file.ToFullString()); 3018Assert.Equal(text, file.ToFullString()); 3036Assert.Equal(text, file.ToFullString()); 3059Assert.Equal(text, file.ToFullString()); 3083Assert.Equal(text, file.ToFullString()); 3107Assert.Equal(text, file.ToFullString()); 3129Assert.Equal(text, file.ToFullString()); 3152Assert.Equal(text, file.ToFullString()); 3175Assert.Equal(text, file.ToFullString()); 3198Assert.Equal(text, file.ToFullString()); 3221Assert.Equal(text, file.ToFullString()); 3244Assert.Equal(text, file.ToFullString()); 3265Assert.Equal(text, file.ToFullString()); 3286Assert.Equal(text, file.ToFullString()); 3307Assert.Equal(text, file.ToFullString()); 3328Assert.Equal(text, file.ToFullString()); 3349Assert.Equal(text, file.ToFullString()); 3370Assert.Equal(text, file.ToFullString()); 3392Assert.Equal(text, file.ToFullString()); 3415Assert.Equal(text, file.ToFullString()); 3438Assert.Equal(text, file.ToFullString()); 3461Assert.Equal(text, file.ToFullString()); 3485Assert.Equal(text, file.ToFullString()); 3508Assert.Equal(text, file.ToFullString()); 3531Assert.Equal(text, file.ToFullString()); 3558Assert.Equal("", ie.ArgumentList.CloseParenToken.ToFullString()); 3559Assert.Equal("\t\t\t} ", md.Body.CloseBraceToken.ToFullString()); 3574Assert.Equal(text, file.ToFullString()); 3599Assert.Equal(text, file.ToFullString()); 3624Assert.Equal(text, file.ToFullString()); 3650Assert.Equal(text, file.ToFullString()); 3674Assert.Equal(text, file.ToFullString()); 3698Assert.Equal(text, file.ToFullString()); 3723Assert.Equal(text, file.ToFullString()); 3747Assert.Equal(text, file.ToFullString()); 3771Assert.Equal(text, file.ToFullString()); 3795Assert.Equal(text, file.ToFullString()); 3820Assert.Equal(text, file.ToFullString()); 3844Assert.Equal(text, file.ToFullString()); 3868Assert.Equal(text, file.ToFullString()); 3893Assert.Equal(text, file.ToFullString()); 3919Assert.Equal(text, file.ToFullString()); 3945Assert.Equal(text, file.ToFullString()); 3972Assert.Equal(text, file.ToFullString()); 3997Assert.Equal(text, file.ToFullString()); 4022Assert.Equal(text, file.ToFullString()); 4048Assert.Equal(text, file.ToFullString()); 4069Assert.Equal(text, file.ToFullString()); 4114Assert.Equal(text, file.ToFullString()); 4135Assert.Equal(text, file.ToFullString()); 4156Assert.Equal(text, file.ToFullString()); 4177Assert.Equal(text, file.ToFullString()); 4199Assert.Equal(text, file.ToFullString()); 4221Assert.Equal(text, file.ToFullString()); 4244Assert.Equal(text, file.ToFullString()); 4267Assert.Equal(text, file.ToFullString()); 4288Assert.Equal(text, file.ToFullString()); 4311Assert.Equal(text, file.ToFullString()); 4334Assert.Equal(text, file.ToFullString()); 4360Assert.Equal(text, file.ToFullString()); 4382Assert.Equal(text, file.ToFullString()); 4408Assert.Equal(text, file.ToFullString()); 4435Assert.Equal(text, file.ToFullString()); 4456Assert.Equal(text, file.ToFullString()); 4479Assert.Equal(text, file.ToFullString()); 4504Assert.Equal(text, file.ToFullString()); 4529Assert.Equal(text, file.ToFullString()); 4551Assert.Equal(text, file.ToFullString()); 4576Assert.Equal(text, file.ToFullString()); 4602Assert.Equal(text, file.ToFullString()); 4629Assert.Equal(text, file.ToFullString()); 4656Assert.Equal(text, file.ToFullString()); 4684Assert.Equal(text, file.ToFullString()); 4711Assert.Equal(text, file.ToFullString()); 4738Assert.Equal(text, file.ToFullString()); 4767Assert.Equal(text, file.ToFullString()); 4796Assert.Equal(text, file.ToFullString()); 4826Assert.Equal(text, file.ToFullString()); 4855Assert.Equal(text, file.ToFullString()); 4884Assert.Equal(text, file.ToFullString()); 4911Assert.Equal(text, file.ToFullString()); 4938Assert.Equal(text, file.ToFullString()); 4965Assert.Equal(text, file.ToFullString()); 4993Assert.Equal(text, file.ToFullString()); 5020Assert.Equal(text, file.ToFullString()); 5048Assert.Equal(text, file.ToFullString()); 5074Assert.Equal(text, file.ToFullString()); 5104Assert.Equal(text, file.ToFullString()); 5133Assert.Equal(text, file.ToFullString()); 5163Assert.Equal(text, file.ToFullString()); 5816Assert.Equal(text, file.ToFullString()); 5855Assert.Equal(text, file.ToFullString()); 5884Assert.Equal(text, file.ToFullString()); 5913Assert.Equal(text, file.ToFullString()); 5943Assert.Equal(text, file.ToFullString()); 5972Assert.Equal(text, file.ToFullString()); 6006Assert.Equal(text, file.ToFullString()); 6033Assert.Equal(text, file.ToFullString()); 6060Assert.Equal(text, file.ToFullString()); 6087Assert.Equal(text, file.ToFullString()); 6115Assert.Equal(text, file.ToFullString()); 6142Assert.Equal(text, file.ToFullString()); 6172Assert.Equal(text, file.ToFullString()); 6203Assert.Equal(text, file.ToFullString()); 6231Assert.Equal(text, file.ToFullString()); 6278Assert.Equal(text, file.ToFullString()); 6312Assert.Equal(text, file.ToFullString()); 6342Assert.Equal(text, file.ToFullString()); 6355Assert.Equal("var x = (y, ", ds.ToFullString()); 6400Assert.Equal(text, file.ToFullString()); 6424Assert.Equal(text, file.ToFullString()); 6449Assert.Equal(text, file.ToFullString()); 6484Assert.Equal(text, file.ToFullString()); 6523Assert.Equal(text, file.ToFullString()); 6562Assert.Equal(text, file.ToFullString()); 6594Assert.Equal(text, file.ToFullString()); 6625Assert.Equal(text, file.ToFullString()); 6670Assert.Equal(text, file.ToFullString()); 6714Assert.Equal(text, file.ToFullString()); 6763Assert.Equal(text, file.ToFullString()); 6811Assert.Equal(text, file.ToFullString()); 6858Assert.Equal(text, file.ToFullString()); 6910Assert.Equal(text, file.ToFullString()); 6915Assert.Equal("C1", item1.Identifier.ToString()); 6930Assert.Equal("x", decl.Declaration.Variables[0].Identifier.ToString()); 6939Assert.Equal("y", subitem2.Identifier.ToString()); 6962Assert.Equal(text, file.ToFullString()); 6973Assert.Equal(text, file.ToFullString()); 6992Assert.Equal(text, file.ToFullString()); 7017Assert.Equal(text, file.ToFullString()); 7033Assert.Equal(text, file.ToFullString()); 7058Assert.Equal(text, file.ToFullString()); 7068Assert.Equal(text, file.ToFullString()); 7083Assert.Equal(text, file.ToFullString()); 7098Assert.Equal(text, file.ToFullString()); 7122Assert.Equal(text, file.ToFullString()); 7150Assert.Equal(text, file.ToFullString()); 7181Assert.Equal(text, file.ToFullString()); 7197Assert.Equal(text, file.ToFullString()); 7213Assert.Equal(text, file.ToFullString()); 7234Assert.Equal(text, file.ToFullString()); 7252Assert.Equal(text, file.ToFullString()); 7272Assert.Equal(text, file.ToFullString()); 7298Assert.Equal(text, file.ToFullString()); 7331Assert.Equal(text, file.ToFullString()); 7356Assert.Equal(text, file.ToFullString()); 7376Assert.Equal(text, srcTree.ToFullString()); 7377Assert.Equal("foreach", srcTree.GetLastToken().ToString()); 7396Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7415Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7449Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7474Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7499Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7525Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7549Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7574Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7588Assert.Equal(text, syntaxTree.GetCompilationUnitRoot().ToFullString()); 7762Assert.Equal(source, toString); 7777Assert.Equal(source, toString); 7808Assert.Equal(source, toString); 7842Assert.Equal(source, toString); 7867Assert.Equal(source, toString); 7894Assert.Equal(source, toString); 7908Assert.Equal(source, toString); 7935Assert.Equal(source, root.ToFullString()); 7956Assert.Equal(source, root.ToFullString()); 7977Assert.Equal(source, root.ToFullString()); 8000Assert.Equal(source, root.ToFullString()); 8024Assert.Equal(source, root.ToFullString());
Parsing\ParsingTests.cs (3)
113Assert.Equal(text, node.ToFullString()); 135Assert.Equal(text, node.ToFullString()); 211Assert.Equal(current.ToString(), value);
Parsing\RoundTrippingTests.cs (6)
31Assert.Equal(text, toText); 57Assert.Equal(text, toText); 105Assert.Equal(text, toText); 1584Assert.Equal(text, newTest); 1593Assert.Equal(text, typeOfExpression.ToFullString()); 1597Assert.Equal("typeof(System.String ", typeOfExpression.ToFullString());
Parsing\ScriptParsingTests.cs (2)
39Assert.Equal(text, parsedText.ToFullString()); 9742Assert.Equal(expectedSkippedText, skippedText.ToString());
Parsing\StatementParsingTests.cs (287)
60Assert.Equal(text, statement.ToString()); 67Assert.Equal("a()", es.Expression.ToString()); 80Assert.Equal(text, statement.ToString()); 87Assert.Equal("a.b()", es.Expression.ToString()); 100Assert.Equal(text, statement.ToString()); 106Assert.Equal("a<b>()", es.Expression.ToString()); 119Assert.Equal(text, statement.ToString()); 126Assert.Equal("a<b>.c()", es.Expression.ToString()); 139Assert.Equal(text, statement.ToString()); 146Assert.Equal("a.b<c>()", es.Expression.ToString()); 158Assert.Equal(text, statement.ToString()); 169Assert.Equal("a", us.Operand.ToString()); 189Assert.Equal(text, statement.ToString()); 195Assert.Equal("T", ds.Declaration.Type.ToString()); 199Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 217Assert.Equal(text, statement.ToString()); 223Assert.Equal("var", ds.Declaration.Type.ToString()); 229Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 247Assert.Equal(text, statement.ToString()); 253Assert.Equal("(int, int)", ds.Declaration.Type.ToString()); 263Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 281Assert.Equal(text, statement.ToString()); 287Assert.Equal("(T x, (U k, V l, W m) y)", ds.Declaration.Type.ToString()); 293Assert.Equal("y", tt.Elements[1].Identifier.ToString()); 298Assert.Equal("(U k, V l, W m)", tt.ToString()); 300Assert.Equal("l", tt.Elements[1].Identifier.ToString()); 304Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 322Assert.Equal(text, statement.ToString()); 328Assert.Equal("dynamic", ds.Declaration.Type.ToString()); 334Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 350Assert.Equal(text, statement.ToString()); 356Assert.Equal("T<a>", ds.Declaration.Type.ToString()); 360Assert.Equal("b", ds.Declaration.Variables[0].Identifier.ToString()); 376Assert.Equal(text, statement.ToString()); 382Assert.Equal("T.X.Y", ds.Declaration.Type.ToString()); 386Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 402Assert.Equal(text, statement.ToString()); 408Assert.Equal("T<t>.X<x>.Y<y>", ds.Declaration.Type.ToString()); 412Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 428Assert.Equal(text, statement.ToString()); 434Assert.Equal("T[][,][,,]", ds.Declaration.Type.ToString()); 438Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 454Assert.Equal(text, statement.ToString()); 460Assert.Equal("T*", ds.Declaration.Type.ToString()); 464Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 480Assert.Equal(text, statement.ToString()); 486Assert.Equal("T?", ds.Declaration.Type.ToString()); 490Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 506Assert.Equal(text, statement.ToString()); 512Assert.Equal("T", ds.Declaration.Type.ToString()); 516Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 521Assert.Equal("b", ds.Declaration.Variables[1].Identifier.ToString()); 526Assert.Equal("c", ds.Declaration.Variables[2].Identifier.ToString()); 541Assert.Equal(text, statement.ToString()); 547Assert.Equal("T", ds.Declaration.Type.ToString()); 551Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 557Assert.Equal("b", ds.Declaration.Variables[0].Initializer.Value.ToString()); 571Assert.Equal(text, statement.ToString()); 577Assert.Equal("T", ds.Declaration.Type.ToString()); 581Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 586Assert.Equal("va", ds.Declaration.Variables[0].Initializer.Value.ToString()); 589Assert.Equal("b", ds.Declaration.Variables[1].Identifier.ToString()); 594Assert.Equal("vb", ds.Declaration.Variables[1].Initializer.Value.ToString()); 597Assert.Equal("c", ds.Declaration.Variables[2].Identifier.ToString()); 602Assert.Equal("vc", ds.Declaration.Variables[2].Initializer.Value.ToString()); 616Assert.Equal(text, statement.ToString()); 622Assert.Equal("T", ds.Declaration.Type.ToString()); 626Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 633Assert.Equal("{b, c}", ds.Declaration.Variables[0].Initializer.Value.ToString()); 647Assert.Equal(text, statement.ToString()); 654Assert.Equal("T", ds.Declaration.Type.ToString()); 658Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 664Assert.Equal("b", ds.Declaration.Variables[0].Initializer.Value.ToString()); 678Assert.Equal(text, statement.ToString()); 686Assert.Equal("T", ds.Declaration.Type.ToString()); 690Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 696Assert.Equal("b", ds.Declaration.Variables[0].Initializer.Value.ToString()); 710Assert.Equal(text, statement.ToString()); 718Assert.Equal("T", ds.Declaration.Type.ToString()); 722Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 728Assert.Equal("b", ds.Declaration.Variables[0].Initializer.Value.ToString()); 742Assert.Equal(text, statement.ToString()); 750Assert.Equal("T", ds.Declaration.Type.ToString()); 754Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 760Assert.Equal("b", ds.Declaration.Variables[0].Initializer.Value.ToString()); 774Assert.Equal(text, statement.ToString()); 780Assert.Equal("ref T", ds.Declaration.Type.ToString()); 784Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 800Assert.Equal(text, statement.ToString()); 806Assert.Equal("ref T", ds.Declaration.Type.ToString()); 810Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 817Assert.Equal("ref b", initializer.Value.ToString()); 831Assert.Equal(text, statement.ToString()); 837Assert.Equal("ref T", ds.Declaration.Type.ToString()); 841Assert.Equal("a", ds.Declaration.Variables[0].Identifier.ToString()); 848Assert.Equal("ref b", initializer.Value.ToString()); 851Assert.Equal("c", ds.Declaration.Variables[1].Identifier.ToString()); 858Assert.Equal("ref d", initializer.Value.ToString()); 872Assert.Equal(text, statement.ToString()); 883Assert.Equal("T", fs.Declaration.Type.ToString()); 885Assert.Equal("a = b", fs.Declaration.Variables[0].ToString()); 888Assert.Equal("{ }", fs.Statement.ToString()); 899Assert.Equal(text, statement.ToString()); 910Assert.Equal("var", fs.Declaration.Type.ToString()); 915Assert.Equal("a = b", fs.Declaration.Variables[0].ToString()); 918Assert.Equal("{ }", fs.Statement.ToString()); 929Assert.Equal(text, statement.ToString()); 940Assert.Equal("T", fs.Declaration.Type.ToString()); 942Assert.Equal("a = b", fs.Declaration.Variables[0].ToString()); 943Assert.Equal("c = d", fs.Declaration.Variables[1].ToString()); 946Assert.Equal("{ }", fs.Statement.ToString()); 957Assert.Equal(text, statement.ToString()); 973Assert.Equal(text, statement.ToString()); 978Assert.Equal("label", ls.Identifier.ToString()); 983Assert.Equal(";", ls.Statement.ToString()); 994Assert.Equal(text, statement.ToString()); 1013Assert.Equal(text, statement.ToString()); 1032Assert.Equal(text, statement.ToString()); 1041Assert.Equal("label", gs.Expression.ToString()); 1054Assert.Equal(text, statement.ToString()); 1065Assert.Equal("label", gs.Expression.ToString()); 1078Assert.Equal(text, statement.ToString()); 1101Assert.Equal(text, statement.ToString()); 1121Assert.Equal(text, statement.ToString()); 1129Assert.Equal("a", rs.Expression.ToString()); 1142Assert.Equal(text, statement.ToString()); 1153Assert.Equal("a", ys.Expression.ToString()); 1166Assert.Equal(text, statement.ToString()); 1189Assert.Equal(text, statement.ToString()); 1209Assert.Equal(text, statement.ToString()); 1217Assert.Equal("a", ts.Expression.ToString()); 1230Assert.Equal(text, statement.ToString()); 1243Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1245Assert.Equal("e", ts.Catches[0].Declaration.Identifier.ToString()); 1260Assert.Equal(text, statement.ToString()); 1273Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1289Assert.Equal(text, statement.ToString()); 1313Assert.Equal(text, statement.ToString()); 1327Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1329Assert.Equal("e", ts.Catches[0].Declaration.Identifier.ToString()); 1337Assert.Equal("T2", ts.Catches[1].Declaration.Type.ToString()); 1356Assert.Equal(text, statement.ToString()); 1379Assert.Equal(text, statement.ToString()); 1393Assert.Equal("T", ts.Catches[0].Declaration.Type.ToString()); 1395Assert.Equal("e", ts.Catches[0].Declaration.Identifier.ToString()); 1403Assert.Equal("T2", ts.Catches[1].Declaration.Type.ToString()); 1424Assert.Equal(text, statement.ToString()); 1441Assert.Equal(text, statement.ToString()); 1458Assert.Equal(text, statement.ToString()); 1475Assert.Equal(text, statement.ToString()); 1484Assert.Equal("a", ws.Condition.ToString()); 1497Assert.Equal(text, statement.ToString()); 1510Assert.Equal("a", ds.Condition.ToString()); 1522Assert.Equal(text, statement.ToString()); 1548Assert.Equal(text, statement.ToString()); 1559Assert.Equal("T", fs.Declaration.Type.ToString()); 1562Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1566Assert.Equal("0", fs.Declaration.Variables[0].Initializer.Value.ToString()); 1585Assert.Equal(text, statement.ToString()); 1596Assert.Equal("var", fs.Declaration.Type.ToString()); 1601Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1605Assert.Equal("0", fs.Declaration.Variables[0].Initializer.Value.ToString()); 1624Assert.Equal(text, statement.ToString()); 1635Assert.Equal("T", fs.Declaration.Type.ToString()); 1639Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1643Assert.Equal("0", fs.Declaration.Variables[0].Initializer.Value.ToString()); 1646Assert.Equal("b", fs.Declaration.Variables[1].Identifier.ToString()); 1650Assert.Equal("1", fs.Declaration.Variables[1].Initializer.Value.ToString()); 1733Assert.Equal(text, statement.ToString()); 1744Assert.Equal("a = 0", fs.Initializers[0].ToString()); 1762Assert.Equal(text, statement.ToString()); 1773Assert.Equal("a = 0", fs.Initializers[0].ToString()); 1774Assert.Equal("b = 1", fs.Initializers[1].ToString()); 1792Assert.Equal(text, statement.ToString()); 1806Assert.Equal("a", fs.Condition.ToString()); 1822Assert.Equal(text, statement.ToString()); 1838Assert.Equal("a++", fs.Incrementors[0].ToString()); 1852Assert.Equal(text, statement.ToString()); 1868Assert.Equal("a++", fs.Incrementors[0].ToString()); 1869Assert.Equal("b++", fs.Incrementors[1].ToString()); 1883Assert.Equal(text, statement.ToString()); 1894Assert.Equal("T", fs.Declaration.Type.ToString()); 1897Assert.Equal("a", fs.Declaration.Variables[0].Identifier.ToString()); 1901Assert.Equal("0", fs.Declaration.Variables[0].Initializer.Value.ToString()); 1907Assert.Equal("a < 10", fs.Condition.ToString()); 1912Assert.Equal("a++", fs.Incrementors[0].ToString()); 1926Assert.Equal(text, statement.ToString()); 1935Assert.Equal("T", fs.Type.ToString()); 1937Assert.Equal("a", fs.Identifier.ToString()); 1942Assert.Equal("b", fs.Expression.ToString()); 1955Assert.Equal(text, statement.ToString()); 1964Assert.Equal("for", fs.ForEachKeyword.TrailingTrivia[0].ToString()); 1968Assert.Equal("T", fs.Type.ToString()); 1970Assert.Equal("a", fs.Identifier.ToString()); 1975Assert.Equal("b", fs.Expression.ToString()); 1988Assert.Equal(text, statement.ToString()); 1997Assert.Equal("var", fs.Type.ToString()); 2001Assert.Equal("a", fs.Identifier.ToString()); 2006Assert.Equal("b", fs.Expression.ToString()); 2019Assert.Equal(text, statement.ToString()); 2027Assert.Equal("a", ss.Condition.ToString()); 2042Assert.Equal(text, statement.ToString()); 2050Assert.Equal("a", ss.Condition.ToString()); 2068Assert.Equal(text, statement.ToString()); 2076Assert.Equal("a", ss.Condition.ToString()); 2089Assert.Equal("b", subIf.Condition.ToString()); 2102Assert.Equal(text, statement.ToString()); 2110Assert.Equal("a", ls.Expression.ToString()); 2123Assert.Equal(text, statement.ToString()); 2133Assert.Equal("a", ss.Expression.ToString()); 2148Assert.Equal(text, statement.ToString()); 2156Assert.Equal("a", ss.Expression.ToString()); 2167Assert.Equal("b", caseLabelSyntax.Value.ToString()); 2170Assert.Equal(";", ss.Sections[0].Statements[0].ToString()); 2183Assert.Equal(text, statement.ToString()); 2191Assert.Equal("a", ss.Expression.ToString()); 2203Assert.Equal("b", caseLabelSyntax.Value.ToString()); 2206Assert.Equal(";", ss.Sections[0].Statements[0].ToString()); 2214Assert.Equal("c", caseLabelSyntax2.Value.ToString()); 2217Assert.Equal(";", ss.Sections[0].Statements[0].ToString()); 2230Assert.Equal(text, statement.ToString()); 2238Assert.Equal("a", ss.Expression.ToString()); 2250Assert.Equal(";", ss.Sections[0].Statements[0].ToString()); 2263Assert.Equal(text, statement.ToString()); 2271Assert.Equal("a", ss.Expression.ToString()); 2283Assert.Equal("b", caseLabelSyntax.Value.ToString()); 2289Assert.Equal("c", caseLabelSyntax2.Value.ToString()); 2292Assert.Equal(";", ss.Sections[0].Statements[0].ToString()); 2305Assert.Equal(text, statement.ToString()); 2313Assert.Equal("a", ss.Expression.ToString()); 2325Assert.Equal("b", caseLabelSyntax.Value.ToString()); 2327Assert.Equal("s1();", ss.Sections[0].Statements[0].ToString()); 2328Assert.Equal("s2();", ss.Sections[0].Statements[1].ToString()); 2341Assert.Equal(text, statement.ToString()); 2350Assert.Equal("a", us.Expression.ToString()); 2363Assert.Equal(text, statement.ToString()); 2373Assert.Equal("T", us.Declaration.Type.ToString()); 2376Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2381Assert.Equal("b", us.Declaration.Variables[0].Initializer.Value.ToString()); 2397Assert.Equal(text, statement.ToString()); 2406Assert.Equal("T", us.Declaration.Type.ToString()); 2409Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2414Assert.Equal("b", us.Declaration.Variables[0].Initializer.Value.ToString()); 2456Assert.Equal(text, statement.ToString()); 2466Assert.Equal("var", us.Declaration.Type.ToString()); 2471Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2476Assert.Equal("b", us.Declaration.Variables[0].Initializer.Value.ToString()); 2492Assert.Equal(text, statement.ToString()); 2501Assert.Equal("var", us.Declaration.Type.ToString()); 2506Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2511Assert.Equal("b", us.Declaration.Variables[0].Initializer.Value.ToString()); 2624Assert.Equal(text, statement.ToString()); 2635Assert.Equal("var", us.Declaration.Type.ToString()); 2640Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2645Assert.Equal("b", us.Declaration.Variables[0].Initializer.Value.ToString()); 2796Assert.Equal(text, statement.ToString()); 2806Assert.Equal("T", us.Declaration.Type.ToString()); 2811Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2816Assert.Equal("b", us.Declaration.Variables[0].Initializer.Value.ToString()); 2819Assert.Equal("c", us.Declaration.Variables[1].Identifier.ToString()); 2824Assert.Equal("d", us.Declaration.Variables[1].Initializer.Value.ToString()); 2840Assert.Equal(text, statement.ToString()); 2849Assert.Equal("T", us.Declaration.Type.ToString()); 2854Assert.Equal("a", us.Declaration.Variables[0].Identifier.ToString()); 2859Assert.Equal("b", us.Declaration.Variables[0].Initializer.Value.ToString()); 2862Assert.Equal("c", us.Declaration.Variables[1].Identifier.ToString()); 2867Assert.Equal("d", us.Declaration.Variables[1].Initializer.Value.ToString()); 2921Assert.Equal(text, statement.ToString()); 2930Assert.Equal("f ? x = a : x = b", us.Expression.ToString()); 2943Assert.Equal(text, statement.ToString()); 2950Assert.Equal("var x = f ? a : b", us.Declaration.ToString()); 3004Assert.Equal(text, statement.ToString()); 3012Assert.Equal("f ? x = a", us.Declaration.ToString()); 3026Assert.Equal(text, statement.ToString()); 3033Assert.Equal("f ? x = a", us.Declaration.ToString()); 3076Assert.Equal(text, statement.ToString()); 3084Assert.Equal("f ? x, y", us.Declaration.ToString()); 3098Assert.Equal(text, statement.ToString()); 3105Assert.Equal("f ? x, y", us.Declaration.ToString()); 3346Assert.Equal(text, statement.ToString()); 3349Assert.Equal(keywordText, decl.Declaration.Type.ToString()); 3362Assert.Equal(text, toText); 3374Assert.Equal(text, statement.ToString()); 3383Assert.Equal("T", fs.Type.ToString()); 3385Assert.Equal("a", fs.Identifier.ToString()); 3390Assert.Equal("b", fs.Expression.ToString()); 3554Assert.Equal(text, statement.ToString());
Syntax\SeparatedSyntaxListTests.cs (14)
54Assert.Equal("x", addList.ToFullString()); 57Assert.Equal("y,x", insertBefore.ToFullString()); 60Assert.Equal("x,y", insertAfter.ToFullString()); 63Assert.Equal("x,a,b,c,y", insertBetween.ToFullString()); 70Assert.Equal(@"a, // a is good 78Assert.Equal(@"a, 84Assert.Equal("a,c, /* b is best */ b", insertBeforeMultiLineComment.ToFullString()); 102Assert.Equal("A", list[0].ToString()); 103Assert.Equal("B", list[1].ToString()); 104Assert.Equal("C", list[2].ToString()); 249Assert.Equal("D", newList.ToFullString()); 253Assert.Equal("D,E", newList.ToFullString()); 257Assert.Equal("D", newList.ToFullString()); 261Assert.Equal("D,E", newList.ToFullString());
Syntax\StructuredTriviaTests.cs (13)
27Assert.Equal(conditionName, ((IdentifierNameSyntax)structuredTrivia.Condition).Identifier.ValueText); 53Assert.Equal(" <goo> </goo> ", xmlElement.ToFullString()); 54Assert.Equal("<goo> </goo>", xmlElement.ToString()); 57Assert.Equal(" <goo> </goo> ", docComment.ToFullString()); 60Assert.Equal(" <goo> </goo> ", child.ToFullString()); 61Assert.Equal("<goo> </goo>", child.ToString()); 62Assert.Equal(" <goo> ", child.StartTag.ToFullString()); 63Assert.Equal("<goo>", child.StartTag.ToString()); 69Assert.Equal(" <goo> </goo> banana ", ident.ToFullString()); 70Assert.Equal("banana", ident.ToString()); 71Assert.Equal(" <goo> </goo> ", ident.LeadingTrivia[0].ToFullString()); 79Assert.Equal("goo", result.ToString()); 83Assert.Equal(" ", trResult.ToString());
Syntax\SyntaxDiffingTests.cs (18)
34Assert.Equal("class C { }", changes[0].NewText); 54Assert.Equal("B", changes[0].NewText); 76Assert.Equal("C", changes[0].NewText); 78Assert.Equal("D", changes[1].NewText); 96Assert.Equal("class ", changes[0].NewText); 114Assert.Equal("class A ", changes[0].NewText); 133Assert.Equal("class A { }", changes[0].NewText); 153Assert.Equal("} class A { ", changes[0].NewText); 171Assert.Equal("namespace N { ", changes[0].NewText); 189Assert.Equal("int X; ", changes[0].NewText); 206Assert.Equal("", changes[0].NewText); 223Assert.Equal("", changes[0].NewText); 240Assert.Equal("", changes[0].NewText); 258Assert.Equal("struct", changes[0].NewText); 310Assert.Equal("Sign", node.Identifier.ValueText); 325Assert.Equal("this.", changes[0].NewText); 375Assert.Equal("Object", node.Identifier.ValueText); 387Assert.Equal("o", changes[0].NewText);
Syntax\SyntaxFactoryTests.cs (36)
26Assert.Equal("$@\"", token.Text); 27Assert.Equal("$@\"", token.ValueText); 38Assert.Equal("System.String", usingDirective.Name.ToFullString()); 114Assert.Equal("#pragmachecksum\"file\"\"guid\"\"bytes\"", t.ToString()); 115Assert.Equal("#pragma checksum \"file\" \"guid\" \"bytes\"\r\n", t.NormalizeWhitespace().ToFullString()); 219Assert.Equal(text, token.Text); 220Assert.Equal(valueText, token.ValueText); 240Assert.Equal("", null1.ToString()); 246Assert.Equal("", null2.ToString()); 252Assert.Equal("", empty1.ToString()); 258Assert.Equal("", empty2.ToString()); 264Assert.Equal("a", singleton1.ToString()); 270Assert.Equal("x", singleton2.ToString()); 276Assert.Equal("a,b,c", list1.ToString()); 287Assert.Equal("x,y,z", list2.ToString()); 377Assert.Equal("3.14", literal.ValueText); 387Assert.Equal("\"\\u2028\"", literal.Text); 395Assert.Equal("'\\udbff'", literal.Text); 424Assert.Equal("1l", literal.Text); 438Assert.Equal("1L", literal.Text); 449Assert.Equal("1l", expression.Token.Text); 463Assert.Equal("1L", expression.Token.Text); 502Assert.Equal("class C\r\n{\r\n int? P { }\r\n}", syntaxNode.ToFullString()); 525Assert.Equal("class C\r\n{\r\n DateTime? P { }\r\n}", syntaxNode.ToFullString()); 535Assert.Equal("x is int ? y : z", syntaxNode.ToFullString()); 540Assert.Equal("x is DateTime ? y : z", syntaxNode2.ToFullString()); 548Assert.Equal("x is int ?? y", syntaxNode.ToFullString()); 551Assert.Equal("x is DateTime ?? y", syntaxNode2.ToFullString()); 554Assert.Equal("x is object ?? y", syntaxNode3.ToFullString()); 573Assert.Equal("int[]M(){};", syntaxNode.ToFullString()); 581Assert.Equal("()=>{}", lambda.ToFullString()); 584Assert.Equal(fullySpecified.ToFullString(), lambda.ToFullString()); 592Assert.Equal("()=>1", lambda.ToFullString()); 597Assert.Equal(fullySpecified.ToFullString(), lambda.ToFullString()); 606Assert.Equal("record R;", record.NormalizeWhitespace().ToFullString()); 618Assert.Equal("record R\r\n{\r\n private int i;\r\n}", record.NormalizeWhitespace().ToFullString());
Syntax\SyntaxListTests.cs (8)
58Assert.Equal("A", list[0].ToString()); 59Assert.Equal("B", list[1].ToString()); 60Assert.Equal("C", list[2].ToString()); 201Assert.Equal("D ", newList.ToFullString()); 205Assert.Equal("D E ", newList.ToFullString()); 209Assert.Equal("D ", newList.ToFullString()); 213Assert.Equal("D E ", newList.ToFullString()); 306Assert.Equal(expectedArgName, ((ArgumentSyntax)item).Expression.ToString());
Syntax\SyntaxNodeOrTokenListTests.cs (7)
45Assert.Equal("A", list[0].ToString()); 46Assert.Equal("B", list[1].ToString()); 47Assert.Equal("C", list[2].ToString()); 190Assert.Equal("D ", newList.ToFullString()); 194Assert.Equal("D E ", newList.ToFullString()); 198Assert.Equal("D ", newList.ToFullString()); 202Assert.Equal("D E ", newList.ToFullString());
Syntax\SyntaxNodeTests.cs (122)
57Assert.Equal("A.C", text); 126Assert.Equal("(d / e)", firstParens.ToString()); 503Assert.Equal(identifierNodes[i].ToString(), nodesWithMyAnnotations[i].ToString()); 642Assert.Equal("Goo", node.ToString()); 653Assert.Equal("goo", token.ToString()); 1008Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1012Assert.Equal("garbage", tokens[0].Text); 1108Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1112Assert.Equal("garbage", tokens[0].Text); 1138Assert.Equal(text, tree.GetCompilationUnitRoot().ToFullString()); 1839Assert.Equal("Goo.Bar", qualified.ToString()); 1840Assert.Equal("Bar", qualified.GetUnqualifiedName().Identifier.ValueText); 1844Assert.Equal("Bar<int>", generic.ToString()); 1845Assert.Equal("Bar", generic.GetUnqualifiedName().Identifier.ValueText); 1849Assert.Equal("Goo.Bar<int>", qualifiedGeneric.ToString()); 1850Assert.Equal("Bar", qualifiedGeneric.GetUnqualifiedName().Identifier.ValueText); 1854Assert.Equal("alias::Goo", alias.ToString()); 1855Assert.Equal("Goo", alias.GetUnqualifiedName().Identifier.ValueText); 1859Assert.Equal("alias::Bar<int>", aliasGeneric.ToString()); 1860Assert.Equal("Bar", aliasGeneric.GetUnqualifiedName().Identifier.ValueText); 1864Assert.Equal("alias::Goo.Bar", aliasQualified.ToString()); 1865Assert.Equal("Bar", aliasQualified.GetUnqualifiedName().Identifier.ValueText); 1869Assert.Equal("alias::Goo.Bar<int>", aliasQualifiedGeneric.ToString()); 1870Assert.Equal("Bar", aliasQualifiedGeneric.GetUnqualifiedName().Identifier.ValueText); 2082Assert.Equal("a + c", expr2.ToFullString()); 2096Assert.Equal("(((a )+ (b ))+ (c ))+ (d)", replacedText); 2108Assert.Equal("m(c,d, b)", newNode.ToFullString()); 2112Assert.Equal("m(a, c,d)", newNode.ToFullString()); 2116Assert.Equal("m(b)", newNode.ToFullString()); 2120Assert.Equal("m(a)", newNode.ToFullString()); 2148Assert.Equal("m(c,d,a, b)", newNode.ToFullString()); 2152Assert.Equal("m(a,c,d, b)", newNode.ToFullString()); 2156Assert.Equal("m(a,c,d, b)", newNode.ToFullString()); 2160Assert.Equal("m(a, b,c,d)", newNode.ToFullString()); 2188Assert.Equal("{ var z = 30; var q = 40; var y = 20; }", newBlock.ToFullString()); 2192Assert.Equal("{ var x = 10; var z = 30; var q = 40; }", newBlock.ToFullString()); 2196Assert.Equal("{ var y = 20; }", newBlock.ToFullString()); 2200Assert.Equal("{ var x = 10; }", newBlock.ToFullString()); 2212Assert.Equal("{ var z = 30; var q = 40; var x = 10; var y = 20; }", newBlock.ToFullString()); 2216Assert.Equal("{ var x = 10; var z = 30; var q = 40; var y = 20; }", newBlock.ToFullString()); 2220Assert.Equal("{ var x = 10; var z = 30; var q = 40; var y = 20; }", newBlock.ToFullString()); 2224Assert.Equal("{ var x = 10; var y = 20; var z = 30; var q = 40; }", newBlock.ToFullString()); 2233Assert.Equal("a + c", expr2.ToString()); 2243Assert.Equal("d + d + d ", replaced.ToFullString()); 2255Assert.Equal("public class C { }", cu1.ToFullString()); 2258Assert.Equal("public partial class C { }", cu2.ToFullString()); 2261Assert.Equal("class C { }", cu3.ToFullString()); 2289Assert.Equal("static public class C { }", cu1.ToFullString()); 2292Assert.Equal("public static class C { }", cu2.ToFullString()); 2322Assert.Equal("return x;", text2); 2337Assert.Equal("/// Goo\r\ngarbage return x;", text2); 2350Assert.Equal(" ", text2); 2365Assert.Equal("#if true\r\na + \r\n#endif\r\n + b", expr2.ToFullString()); 2375Assert.Equal("a + b", expr2.ToFullString()); 2385Assert.Equal("a + b", replaced.ToFullString()); 2401Assert.Equal("/* a */ identifier", ex1.ToFullString()); 2404Assert.Equal("/* a *//* b */ identifier", ex2.ToFullString()); 2407Assert.Equal(" identifier", ex3.ToFullString()); 2423Assert.Equal("/* a *//* b *//* c */ identifier", ex1.ToFullString()); 2426Assert.Equal("/* c *//* a *//* b */ identifier", ex2.ToFullString()); 2436Assert.Equal("a ", id2.ToFullString()); 2448Assert.Equal("a ", id2.ToFullString()); 2462Assert.Equal("m(a , /* trivia */ c)", text); 2477Assert.Equal(@"m(a, /* trivia */ 2493Assert.Equal(@"m(a, 2510Assert.Equal(@"SomeMethod(/*arg1:*/ a, 2531Assert.Equal(@"SomeMethod(// comment about a 2550Assert.Equal("m(a, /* trivia */ c)", text); 2566Assert.Equal(@"m(a, c)", text); 2582Assert.Equal(@"m(a, /* trivia */ c)", text); 2598Assert.Equal(@"SomeMethod(/*arg1:*/ a, 2618Assert.Equal(@"SomeMethod(// comment about a 2635Assert.Equal("m(/* before */ /* after */)", text); 2649Assert.Equal("m(/* before */ /* after */ b, c)", text); 2663Assert.Equal("m(a, b /* before */ /* after */)", text); 2677Assert.Equal("{ a; c }", text); 2691Assert.Equal("{ a; /* trivia */ c }", text); 2710Assert.Equal("void M() /* trivia */ ", text); 2743Assert.Equal(expectedText, text); 2778Assert.Equal(expected, text); 2818Assert.Equal(expected, text); 2850Assert.Equal(expected, text); 2867Assert.Equal("class A { } ", text); 2883Assert.Equal("class A { } \r\n#endregion", text); 2942Assert.Equal(expected, text); 2983Assert.Equal(expected, text); 3027Assert.Equal(expected, text); 3069Assert.Equal(expectedText, text); 3111Assert.Equal(expected, text); 3151Assert.Equal(expected, text); 3194Assert.Equal(expected, text); 3235Assert.Equal(expectedText, text); 3259Assert.Equal(expected, text); 3444Assert.Equal(" static unsafe ", newModifiers.ToFullString()); 3474Assert.Equal(" ", node.GetLeadingTrivia().First().ToString()); 3485Assert.Equal(" ", node.GetLeadingTrivia().First().ToString()); 3496Assert.Equal("class A { }", nodeOrToken.ToString()); 3497Assert.Equal(text, nodeOrToken.ToString()); 3500Assert.Equal("class A { }", node.ToString()); 3501Assert.Equal(text, node.ToFullString()); 3504Assert.Equal("class", token.ToString()); 3505Assert.Equal("class ", token.ToFullString()); 3508Assert.Equal(" ", trivia.ToString()); 3509Assert.Equal(" ", trivia.ToFullString()); 3527Assert.Equal("// This is trivia", rootTrivia.ToString().Trim()); 3834Assert.Equal("static async delegate(int i) { }", withAsync); 3843Assert.Equal("static async (a) => { }", withAsync); 3852Assert.Equal("static async a => { }", withAsync); 3861Assert.Equal("static async delegate(int i) { }", withAsync); 3870Assert.Equal("static async (a) => { }", withAsync); 3879Assert.Equal("static async a => { }", withAsync); 3888Assert.Equal("static delegate(int i) { }", withAsync); 3897Assert.Equal("static (a) => { }", withAsync); 3906Assert.Equal("static a => { }", withAsync); 3915Assert.Equal(text, withAsync); 3924Assert.Equal(text, withAsync); 3933Assert.Equal(text, withAsync); 3943Assert.Equal("static async async/*async2*/delegate(int i) { }", withAsync); 3952Assert.Equal("static delegate(int i) { }", withAsync.ToString()); 3981Assert.Equal("stackalloc int[50]", newExpression); 3991Assert.Equal("string s!!", newParameter.ToFullString()); 3992Assert.Equal("string s", newParameter.ToString());
Syntax\SyntaxNormalizerTests.cs (10)
414Assert.Equal(expected.NormalizeLineEndings(), actual.NormalizeLineEndings()); 943Assert.Equal(expected.NormalizeLineEndings(), actual.NormalizeLineEndings()); 3409Assert.Equal(text.NormalizeLineEndings(), node.ToFullString().NormalizeLineEndings()); 3556Assert.Equal(expected.NormalizeLineEndings(), actual.NormalizeLineEndings()); 3799Assert.Equal(expected, actual); 3815Assert.Equal(expected.NormalizeLineEndings(), actual); 3981Assert.Equal(expected.NormalizeLineEndings(), actual.NormalizeLineEndings()); 3993Assert.Equal(expected.NormalizeLineEndings(), actual.NormalizeLineEndings()); 5967Assert.Equal(expression, syntaxNode.ToFullString()); 5980Assert.Equal(expression, syntaxNode.ToFullString());
Syntax\SyntaxRewriterTests.cs (13)
384Assert.Equal("m(c,d, b)", newRoot.ToFullString()); 405Assert.Equal("m(c,d,a, b)", newNode.ToFullString()); 412Assert.Equal("m(a,c,d, b)", newNode2.ToFullString()); 431Assert.Equal("public partial class C { }", newRoot.ToFullString()); 449Assert.Equal("static public class C { }", newRoot.ToFullString()); 455Assert.Equal("public static class C { }", newRoot2.ToFullString()); 476Assert.Equal("/* a *//* b */ identifier", newRoot.ToFullString()); 482Assert.Equal(" identifier", newRoot2.ToFullString()); 503Assert.Equal("/* c *//* a *//* b */ identifier", newRoot.ToFullString()); 654Assert.Equal(expectedNewSource, newRoot.ToFullString()); 673Assert.Equal(expectedText, newRoot.ToFullString()); 703Assert.Equal(output, result.ToFullString()); 715Assert.Equal(output, result.ToFullString());
Syntax\SyntaxTests.cs (1)
184Assert.Equal(expected, actual);
Syntax\SyntaxTokenListTests.cs (7)
67Assert.Equal("A", list[0].ToString()); 68Assert.Equal("B", list[1].ToString()); 69Assert.Equal("C", list[2].ToString()); 210Assert.Equal("D ", newList.ToFullString()); 214Assert.Equal("D E ", newList.ToFullString()); 218Assert.Equal("D ", newList.ToFullString()); 222Assert.Equal("D E ", newList.ToFullString());
Syntax\SyntaxTreeTests.cs (14)
94Assert.Equal("#define U | #undef U | #define Y", ((CSharpSyntaxTree)tree).GetDirectives().GetDebuggerDisplay()); 249Assert.Equal(newRoot.ToString(), newTree.GetRoot().ToString()); 267Assert.Equal(newRoot.ToString(), newTree.GetRoot().ToString()); 280Assert.Equal(newRoot.ToString(), newTree.GetRoot().ToString()); 291Assert.Equal("new.cs", newTree.FilePath); 292Assert.Equal(oldTree.ToString(), newTree.ToString()); 307Assert.Equal("new.cs", newTree.FilePath); 308Assert.Equal(oldTree.ToString(), newTree.ToString()); 320Assert.Equal("new.cs", newTree.FilePath); 321Assert.Equal(oldTree.ToString(), newTree.ToString()); 328Assert.Equal(string.Empty, oldTree.WithFilePath(null).FilePath); 330Assert.Equal(string.Empty, oldTree.WithFilePath(null).FilePath); 331Assert.Equal(string.Empty, SyntaxFactory.ParseSyntaxTree("", path: null).FilePath); 332Assert.Equal(string.Empty, CSharpSyntaxTree.Create((CSharpSyntaxNode)oldTree.GetRoot()).FilePath);
Syntax\SyntaxTriviaListTests.cs (32)
56Assert.Equal("/*A*/", list[0].ToString()); 57Assert.Equal("/*B*/", list[1].ToString()); 58Assert.Equal("/*C*/", list[2].ToString()); 59Assert.Equal("/*A*//*B*//*C*/", list.ToFullString()); 74Assert.Equal("/*A*//*B*//*C*//*D*/", newList.ToFullString()); 78Assert.Equal("/*A*//*B*//*C*//*D*//*E*/", newList.ToFullString()); 82Assert.Equal("/*D*//*A*//*B*//*C*/", newList.ToFullString()); 86Assert.Equal("/*A*//*D*//*B*//*C*/", newList.ToFullString()); 90Assert.Equal("/*A*//*B*//*D*//*C*/", newList.ToFullString()); 94Assert.Equal("/*A*//*B*//*C*//*D*/", newList.ToFullString()); 98Assert.Equal("/*D*//*E*//*A*//*B*//*C*/", newList.ToFullString()); 102Assert.Equal("/*A*//*D*//*E*//*B*//*C*/", newList.ToFullString()); 106Assert.Equal("/*A*//*B*//*D*//*E*//*C*/", newList.ToFullString()); 110Assert.Equal("/*A*//*B*//*C*//*D*//*E*/", newList.ToFullString()); 114Assert.Equal("/*B*//*C*/", newList.ToFullString()); 118Assert.Equal("/*A*//*B*/", newList.ToFullString()); 122Assert.Equal("/*B*//*C*/", newList.ToFullString()); 126Assert.Equal("/*A*//*C*/", newList.ToFullString()); 130Assert.Equal("/*A*//*B*/", newList.ToFullString()); 134Assert.Equal("/*D*//*B*//*C*/", newList.ToFullString()); 138Assert.Equal("/*A*//*D*//*C*/", newList.ToFullString()); 142Assert.Equal("/*A*//*B*//*D*/", newList.ToFullString()); 146Assert.Equal("/*D*//*E*//*B*//*C*/", newList.ToFullString()); 150Assert.Equal("/*A*//*D*//*E*//*C*/", newList.ToFullString()); 154Assert.Equal("/*A*//*B*//*D*//*E*/", newList.ToFullString()); 158Assert.Equal("/*B*//*C*/", newList.ToFullString()); 162Assert.Equal("/*A*//*C*/", newList.ToFullString()); 166Assert.Equal("/*A*//*B*/", newList.ToFullString()); 198Assert.Equal("/*D*/", newList.ToFullString()); 202Assert.Equal("/*D*//*E*/", newList.ToFullString()); 206Assert.Equal("/*D*/", newList.ToFullString()); 210Assert.Equal("/*D*//*E*/", newList.ToFullString());
Syntax\TrackNodeTests.cs (7)
28Assert.Equal("a", currentA.ToString()); 40Assert.Equal("a", currentAs.ElementAt(0).ToString()); 74Assert.Equal(newA.ToFullString(), latestA.ToFullString()); 89Assert.Equal(newA.ToFullString(), latestAs.ElementAt(0).ToFullString()); 141Assert.Equal("a", nodes[0].ToString()); 142Assert.Equal("a", nodes[1].ToString()); 159Assert.Equal(id.ToString(), currentId.ToString());
Microsoft.CodeAnalysis.CSharp.Test.Utilities (14)
AttributeValidation.cs (3)
22Assert.Equal("IsUnmanagedAttribute", attributeType.Name); 33Assert.Equal(WellKnownTypes.GetMetadataName(WellKnownType.System_Runtime_CompilerServices_CompilerGeneratedAttribute), isUnmanagedTypeAttributes[0].AttributeClass.ToDisplayString()); 34Assert.Equal(AttributeDescription.CodeAnalysisEmbeddedAttribute.FullName, isUnmanagedTypeAttributes[1].AttributeClass.ToDisplayString());
CompilationTestUtils.cs (4)
40Assert.Equal(symbolDescriptions[i], descriptions[i]); 55Assert.Equal(symbolDescriptions[i], descriptions[i]); 74Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description); 79Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description);
CSharpTestBase.cs (3)
1109Assert.Equal(text, parsedText.ToFullString()); 1553Assert.Equal(expectedMessage, e.Message); 1778Assert.Equal(bindText, node.ToString());
Extensions.cs (1)
413Assert.Equal(namedArg.Key, name);
FunctionPointerUtilities.cs (3)
59Assert.Equal(string.Empty, symbol.Name); 109Assert.Equal(string.Empty, symbol.Name); 338=> typeSymbol => Assert.Equal(typeName, typeSymbol.Name);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdEventTests.cs (1)
3348Assert.Equal("EventRegistrationTokenTable", fieldType.Name);
Metadata\WinMdMetadataTests.cs (3)
137Assert.Equal("System.Runtime.WindowsRuntime.dll", ((PENamedTypeSymbol)((((PropertySymbol)(blk)).GetMethod).ReturnType)).ContainingModule.ToString()); 180Assert.Equal("ulong?", 244Assert.Equal("C1, W, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime", value);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (166)
CodeGeneration\AddAttributesTests.cs (1)
63Assert.Equal(attributeAddedText, actualText);
CodeGeneration\AddImportsTests.cs (2)
97Assert.Equal(importsAddedText, actualText); 820Assert.Equal(@"using System;
CodeGeneration\SymbolEditorTests.cs (32)
87Assert.Equal(expected, actual); 124Assert.Equal(expected, actual); 161Assert.Equal(expected, actual); 205Assert.Equal(expected, actual); 254Assert.Equal(expected1, actual1); 255Assert.Equal(expected2, actual2); 287Assert.Equal(expected, actual); 326Assert.Equal(expected1, actual1); 327Assert.Equal(expected2, actual2); 364Assert.Equal(expected, actual); 401Assert.Equal(expected, actual); 447Assert.Equal(expected, actual); 494Assert.Equal(expected, actual); 538Assert.Equal(expected, actual); 560Assert.Equal("X", newSymbol.Name); 568Assert.Equal(expected, actual); 597Assert.Equal("X", newSymbol.Name); 605Assert.Equal(expected, actual); 628Assert.Equal(expected, actual); 655Assert.Equal("C", newSymbol.Name); 659Assert.Equal(expected, actual); 687Assert.Equal(expected, actual); 722Assert.Equal(expected, actual); 729Assert.Equal(expected2, actual); 770Assert.Equal(expected, actual); 811Assert.Equal(expected, actual); 844Assert.Equal(expected, actual); 877Assert.Equal(expected, actual); 910Assert.Equal(expected, actual); 951Assert.Equal(expected, actual); 984Assert.Equal(expected, actual); 1009Assert.Equal(expected, actual);
CodeGeneration\SyntaxGeneratorTests.cs (113)
59Assert.Equal(expectedText, normalized); 2610Assert.Equal(expected, actual); 2897Assert.Equal("c", Generator.GetName(Generator.ClassDeclaration("c"))); 2898Assert.Equal("s", Generator.GetName(Generator.StructDeclaration("s"))); 2899Assert.Equal("i", Generator.GetName(Generator.EnumDeclaration("i"))); 2900Assert.Equal("e", Generator.GetName(Generator.EnumDeclaration("e"))); 2901Assert.Equal("d", Generator.GetName(Generator.DelegateDeclaration("d"))); 2902Assert.Equal("m", Generator.GetName(Generator.MethodDeclaration("m"))); 2903Assert.Equal("", Generator.GetName(Generator.ConstructorDeclaration())); 2904Assert.Equal("p", Generator.GetName(Generator.ParameterDeclaration("p"))); 2905Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")))); 2906Assert.Equal("", Generator.GetName(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.IdentifierName("t")))); 2907Assert.Equal("f", Generator.GetName(Generator.FieldDeclaration("f", Generator.IdentifierName("t")))); 2908Assert.Equal("v", Generator.GetName(Generator.EnumMember("v"))); 2909Assert.Equal("ef", Generator.GetName(Generator.EventDeclaration("ef", Generator.IdentifierName("t")))); 2910Assert.Equal("ep", Generator.GetName(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t")))); 2911Assert.Equal("n", Generator.GetName(Generator.NamespaceDeclaration("n"))); 2912Assert.Equal("u", Generator.GetName(Generator.NamespaceImportDeclaration("u"))); 2913Assert.Equal("loc", Generator.GetName(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"))); 2914Assert.Equal("a", Generator.GetName(Generator.Attribute("a"))); 2920Assert.Equal("c", Generator.GetName(Generator.WithName(Generator.ClassDeclaration("x"), "c"))); 2921Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.StructDeclaration("x"), "s"))); 2922Assert.Equal("i", Generator.GetName(Generator.WithName(Generator.EnumDeclaration("x"), "i"))); 2923Assert.Equal("e", Generator.GetName(Generator.WithName(Generator.EnumDeclaration("x"), "e"))); 2924Assert.Equal("d", Generator.GetName(Generator.WithName(Generator.DelegateDeclaration("x"), "d"))); 2925Assert.Equal("m", Generator.GetName(Generator.WithName(Generator.MethodDeclaration("x"), "m"))); 2926Assert.Equal("", Generator.GetName(Generator.WithName(Generator.ConstructorDeclaration(), ".ctor"))); 2927Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.ParameterDeclaration("x"), "p"))); 2928Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.IdentifierName("t")), "p"))); 2929Assert.Equal("", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.IdentifierName("t")), "this"))); 2930Assert.Equal("f", Generator.GetName(Generator.WithName(Generator.FieldDeclaration("x", Generator.IdentifierName("t")), "f"))); 2931Assert.Equal("v", Generator.GetName(Generator.WithName(Generator.EnumMember("x"), "v"))); 2932Assert.Equal("ef", Generator.GetName(Generator.WithName(Generator.EventDeclaration("x", Generator.IdentifierName("t")), "ef"))); 2933Assert.Equal("ep", Generator.GetName(Generator.WithName(Generator.CustomEventDeclaration("x", Generator.IdentifierName("t")), "ep"))); 2934Assert.Equal("n", Generator.GetName(Generator.WithName(Generator.NamespaceDeclaration("x"), "n"))); 2935Assert.Equal("u", Generator.GetName(Generator.WithName(Generator.NamespaceImportDeclaration("x"), "u"))); 2936Assert.Equal("loc", Generator.GetName(Generator.WithName(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "x"), "loc"))); 2937Assert.Equal("a", Generator.GetName(Generator.WithName(Generator.Attribute("x"), "a"))); 3194Assert.Equal("t", Generator.GetType(Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"))).ToString()); 3197Assert.Equal("t", Generator.GetType(Generator.FieldDeclaration("f", Generator.IdentifierName("t"))).ToString()); 3198Assert.Equal("t", Generator.GetType(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).ToString()); 3200Assert.Equal("t", Generator.GetType(Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))).ToString()); 3202Assert.Equal("t", Generator.GetType(Generator.EventDeclaration("ef", Generator.IdentifierName("t"))).ToString()); 3203Assert.Equal("t", Generator.GetType(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"))).ToString()); 3205Assert.Equal("t", Generator.GetType(Generator.DelegateDeclaration("t", returnType: Generator.IdentifierName("t"))).ToString()); 3208Assert.Equal("t", Generator.GetType(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "v")).ToString()); 3217Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()); 3218Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.FieldDeclaration("f", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()); 3219Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.PropertyDeclaration("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()); 3221Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.ParameterDeclaration("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()); 3223Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t"), Generator.IdentifierName("t"))).ToString()); 3225Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.EventDeclaration("ef", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()); 3226Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()); 3228Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.LocalDeclarationStatement(Generator.IdentifierName("x"), "v"), Generator.IdentifierName("t"))).ToString()); 3282Assert.Equal("x", Generator.GetExpression(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), initializer: Generator.IdentifierName("x"))).ToString()); 3283Assert.Equal("x", Generator.GetExpression(Generator.ParameterDeclaration("p", Generator.IdentifierName("t"), initializer: Generator.IdentifierName("x"))).ToString()); 3284Assert.Equal("x", Generator.GetExpression(Generator.LocalDeclarationStatement("loc", initializer: Generator.IdentifierName("x"))).ToString()); 3289Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("x"))).ToString()); 3290Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("x"))).ToString()); 3291Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", Generator.IdentifierName("x"))).ToString()); 3292Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression("p", Generator.IdentifierName("x"))).ToString()); 3302Assert.Equal("x", Generator.GetExpression(method).ToString()); 3309Assert.Equal("x", Generator.GetExpression(local).ToString()); 3316Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.FieldDeclaration("f", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString()); 3317Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString()); 3318Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Generator.IdentifierName("x"))).ToString()); 3321Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", [Generator.IdentifierName("x")]), Generator.IdentifierName("y"))).ToString()); 3322Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", [Generator.IdentifierName("x")]), Generator.IdentifierName("y"))).ToString()); 3325Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()); 3326Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()); 3327Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()); 3328Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()); 3338Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(method, Generator.IdentifierName("y"))).ToString()); 3345Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(local, Generator.IdentifierName("y"))).ToString()); 3500Assert.Equal("100", Generator.GetExpression(x).ToString()); 3501Assert.Equal("300", Generator.GetExpression(y).ToString()); 3503Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(x, Generator.LiteralExpression(500))).ToString()); 3504Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(y, Generator.LiteralExpression(500))).ToString()); 3505Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(z, Generator.LiteralExpression(500))).ToString()); 3523Assert.Equal("p * 10", Generator.GetExpression(y).ToString()); 3526Assert.Equal("500", Generator.GetExpression(Generator.WithExpression(y, Generator.LiteralExpression(500))).ToString()); 3645Assert.Equal("B", baseListBI[0].ToString()); 3646Assert.Equal("I", baseListBI[1].ToString()); 3656Assert.Equal("B", baseListB[0].ToString()); 3797Assert.Equal("int", Generator.GetType(declX).ToString()); 3798Assert.Equal("X", Generator.GetName(declX)); 3803Assert.Equal("int", Generator.GetType(declY).ToString()); 3804Assert.Equal("Y", Generator.GetName(declY)); 3809Assert.Equal("int", Generator.GetType(declZ).ToString()); 3810Assert.Equal("Z", Generator.GetName(declZ)); 3817Assert.Equal("T", Generator.GetType(xTypedT).ToString()); 3822Assert.Equal("Q", Generator.GetName(xNamedQ).ToString()); 3827Assert.Equal("e", Generator.GetExpression(xInitialized).ToString()); 3843Assert.Equal("[A]", Generator.GetAttributes(xAttributed)[0].ToString()); 4138Assert.Equal("X", Generator.GetName(attrX)); 4139Assert.Equal("Y", Generator.GetName(attrY)); 4140Assert.Equal("Z", Generator.GetName(attrZ)); 4145Assert.Equal("[Q]", xNamedQ.ToString()); 4150Assert.Equal("[X(e)]", xWithArg.ToString()); 4318Assert.Equal("X", Generator.GetName(attrX)); 4319Assert.Equal("Y", Generator.GetName(attrY)); 4320Assert.Equal("Z", Generator.GetName(attrZ)); 4325Assert.Equal("[Q]", xNamedQ.ToString()); 4330Assert.Equal("[X(e)]", xWithArg.ToString()); 4406Assert.Equal("X", Generator.GetName(attrX)); 4410Assert.Equal("Y", Generator.GetName(attrY)); 4414Assert.Equal("Z", Generator.GetName(attrZ)); 4418Assert.Equal("P", Generator.GetName(attrP)); 4425Assert.Equal("A", Generator.GetName(attrA)); 4429Assert.Equal("B", Generator.GetName(attrB)); 4433Assert.Equal("C", Generator.GetName(attrC)); 4437Assert.Equal("D", Generator.GetName(attrD)); 4586Assert.Equal(expected, elasticOnlyFormatted);
CSharpCommandLineParserServiceTests.cs (6)
27Assert.Equal("true", options.Features["test"]); 34Assert.Equal("dog", options.Features["test"]); 41Assert.Equal("true", options.Features["test1"]); 42Assert.Equal("true", options.Features["test2"]); 49Assert.Equal("dog", options.Features["test1"]); 50Assert.Equal("cat", options.Features["test2"]);
Formatting\EditorConfigOptionParserTests.cs (2)
31Assert.Equal(roundtrip, CSharpFormattingOptions2.ToEditorConfigValue(value)); 107Assert.Equal(roundtrip, CSharpFormattingOptions2.ToEditorConfigValue(value));
Formatting\FormattingElasticTriviaTests.cs (5)
90Assert.Equal(expected, newCompilation.ToFullString()); 130Assert.Equal(expected, formatted); 133Assert.Equal(expected, elasticOnlyFormatted); 136Assert.Equal(expected, annotationFormatted); 186Assert.Equal(expected, newCompilation.ToFullString());
Formatting\FormattingTests.cs (1)
4657Assert.Equal(expected, newProperty.ToFullString());
Formatting\FormattingTreeEditTests.cs (2)
48Assert.Equal(@" 61Assert.Equal(@"
Formatting\FormattingTriviaTests.cs (2)
1757Assert.Equal(expected, actual); 1801Assert.Equal(expected, actual);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (44)
AbstractCommandHandlerTestState.cs (1)
249Assert.Equal(expectedLine.Trim(), SubjectBuffer.CurrentSnapshot.GetLineFromLineNumber(line).GetText().Trim());
AbstractTypingCommandHandlerTest.cs (1)
49Assert.Equal(expectedCode, view.TextSnapshot.GetText());
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (1)
94=> Assert.Equal(result, session.SubjectBuffer.CurrentSnapshot.GetText());
AutomaticCompletion\AbstractAutomaticLineEnderTests.cs (1)
110Assert.Equal(expected, buffer.CurrentSnapshot.GetText());
Classification\ClassificationTestHelper.cs (3)
30Assert.Equal(expectedText, actualText); 55Assert.Equal(expected.Text, text); 56Assert.Equal(expected.ClassificationName, actual.ClassificationType);
CommentSelection\AbstractToggleCommentTestBase.cs (1)
72Assert.Equal(actualExpectedText, textBuffer.CurrentSnapshot.GetText());
Completion\AbstractArgumentProviderTests`1.cs (1)
72Assert.Equal(expectedDefaultValue, context.DefaultValue);
Completion\AbstractCompletionProviderTests.cs (4)
501Assert.Equal(codeBeforeCommit, actualExpectedCode); 543Assert.Equal(codeBeforeCommit, actualExpectedCode); 558Assert.Equal(actualExpectedCode, actualCodeAfterCommit); 622Assert.Equal(expectedCodeAfterCommit, text.ToString());
DocumentationComments\AbstractDocumentationCommentTests.cs (2)
165Assert.Equal(expectedCode, actual); 170Assert.Equal(expectedMarkup, actualWithCaret);
DocumentationComments\AbstractXmlTagCompletionTests.cs (1)
42Assert.Equal(expectedCode, view.TextSnapshot.GetText());
ExtractInterface\AbstractExtractInterfaceTests.cs (7)
115Assert.Equal(expectedMemberName, testState.TestExtractInterfaceOptionsService.AllExtractableMembers.Single().Name); 120Assert.Equal(expectedInterfaceName, testState.TestExtractInterfaceOptionsService.DefaultInterfaceName); 125Assert.Equal(expectedNamespaceName, testState.TestExtractInterfaceOptionsService.DefaultNamespace); 130Assert.Equal(expectedTypeParameterSuffix, testState.TestExtractInterfaceOptionsService.GeneratedNameTypeParameterSuffix); 137Assert.Equal(expectedUpdatedOriginalDocumentCode, updatedCode); 144Assert.Equal(expectedInterfaceCode, interfaceCode); 164Assert.Equal(expectedMarkup, updatedCode);
Formatting\CoreFormatterTestsBase.cs (4)
150Assert.Equal(expected, view.TextSnapshot.GetText()); 217Assert.Equal(expected, newRootNode.ToFullString()); 267Assert.Equal(expected, view.TextSnapshot.GetText()); 293Assert.Equal(expected, actual);
NavigateTo\AbstractNavigateToTests.cs (8)
175Assert.Equal(expectedItem.Name, actualItem.Name); 178Assert.Equal(expectedItem.Language, actualItem.Language); 179Assert.Equal(expectedItem.Kind, actualItem.Kind); 193Assert.Equal(name, result.Name); 195Assert.Equal(this.Language, result.Language); 196Assert.Equal(navigateToItemKind, result.Kind); 204Assert.Equal(displayMarkup, itemDisplay.Name); 211Assert.Equal(additionalInfo, itemDisplay.AdditionalInformation);
QuickInfo\AbstractSemanticQuickInfoSourceTests.cs (1)
68Assert.Equal(expectedText, actualText);
QuickInfo\ToolTipAssert.cs (4)
78Assert.Equal(expected.AutomationName, actual.AutomationName); 92Assert.Equal(expected.ClassificationTypeName, actual.ClassificationTypeName); 93Assert.Equal(expected.Text, actual.Text); 94Assert.Equal(expected.Tooltip, actual.Tooltip);
Rename\RenamerTests.cs (1)
93Assert.Equal(endDocument.DocumentName, updatedDocument.Name);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
245Assert.Equal(expectedTestItem.Description, ToString(actualSignatureHelpItem.DescriptionParts)); 253Assert.Equal(string.Join(", ", classificationTypeNames), string.Join(", ", classifiedSpans.Select(s => s.ClassificationType)));
Structure\AbstractSyntaxStructureProviderTests.cs (1)
111Assert.Equal(expected.BannerText, actual.BannerText);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (141)
CodeFixes\CodeFixServiceTests.cs (3)
128Assert.Equal(codeFix.FixableDiagnosticIds.Single(), analyzerWithFix.SupportedDiagnostics.Single().Id); 892Assert.Equal("Additional Document", txtDocument.GetTextSynchronously(CancellationToken.None).ToString()); 893Assert.Equal($"Additional Document{fixer1.Title}", changedtxtDocument.GetTextSynchronously(CancellationToken.None).ToString());
CodeFixes\ExtensionOrderingTests.cs (3)
81Assert.Equal(PredefinedConfigurationFixProviderNames.Suppression, actualOrder[0].Metadata.Name); 82Assert.Equal(PredefinedConfigurationFixProviderNames.ConfigureCodeStyleOption, actualOrder[1].Metadata.Name); 83Assert.Equal(PredefinedConfigurationFixProviderNames.ConfigureSeverity, actualOrder[2].Metadata.Name);
CodeGeneration\CodeGenerationTests.cs (1)
962Assert.Equal(_expected, actual);
CodeRefactorings\CodeRefactoringServiceTest.cs (2)
183Assert.Equal(refactoring1.Title, changedtxtDocument.GetTextSynchronously(CancellationToken.None).ToString()); 222Assert.Equal(refactoring1.Title, changedEditorConfig.GetTextSynchronously(CancellationToken.None).ToString());
Collections\Immutable\Maps\MapTests.cs (2)
24Assert.Equal("1", v.Key); 30Assert.Equal("1", ((KeyValuePair<string, int>)v).Key);
Diagnostics\AnalyzerLoadFailureTests.cs (1)
35Assert.Equal(languageName, diagnostic.Language);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (5)
677Assert.Equal($"#pragma warning disable {NamedTypeAnalyzer.DiagnosticId} // Unnecessary", pragma1); 679Assert.Equal($"#pragma warning disable CS0168 // Variable is declared but never used - Unnecessary", pragma2); 684Assert.Equal($@"System.Diagnostics.CodeAnalysis.SuppressMessage(""Category2"", ""{NamedTypeAnalyzer.DiagnosticId}"")", attribute1); 686Assert.Equal($@"System.Diagnostics.CodeAnalysis.SuppressMessage(""Category3"", ""CS0168"")", attribute2); 783Assert.Equal(expectedText, actualText);
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (1)
85Assert.Equal("https://github.com/dotnet/roslyn/issues/41640", helpLinkUri);
EditAndContinue\EditAndContinueLanguageServiceTests.cs (2)
276Assert.Equal(source1, (await documentState.GetTextAsync(CancellationToken.None)).ToString()); 283Assert.Equal(source1, (await document.GetTextAsync(CancellationToken.None)).ToString());
EditorAdapter\TextSnapshotImplementationTest.cs (3)
34Assert.Equal(tuple.Item1.GetText(), text.ToString()); 45Assert.Equal("goo", line1.ToString()); 56Assert.Equal("bar", line1.ToString());
EditorConfigSettings\Data\CodeStyleSettingsTest.cs (4)
41Assert.Equal(string.Empty, setting.Category); 42Assert.Equal("TestDesciption", setting.Description); 72Assert.Equal(string.Empty, setting.Category); 73Assert.Equal("TestDesciption", setting.Description);
Emit\CompilationOutputFilesTests.cs (1)
53Assert.Equal("lib", mdReader.GetString(mdReader.GetAssemblyDefinition().Name));
Extensions\IProjectionBufferFactoryServiceExtensionsTests.cs (8)
73Assert.Equal("...", lines[0].GetText()); 74Assert.Equal(" line 2", lines[1].GetText()); 75Assert.Equal("...", lines[2].GetText()); 76Assert.Equal(" line 4", lines[3].GetText()); 103Assert.Equal("line 1", lines[0].GetText()); 104Assert.Equal("...", lines[1].GetText()); 105Assert.Equal("line 3", lines[2].GetText()); 106Assert.Equal(" line 4", lines[3].GetText());
Extensions\ITextExtensionsTests.cs (16)
19Assert.Equal(string.Empty, leadingWhitespace); 26Assert.Equal(" ", leadingWhitespace); 33Assert.Equal("\t\t", leadingWhitespace); 40Assert.Equal(" \t ", leadingWhitespace); 47Assert.Equal(string.Empty, leadingWhitespace); 54Assert.Equal(" ", leadingWhitespace); 61Assert.Equal("\t\t", leadingWhitespace); 68Assert.Equal(" \t ", leadingWhitespace); 75Assert.Equal(string.Empty, leadingWhitespace); 82Assert.Equal(" ", leadingWhitespace); 89Assert.Equal("\t\t", leadingWhitespace); 96Assert.Equal(" \t ", leadingWhitespace); 103Assert.Equal(string.Empty, leadingWhitespace); 110Assert.Equal(" ", leadingWhitespace); 117Assert.Equal("\t\t", leadingWhitespace); 124Assert.Equal(" \t ", leadingWhitespace);
Extensions\ITextSnapshotExtensionsTests.cs (16)
23Assert.Equal(string.Empty, leadingWhitespace); 30Assert.Equal(" ", leadingWhitespace); 37Assert.Equal(" \t ", leadingWhitespace); 44Assert.Equal("\t\t", leadingWhitespace); 51Assert.Equal(string.Empty, leadingWhitespace); 58Assert.Equal(" ", leadingWhitespace); 65Assert.Equal(" \t ", leadingWhitespace); 72Assert.Equal("\t\t", leadingWhitespace); 79Assert.Equal(string.Empty, leadingWhitespace); 86Assert.Equal(" ", leadingWhitespace); 93Assert.Equal(" \t ", leadingWhitespace); 100Assert.Equal("\t\t", leadingWhitespace); 107Assert.Equal(string.Empty, leadingWhitespace); 114Assert.Equal(" ", leadingWhitespace); 121Assert.Equal(" \t ", leadingWhitespace); 128Assert.Equal("\t\t", leadingWhitespace);
InheritanceMargin\InheritanceMarginTests.cs (2)
141Assert.Equal(expectedTarget.TargetSymbolName, actualTarget.DisplayName); 148Assert.Equal(expectedTarget.ProjectName, actualTarget.ProjectName);
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (2)
91Assert.Equal(s_expectedCode, (await workspace.CurrentSolution.GetRequiredDocument(documentId).GetTextAsync()).ToString()); 92Assert.Equal(s_expectedCode, (await workspace.CurrentSolution.GetRequiredDocument(linkedDocumentId).GetTextAsync()).ToString());
MetadataAsSource\AbstractMetadataAsSourceTests.cs (1)
64Assert.Equal(expected, lineText);
MetadataAsSource\DocCommentFormatterTests.cs (2)
33Assert.Equal(expectedCSharp, csharpFormattedComment); 34Assert.Equal(expectedVB, vbFormattedComment);
MetadataAsSource\MetadataAsSourceTests.cs (2)
1718Assert.Equal("mscorlib", openedDocument.Project.AssemblyName); 1719Assert.Equal("mscorlib", openedDocument.Project.Name);
MetadataAsSource\MetadataAsSourceTests.CSharp.cs (1)
33Assert.Equal(expectedXMLFragment, extractedXMLFragment);
MetadataAsSource\MetadataAsSourceTests.VisualBasic.cs (1)
193Assert.Equal(expectedXMLFragment, extractedXMLFragment);
Preview\PreviewWorkspaceTests.cs (1)
82Assert.Equal(previewWorkspace.CurrentSolution.Projects.First().Documents.First().GetTextAsync().Result.ToString(), text);
RenameTracking\RenameTrackingTaggerProviderTests.cs (11)
605Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 628Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 651Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 674Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 700Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 732Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 763Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 959Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 988Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 1025Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText()); 1438Assert.Equal(expectedCode, state.HostDocument.GetTextBuffer().CurrentSnapshot.GetText());
StackTraceExplorer\StackTraceExplorerTests.cs (1)
70Assert.Equal(contents[i], frames[i].ToString());
Structure\BlockSpanTests.cs (3)
29Assert.Equal(bannerText, outliningRegion.BannerText); 45Assert.Equal("{Span=[0..1), HintSpan=[2..3), BannerText=\"Goo\", AutoCollapse=True, IsDefaultCollapsed=False}", outliningRegion.ToString()); 59Assert.Equal("{Span=[0..1), BannerText=\"Goo\", AutoCollapse=True, IsDefaultCollapsed=False}", outliningRegion.ToString());
Structure\StructureTaggerTests.cs (38)
71Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Namespace : PredefinedStructureTagTypes.Nonstructural, namespaceTag.Type); 72Assert.Equal("namespace MyNamespace", GetHeaderText(namespaceTag)); 78Assert.Equal(showBlockStructureGuidesForCommentsAndPreprocessorRegions ? PredefinedStructureTagTypes.PreprocessorRegion : PredefinedStructureTagTypes.Nonstructural, regionTag.Type); 79Assert.Equal("#region MyRegion", GetHeaderText(regionTag)); 85Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Type : PredefinedStructureTagTypes.Nonstructural, classTag.Type); 86Assert.Equal("public class MyClass", GetHeaderText(classTag)); 92Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Member : PredefinedStructureTagTypes.Nonstructural, methodTag.Type); 93Assert.Equal("static void Main(string[] args)", GetHeaderText(methodTag)); 99Assert.Equal(showBlockStructureGuidesForCodeLevelConstructs ? PredefinedStructureTagTypes.Conditional : PredefinedStructureTagTypes.Nonstructural, ifTag.Type); 100Assert.Equal("if (false)", GetHeaderText(ifTag)); 136Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Imports : PredefinedStructureTagTypes.Nonstructural, importsTag.Type); 137Assert.Equal("using ", GetHeaderText(importsTag)); 142Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Type : PredefinedStructureTagTypes.Nonstructural, classTag.Type); 143Assert.Equal("public class Bar", GetHeaderText(classTag)); 182Assert.Equal(showBlockStructureGuidesForCommentsAndPreprocessorRegions ? PredefinedStructureTagTypes.Comment : PredefinedStructureTagTypes.Nonstructural, commentsTag.Type); 183Assert.Equal("/// <summary>", GetHeaderText(commentsTag)); 188Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Type : PredefinedStructureTagTypes.Nonstructural, classTag.Type); 189Assert.Equal("public class Bar", GetHeaderText(classTag)); 226Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Namespace : PredefinedStructureTagTypes.Nonstructural, namespaceTag.Type); 227Assert.Equal("namespace Foo", GetHeaderText(namespaceTag)); 232Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Imports : PredefinedStructureTagTypes.Nonstructural, importsTag.Type); 233Assert.Equal("using ", GetHeaderText(importsTag)); 238Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Type : PredefinedStructureTagTypes.Nonstructural, classTag.Type); 239Assert.Equal("public class Bar", GetHeaderText(classTag)); 279Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Namespace : PredefinedStructureTagTypes.Nonstructural, namespaceTag.Type); 280Assert.Equal("Namespace MyNamespace", GetHeaderText(namespaceTag)); 286Assert.Equal(PredefinedStructureTagTypes.Nonstructural, regionTag.Type); 287Assert.Equal(@"#Region ""MyRegion""", GetHeaderText(regionTag)); 293Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Type : PredefinedStructureTagTypes.Nonstructural, moduleTag.Type); 294Assert.Equal("Module M", GetHeaderText(moduleTag)); 300Assert.Equal(showBlockStructureGuidesForDeclarationLevelConstructs ? PredefinedStructureTagTypes.Member : PredefinedStructureTagTypes.Nonstructural, methodTag.Type); 301Assert.Equal("Sub Main(args As String())", GetHeaderText(methodTag)); 307Assert.Equal(showBlockStructureGuidesForCodeLevelConstructs ? PredefinedStructureTagTypes.Conditional : PredefinedStructureTagTypes.Nonstructural, ifTag.Type); 308Assert.Equal("If False Then", GetHeaderText(ifTag)); 325Assert.Equal("Sub Main(args As String())\r\nEnd Sub", hints[1].GetText_TestOnly()); // method 347Assert.Equal("Module Program", GetHeaderText(programTag)); 352Assert.Equal("Sub Main(args As String())", GetHeaderText(mainTag)); 357Assert.Equal("If str.Contains(\"foo\") Then", GetHeaderText(IfTag));
TextEditor\OpenDocumentTests.cs (4)
65Assert.Equal("Hello, World!", newDocumentWithChanges.GetTextSynchronously(CancellationToken.None).ToString()); 66Assert.Equal("Hello, World!", newDocumentWithChanges.GetLinkedDocuments().Single().GetTextSynchronously(CancellationToken.None).ToString()); 71Assert.Equal("Hello", originalDocumentWithChanges.GetTextSynchronously(CancellationToken.None).ToString()); 72Assert.Equal("Hello", originalDocumentWithChanges.GetLinkedDocuments().Single().GetTextSynchronously(CancellationToken.None).ToString());
TextEditor\TryGetDocumentTests.cs (1)
43Assert.Equal(expected, newSourceText.ToString());
ValueTracking\AbstractBaseValueTrackingTests.cs (1)
89Assert.Equal(text, item.ToString());
Workspaces\TextFactoryTests.cs (2)
94Assert.Equal(text.ToString(), text2.ToString()); 114Assert.Equal(text.ToString(), text2.ToString());
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver.UnitTests (1)
VisualBasicParsingTests.cs (1)
50Assert.Equal(expectedKind, actualKind);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (8)
ResultProviderTestBase.cs (8)
490Assert.Equal(expected.Name, actual.Name); 491Assert.Equal(expected.FullName, actual.FullName); 501Assert.Equal(expectedSuccess.Value, actualSuccess.Value); 504Assert.Equal(expectedSuccess.Type, actualSuccess.Type); 515Assert.Equal(expectedSuccess.EditableValue, actualSuccess.EditableValue); 524Assert.Equal(expectedIntermediate.Expression, actualIntermediate.Expression); 532Assert.Equal(expectedFailed.ErrorMessage, actualFailed.ErrorMessage); 533Assert.Equal(expectedFailed.Type, actualFailed.Type);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Snippets\AbstractSnippetProviderTests.cs (1)
67Assert.Equal(markupAfterCommit, documentTextAfterSnippet.ToString());
Microsoft.CodeAnalysis.Features.UnitTests (11)
EditAndContinue\EditAndContinueDiagnosticDescriptorsTests.cs (10)
21Assert.Equal("ENC0001", d.Id); 22Assert.Equal(DiagnosticCategory.EditAndContinue, d.Category); 25Assert.Equal("", d.HelpLinkUri); 30Assert.Equal("ENC0087", EditAndContinueDiagnosticDescriptors.GetDescriptor(RudeEditKind.ComplexQueryExpression).Id); 33Assert.Equal("ENC1001", d.Id); 34Assert.Equal(DiagnosticCategory.EditAndContinue, d.Category); 37Assert.Equal("", d.HelpLinkUri); 43Assert.Equal("ENC2012", d.Id); 44Assert.Equal(DiagnosticCategory.EditAndContinue, d.Category); 47Assert.Equal("", d.HelpLinkUri);
EditAndContinue\EditAndContinueMethodDebugInfoReaderTests.cs (1)
112Assert.Equal("21-C8-B2-D7-A3-6B-49-C7-57-DF-67-B8-1F-75-DF-6A-64-FD-59-22", BitConverter.ToString([.. actualChecksum]));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (79)
CodeActions\RunCodeActionsTests.cs (1)
60Assert.Equal(expectedTextForB, textForB.ToString());
Completion\CompletionResolveTests.cs (1)
343Assert.Equal("(byte)", results.Label);
Diagnostics\PullDiagnosticTests.cs (2)
179Assert.Equal(vsDiagnostic.ExpandedMessage, AnalyzersResources.Avoid_unused_parameters_in_your_code_If_the_parameter_cannot_be_removed_then_change_its_name_so_it_starts_with_an_underscore_and_is_optionally_followed_by_an_integer_such_as__comma__1_comma__2_etc_These_are_treated_as_special_discard_symbol_names); 508Assert.Equal(csproj1Diagnostic.Identifier, csproj2Diagnostic.Identifier);
DocumentChanges\DocumentChangesTests.cs (9)
52Assert.Equal(documentText, document.ToString()); 57Assert.Equal(expected, document.ToString()); 85Assert.Equal(documentText, document.ToString()); 206Assert.Equal(expected, document.ToString()); 241Assert.Equal(documentText, documentTextFromWorkspace); 284Assert.Equal(expected, document.ToString()); 323Assert.Equal(expected, document.ToString()); 363Assert.Equal(expected, document.ToString()); 447Assert.Equal(expected, document.ToString());
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (2)
43Assert.Equal(documentText, document.GetTextSynchronously(CancellationToken.None).ToString()); 94Assert.Equal(updatedText, document.GetTextSynchronously(CancellationToken.None).ToString());
Formatting\FormatDocumentOnTypeTests.cs (2)
51Assert.Equal(expected, actualText); 82Assert.Equal(expected, actualText);
Formatting\FormatDocumentRangeTests.cs (2)
48Assert.Equal(expected, actualText); 76Assert.Equal(expected, actualText);
Formatting\FormatDocumentTests.cs (3)
49Assert.Equal(expected, actualText); 77Assert.Equal(expected, actualText); 105Assert.Equal(expected, actualText);
Hover\HoverTests.cs (1)
514Assert.Equal(expectedContent, content);
MapCode\MapCodeTests.cs (1)
136Assert.Equal(expected, actualText);
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
242Assert.Equal(LanguageNames.CSharp, miscDoc.Project.Language); 286Assert.Equal(LanguageNames.CSharp, miscDoc.Project.Language);
ProtocolConversionsTests.cs (20)
38Assert.Equal(expectedAbsoluteUri, ProtocolConversions.GetAbsoluteUriString(filePath)); 41Assert.Equal(expectedAbsoluteUri, uri.AbsoluteUri); 42Assert.Equal(filePath, uri.LocalPath); 65Assert.Equal(expectedAbsoluteUri, ProtocolConversions.GetAbsoluteUriString(filePath)); 68Assert.Equal(expectedAbsoluteUri, uri.AbsoluteUri); 69Assert.Equal(filePath.Replace('/', '\\'), uri.LocalPath); 79Assert.Equal(expectedRawUri, ProtocolConversions.GetAbsoluteUriString(filePath)); 82Assert.Equal(expectedNormalizedUri, uri.AbsoluteUri); 83Assert.Equal(Path.GetFullPath(filePath).Replace('/', '\\'), uri.LocalPath); 99Assert.Equal(expectedAbsoluteUri, ProtocolConversions.GetAbsoluteUriString(filePath)); 102Assert.Equal(expectedAbsoluteUri, uri.AbsoluteUri); 103Assert.Equal(filePath, uri.LocalPath); 126Assert.Equal(expectedUri, uri.AbsoluteUri); 144Assert.Equal(expectedRelativeUri, uri.AbsoluteUri); 154Assert.Equal(expectedRawUri, ProtocolConversions.GetAbsoluteUriString(filePath)); 157Assert.Equal(expectedNormalizedUri, uri.AbsoluteUri); 158Assert.Equal(filePath, uri.LocalPath); 167Assert.Equal(url, ProtocolConversions.CreateAbsoluteUri(url).AbsoluteUri); 179Assert.Equal(expectedAbsoluteUri, url.AbsoluteUri); 188Assert.Equal(expectedAbsoluteUri, url.AbsoluteUri);
References\FindAllReferencesHandlerTests.cs (1)
130Assert.Equal("class A", actualText);
Symbols\DocumentSymbolsTests.cs (1)
165Assert.Equal(expected.Name, actual.Name);
UriTests.cs (7)
153Assert.Equal(fileDocumentText, fileTextResult.ToString()); 160Assert.Equal(gitDocumentText, gitText.ToString()); 190Assert.Equal("LSP text", originalText.ToString()); 207Assert.Equal("LSP text", encodedText.ToString()); 242Assert.Equal("LSP text", originalText.ToString()); 255Assert.Equal("LSP text", lowerCaseText.ToString()); 290Assert.Equal("LSP text", originalText.ToString());
Workspaces\LspWorkspaceManagerTests.cs (24)
38Assert.Equal("LSP text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 44Assert.Equal("More textLSP text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 95Assert.Equal($"Some more text{markupOne}", (await firstDocumentWithChange.GetTextAsync(CancellationToken.None)).ToString()); 125Assert.Equal("LSP text", (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 130Assert.Equal("Two is now three!", (await secondDocument.GetTextAsync()).ToString()); 163Assert.Equal(markup, (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 196Assert.Equal("LSP text", (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 256Assert.Equal("LSP text", (await miscDocument.GetTextAsync(CancellationToken.None)).ToString()); 263Assert.Equal("More LSP textLSP text", miscText.ToString()); 275Assert.Equal("More LSP textLSP text", documentText.ToString()); 491Assert.Equal("Server one text", (await documentServerTwo.GetTextAsync(CancellationToken.None)).ToString()); 495Assert.Equal("Original text", (await documentServerTwo.GetTextAsync(CancellationToken.None)).ToString()); 526Assert.Equal("Text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 551Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 570Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 573Assert.Equal( 588Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 609Assert.Equal("Text", (await document.GetTextAsync(CancellationToken.None)).ToString()); 617Assert.Equal("New Disk Contents", (await document.GetTextAsync()).ToString()); 623Assert.Equal("Text", (await document.GetTextAsync(CancellationToken.None)).ToString()); 626Assert.Equal("Text", (await document.GetTextAsync()).ToString()); 650Assert.Equal(initialContents, originalSourceText.ToString()); 661Assert.Equal("namespace N { class C1 { void X() { } } class C2 { void Y() { } } class D3 { void Z() { } } }", newSourceText.ToString()); 696Assert.Equal(openText, (await lspDocument.GetTextAsync(CancellationToken.None)).ToString());
Microsoft.CodeAnalysis.Rebuild.UnitTests (14)
BasicDeterministicKeyBuilderTests.cs (2)
148Assert.Equal(effective.ToString(), obj.Value<string>("languageVersion")); 149Assert.Equal(languageVersion.ToString(), obj.Value<string>("specifiedLanguageVersion"));
CSharpDeterministicKeyBuilderTests.cs (4)
285Assert.Equal(binderFlags.ToString(), value.Value<string>("topLevelBinderFlags")); 286Assert.Equal(nullableContextOptions.ToString(), value.Value<string>("nullableContextOptions")); 330Assert.Equal(effective.ToString(), obj.Value<string>("languageVersion")); 331Assert.Equal(languageVersion.ToString(), obj.Value<string>("specifiedLanguageVersion"));
DeterministicKeyBuilderTests.cs (8)
82Assert.Equal(expected, actual); 316Assert.Equal(outputKind.ToString(), obj.Value<string>("outputKind")); 354Assert.Equal(key, compilation.GetDeterministicKey()); 376Assert.Equal(expected.ToString(), actual.ToString()); 432Assert.Equal(sourceCodeKind.ToString(), obj.Value<string>("kind")); 433Assert.Equal(documentationMode.ToString(), obj.Value<string>("documentationMode")); 568Assert.Equal(@"util.pdb", obj.Value<string>("pdbFilePath")); 585Assert.Equal(@"c:\src\util.pdb", obj.Value<string>("pdbFilePath"));
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (2)
TelemetryLoggerTests.cs (2)
100Assert.Equal("vs/ide/vbcs/debugging/encsession/editsession/emitdeltaerrorid", postedEvent.Name); 122Assert.Equal("vs/ide/vbcs/debugging/encsession/editsession/emitdeltaerrorid", scope.EndEvent.Name);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (15)
GlobalAssemblyCacheTests.cs (8)
30Assert.Equal("mscorlib", name.Name); 37Assert.Equal("mscorlib", name.Name); 44Assert.Equal("mscorlib", name.Name); 51Assert.Equal("System.Core", name.Name); 60Assert.Equal("System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", name.GetDisplayName()); 71Assert.Equal("System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", name.GetDisplayName()); 99Assert.Equal("netstandard", name.Name); 116Assert.Equal(Path.GetFullPath(location), location);
MetadataShadowCopyProviderTests.cs (7)
91Assert.Equal(dll.Path, sc1.PrimaryModule.OriginalPath); 231Assert.Equal(Path.Combine(Path.GetDirectoryName(sc.PrimaryModule.FullPath), @"a.xml"), sc.DocumentationFile.FullPath); 232Assert.Equal("Invariant", File.ReadAllText(sc.DocumentationFile.FullPath)); 237Assert.Equal(Path.Combine(Path.GetDirectoryName(sc.PrimaryModule.FullPath), @"el-GR", "a.xml"), sc.DocumentationFile.FullPath); 238Assert.Equal("Greek", File.ReadAllText(sc.DocumentationFile.FullPath)); 243Assert.Equal(Path.Combine(Path.GetDirectoryName(sc.PrimaryModule.FullPath), @"a.xml"), sc.DocumentationFile.FullPath); 244Assert.Equal("Invariant", File.ReadAllText(sc.DocumentationFile.FullPath));
Microsoft.CodeAnalysis.Scripting.TestUtilities (6)
ObjectFormatterTestBase.cs (3)
26Assert.Equal(expected[i] + " {", line); 30Assert.Equal(expected[i] + Environment.NewLine + "}" + Environment.NewLine, line); 34Assert.Equal(expected[i] + ",", line);
ScriptingTestHelpers.cs (3)
30Assert.Equal(expectedOutput, output.Trim()); 45Assert.Equal(expectedOutput, output.Trim()); 57Assert.Equal(expectedOutput, output.Trim());
Microsoft.CodeAnalysis.Scripting.UnitTests (2)
NuGetPackageResolverTests.cs (2)
47Assert.Equal(expectedName, name); 48Assert.Equal(expectedVersion, version);
Microsoft.CodeAnalysis.Test.Utilities (16)
CommonTestBase.cs (1)
667Assert.Equal(original, cloned);
Compilation\OperationTreeVerifier.cs (1)
879Assert.Equal(argumentNames[i], operation.GetArgumentName(i));
Compilation\TestOperationVisitor.cs (3)
56Assert.Equal(LanguageNames.CSharp, operation.Parent.Language); 1489Assert.Equal("Deconstruct", method.Name); 1493Assert.Equal("ITuple", type.Name);
Diagnostics\CommonDiagnosticAnalyzers.cs (5)
1289Assert.Equal(new ArgumentNullException("operationBlock").Message, ex.Message); 1298Assert.Equal(new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, "operationBlock").Message, ex.Message); 2175Assert.Equal(SuppressionDescriptor.SuppressedDiagnosticId, diagnostic.Id); 2308Assert.Equal(_unsupportedDescriptor.SuppressedDiagnosticId, diagnostic.Id); 2340Assert.Equal(_supportedDescriptor.SuppressedDiagnosticId, diagnostic.Id);
EncodingTestHelpers.cs (1)
55Assert.Equal(expected.WebName, actual.WebName);
PDB\DeterministicBuildCompilationTestHelpers.cs (4)
31Assert.Equal(expectedValueString, actualValueString); 63Assert.Equal(compilerVersion.ToString(), pdbOptions["compiler-version"]); 66Assert.Equal(runtimeVersion, pdbOptions[CompilationOptionNames.RuntimeVersion]); 73Assert.Equal(compilation.Language, pdbOptions["language"]);
PDB\MetadataReferenceInfo.cs (1)
44Assert.Equal(Name, other.Name);
Microsoft.CodeAnalysis.UnitTests (584)
AnalyzerAssemblyLoaderTests.cs (30)
188Assert.Equal("TestAnalyzer", analyzers[0].ToString()); 260Assert.Equal(expected, actual); 284Assert.Equal(name.FullName, assembly.GetName().FullName); 328Assert.Equal(@"", actual); 335Assert.Equal(@"Delta: Gamma: Beta: Test B 483Assert.Equal(@"Delta: Gamma: Test G 515Assert.Equal(@"Delta: Gamma: Test G 545Assert.Equal(externalAccessRazorPath, assembly.Location); 583Assert.Equal(externalAccessRazorPath, razorAssembly.Location); 631Assert.Equal(@"Delta: Gamma: Test G 680Assert.Equal(@"Delta: Gamma: Test G 710Assert.Equal("TestAnalyzer", analyzers[0].ToString()); 768Assert.Equal( 811Assert.Equal( 829Assert.Equal( 864Assert.Equal( 879Assert.Equal( 951Assert.Equal( 968Assert.Equal( 1013Assert.Equal( 1027Assert.Equal( 1081Assert.Equal( 1089Assert.Equal( 1120Assert.Equal( 1154Assert.Equal( 1184Assert.Equal( 1214Assert.Equal("42", sb.ToString()); 1233Assert.Equal(ExecutionConditionUtil.IsCoreClr ? "1" : "42", sb.ToString()); 1322Assert.Equal( 1364Assert.Equal(@"Delta: Gamma: Test G
Analyzers\AnalyzerConfigTests.cs (46)
58Assert.Equal("/bogus", config.NormalizedDirectory); 113Assert.Equal("abc123", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 116Assert.Equal("def456", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 135Assert.Equal("abc123", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 138Assert.Equal("abc123", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 141Assert.Equal("def456", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 144Assert.Equal("def456", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 147Assert.Equal("global", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 150Assert.Equal("global", sectionOptions.AnalyzerOptions["build_metadata.compile.toretrieve"]); 159Assert.Equal("Z:/bogus", config.NormalizedDirectory); 160Assert.Equal(path, config.PathToFile); 378Assert.Equal("^.*/abc$", matcher.Regex.ToString()); 390Assert.Equal("^.*/[^/]*$", matcher.Regex.ToString()); 401Assert.Equal("^.*/[^/]*\\.cs$", matcher.Regex.ToString()); 418Assert.Equal("^.*/.*\\.cs$", matcher.Regex.ToString()); 428Assert.Equal("^.*/\\.\\.\\.$", matcher.Regex.ToString()); 448Assert.Equal("^.*/ab.def$", matcher.Regex.ToString()); 461Assert.Equal("^.*/ab\\\\c$", matcher.Regex.ToString()); 472Assert.Equal("^.*/\\*.*\\*\\*[^/]*$", matcher.Regex.ToString()); 484Assert.Equal("^.*/\\?.\\?[^/]*\\?.$", matcher.Regex.ToString()); 498Assert.Equal(@"^.*/abc\{}def$", matcher.Regex.ToString()); 510Assert.Equal("^.*/abc,def$", matcher.Regex.ToString()); 523Assert.Equal("^.*/[^/]*\\.(?:cs|vb|fs)$", matcher.Regex.ToString()); 553Assert.Equal("^/(?:[^/]*\\.cs|subdir/test\\.vb)$", matcher.Regex.ToString()); 567Assert.Equal("^.*/(?:)$", matcher.Regex.ToString()); 579Assert.Equal("^.*/(?:[^/]*\\.cs)$", matcher.Regex.ToString()); 605Assert.Equal("^.*/(?:test(?:\\.cs|\\.vb)|other\\.(?:a(?:bb|cc)))$", matcher.Regex.ToString()); 625Assert.Equal("^.*/ab(?:-)cd(?:-|)ef$", matcher.Regex.ToString()); 639Assert.Equal("^.*/ab(?:cs|vb|fs)cd$", matcher.Regex.ToString()); 759Assert.Equal(@"^.*/[^/]*\.[cf]s$", matcher.Regex.ToString()); 770Assert.Equal(@"^.*/[^/]*\.[^cf]s$", matcher.Regex.ToString()); 783Assert.Equal(@"^.*/[^/]*\.[\^cf]s$", matcher.Regex.ToString()); 797Assert.Equal("^.*/[0-9]x$", matcher.Regex.ToString()); 810Assert.Equal("^.*/[^0-9]x$", matcher.Regex.ToString()); 823Assert.Equal("^.*/[ab0-9]x$", matcher.Regex.ToString()); 868Assert.Equal(@"^.*/[\[a]bc$", matcher.Regex.ToString()); 883Assert.Equal(@"^.*/[-ac]bd$", matcher.Regex.ToString()); 898Assert.Equal(@"^.*/[ac-]bd$", matcher.Regex.ToString()); 912Assert.Equal(@"^.*/[ab]]cd$", matcher.Regex.ToString()); 927Assert.Equal(@"^.*/[ab\\]cd$", matcher.Regex.ToString()); 940Assert.Equal(@"^.*/ab\[cd$", matcher.Regex.ToString()); 1591Assert.Equal("cs000", options[0].TreeOptions.Keys.Single()); 2397Assert.Equal("123", sectionOptions.AnalyzerOptions["global_level"]); 2611Assert.Equal("b", options.AnalyzerOptions["a"]); 2637Assert.Equal("a", options.AnalyzerOptions["a"]); 2638Assert.Equal("b", options.AnalyzerOptions["b"]);
Analyzers\AnalyzerFileReferenceTests.cs (47)
59Assert.Equal("\0<>|*", refBadPath.Display); 202Assert.Equal(expected: "Goo", actual: reference.Display); 210Assert.Equal(expected: "Alpha", actual: reference.Display); 274Assert.Equal("Analyzer", error.TypeName); 521Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+SomeType+NestedAnalyzer", csharpAnalyzers[0]); 522Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzer", csharpAnalyzers[1]); 523Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzerCS", csharpAnalyzers[2]); 524Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestAnalyzerCSVB", csharpAnalyzers[3]); 528Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+SomeType+NestedAnalyzer", vbAnalyzers[0]); 529Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzer", vbAnalyzers[1]); 530Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzerVB", vbAnalyzers[2]); 531Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestAnalyzerCSVB", vbAnalyzers[3]); 536Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+SomeType+NestedAnalyzer", allAnalyzers[0]); 537Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzer", allAnalyzers[1]); 538Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzerCS", allAnalyzers[2]); 539Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestAnalyzerCSVB", allAnalyzers[3]); 540Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+SomeType+NestedAnalyzer", allAnalyzers[4]); 541Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzer", allAnalyzers[5]); 542Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestAnalyzerVB", allAnalyzers[6]); 543Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestAnalyzerCSVB", allAnalyzers[7]); 554Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+SomeType+NestedGenerator", csharpGenerators[0]); 555Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestGenerator", csharpGenerators[1]); 556Assert.Equal("Microsoft.CodeAnalysis.UnitTests.BaseGenerator", csharpGenerators[2]); 557Assert.Equal("Microsoft.CodeAnalysis.UnitTests.CSharpAndVisualBasicGenerator", csharpGenerators[3]); 558Assert.Equal("Microsoft.CodeAnalysis.UnitTests.ExplicitCSharpOnlyGenerator", csharpGenerators[4]); 559Assert.Equal("Microsoft.CodeAnalysis.UnitTests.SubClassedGenerator", csharpGenerators[5]); 560Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestGenerator", csharpGenerators[6]); 561Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestIncrementalGenerator", csharpGenerators[7]); 562Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestSourceAndIncrementalGenerator", csharpGenerators[8]); 563Assert.Equal("Microsoft.CodeAnalysis.UnitTests.VisualBasicAndCSharpGenerator", csharpGenerators[9]); 567Assert.Equal("Microsoft.CodeAnalysis.UnitTests.CSharpAndVisualBasicGenerator", vbGenerators[0]); 568Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestIncrementalGenerator", vbGenerators[1]); 569Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestSourceAndIncrementalGenerator", vbGenerators[2]); 570Assert.Equal("Microsoft.CodeAnalysis.UnitTests.VisualBasicAndCSharpGenerator", vbGenerators[3]); 571Assert.Equal("Microsoft.CodeAnalysis.UnitTests.VisualBasicOnlyGenerator", vbGenerators[4]); 576Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+SomeType+NestedGenerator", allGenerators[0]); 577Assert.Equal("Microsoft.CodeAnalysis.UnitTests.AnalyzerFileReferenceTests+TestGenerator", allGenerators[1]); 578Assert.Equal("Microsoft.CodeAnalysis.UnitTests.BaseGenerator", allGenerators[2]); 579Assert.Equal("Microsoft.CodeAnalysis.UnitTests.CSharpAndVisualBasicGenerator", allGenerators[3]); 580Assert.Equal("Microsoft.CodeAnalysis.UnitTests.ExplicitCSharpOnlyGenerator", allGenerators[4]); 581Assert.Equal("Microsoft.CodeAnalysis.UnitTests.SubClassedGenerator", allGenerators[5]); 582Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestGenerator", allGenerators[6]); 583Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestIncrementalGenerator", allGenerators[7]); 584Assert.Equal("Microsoft.CodeAnalysis.UnitTests.TestSourceAndIncrementalGenerator", allGenerators[8]); 585Assert.Equal("Microsoft.CodeAnalysis.UnitTests.VisualBasicAndCSharpGenerator", allGenerators[9]); 586Assert.Equal("Microsoft.CodeAnalysis.UnitTests.FSharpGenerator", allGenerators[10]); 587Assert.Equal("Microsoft.CodeAnalysis.UnitTests.VisualBasicOnlyGenerator", allGenerators[11]);
AssemblyUtilitiesTests.cs (2)
125Assert.Equal(expected: "netstandard", actual: results[0].Name); 140Assert.Equal(expected: "Alpha", actual: result.Name);
Collections\ImmutableArrayExtensionsTests.cs (2)
47Assert.Equal("hello", e.First()); 49Assert.Equal("hello", aa[0]);
Collections\ImmutableDictionaryBuilderTestBase.nonnetstandard.cs (3)
24Assert.Equal("a", actualKey); 27Assert.Equal("a", actualKey); 30Assert.Equal("b", actualKey);
Collections\ImmutableDictionaryTestBase.cs (3)
228Assert.Equal("a", actualKey); 231Assert.Equal("a", actualKey); 234Assert.Equal("b", actualKey);
Collections\ImmutableSetTest.nonnetstandard.cs (2)
104Assert.Equal("foo", actual); 107Assert.Equal("nonexistent", actual);
Collections\RopeTests.cs (6)
39Assert.Equal(string.Empty, r.ToString()); 59Assert.Equal(s, Rope.ForString(s).ToString()); 77Assert.Equal(c1.ToString(), s); 78Assert.Equal(c2.ToString(), s); 83Assert.Equal(c3.ToString(), s); 114Assert.Equal(concatted[..i], r.ToString(i));
CommonCommandLineParserTests.cs (20)
27Assert.Equal(expected[i], actual[i]); 74Assert.Equal(messageFormatter(), e.Message); 453Assert.Equal("goo.ruleset", ruleSet.Includes.First().IncludePath); 1017Assert.Equal(expected: file.Path, actual: includePaths[0]); 1054Assert.Equal(expected: file.Path, actual: includePaths[0]); 1055Assert.Equal(expected: include.Path, actual: includePaths[1]); 1106Assert.Equal(expected: file.Path, actual: includePaths[0]); 1107Assert.Equal(expected: include1.Path, actual: includePaths[1]); 1108Assert.Equal(expected: include2.Path, actual: includePaths[2]); 1237Assert.Equal(@"\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\test.cs")); 1238Assert.Equal(@"\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"""\\test.cs""")); 1239Assert.Equal(@"\\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\\test.cs")); 1240Assert.Equal(@"\\\\test.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\\\test.cs")); 1241Assert.Equal(@"\\test\a\b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\test\a\b.cs")); 1242Assert.Equal(@"\\\\test\\a\\b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"\\\\test\\a\\b.cs")); 1243Assert.Equal(@"a""b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"a\""b.cs")); 1244Assert.Equal(@"a"" mid ""b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"a\"" mid \""b.cs")); 1245Assert.Equal(@"a mid b.cs", CommandLineParser.RemoveQuotesAndSlashes(@"a"" mid ""b.cs")); 1246Assert.Equal(@"a.cs", CommandLineParser.RemoveQuotesAndSlashes(@"""a.cs""")); 1247Assert.Equal(@"C:""My Folder\MyBinary.xml", CommandLineParser.RemoveQuotesAndSlashes(@"C:\""My Folder""\MyBinary.xml"));
CommonSyntaxTests.cs (18)
52Assert.Equal("", d.Language); 55Assert.Equal("", d.ToString()); 56Assert.Equal("", d.ToFullString()); 57Assert.Equal("SyntaxNodeOrToken None ", d.GetDebuggerDisplay()); 69Assert.Equal("", d.Language); 72Assert.Equal("", d.ToString()); 73Assert.Equal("", d.ToFullString()); 74Assert.Equal("SyntaxNodeOrToken None ", d.GetDebuggerDisplay()); 81Assert.Equal("test", node.ToString()); 84Assert.Equal("test", nodeOrToken.ToString()); 87Assert.Equal("test", token.ToString()); 90Assert.Equal("test", trivia.ToString()); 97Assert.Equal("test", node.ToString()); 100Assert.Equal("test", nodeOrToken.ToString()); 103Assert.Equal("test", token.ToString()); 106Assert.Equal("test", trivia.ToString()); 220Assert.Equal("(((a) + (b)) + (c)) + (d)", trackedExpr.ToString()); 243Assert.Equal("(((a) + (b)) + (c)) + (d)", trackedExpr.ToString());
CorLibTypesTests.cs (5)
244Assert.Equal($"ConstantValueNull(null: {value})", cv.ToString()); 247Assert.Equal($"ConstantValueNull(null: {value})", cv.ToString()); 253Assert.Equal(@"ConstantValueString(""QC"": String)", cv.ToString()); 256Assert.Equal("ConstantValueI8(-128: SByte)", cv.ToString()); 259Assert.Equal("ConstantValueI64(123456789: UInt64)", cv.ToString());
Diagnostics\DiagnosticLocalizationTests.cs (20)
53Assert.Equal(fixedTitle, descriptor.Title.ToString(arCulture)); 54Assert.Equal(fixedMessageFormat, descriptor.MessageFormat.ToString(arCulture)); 55Assert.Equal(fixedDescription, descriptor.Description.ToString(arCulture)); 82Assert.Equal(localizedTitle, descriptor.Title.ToString(arCulture)); 83Assert.Equal(localizedMessageFormat, descriptor.MessageFormat.ToString(arCulture)); 84Assert.Equal(localizedDescription, descriptor.Description.ToString(arCulture)); 92Assert.Equal(fixedTitle, localizableDiagnostic.Descriptor.Title.ToString()); 93Assert.Equal(fixedMessageFormat, localizableDiagnostic.GetMessage()); 94Assert.Equal(fixedDescription, localizableDiagnostic.Descriptor.Description.ToString()); 97Assert.Equal(fixedTitle, localizableDiagnostic.Descriptor.Title.ToString(CustomResourceManager.DefaultCulture)); 98Assert.Equal(fixedMessageFormat, localizableDiagnostic.GetMessage(CustomResourceManager.DefaultCulture)); 99Assert.Equal(fixedDescription, localizableDiagnostic.Descriptor.Description.ToString(CustomResourceManager.DefaultCulture)); 102Assert.Equal(localizedTitle, localizableDiagnostic.Descriptor.Title.ToString(arCulture)); 103Assert.Equal(localizedMessageFormat, localizableDiagnostic.GetMessage(arCulture)); 104Assert.Equal(localizedDescription, localizableDiagnostic.Descriptor.Description.ToString(arCulture)); 117Assert.Equal(expected, localizableResource.ToString()); 120Assert.Equal(expected, localizableResource.ToString(CustomResourceManager.DefaultCulture)); 125Assert.Equal(expected, localizableResource.ToString(arCulture)); 180Assert.Equal(expectedResourceValue, actual); 317Assert.Equal(descriptor.Id, descriptors[0].Id);
Diagnostics\OperationTests.cs (10)
59Assert.Equal(name, dynamicExpression.GetArgumentName(0)); 158Assert.Equal(new ArgumentException(argumentExceptionMessage, "body").Message, ex.Message); 176Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 194Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 212Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 234Assert.Equal(new ArgumentException(argumentExceptionMessage, "constructorBody").Message, ex.Message); 254Assert.Equal(new ArgumentException(argumentExceptionMessage, "methodBody").Message, ex.Message); 287Assert.Equal(ex.Message, new ArgumentNullException("node").Message); 300Assert.Equal(ex.Message, new ArgumentNullException("semanticModel").Message); 315Assert.Equal(ex.Message, new ArgumentException(CodeAnalysisResources.NotARootOperation, "operation").Message);
Diagnostics\SarifErrorLoggerTests.cs (2)
48Assert.Equal(ExpectedOutputForAdditionalLocationsAsRelatedLocations, actual); 88Assert.Equal(ExpectedOutputForDescriptorIdCollision, actual);
DiffUtilTests.cs (1)
31Assert.Equal(@" A
EmbeddedTextTests.cs (13)
82Assert.Equal("pathToEmpty", text.FilePath); 94Assert.Equal("pathToEmpty", text.FilePath); 107Assert.Equal("pathToEmpty", text.FilePath); 120Assert.Equal("pathToSmall", text.FilePath); 135Assert.Equal("pathToSmall", text.FilePath); 148Assert.Equal("pathToSmall", text.FilePath); 162Assert.Equal("pathToLarge", text.FilePath); 177Assert.Equal("pathToLarge", text.FilePath); 190Assert.Equal("pathToLarge", text.FilePath); 206Assert.Equal(expectedEmbedded.FilePath, actualEmbedded.FilePath); 221Assert.Equal(expectedEmbedded.FilePath, actualEmbedded.FilePath); 240Assert.Equal("pathToPrecomputed", text.FilePath); 255Assert.Equal("pathToLarge", text.FilePath);
Emit\CustomDebugInfoTests.cs (4)
155Assert.Equal("Invalid data at offset 3: 01-68-FF*", e.Message); 158Assert.Equal("Invalid data at offset 3: 01-68-FF*FF-FF-FF", e.Message); 161Assert.Equal("Invalid data at offset 1: FF*FF-FF-FF", e.Message); 172Assert.Equal(
FileLinePositionSpanTests.cs (3)
83Assert.Equal("C:\\goo.cs: (1,2)-(3,5)", new FileLinePositionSpan("C:\\goo.cs", new LinePosition(1, 2), new LinePosition(3, 5)).ToString()); 84Assert.Equal("\\server\\goo.vb: (1,2)-(3,5)", new FileLinePositionSpan("\\server\\goo.vb", new LinePosition(1, 2), new LinePosition(3, 5)).ToString()); 85Assert.Equal("~\\goo.huh: (1,2)-(3,5)", new FileLinePositionSpan("~\\goo.huh", new LinePosition(1, 2), new LinePosition(3, 5)).ToString());
FileSystem\PathUtilitiesTests.cs (6)
364Assert.Equal(Path.Combine(path1, path2), PathUtilities.CombinePaths(path1, path2)); 381Assert.Equal(Path.Combine(path1, path2), PathUtilities.CombinePaths(path1, path2)); 393Assert.Equal(Path.Combine(path1, path2), PathUtilities.CombinePaths(path1, path2)); 405Assert.Equal(expected, PathUtilities.CombinePaths(path1, path2)); 413Assert.Equal(expected, result); 421Assert.Equal(expected, result);
FileSystem\RelativePathResolverTests.cs (16)
43Assert.Equal(subFilePath, path); 47Assert.Equal(filePath, path); 59Assert.Equal(subFilePath, path); 62Assert.Equal(subFilePath, path); 65Assert.Equal(dotted, path); 71Assert.Equal(filePath, path); 74Assert.Equal(filePath, path); 83Assert.Equal(filePath, path); 92Assert.Equal(filePath, path); 117Assert.Equal(filePath, path); 121Assert.Equal(subFilePath, path); 130Assert.Equal(filePath, path); 143Assert.Equal(filePath, path); 153Assert.Equal(filePath, path); 157Assert.Equal(filePath, path); 175Assert.Equal(f1, path);
FileUtilitiesTests.cs (49)
45Assert.Equal("", PathUtilities.GetPathRoot("")); 46Assert.Equal("", PathUtilities.GetPathRoot("C")); 47Assert.Equal("", PathUtilities.GetPathRoot("abc.txt")); 48Assert.Equal("C:", PathUtilities.GetPathRoot("C:")); 49Assert.Equal(@"C:\", PathUtilities.GetPathRoot(@"C:\")); 50Assert.Equal(@"C:/", PathUtilities.GetPathRoot(@"C:/")); 51Assert.Equal(@"C:\", PathUtilities.GetPathRoot(@"C:\\")); 52Assert.Equal(@"C:/", PathUtilities.GetPathRoot(@"C:/\")); 53Assert.Equal(@"*:/", PathUtilities.GetPathRoot(@"*:/")); 54Assert.Equal(@"0:/", PathUtilities.GetPathRoot(@"0:/")); 55Assert.Equal(@"::/", PathUtilities.GetPathRoot(@"::/")); 62Assert.Equal("/", PathUtilities.GetPathRoot(@"/")); 63Assert.Equal(@"/", PathUtilities.GetPathRoot(@"/x")); 66Assert.Equal(@"\", PathUtilities.GetPathRoot(@"\")); 67Assert.Equal(@"\", PathUtilities.GetPathRoot(@"\x")); 70Assert.Equal(@"\", PathUtilities.GetPathRoot(@"\")); 71Assert.Equal(@"\", PathUtilities.GetPathRoot(@"\x")); 74Assert.Equal(@"\\", PathUtilities.GetPathRoot(@"\\")); 75Assert.Equal(@"\\x", PathUtilities.GetPathRoot(@"\\x")); 76Assert.Equal(@"\\x\", PathUtilities.GetPathRoot(@"\\x\")); 77Assert.Equal(@"\\x\y", PathUtilities.GetPathRoot(@"\\x\y")); 78Assert.Equal(@"\\\x\y", PathUtilities.GetPathRoot(@"\\\x\y")); 79Assert.Equal(@"\\\\x\y", PathUtilities.GetPathRoot(@"\\\\x\y")); 80Assert.Equal(@"\\x\\y", PathUtilities.GetPathRoot(@"\\x\\y")); 81Assert.Equal(@"\\/x\\/y", PathUtilities.GetPathRoot(@"\\/x\\/y")); 82Assert.Equal(@"\\/x\\/y", PathUtilities.GetPathRoot(@"\\/x\\/y/")); 83Assert.Equal(@"\\/x\\/y", PathUtilities.GetPathRoot(@"\\/x\\/y\/")); 84Assert.Equal(@"\\/x\\/y", PathUtilities.GetPathRoot(@"\\/x\\/y\/zzz")); 85Assert.Equal(@"\\x\y", PathUtilities.GetPathRoot(@"\\x\y")); 86Assert.Equal(@"\\x\y", PathUtilities.GetPathRoot(@"\\x\y\\")); 87Assert.Equal(@"\\abc\xyz", PathUtilities.GetPathRoot(@"\\abc\xyz")); 88Assert.Equal(@"\\server\$c", PathUtilities.GetPathRoot(@"\\server\$c\Public")); 96Assert.Equal(@"C:\x/y", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", @"")); 97Assert.Equal(@"C:\x/y", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", null)); 98Assert.Equal(@"C:\x/y", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", null)); 104Assert.Equal(@"C:\x\y\goo", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x\y", @"goo")); 105Assert.Equal(@"C:\x/y\goo", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", @"goo")); 106Assert.Equal(@"C:\x/y\.\goo", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", @".\goo")); 107Assert.Equal(@"C:\x/y\./goo", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", @"./goo")); 108Assert.Equal(@"C:\x/y\..\goo", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", @"..\goo")); 109Assert.Equal(@"C:\x/y\../goo", PathUtilities.CombineAbsoluteAndRelativePaths(@"C:\x/y", @"../goo")); 209Assert.Equal(expected, Path.GetExtension(path)); 214Assert.Equal(expected, PathUtilities.RemoveExtension(path)); 215Assert.Equal(expected, Path.GetFileNameWithoutExtension(path)); 220Assert.Equal(expected, PathUtilities.ChangeExtension(path, extension)); 221Assert.Equal(expected, Path.ChangeExtension(path, extension)); 247Assert.Equal("*", PathUtilities.RemoveExtension("*.dll")); 269Assert.Equal("*", PathUtilities.RemoveExtension("*.dll")); 322Assert.Equal(expected, result);
InternalUtilities\StringExtensionsTests.cs (4)
16Assert.Equal("0", StringExtensions.GetNumeral(0)); 17Assert.Equal("5", StringExtensions.GetNumeral(5)); 18Assert.Equal("10", StringExtensions.GetNumeral(10)); 19Assert.Equal("10000000", StringExtensions.GetNumeral(10000000));
MetadataReferences\AssemblyIdentityDisplayNameTests.cs (13)
98Assert.Equal(expectedFusion, actual); 102Assert.Equal(expected, actual); 127Assert.Equal("goo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", id.GetDisplayName()); 130Assert.Equal("goo, Version=1.2.3.4, Culture=neutral, PublicKeyToken=null", id.GetDisplayName()); 133Assert.Equal("goo, Version=0.0.0.0, Culture=en-US, PublicKeyToken=null", id.GetDisplayName()); 139Assert.Equal("goo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null, Retargetable=Yes", id.GetDisplayName()); 142Assert.Equal("goo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime", id.GetDisplayName()); 148Assert.Equal("Goo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=" + StrPublicKeyToken1, dn1); 151Assert.Equal("Goo, Version=0.0.0.0, Culture=neutral, PublicKey=" + StrPublicKey1, dnFull); 154Assert.Equal("Goo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", id.GetDisplayName()); 157Assert.Equal(@"Goo, Version=0.0.0.0, Culture="" \'\t\r\n\\\=\, "", PublicKeyToken=null", id.GetDisplayName()); 328Assert.Equal(expectedSimpleName + ", Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", dn); 409Assert.Equal(", Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", name);
MetadataReferences\AssemblyIdentityTests.cs (25)
98Assert.Equal("goo", id.Name); 110Assert.Equal("goo", id.Name); 120Assert.Equal("goo", id.Name); 137Assert.Equal("", id.CultureName); 144Assert.Equal("Goo", id.Name); 147Assert.Equal("", id.CultureName); 155Assert.Equal("Goo", id.Name); 158Assert.Equal("", id.CultureName); 166Assert.Equal("Goo", id.Name); 169Assert.Equal("", id.CultureName); 177Assert.Equal("Goo", id.Name); 180Assert.Equal("", id.CultureName); 188Assert.Equal("Goo", id.Name); 191Assert.Equal("", id.CultureName); 259Assert.Equal("Goo", id.Name); 262Assert.Equal("en-US", id.CultureName); 273Assert.Equal("", id.CultureName); 282Assert.Equal("Goo", id.Name); 285Assert.Equal("", id.CultureName); 295Assert.Equal("blah,", id.CultureName); 299Assert.Equal("*", id.CultureName); 303Assert.Equal("", id.CultureName); 311Assert.Equal("goo", an.Name); 327Assert.Equal("goo", an.Name); 343Assert.Equal(c.ToString(), an.Name);
MetadataReferences\AssemblyMetadataTests.cs (4)
51Assert.Equal("MultiModule.dll", a.GetModules()[0].Name); 66Assert.Equal("MultiModule.dll", a.GetModules()[0].Name); 67Assert.Equal("mod2.netmodule", a.GetModules()[1].Name); 68Assert.Equal("mod3.netmodule", a.GetModules()[2].Name);
MetadataReferences\FusionAssemblyIdentityTests.cs (11)
60Assert.Equal(name.Name, rtName.Name); 68Assert.Equal(fullName, displayName); 73Assert.Equal(name.Name, rtName.Name); 96Assert.Equal("goo, Version=65535.65535.65535.65535, Culture=neutral, PublicKeyToken=null", display); 161Assert.Equal("mscorlib", name.Name); 170Assert.Equal("mscorlib", name.Name); 179Assert.Equal("mscorlib", name.Name); 188Assert.Equal("mscorlib", name.Name); 191Assert.Equal("en-US", name.CultureInfo.Name); 198Assert.Equal("Windows", name.Name); 223Assert.Equal(c.ToString(), name.Name);
MetadataReferences\MetadataHelpersTests.cs (8)
238Assert.Equal(expectedTopLevelType, decodedName.TopLevelType); 239Assert.Equal(expectedAssemblyName, decodedName.AssemblyName); 455Assert.Equal("", array[0].Key); 457Assert.Equal("-", array[1].Key); 459Assert.Equal("a", array[2].Key); 492Assert.Equal("", nestedNS.Key); 503Assert.Equal("a", nestedNamespaces.ElementAt(0).Key); 504Assert.Equal("b", nestedNamespaces.ElementAt(1).Key);
MetadataReferences\MetadataReferenceTests.cs (37)
38Assert.Equal("", inMemoryAssembly.Location); 104Assert.Equal(CodeAnalysisResources.InMemoryAssembly, r.Display); 112Assert.Equal("CommonLanguageRuntimeLibrary", metadata.GetModules()[0].Name); 119Assert.Equal(CodeAnalysisResources.InMemoryAssembly, r.Display); 135Assert.Equal(CodeAnalysisResources.InMemoryAssembly, r.Display); 151Assert.Equal(CodeAnalysisResources.InMemoryModule, r.Display); 166Assert.Equal(file.Path, r.FilePath); 167Assert.Equal(file.Path, r.Display); 178Assert.Equal(module ? "ModuleCS00.netmodule" : "CommonLanguageRuntimeLibrary", metadata.GetModules()[0].Name); 189Assert.Equal(file.Path, r.FilePath); 190Assert.Equal(file.Path, r.Display); 201Assert.Equal(module ? "ModuleCS00.netmodule" : "CommonLanguageRuntimeLibrary", metadata.Name); 209Assert.Equal(assembly.Location, r.FilePath); 210Assert.Equal(assembly.Location, r.Display); 226Assert.Equal(assembly.Location, r.FilePath); 227Assert.Equal(assembly.Location, r.Display); 264Assert.Equal(@"c:\temp", r.FilePath); 268Assert.Equal(@"c:\temp", r1.FilePath); 272Assert.Equal(@"c:\temp", r2.FilePath); 303Assert.Equal(@"c:\temp", r.FilePath); 307Assert.Equal(@"c:\temp", r2.FilePath); 315Assert.Equal(r.FilePath, r3.FilePath); 323Assert.Equal(r.FilePath, r4.FilePath); 410Assert.Equal(path, r.FilePath); 425Assert.Equal(path, r.FilePath); 434Assert.Equal(CodeAnalysisResources.InMemoryAssembly, r.Display); 437Assert.Equal(CodeAnalysisResources.InMemoryModule, r.Display); 440Assert.Equal(@"c:\blah", r.Display); 443Assert.Equal(@"dddd", r.Display); 446Assert.Equal(@"dddd", r.Display); 449Assert.Equal(@"compilation name", r.Display); 452Assert.Equal(@"compilation name", r.Display); 533Assert.Equal("m1a", m1a.Display); 535Assert.Equal("m1b", m1b.Display); 537Assert.Equal("m2", m2.Display); 578Assert.Equal("<member name='T:System.Collections.ArrayList'><summary>T:System.Collections.ArrayList</summary></member>", summary); 585Assert.Equal(CodeAnalysisResources.InMemoryAssembly, r.Display);
SourceFileResolverTest.cs (2)
41Assert.Equal(new ArgumentException(CodeAnalysisResources.NullValueInPathMap, "pathMap").Message, argException.Message); 64Assert.Equal(new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, "baseDirectory").Message, argException.Message);
StringTableTests.cs (1)
140Assert.Equal("abcd", s1);
Symbols\DocumentationCommentIdTests.cs (4)
43Assert.Equal(expectedDocId, actualDocId); 70Assert.Equal(expectedDocId, actualDocId); 93Assert.Equal(expectedDocId, actualDocId); 117Assert.Equal(expectedDocId, actualDocId);
Text\LargeTextTests.cs (8)
47Assert.Equal(HelloWorld, text.ToString()); 130Assert.Equal(HelloWorld, new string(buffer)); 167Assert.Equal(lineText, textLine.ToString()); 168Assert.Equal(text.ToString().Substring(start, length), textLine.ToString()); 316Assert.Equal("goo", data.Lines[0].ToString()); 317Assert.Equal("bar baz", data.Lines[1].ToString()); 325Assert.Equal("goo", data.Lines[0].ToString()); 337Assert.Equal("goo", actualSourceText.Lines[0].ToString());
Text\SourceTextTests.cs (4)
430Assert.Equal("BCDEFGHIJKLMNOPQRSTUVWXYZ", writer.ToString()); 449Assert.Equal(Text.Substring(span.Start, span.Length), writer.ToString()); 458Assert.Equal("span", ex.ParamName); 467Assert.Equal("span", ex.ParamName);
Text\StringText_LineTest.cs (3)
54Assert.Equal("goo", line.ToString()); 85Assert.Equal("", line.ToString()); 99Assert.Equal("", line.ToString());
Text\StringTextDecodingTests.cs (15)
62Assert.Equal(sjis.GetString(TestResources.General.ShiftJisSource), data.ToString()); 72Assert.Equal(sjis.GetString(TestResources.General.ShiftJisSource), data.ToString()); 82Assert.Equal("2fd4e1c6 7a2d28fc ed849ee1 bb76e739 1b93eb12", StringTextTest.ChecksumToHexQuads(checksum)); 91Assert.Equal("9d0047c0 8c84a7ef a55a955e aa3b4aae f62c9c39", StringTextTest.ChecksumToHexQuads(checksum)); 100Assert.Equal("72b2beae c76188ac 5b38c16c 4f9d518a 2be0a34c", StringTextTest.ChecksumToHexQuads(checksum)); 110Assert.Equal("da39a3ee 5e6b4b0d 3255bfef 95601890 afd80709", StringTextTest.ChecksumToHexQuads(checksum)); 119Assert.Equal("d62636d8 caec13f0 4e28442a 0a6fa1af eb024bbb", StringTextTest.ChecksumToHexQuads(checksum)); 128Assert.Equal("26237800 2c95ae7e 29535cb9 f438db21 9adf98f5", StringTextTest.ChecksumToHexQuads(checksum)); 137Assert.Equal("f1945cd6 c19e56b3 c1c78943 ef5ec181 16907a4c a1efc40a 57d48ab1 db7adfc5", StringTextTest.ChecksumToHexQuads(checksum)); 171Assert.Equal(text, sourceText.ToString()); 179Assert.Equal(text, sourceText.Encoding.GetString(bytes)); 196Assert.Equal(text, sourceText.ToString()); 197Assert.Equal(Encoding.UTF8.EncodingName, sourceText.Encoding.EncodingName); 226Assert.Equal(expectedText, sourceText.ToString()); 312Assert.Equal(expectedText, encodedText.ToString());
Text\StringTextTest.cs (10)
120Assert.Equal(lineText, textLine.ToString()); 121Assert.Equal(text.ToString().Substring(start, length), textLine.ToString()); 209Assert.Equal("goo", data.Lines[0].ToString()); 210Assert.Equal("bar baz", data.Lines[1].ToString()); 218Assert.Equal("goo", data.Lines[0].ToString()); 226Assert.Equal("88d3ed78 9b0bae8b ced8e348 91133516 b79ba9fb", ChecksumToHexQuads(checksum)); 235Assert.Equal("abc", source.ToString()); 250Assert.Equal("ab?", source.ToString()); 262Assert.Equal("\u1234", source.ToString()); 277Assert.Equal("abc", source.ToString());
Text\StringTextTests_Default.cs (9)
73Assert.Equal("goo", data.ToString(data.Lines[0].Span)); 74Assert.Equal("bar", data.ToString(data.Lines[1].Span)); 75Assert.Equal("baz", data.ToString(data.Lines[2].Span)); 83Assert.Equal("goo", data.ToString(data.Lines[0].Span)); 84Assert.Equal("bar", data.ToString(data.Lines[1].Span)); 101Assert.Equal("goo", data.Lines[0].ToString()); 102Assert.Equal("bar baz", data.Lines[1].ToString()); 109Assert.Equal("goo", data.Lines[0].ToString()); 148Assert.Equal(originalText, encodedText.ToString());
Text\TextChangeTests.cs (113)
34Assert.Equal("World", subText.ToString()); 42Assert.Equal("Hello", subText.ToString()); 50Assert.Equal("World", subText.ToString()); 58Assert.Equal("o W", subText.ToString()); 66Assert.Equal("Hello Beautiful World", newText.ToString()); 91Assert.Equal("Halo Universe", newText.ToString()); 118Assert.Equal("Halo Universe", newText.ToString()); 145Assert.Equal("Hello Super Spectacular World", newText.ToString()); 157Assert.Equal("Hello Super Vurld", newText.ToString()); 171Assert.Equal("Hello Super Vurld", newText.ToString()); 183Assert.Equal("HellWorld", newText.ToString()); 195Assert.Equal("l Un", subText.ToString()); 251Assert.Equal(expected.NewText, actual.NewText); 361Assert.Equal(expected, text.ToString()); 381Assert.Equal(expected, text.ToString()); 394Assert.Equal("fghijklmno", subtext.ToString()); 432Assert.Equal("abcdefghij", newText.Segments[0].ToString()); 433Assert.Equal("lmnopqrstuvwxyz", newText.Segments[1].ToString()); 445Assert.Equal("abcdefghij*klmnopqrstuvwxyz", textWithSegments.ToString()); 448Assert.Equal("abcdefghij", textWithSegments.Segments[0].ToString()); 449Assert.Equal("*", textWithSegments.Segments[1].ToString()); 450Assert.Equal("klmnopqrstuvwxyz", textWithSegments.Segments[2].ToString()); 464Assert.Equal("abcdefghilmnopqrstuvwxyz", textWithFewerSegments.ToString()); 469Assert.Equal("abcdefghi", textWithFewerSegments.Segments[0].ToString()); 470Assert.Equal("lmnopqrstuvwxyz", textWithFewerSegments.Segments[1].ToString()); 495Assert.Equal(a, t.Segments[0].ToString()); 496Assert.Equal(b, t.Segments[1].ToString()); 508Assert.Equal(a, t.Segments[0].ToString()); 509Assert.Equal(b, t.Segments[1].ToString()); 510Assert.Equal(new string('c', t.Segments[2].Length), t.Segments[2].ToString()); 525Assert.Equal(a, t.Segments[0].ToString()); 526Assert.Equal(b, t.Segments[1].ToString()); 659Assert.Equal("Hello Cool World", change2.ToString()); 664Assert.Equal("Cool ", changes[0].NewText); 676Assert.Equal("0aa4", change1.ToString()); 677Assert.Equal("0abba4", change2.ToString()); 690Assert.Equal("0aaa2", change1.ToString()); 691Assert.Equal("0aabba2", change2.ToString()); 704Assert.Equal("0aa4", change1.ToString()); 705Assert.Equal("0abb4", change2.ToString()); 715Assert.Equal("Heard", change2.ToString()); 720Assert.Equal("ar", changes[0].NewText); 729Assert.Equal("Hell Bell World", change2.ToString()); 734Assert.Equal(" Bell ", changes[0].NewText); 743Assert.Equal("Hello Cwazy Vorld", change2.ToString()); 748Assert.Equal("Cwazy V", changes[0].NewText); 759Assert.Equal("0aa1234", change1.ToString()); 760Assert.Equal("0bbaa1234", change2.ToString()); 772Assert.Equal("0aa4", change1.ToString()); 773Assert.Equal("0bbaa4", change2.ToString()); 785Assert.Equal("0aa1234", change1.ToString()); 786Assert.Equal("0bba1234", change2.ToString()); 798Assert.Equal("0aa1234", change1.ToString()); 799Assert.Equal("0bb1234", change2.ToString()); 811Assert.Equal("0aa1234", change1.ToString()); 812Assert.Equal("0bb234", change2.ToString()); 825Assert.Equal("0aa4", change1.ToString()); 826Assert.Equal("0bba4", change2.ToString()); 839Assert.Equal("0aa4", change1.ToString()); 840Assert.Equal("0bb", change2.ToString()); 849Assert.Equal("Hello World", change2.ToString()); 854Assert.Equal("o World", changes[0].NewText); 863Assert.Equal("Hello World", change2.ToString()); 868Assert.Equal("o", changes[0].NewText); 870Assert.Equal("World", changes[1].NewText); 879Assert.Equal("Hello World", change2.ToString()); 884Assert.Equal("o", changes[0].NewText); 886Assert.Equal("l", changes[1].NewText); 894Assert.Equal("Hell World", change1.ToString()); 896Assert.Equal("Hello World", change2.ToString()); 901Assert.Equal("o World", changes[0].NewText); 914Assert.Equal("Hello World", final.ToString()); 919Assert.Equal("o World", changes[0].NewText); 953Assert.Equal("new TextChange(new TextSpan(0, 0), null)", default(TextChange).GetDebuggerDisplay()); 954Assert.Equal("new TextChange(new TextSpan(0, 1), \"abc\")", new TextChange(new TextSpan(0, 1), "abc").GetDebuggerDisplay()); 955Assert.Equal("new TextChange(new TextSpan(0, 1), (NewLength = 10))", new TextChange(new TextSpan(0, 1), "0123456789").GetDebuggerDisplay()); 1012Assert.Equal(originalText.WithChanges(textChanges).ToString(), change2.ToString()); 1049Assert.Equal("a234", change1.ToString()); 1050Assert.Equal("bb34", change2.ToString()); 1053Assert.Equal("bb34", originalText.WithChanges(changes).ToString()); 1065Assert.Equal("aa0aa234", change1.ToString()); 1066Assert.Equal("baa234", change2.ToString()); 1067Assert.Equal(change2.ToString(), original.WithChanges(changes).ToString()); 1077Assert.Equal("a01234", change1.ToString()); 1078Assert.Equal("bb1234", change2.ToString()); 1081Assert.Equal("bb1234", originalText.WithChanges(changes).ToString()); 1091Assert.Equal("aa12aa4", change1.ToString()); 1092Assert.Equal("bbbaa12aa4", change2.ToString()); 1094Assert.Equal("bbbaa12aa4", originalText.WithChanges(changes).ToString()); 1104Assert.Equal("a34aaa5", change1.ToString()); 1105Assert.Equal("4bbaa5", change2.ToString()); 1108Assert.Equal("4bbaa5", originalText.WithChanges(changes).ToString()); 1118Assert.Equal("aaaaa12aaaa45aaaaa7", change1.ToString()); 1119Assert.Equal("baababbbbbaabbbbba7", change2.ToString()); 1122Assert.Equal("baababbbbbaabbbbba7", originalText.WithChanges(changes).ToString()); 1132Assert.Equal("a1234", change1.ToString()); 1133Assert.Equal("b1b4", change2.ToString()); 1136Assert.Equal("b1b4", originalText.WithChanges(changes).ToString()); 1146Assert.Equal("aa1234", change1.ToString()); 1147Assert.Equal("bab234", change2.ToString()); 1150Assert.Equal("bab234", originalText.WithChanges(changes).ToString()); 1160Assert.Equal("a2a5", change1.ToString()); 1161Assert.Equal("bbb5", change2.ToString()); 1164Assert.Equal("bbb5", originalText.WithChanges(changes).ToString()); 1174Assert.Equal("46", change1.ToString()); 1175Assert.Equal("6", change2.ToString()); 1178Assert.Equal("6", originalText.WithChanges(changes).ToString()); 1188Assert.Equal("245", change1.ToString()); 1189Assert.Equal("5", change2.ToString()); 1192Assert.Equal("5", originalText.WithChanges(changes).ToString()); 1202Assert.Equal("134", change1.ToString()); 1203Assert.Equal("14", change2.ToString()); 1206Assert.Equal("14", originalText.WithChanges(changes).ToString());
Text\TextSpanTest.cs (3)
93Assert.Equal("[0..0)", span.ToString()); 104Assert.Equal("[0..1)", span.ToString()); 116Assert.Equal("[15..1500)", span.ToString());
Win32Res.cs (1)
152Assert.Equal(xmlExpectedVersion, rsrcInXml);
XmlDocumentationCommentTextReaderTests.cs (1)
36Assert.Equal(" ", new string(buffer, 0, charsRead));
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (302)
CommandLineArgumentsTests.vb (4)
231Assert.Equal(True, dict("Blah")) 232Assert.Equal(True, dict("blah")) 265Assert.Equal(True, dict("Blah")) 266Assert.Equal(True, dict("blah"))
CommandLineBreakingChanges.vb (5)
29Assert.Equal("", output.Trim()) 60Assert.Equal("", output.Trim()) 92Assert.Equal("", output.Trim()) 124Assert.Equal("", output.Trim()) 159Assert.Equal("", output.Trim())
CommandLineTests.vb (284)
84Assert.Equal(analyzerConfig.Path, Assert.Single(cmd.Arguments.AnalyzerConfigPaths)) 89Assert.Equal("", outWriter.ToString()) 124Assert.Equal(analyzerConfig.Path, Assert.Single(cmd.Arguments.AnalyzerConfigPaths)) 129Assert.Equal("", outWriter.ToString()) 148Assert.Equal("my_val", val) 155Assert.Equal("my_val2", val) 179Assert.Equal(analyzerConfig.Path, Assert.Single(cmd.Arguments.AnalyzerConfigPaths)) 184Assert.Equal( 221Assert.Equal( 243Assert.Equal("", outWriter.ToString()) 263Assert.Equal("", outWriter.ToString()) 339Assert.Equal("", output.ToString().Trim()) 437Assert.Equal("Test", args.CompilationOptions.RootNamespace) 441Assert.Equal("Test", args.CompilationOptions.MainTypeName) 445Assert.Equal("Test", args.CompilationOptions.MainTypeName) 449Assert.Equal("Test", args.CompilationOptions.RootNamespace) 453Assert.Equal("test.Module1", args.CompilationOptions.MainTypeName) 454Assert.Equal("test", args.CompilationOptions.RootNamespace) 459Assert.Equal("решения.Module1", args.CompilationOptions.MainTypeName) 460Assert.Equal("решения", args.CompilationOptions.RootNamespace) 479Assert.Equal(String.Empty, writer.ToString.Trim) 485Assert.Equal(String.Empty, writer.ToString.Trim) 491Assert.Equal(String.Empty, writer.ToString.Trim) 519Assert.Equal("", output.ToString().Trim()) 537Assert.Equal("", output.ToString().Trim()) 576Assert.Equal(expected, ReplaceCommitHash(orig)) 614Assert.Equal("", output.Trim()) 633Assert.Equal("", output.Trim()) 682Assert.Equal("Hello World!", output.Trim()) 783Assert.Equal("Hello", cmd.Arguments.CompilationOptions.RootNamespace) 791Assert.Equal(expectedImportStrings(i), actualImports(i).Clause.ToString) 1026Assert.Equal("vbc : error BC30136: Error creating Win32 resources: Unrecognized resource file format.", outWriter.ToString().Trim()) 1154Assert.Equal(expectedResourceFile, parsedArgs.Win32ResourceFile) 1155Assert.Equal(expectedIcon, parsedArgs.Win32Icon) 1156Assert.Equal(expectedManifest, parsedArgs.Win32Manifest) 1411Assert.Equal("blah", parsedArgs.Win32Manifest) 1583Assert.Equal(True, parsedArgs.CompilationOptions.DelaySign) 1588Assert.Equal(True, parsedArgs.CompilationOptions.DelaySign) 1593Assert.Equal(False, parsedArgs.CompilationOptions.DelaySign) 1870Assert.Equal("Unicode", parsedArgs.Encoding.EncodingName) 1874Assert.Equal("Unicode (UTF-8)", parsedArgs.Encoding.EncodingName) 1945Assert.Equal("A.B.C", parsedArgs.CompilationOptions.MainTypeName) 1950Assert.Equal("X.Y.Z", parsedArgs.CompilationOptions.MainTypeName) 1969Assert.Equal("XYZ", parsedArgs.CompilationOptions.MainTypeName) 2242Assert.Equal("One.Two.Three", parsedArgs.CompilationOptions.RootNamespace) 2246Assert.Equal("One.Two.Three", parsedArgs.CompilationOptions.RootNamespace) 2250Assert.Equal("One.Two.Three", parsedArgs.CompilationOptions.RootNamespace) 2284Assert.Equal("[global]", parsedArgs.CompilationOptions.RootNamespace) 2288Assert.Equal("goo.[global].bar", parsedArgs.CompilationOptions.RootNamespace) 2292Assert.Equal("goo.[bar]", parsedArgs.CompilationOptions.RootNamespace) 2308Assert.Equal("__.___", parsedArgs.CompilationOptions.RootNamespace) 2416Assert.Equal("vbc : error BC2014: the value '.' is invalid for option 'recurse'", outWriter.ToString().Trim()) 2421Assert.Equal("vbc : error BC2014: the value '.' is invalid for option 'recurse'", outWriter.ToString().Trim()) 2563Assert.Equal("goo.dll", parsedArgs.AnalyzerReferences(0).FilePath) 2568Assert.Equal("goo.dll", parsedArgs.AnalyzerReferences(0).FilePath) 2573Assert.Equal("goo.dll", parsedArgs.AnalyzerReferences(0).FilePath) 2578Assert.Equal("goo.dll", parsedArgs.AnalyzerReferences(0).FilePath) 2579Assert.Equal("bar.dll", parsedArgs.AnalyzerReferences(1).FilePath) 2600Assert.Equal("vbc : error BC2017: could not find library 'missing.dll'", outWriter.ToString().Trim()) 2834Assert.Equal(expected:=file.Path, actual:=parsedArgs.RuleSetPath) 2859Assert.Equal(expected:=file.Path, actual:=parsedArgs.RuleSetPath) 2877Assert.Equal(expected:=Path.Combine(TempRoot.Root, "blah"), actual:=parsedArgs.RuleSetPath) 2882Assert.Equal(expected:=Path.Combine(TempRoot.Root, "blah;blah.ruleset"), actual:=parsedArgs.RuleSetPath) 2888Assert.Equal(expected:=file.Path, actual:=parsedArgs.RuleSetPath) 3145Assert.Equal(Path.Combine(_baseDirectory, "sl.json"), parsedArgs.SourceLink) 3149Assert.Equal(Path.Combine(_baseDirectory, "sl.json"), parsedArgs.SourceLink) 3153Assert.Equal(Path.Combine(_baseDirectory, "s l.json"), parsedArgs.SourceLink) 3376Assert.Equal("", output.ToString().Trim()) 3711Assert.Equal("MyBinary", parsedArgs.CompilationName) 3712Assert.Equal("MyBinary.dll", parsedArgs.OutputFileName) 3713Assert.Equal("MyBinary.dll", parsedArgs.CompilationOptions.ModuleName) 3714Assert.Equal("C:\MyFolder", parsedArgs.OutputDirectory) 3718Assert.Equal("MyBinary", parsedArgs.CompilationName) 3719Assert.Equal("MyBinary.dll", parsedArgs.OutputFileName) 3720Assert.Equal("MyBinary.dll", parsedArgs.CompilationOptions.ModuleName) 3721Assert.Equal("C:\My Folder", parsedArgs.OutputDirectory) 3755Assert.Equal("MyBinary", parsedArgs.CompilationName) 3756Assert.Equal("MyBinary.dll", parsedArgs.OutputFileName) 3757Assert.Equal("MyBinary.dll", parsedArgs.CompilationOptions.ModuleName) 3758Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3762Assert.Equal("MyBinary", parsedArgs.CompilationName) 3763Assert.Equal("MyBinary.dll", parsedArgs.OutputFileName) 3764Assert.Equal("MyBinary.dll", parsedArgs.CompilationOptions.ModuleName) 3765Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3769Assert.Equal("MyBinary", parsedArgs.CompilationName) 3770Assert.Equal("MyBinary.dll", parsedArgs.OutputFileName) 3771Assert.Equal("MyBinary.dll", parsedArgs.CompilationOptions.ModuleName) 3772Assert.Equal("C:\abc\def", parsedArgs.OutputDirectory) 3777Assert.Equal("a", parsedArgs.CompilationName) 3778Assert.Equal("a.exe", parsedArgs.OutputFileName) 3779Assert.Equal("a.exe", parsedArgs.CompilationOptions.ModuleName) 3780Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3785Assert.Equal("a", parsedArgs.CompilationName) 3786Assert.Equal("a.dll", parsedArgs.OutputFileName) 3787Assert.Equal("a.dll", parsedArgs.CompilationOptions.ModuleName) 3788Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3794Assert.Equal("a.netmodule", parsedArgs.OutputFileName) 3795Assert.Equal("a.netmodule", parsedArgs.CompilationOptions.ModuleName) 3796Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3801Assert.Equal("a", parsedArgs.CompilationName) 3802Assert.Equal("a.exe", parsedArgs.OutputFileName) 3803Assert.Equal("a.exe", parsedArgs.CompilationOptions.ModuleName) 3804Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3809Assert.Equal("a", parsedArgs.CompilationName) 3810Assert.Equal("a.winmdobj", parsedArgs.OutputFileName) 3811Assert.Equal("a.winmdobj", parsedArgs.CompilationOptions.ModuleName) 3812Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3823Assert.Equal(baseDirectory, parsedArgs.OutputDirectory) 3830Assert.Equal("a.exe", parsedArgs.OutputFileName) 3831Assert.Equal("a", parsedArgs.CompilationName) 3832Assert.Equal("a.exe", parsedArgs.CompilationOptions.ModuleName) 3837Assert.Equal("\\server\share", parsedArgs.OutputDirectory) 3838Assert.Equal("file.exe", parsedArgs.OutputFileName) 3839Assert.Equal("file", parsedArgs.CompilationName) 3840Assert.Equal("file.exe", parsedArgs.CompilationOptions.ModuleName) 3847Assert.Equal("a.exe", parsedArgs.OutputFileName) 3848Assert.Equal("a", parsedArgs.CompilationName) 3849Assert.Equal("a.exe", parsedArgs.CompilationOptions.ModuleName) 3874Assert.Equal("a.exe", parsedArgs.OutputFileName) 3875Assert.Equal("a", parsedArgs.CompilationName) 3876Assert.Equal("a.exe", parsedArgs.CompilationOptions.ModuleName) 3924Assert.Equal(".netmodule", parsedArgs.OutputFileName) 3926Assert.Equal(".netmodule", parsedArgs.CompilationOptions.ModuleName) 3955Assert.Equal(".netmodule", parsedArgs.OutputFileName) 3957Assert.Equal(".netmodule", parsedArgs.CompilationOptions.ModuleName) 3966Assert.Equal(".x", parsedArgs.CompilationName) 3967Assert.Equal(".x.exe", parsedArgs.OutputFileName) 3968Assert.Equal(".x.exe", parsedArgs.CompilationOptions.ModuleName) 3973Assert.Equal(".x", parsedArgs.CompilationName) 3974Assert.Equal(".x.eXe", parsedArgs.OutputFileName) 3975Assert.Equal(".x.eXe", parsedArgs.CompilationOptions.ModuleName) 3988Assert.Equal(".x", parsedArgs.CompilationName) 3989Assert.Equal(".x.dll", parsedArgs.OutputFileName) 3990Assert.Equal(".x.dll", parsedArgs.CompilationOptions.ModuleName) 3995Assert.Equal(".X", parsedArgs.CompilationName) 3996Assert.Equal(".X.Dll", parsedArgs.OutputFileName) 3997Assert.Equal(".X.Dll", parsedArgs.CompilationOptions.ModuleName) 4011Assert.Equal(".x", parsedArgs.OutputFileName) 4012Assert.Equal(".x", parsedArgs.CompilationOptions.ModuleName) 4018Assert.Equal("x.dll", parsedArgs.OutputFileName) 4019Assert.Equal("x.dll", parsedArgs.CompilationOptions.ModuleName) 4025Assert.Equal(".x.netmodule", parsedArgs.OutputFileName) 4026Assert.Equal(".x.netmodule", parsedArgs.CompilationOptions.ModuleName) 4032Assert.Equal("x.netmodule", parsedArgs.OutputFileName) 4033Assert.Equal("x.netmodule", parsedArgs.CompilationOptions.ModuleName) 4043Assert.Equal("vbc : error BC2006: option 'keyfile' requires ':<file>'", outWriter.ToString().Trim()) 4053Assert.Equal("vbc : error BC2006: option 'keyfile' requires ':<file>'", outWriter.ToString().Trim()) 4063Assert.Equal("vbc : error BC2006: option 'keyfile' requires ':<file>'", outWriter.ToString().Trim()) 4073Assert.Equal("vbc : error BC2006: option 'keyfile' requires ':<file>'", outWriter.ToString().Trim()) 4108Assert.Equal(&HEF, fileContents(0)) 4109Assert.Equal(&HBB, fileContents(1)) 4110Assert.Equal(&HBF, fileContents(2)) 4422Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath) 4427Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath) 4438Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath) 4450Assert.Equal("C:\MyFolder\MyBinary.xml", parsedArgs.DocumentationPath) 4456Assert.Equal("C:\My Folder\MyBinary.xml", parsedArgs.DocumentationPath) 4462Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.DocumentationPath) 4468Assert.Equal("C:\abc\def\MyBinary.xml", parsedArgs.DocumentationPath) 4484Assert.Equal("\\server\share\file.xml", parsedArgs.DocumentationPath) 4496Assert.Equal("C:\abc\def\baz\a\b.xml", parsedArgs.DocumentationPath) 4498Assert.Equal("C:\abc\def\baz\c", parsedArgs.OutputDirectory) 4499Assert.Equal("d.exe", parsedArgs.OutputFileName) 4505Assert.Equal("C:\abc\def\baz\b.xml", parsedArgs.DocumentationPath) 4507Assert.Equal("C:\abc\def\baz\c", parsedArgs.OutputDirectory) 4508Assert.Equal("d.exe", parsedArgs.OutputFileName) 4518Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath) 4533Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath) 4538Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath) 4543Assert.Equal(Path.Combine(baseDirectory, "a.xml"), parsedArgs.DocumentationPath) 4565Assert.Equal("C:\MyFolder\MyBinary.xml", parsedArgs.ErrorLogOptions.Path) 4571Assert.Equal("C:\My Folder\MyBinary.xml", parsedArgs.ErrorLogOptions.Path) 4582Assert.Equal(Path.Combine(baseDirectory, "MyBinary.xml"), parsedArgs.ErrorLogOptions.Path) 4587Assert.Equal("C:\abc\def\MyBinary.xml", parsedArgs.ErrorLogOptions.Path) 4604Assert.Equal("\\server\share\file.xml", parsedArgs.ErrorLogOptions.Path) 4610Assert.Equal("C:\MyFolder\MyBinary.xml", parsedArgs.ErrorLogOptions.Path) 4656Assert.Equal("C:\abc\def\baz\a\b.xml", parsedArgs.ErrorLogOptions.Path) 4658Assert.Equal("C:\abc\def\baz\c", parsedArgs.OutputDirectory) 4659Assert.Equal("d.exe", parsedArgs.OutputFileName) 4665Assert.Equal("C:\abc\def\baz\b.xml", parsedArgs.ErrorLogOptions.Path) 4667Assert.Equal("C:\abc\def\baz\c", parsedArgs.OutputDirectory) 4668Assert.Equal("d.exe", parsedArgs.OutputFileName) 4676Assert.Equal("key-cont-name", parsedArgs.CompilationOptions.CryptoKeyContainer) 4697Assert.Equal("\somepath\some File.goo.bar", parsedArgs.CompilationOptions.CryptoKeyFile) 4714Assert.Equal(Nothing, parsedArgs.CompilationOptions.CryptoKeyContainer) 4715Assert.Equal(Nothing, parsedArgs.CompilationOptions.CryptoKeyFile) 4720Assert.Equal(Nothing, parsedArgs.CompilationOptions.CryptoKeyContainer) 4721Assert.Equal("b", parsedArgs.CompilationOptions.CryptoKeyFile) 4726Assert.Equal("a", parsedArgs.CompilationOptions.CryptoKeyContainer) 4727Assert.Equal(Nothing, parsedArgs.CompilationOptions.CryptoKeyFile) 4945Assert.Equal("vbc : error BC2015: the file '" + binaryPath + "' is not a text file", outWriter.ToString.Trim()) 4955Assert.Equal("c:\", parsedArgs.MetadataReferences(0).Reference) 4957Assert.Equal("d:\x\y\z", parsedArgs.MetadataReferences(1).Reference) 4959Assert.Equal("abc", parsedArgs.MetadataReferences(2).Reference) 5011Assert.Equal("", outWriter.ToString().Trim()) 5016Assert.Equal("", outWriter.ToString().Trim()) 5350Assert.Equal(If(sdkPathOrNothing, RuntimeEnvironment.GetRuntimeDirectory()), refPaths(0)) 5352Assert.Equal(paths(i), refPaths(i + 1)) 5381Assert.Equal("d:\abc def\ab cd\a.res", args.Win32ResourceFile) 5388Assert.Equal("d:\abc def\ab cd\a.ico", args.Win32Icon) 5395Assert.Equal("d:\abc def\ab cd\a.manifest", args.Win32Manifest) 5931Assert.Equal(expected, actual) 6021Assert.Equal(expected, actual) 6437Assert.Equal("", output) ' Autodetected UTF-8, NO ERROR 6449Assert.Equal(expected, actual) 6464Assert.Equal(5, peHeaders.PEHeader.MajorSubsystemVersion) 6465Assert.Equal(1, peHeaders.PEHeader.MinorSubsystemVersion) 6857Assert.Equal("Successfully processed 1 files; Failed processing 0 files", output.Trim()) 6860Assert.Equal("Successfully processed 1 files; Failed processing 0 files", output.Trim()) 6867Assert.Equal("Successfully processed 1 files; Failed processing 0 files", output.Trim()) 7041Assert.Equal("vbc : error BC2017: could not find library 'a='", output.ToString().Trim()) 7060Assert.Equal("vbc : error BC2006: option 'define' requires ':<symbol_list>'", output.ToString().Trim()) 7066Assert.Equal("vbc : error BC2006: option 'define' requires ':<symbol_list>'", output.ToString().Trim()) 7072Assert.Equal("vbc : error BC2006: option 'define' requires ':<symbol_list>'", output.ToString().Trim()) 7078Assert.Equal("vbc : error BC31030: Conditional compilation constant '_ ^^ ^^ ' is not valid: Identifier expected.", output.ToString().Trim()) 7084Assert.Equal("", output.ToString().Trim()) 7090Assert.Equal("vbc : error BC31030: Conditional compilation constant '_ ^^ ^^ a' is not valid: Identifier expected.", output.ToString().Trim()) 7096Assert.Equal("vbc : error BC31030: Conditional compilation constant '_ ^^ ^^ ' is not valid: Identifier expected.", output.ToString().Trim()) 7102Assert.Equal("vbc : error BC31030: Conditional compilation constant '_ ^^ ^^ ' is not valid: Identifier expected.", output.ToString().Trim()) 7108Assert.Equal("vbc : error BC31030: Conditional compilation constant '_ ^^ ^^ ' is not valid: Identifier expected.", output.ToString().Trim()) 7114Assert.Equal("vbc : error BC31030: Conditional compilation constant '_ ^^ ^^ ' is not valid: Identifier expected.", output.ToString().Trim()) 7231Assert.Equal("vbc : warning BC2007: unrecognized option '/blah'; ignored", output.ToString().Trim()) 7249Assert.Equal("vbc : error BC31030: Conditional compilation constant 'I ^^ ^^ ' is not valid: End of statement expected.", output.ToString().Trim()) 7255Assert.Equal("vbc : error BC31030: Conditional compilation constant 'I ^^ ^^ ' is not valid: End of statement expected.", output.ToString().Trim()) 7265Assert.Equal("System", vbc.Arguments.CompilationOptions.GlobalImports(0).Name) 7266Assert.Equal("COLL = System.Collections", vbc.Arguments.CompilationOptions.GlobalImports(1).Name) 7267Assert.Equal("System.Diagnostics", vbc.Arguments.CompilationOptions.GlobalImports(2).Name) 7268Assert.Equal("COLLGEN = System.Collections.Generic", vbc.Arguments.CompilationOptions.GlobalImports(3).Name) 7286Assert.Equal("", output.ToString().Trim()) 7292Assert.Equal("", output.ToString().Trim()) 7298Assert.Equal("", output.ToString().Trim()) 7304Assert.Equal("", output.ToString().Trim()) 7310Assert.Equal("", output.ToString().Trim()) 7316Assert.Equal("", output.ToString().Trim()) 7322Assert.Equal("", output.ToString().Trim()) 7328Assert.Equal("", output.ToString().Trim()) 7334Assert.Equal("", output.ToString().Trim()) 7340Assert.Equal("", output.ToString().Trim()) 7347Assert.Equal("", output.ToString().Trim()) 7752Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7753Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7758Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7759Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(1).Path) 7773Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles(0).Path) 7774Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles(1).Path) 7775Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles(2).Path) 7780Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7781Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7786Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7787Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7792Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path) 7797Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path) 7802Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7803Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7808Assert.Equal(Path.Combine(_baseDirectory, "web.config:app.manifest"), args.AdditionalFiles(0).Path) 7828Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0)) 7829Assert.Equal(Path.Combine(_baseDirectory, "subdir\.editorconfig"), args.AnalyzerConfigPaths(1)) 7834Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0)) 7835Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(1)) 7844Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0)) 7845Assert.Equal(Path.Combine(_baseDirectory, "subdir\.editorconfig"), args.AnalyzerConfigPaths(1)) 7850Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig"), args.AnalyzerConfigPaths(0)) 7851Assert.Equal(Path.Combine(_baseDirectory, "subdir\.editorconfig"), args.AnalyzerConfigPaths(1)) 7856Assert.Equal(Path.Combine(_baseDirectory, ".editorconfig:.editorconfig"), args.AnalyzerConfigPaths(0)) 9230Assert.Equal(Path.Combine(_baseDirectory, "test.snk"), parsedArgs.CompilationOptions.CryptoKeyFile) 9255Assert.Equal("a.exe", args.OutputFileName) 9258Assert.Equal("a-b.exe", args.OutputFileName) 9261Assert.Equal("a,b.exe", args.OutputFileName) 9303Assert.Equal(s_compilerVersion, output.Trim()) 9362Assert.Equal(expectedDoc, content.Trim()) 9365Assert.Equal("Hello", output.Trim()) 9411Assert.Equal( 9491Assert.Equal(expectedDoc, content.Trim()) 9653Assert.Equal( 9661Assert.Equal( 10628Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory) 10632Assert.Equal(Path.Combine(baseDirectory, "outdir"), parsedArgs.GeneratedFilesOutputDirectory) 10636Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory) 10640Assert.Equal(Path.Combine(baseDirectory, "out dir"), parsedArgs.GeneratedFilesOutputDirectory) 10645Assert.Equal(absPath, parsedArgs.GeneratedFilesOutputDirectory) 10649Assert.Equal(absPath, parsedArgs.GeneratedFilesOutputDirectory) 10654Assert.Equal(absPath, parsedArgs.GeneratedFilesOutputDirectory) 10658Assert.Equal(absPath, parsedArgs.GeneratedFilesOutputDirectory) 10860Assert.Equal(fileMap(name), content)
SarifErrorLoggerTests.vb (5)
61Assert.Equal("", outWriter.ToString().Trim()) 67Assert.Equal(expectedOutput, actualOutput) 106Assert.Equal(expectedOutput, actualOutput) 148Assert.Equal(expectedOutput, actualOutput) 190Assert.Equal(expectedOutput, actualOutput)
TouchedFileLoggingTests.vb (4)
52Assert.Equal("", outWriter.ToString().Trim()) 86Assert.Equal(String.Empty, outWriter.ToString().Trim()) 128Assert.Equal(String.Empty, writer.ToString().Trim()) 149Assert.Equal(expectedDoc, xml.ReadAllText().Trim())
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (182)
Attributes\AttributeTests_MarshalAs.vb (2)
56Assert.Equal(CType(blob(0), UnmanagedType), parameter.MarshallingType) 58Assert.Equal(CType(0, UnmanagedType), parameter.MarshallingType)
CodeGen\CodeGenTuples.vb (11)
10121Sub(t) Assert.Equal(SpecialType.System_Int32, t.SpecialType)) 15838Assert.Equal("Rest", m.Name) 18563Assert.Equal(0, comparison12) 18664Assert.Equal(0, comparison12) 20493Assert.Equal(1, c.TypeParameters.Length) 20495Assert.Equal(1, param.ConstraintTypes.Length) 20503Sub(t) Assert.Equal(SpecialType.System_Int32, t.SpecialType)) 20508Assert.Equal(1, c2.TypeParameters.Length) 20510Assert.Equal(1, param.ConstraintTypes.Length) 20518Sub(t) Assert.Equal(SpecialType.System_Int32, t.SpecialType)) 21681Assert.Equal("corlib", found.ContainingAssembly.Name)
Emit\NoPiaEmbedTypes.vb (169)
998Assert.Equal(1, references.Length) 1001Assert.Equal(TypeKind.Interface, itest1.TypeKind) 1003Assert.Equal(0, itest1.Interfaces.Length) 1007Assert.Equal(System.Runtime.InteropServices.CharSet.Ansi, itest1.MarshallingCharSet) 1008Assert.Equal(System.Runtime.InteropServices.LayoutKind.Auto, itest1.Layout.Kind) 1009Assert.Equal(0, itest1.Layout.Alignment) 1010Assert.Equal(0, itest1.Layout.Size) 1013Assert.Equal(3, attributes.Length) 1014Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 1015Assert.Equal("System.Runtime.InteropServices.GuidAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58258"")", attributes(1).ToString()) 1016Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute", attributes(2).ToString()) 1020Assert.Equal(TypeAttributes.Public Or TypeAttributes.AutoLayout Or TypeAttributes.Interface Or TypeAttributes.Abstract Or TypeAttributes.Import Or TypeAttributes.AnsiClass, itest1.TypeDefFlags) 1023Assert.Equal(TypeKind.Structure, test2.TypeKind) 1024Assert.Equal(SpecialType.System_ValueType, test2.BaseType.SpecialType) 1029Assert.Equal(System.Runtime.InteropServices.CharSet.Ansi, test2.MarshallingCharSet) 1030Assert.Equal(System.Runtime.InteropServices.LayoutKind.Sequential, test2.Layout.Kind) 1031Assert.Equal(0, test2.Layout.Alignment) 1032Assert.Equal(1, test2.Layout.Size) 1036Assert.Equal(TypeAttributes.Public Or TypeAttributes.SequentialLayout Or TypeAttributes.Class Or TypeAttributes.Sealed Or TypeAttributes.AnsiClass Or TypeAttributes.BeforeFieldInit, test2.TypeDefFlags) 1039Assert.Equal(2, attributes.Length) 1040Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 1041Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""Test2"")", attributes(1).ToString()) 1044Assert.Equal(TypeKind.Interface, itest3.TypeKind) 1049Assert.Equal(System.Runtime.InteropServices.CharSet.Ansi, itest3.MarshallingCharSet) 1050Assert.Equal(System.Runtime.InteropServices.LayoutKind.Auto, itest3.Layout.Kind) 1051Assert.Equal(0, itest3.Layout.Alignment) 1052Assert.Equal(0, itest3.Layout.Size) 1054Assert.Equal(0, [module].GlobalNamespace.GetTypeMembers("ITest4").Length) 1057Assert.Equal(TypeKind.Structure, test5.TypeKind) 1061Assert.Equal(System.Runtime.InteropServices.CharSet.Unicode, test5.MarshallingCharSet) 1062Assert.Equal(System.Runtime.InteropServices.LayoutKind.Explicit, test5.Layout.Kind) 1063Assert.Equal(16, test5.Layout.Alignment) 1064Assert.Equal(64, test5.Layout.Size) 1075Assert.Equal(TypeKind.Interface, itest6.TypeKind) 1078Assert.Equal(TypeKind.Interface, itest7.TypeKind) 1081Assert.Equal(TypeKind.Interface, itest8.TypeKind) 1085Assert.Equal(TypeKind.Enum, test9.TypeKind) 1089Assert.Equal(System.Runtime.InteropServices.CharSet.Ansi, test9.MarshallingCharSet) 1090Assert.Equal(System.Runtime.InteropServices.LayoutKind.Auto, test9.Layout.Kind) 1092Assert.Equal(SpecialType.System_Int32, test9.EnumUnderlyingType.SpecialType) 1096Assert.Equal(TypeAttributes.Public Or TypeAttributes.AutoLayout Or TypeAttributes.Class Or TypeAttributes.Sealed Or TypeAttributes.AnsiClass, test9.TypeDefFlags) 1099Assert.Equal(2, attributes.Length) 1100Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 1101Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""Test9"")", attributes(1).ToString()) 1104Assert.Equal(3, fieldToEmit.Length) 1134Assert.Equal(4, test9.GetMembers().Length) 1135Assert.Equal("Test9.value__ As System.Int32", test9.GetMembers()(0).ToTestDisplayString()) 1141Assert.Equal(TypeKind.Structure, test10.TypeKind) 1142Assert.Equal(System.Runtime.InteropServices.LayoutKind.Sequential, test10.Layout.Kind) 1144Assert.Equal(3, test10.GetMembers().Length) 1165Assert.Equal(TypeKind.Delegate, test11.TypeKind) 1166Assert.Equal(SpecialType.System_MulticastDelegate, test11.BaseType.SpecialType) 1170Assert.Equal(TypeAttributes.Public Or TypeAttributes.AutoLayout Or TypeAttributes.Class Or TypeAttributes.Sealed Or TypeAttributes.AnsiClass, test11.TypeDefFlags) 1173Assert.Equal(2, attributes.Length) 1174Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 1175Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""Test11"")", attributes(1).ToString()) 1177Assert.Equal(4, test11.GetMembers().Length) 1207Assert.Equal(MethodAttributes.Public Or MethodAttributes.Virtual Or MethodAttributes.CheckAccessOnOverride Or MethodAttributes.NewSlot, begin.MethodFlags) 1208Assert.Equal(MethodImplAttributes.Runtime, begin.ImplementationAttributes) 1210Assert.Equal("Function Test11.BeginInvoke(DelegateCallback As System.AsyncCallback, DelegateAsyncState As System.Object) As System.IAsyncResult", begin.ToTestDisplayString()) 1223Assert.Equal(MethodAttributes.Public Or MethodAttributes.Virtual Or MethodAttributes.CheckAccessOnOverride Or MethodAttributes.NewSlot, [end].MethodFlags) 1224Assert.Equal(MethodImplAttributes.Runtime, [end].ImplementationAttributes) 1226Assert.Equal("Sub Test11.EndInvoke(DelegateAsyncResult As System.IAsyncResult)", [end].ToTestDisplayString()) 1238Assert.Equal(MethodAttributes.Public Or MethodAttributes.Virtual Or MethodAttributes.CheckAccessOnOverride Or MethodAttributes.NewSlot, invoke.MethodFlags) 1239Assert.Equal(MethodImplAttributes.Runtime, invoke.ImplementationAttributes) 1241Assert.Equal("Sub Test11.Invoke()", invoke.ToTestDisplayString()) 1244Assert.Equal(TypeKind.Interface, itest13.TypeKind) 1265Assert.Equal(TypeKind.Interface, itest14.TypeKind) 1266Assert.Equal(6, itest14.GetMembers().Length) 1267Assert.Equal("Sub ITest14.M14()", itest14.GetMembers()(0).ToTestDisplayString()) 1268Assert.Equal("Sub ITest14.set_P6(Value As System.Int32)", itest14.GetMembers()(1).ToTestDisplayString()) 1269Assert.Equal("Sub ITest14.add_E4(obj As System.Action)", itest14.GetMembers()(2).ToTestDisplayString()) 1270Assert.Equal("Sub ITest14.remove_E4(obj As System.Action)", itest14.GetMembers()(3).ToTestDisplayString()) 1271Assert.Equal("WriteOnly Property ITest14.P6 As System.Int32", itest14.GetMembers()(4).ToTestDisplayString()) 1272Assert.Equal("Event ITest14.E4 As System.Action", itest14.GetMembers()(5).ToTestDisplayString()) 1275Assert.Equal(TypeKind.Interface, itest16.TypeKind) 1276Assert.Equal("Sub ITest16.M16()", itest16.GetMembers()(0).ToTestDisplayString()) 1279Assert.Equal(TypeKind.Interface, itest17.TypeKind) 1312Assert.Equal(2, itest17.GetMembers().Length) 1322Assert.Equal(MethodAttributes.Public Or MethodAttributes.Virtual Or MethodAttributes.CheckAccessOnOverride Or MethodAttributes.NewSlot Or MethodAttributes.Abstract, m17.MethodFlags) 1323Assert.Equal(MethodImplAttributes.IL, m17.ImplementationAttributes) 1325Assert.Equal("Sub ITest17.M17()", m17.ToTestDisplayString()) 1328Assert.Equal(TypeKind.Interface, itest18.TypeKind) 1397Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility) 1427Assert.Equal(2, itest24.GetMembers().Length) 1452Assert.Equal(3, itest26.GetMembers().Length) 1542Assert.Equal(1, references.Length) 1545Assert.Equal(TypeKind.Interface, type1.TypeKind) 1548Assert.Equal(TypeKind.Interface, type2.TypeKind) 1551Assert.Equal(6, tp.Length) 1554Assert.Equal("T1", t1.Name) 1558Assert.Equal(0, t1.ConstraintTypes.Length) 1559Assert.Equal(VarianceKind.None, t1.Variance) 1562Assert.Equal("T2", t2.Name) 1566Assert.Equal(1, t2.ConstraintTypes.Length) 1568Assert.Equal(VarianceKind.None, t2.Variance) 1571Assert.Equal("T3", t3.Name) 1575Assert.Equal(0, t3.ConstraintTypes.Length) 1576Assert.Equal(VarianceKind.None, t3.Variance) 1579Assert.Equal("T4", t4.Name) 1583Assert.Equal(0, t4.ConstraintTypes.Length) 1584Assert.Equal(VarianceKind.None, t4.Variance) 1587Assert.Equal("T5", t5.Name) 1591Assert.Equal(0, t5.ConstraintTypes.Length) 1592Assert.Equal(VarianceKind.None, t5.Variance) 1595Assert.Equal("T6", t6.Name) 1599Assert.Equal(1, t6.ConstraintTypes.Length) 1601Assert.Equal(VarianceKind.None, t6.Variance) 1739Assert.Equal(1, [module].GetReferencedAssemblySymbols().Length) 1742Assert.Equal("System.Runtime.InteropServices.CoClassAttribute(GetType(Object))", attr.ToString()) 1996Assert.Equal(2, references.Length) 1997Assert.Equal("mscorlib", references(0).Name) 1998Assert.Equal("System.Core", references(1).Name) 2002Assert.Equal(3, attributes.Length) 2003Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 2004Assert.Equal("System.Runtime.InteropServices.ComEventInterfaceAttribute(GetType(IE), GetType(IE))", attributes(1).ToString()) 2005Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""I1"")", attributes(2).ToString()) 2009Assert.Equal(3, attributes.Length) 2010Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 2011Assert.Equal("System.Runtime.InteropServices.GuidAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58278"")", attributes(1).ToString()) 2012Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute", attributes(2).ToString()) 2112Assert.Equal(1, references.Length) 2113Assert.Equal("mscorlib", references(0).Name) 2117Assert.Equal(3, attributes.Length) 2118Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 2119Assert.Equal("System.Runtime.InteropServices.ComEventInterfaceAttribute(GetType(IE), GetType(IE))", attributes(1).ToString()) 2120Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58257"", ""I"")", attributes(2).ToString()) 2124Assert.Equal(3, attributes.Length) 2125Assert.Equal("System.Runtime.CompilerServices.CompilerGeneratedAttribute", attributes(0).ToString()) 2126Assert.Equal("System.Runtime.InteropServices.GuidAttribute(""f9c2d51d-4f44-45f0-9eda-c9d599b58278"")", attributes(1).ToString()) 2127Assert.Equal("System.Runtime.InteropServices.TypeIdentifierAttribute", attributes(2).ToString()) 2399Assert.Equal(1, references.Length) 2402Assert.Equal("System.Runtime.InteropServices.InterfaceTypeAttribute(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)", attr.ToString()) 2405Assert.Equal("System.Runtime.InteropServices.InterfaceTypeAttribute(1)", attr.ToString()) 2453Assert.Equal(1, references.Length) 2456Assert.Equal("System.Runtime.InteropServices.BestFitMappingAttribute(True)", attr.ToString()) 2459Assert.Equal("System.Runtime.InteropServices.BestFitMappingAttribute(False)", attr.ToString()) 2501Assert.Equal(1, references.Length) 2504Assert.Equal("System.FlagsAttribute", attr.ToString()) 2549Assert.Equal(1, references.Length) 2552Assert.Equal("System.Reflection.DefaultMemberAttribute(""M"")", attr.ToString()) 2598Assert.Equal(1, references.Length) 2602Assert.Equal("System.Runtime.InteropServices.LCIDConversionAttribute(123)", attr.ToString()) 2646Assert.Equal(1, references.Length) 2650Assert.Equal("System.Runtime.InteropServices.DispIdAttribute(124)", attr.ToString()) 2715Assert.Equal("System.Runtime.InteropServices.DispIdAttribute(124)", attr.ToString()) 2863Assert.Equal(1, references.Length) 2867Assert.Equal(0, param.GetAttributes().Length) 2913Assert.Equal(1, references.Length) 2966Assert.Equal(1, references.Length) 2969Assert.Equal(39614081275578912866186559485D, method.Parameters(0).ExplicitDefaultValue) 2971Assert.Equal(79228162495817593528424333315D, method.Parameters(0).ExplicitDefaultValue) 3024Assert.Equal(2, references.Length) 3028Assert.Equal("System.Runtime.InteropServices.DefaultParameterValueAttribute(123.456)", attr.ToString()) 3072Assert.Equal(1, references.Length) 3075Assert.Equal("System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.StdCall, SetLastError:=True)", attr.ToString()) 3121Assert.Equal(1, references.Length) 3329Assert.Equal(1, references.Length) 3406Assert.Equal(2, references.Length) 3407Assert.Equal("1", references(1).Name) 3481Assert.Equal(1, [module].GetReferencedAssemblySymbols().Length) 3541Assert.Equal(1, [module].GetReferencedAssemblySymbols().Length) 3598Assert.Equal(1, [module].GetReferencedAssemblySymbols().Length) 3600Assert.Equal(0, i1.GetMembers().Length) 3602Assert.Equal(0, i2.GetMembers().Length) 3604Assert.Equal(0, i3.GetMembers().Length) 3646Assert.Equal(1, [module].GetReferencedAssemblySymbols().Length) 3649Assert.Equal(f.ConstantValue, 0) 3651Assert.Equal(f.ConstantValue, 3)
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (41)
InteractiveSessionTests.vb (6)
24Assert.Equal(3, s.ReturnValue) 32Assert.Equal(1, VisualBasicScript.EvaluateAsync(source).Result) 40Assert.Equal(1, VisualBasicScript.EvaluateAsync(source).Result) 65Assert.Equal(6, VisualBasicScript.EvaluateAsync(source).Result) 85Assert.Equal("True False True", script.EvaluateAsync().Result) 111Assert.Equal("True False True", script.EvaluateAsync().Result)
ObjectFormatterTests.vb (12)
42Assert.Equal("Outer.Nested(Of Integer) { A=1, B=2 }", str) 45Assert.Equal("Outer.Nested(Of Integer)", str) 48Assert.Equal("A(Of Integer).B(Of Integer)", str) 52Assert.Equal("A(Of Integer).B(Of Boolean).C.D(Of String, Double).E", str) 56Assert.Equal("Sort { aB=-1, ab=1, Ac=-1, Ad=1, ad=-1, aE=1, aF=-1...", str) 60Assert.Equal("Sort ...", str) 64Assert.Equal("Sort...", str) 67Assert.Equal("Sor...", str) 70Assert.Equal("So...", str) 73Assert.Equal("S...", str) 76Assert.Equal("Sort { aB=-1, ab=1, Ac=-1, Ad=1, ad=-1, aE=1, aF=-1, AG=1 }", str) 82Assert.Equal("ObjectFormatterFixtures.Signatures.ArrayParameters(Integer(), Integer(,), Integer(,,))", result)
PrintOptionsTests.vb (18)
59Assert.Equal("10", s_formatter.FormatObject(10, options)) 60Assert.Equal("Integer(10) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }", s_formatter.FormatObject(array, options)) 64Assert.Equal("&H0000000A", s_formatter.FormatObject(10, options)) 65Assert.Equal("Integer(&H0000000A) { &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000, &H00000000 }", s_formatter.FormatObject(array, options)) 74Assert.Equal("PrintOptions", s_formatter.FormatObject(options, options)) 77Assert.Equal("PrintOptions { Ellipsis=""..."", EscapeNonPrintableCharacters=True, MaximumOutputLength=1024, MemberDisplayFormat=SingleLine, NumberRadix=10 }", s_formatter.FormatObject(options, options)) 80Assert.Equal("PrintOptions { 111Assert.Equal("1...", s_formatter.FormatObject(123456, options)) 114Assert.Equal("12...", s_formatter.FormatObject(123456, options)) 117Assert.Equal("123...", s_formatter.FormatObject(123456, options)) 120Assert.Equal("1234...", s_formatter.FormatObject(123456, options)) 123Assert.Equal("12345...", s_formatter.FormatObject(123456, options)) 126Assert.Equal("123456", s_formatter.FormatObject(123456, options)) 129Assert.Equal("123456", s_formatter.FormatObject(123456, options)) 138Assert.Equal("1.", s_formatter.FormatObject(123456, options)) 141Assert.Equal("1..", s_formatter.FormatObject(123456, options)) 144Assert.Equal("1", s_formatter.FormatObject(123456, options)) 147Assert.Equal("1", s_formatter.FormatObject(123456, options))
ScriptTests.vb (5)
30Assert.Equal("? 1 + 2", script.Code) 36Assert.Equal(3, value.Result) 42Assert.Equal(3, state.ReturnValue) 50Assert.Equal(3, state.ReturnValue) 56Assert.Equal(3, state.ReturnValue)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1162)
Compilation\SuppressAccessibilityChecksTests.vb (4)
90Assert.Equal("A", creationExpression.Type.Name) 123Assert.Equal("_p", symbolInfo.Symbol.Name) 269Assert.Equal("_p", symbolSpeculation.Symbol.Name) 270Assert.Equal("Int32", typeSpeculation.Type.Name)
FlowAnalysis\IterationJumpYieldStatementTests.vb (167)
95Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 96Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 97Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 98Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 99Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 100Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 101Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 131Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 132Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 133Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 134Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 135Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 136Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 137Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 161Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 162Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 163Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 164Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 165Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 166Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 167Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 192Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 193Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 194Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 195Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 196Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 197Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 198Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 223Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 224Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 225Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 226Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 227Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 228Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 229Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 255Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 256Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 257Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 258Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 259Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 260Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 261Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 287Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 288Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 289Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 290Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 291Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 292Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 293Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 338Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 339Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 340Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 341Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 342Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 343Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 344Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 369Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 370Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 371Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 372Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 373Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 374Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 375Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 400Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 401Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 402Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 403Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 404Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 405Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 406Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 433Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 434Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 435Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 436Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 437Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 438Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 439Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 578Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 579Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 580Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 581Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 582Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 583Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 584Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 585Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 617Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 618Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 619Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 620Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 621Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 622Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 623Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 624Assert.Equal("Me, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 659Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 660Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 661Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 662Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 663Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 664Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 665Assert.Equal("i", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 666Assert.Equal("Me, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 688Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 689Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 690Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 691Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 692Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 693Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 694Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 695Assert.Equal("Me, x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 719Assert.Equal("i", GetSymbolNamesJoined(analysis.VariablesDeclared)) 720Assert.Equal("x, a", GetSymbolNamesJoined(analysis.DataFlowsIn)) 721Assert.Equal(Nothing, GetSymbolNamesJoined(analysis.DataFlowsOut)) 745Assert.Equal("a", GetSymbolNamesJoined(analysis.VariablesDeclared)) 746Assert.Equal("ary", GetSymbolNamesJoined(analysis.DataFlowsIn)) 747Assert.Equal(Nothing, GetSymbolNamesJoined(analysis.DataFlowsOut)) 795Assert.Equal("unassignedRef1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 798Assert.Equal("unassignedRef1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 800Assert.Equal("unassignedRef1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 804Assert.Equal("unassignedRef1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 832Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 837Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 840Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 873Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 876Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 905Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 907Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 989Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 990Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 991Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 992Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 993Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1204Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1251Assert.Equal("X, Z, Y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1409Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1411Assert.Equal("p, v", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1413Assert.Equal("p, v", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1414Assert.Equal("v", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1415Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1416Assert.Equal("p, v", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1447Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1448Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1449Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1451Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1452Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1453Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1454Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1604Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1605Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1606Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1607Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1608Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1609Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1610Assert.Equal("x, y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1634Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1635Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1636Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1637Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1638Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1639Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1640Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1665Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1666Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1667Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1668Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1669Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1670Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1671Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside))
FlowAnalysis\TryLockUsingStatementTests.vb (335)
60Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 61Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 62Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 63Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 64Assert.Equal("x, y, e", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 65Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 66Assert.Equal("x, y, e", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 67Assert.Equal("Me, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 147Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 148Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 149Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 150Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 151Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 152Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 153Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 154Assert.Equal("x, y, e", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 197Assert.Equal("e2", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 198Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 199Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 200Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 201Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 202Assert.Equal("p, s", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 203Assert.Equal("s, e2", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 204Assert.Equal("p, x, s, e1", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 244Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 245Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 246Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 247Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 248Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 249Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 250Assert.Equal("x, e", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 251Assert.Equal("Me, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 301Assert.Equal("ex, ex", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 302Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 303Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 304Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 305Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 306Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 307Assert.Equal("x, ex, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 308Assert.Equal("Me, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 360Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 361Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 362Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 363Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 364Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 365Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 366Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 367Assert.Equal("x, ex, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 417Assert.Equal("ex", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 418Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 419Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 420Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 421Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 422Assert.Equal("x, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 423Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 424Assert.Equal("Me, x, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 474Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 475Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 477Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 478Assert.Equal("x, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 479Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 480Assert.Equal("Me, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 529Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 530Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 531Assert.Equal("x, ex", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 533Assert.Equal("x, ex", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 534Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 535Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 536Assert.Equal("x, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 578Assert.Equal("e, e", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 580Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 581Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 582Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 583Assert.Equal("x, e", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 584Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 585Assert.Equal("x, e, e", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 586Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 622Assert.Equal("y, ex, y", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 623Assert.Equal("x, local", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 624Assert.Equal("x, s", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 625Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 626Assert.Equal("x, s, y", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 627Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 628Assert.Equal("x, local, y, ex, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 629Assert.Equal("Me, x, s", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 663Assert.Equal("ax, ex", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 664Assert.Equal("sb, sb1", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 665Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 667Assert.Equal("sb, sb1", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 668Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 669Assert.Equal("sb, sb1, ax, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 670Assert.Equal("sb, sb1", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 671Assert.Equal("Me", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 707Assert.Equal("ax, ex", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 708Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 709Assert.Equal("ss", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 710Assert.Equal("sb, ss", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 711Assert.Equal("ss", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 712Assert.Equal("sb, ss, ax, ex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 713Assert.Equal("sb, ss", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 714Assert.Equal("F, Me, ss", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 756Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 757Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 758Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 760Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 761Assert.Equal("p, x, y", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 762Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 763Assert.Equal("x, z, e", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 764Assert.Equal("Me, p, x, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 802Assert.Equal("ax", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 803Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 804Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 806Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 807Assert.Equal("p, x", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 808Assert.Equal("x, z, ax", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 809Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 810Assert.Equal("Me, p, x, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 851Assert.Equal("ex, e", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 852Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 853Assert.Equal("p, z", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 854Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 855Assert.Equal("p, x, z", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 856Assert.Equal("y, z, ex, e", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 857Assert.Equal("p, y, z", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 858Assert.Equal("Me, p, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 896Assert.Equal("ax", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 897Assert.Equal("p, ax", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 898Assert.Equal("p, x, y", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 899Assert.Equal("p, z", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 900Assert.Equal("p, x, y", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 901Assert.Equal("p, z", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 902Assert.Equal("p, z, ax", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 903Assert.Equal("Me, p, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 925Assert.Equal("p", GetSymbolNamesJoined(analysisResults.DataFlowsOut)) 976Assert.Equal("s, ax, s, ex, s, s", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 977Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 978Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 979Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 980Assert.Equal("x, y, ax, ex", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 981Assert.Equal("s, ax, s, ex, s, s", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 982Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 983Assert.Equal("Me, p, x, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1035Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1036Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1037Assert.Equal("ax", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1038Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 1039Assert.Equal("x, ax", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1040Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1041Assert.Equal("p, y, ex", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1042Assert.Equal("p, x, y, s, ax, ex, s, s", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1075Assert.Equal("y, e, e", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1076Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1077Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1078Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 1079Assert.Equal("x, y, e", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1080Assert.Equal("x, y, e, e", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1081Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1082Assert.Equal("F, Me, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1128Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1129Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1130Assert.Equal("Me, x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1132Assert.Equal("x, local", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 1133Assert.Equal("Me, x, local, y", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1134Assert.Equal("x, local", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1135Assert.Equal("x, local, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1136Assert.Equal("Me, x, local", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1172Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1173Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1174Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1175Assert.Equal("pex", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 1176Assert.Equal("s, pex", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1177Assert.Equal("pex", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1178Assert.Equal("pex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1179Assert.Equal("s, pex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1228Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1229Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1230Assert.Equal("TryFunc, Me, s", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1231Assert.Equal("pex", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 1232Assert.Equal("TryFunc, Me, s, pex, lex", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1233Assert.Equal("TryFunc, pex, lex, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1234Assert.Equal("pex", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1235Assert.Equal("Me, s, pex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1283Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1284Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1285Assert.Equal("TryFunc, Me, s", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1286Assert.Equal("pex", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 1287Assert.Equal("TryFunc, Me, s", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1288Assert.Equal("TryFunc, pex, lex, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1289Assert.Equal("s, pex, lex", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1290Assert.Equal("TryFunc, Me, s, pex, lex", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1324Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysis.VariablesDeclared)) 1325Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.AlwaysAssigned)) 1326Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsIn)) 1327Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.DataFlowsOut)) 1328Assert.Equal("TryFunc, x, y", GetSymbolNamesJoined(dataFlowAnalysis.ReadInside)) 1329Assert.Equal("TryFunc, x, y", GetSymbolNamesJoined(dataFlowAnalysis.WrittenInside)) 1330Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysis.ReadOutside)) 1331Assert.Equal("TryFunc, Me, x", GetSymbolNamesJoined(dataFlowAnalysis.WrittenOutside)) 1374Assert.Equal("e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1375Assert.Equal("M", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1376Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1377Assert.Equal("refp", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1378Assert.Equal("refp", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1379Assert.Equal("refp, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1380Assert.Equal("M, refp, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1381Assert.Equal("refp", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1382Assert.Equal("M, refp", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1424Assert.Equal("d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1425Assert.Equal("M, d", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1426Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1427Assert.Equal("refp", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1430Assert.Equal("refp, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1431Assert.Equal("M, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1432Assert.Equal("refp", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1433Assert.Equal("M, Me, refp, e", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1473Assert.Equal("e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1475Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1476Assert.Equal("p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1478Assert.Equal("p, local, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1479Assert.Equal("local, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1480Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1481Assert.Equal("Me, p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1522Assert.Equal("d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1523Assert.Equal("d", GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1524Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1525Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1527Assert.Equal("p, local, e, d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1528Assert.Equal("d, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1529Assert.Equal("p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1530Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1569Assert.Equal("e, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1571Assert.Equal("p, local, e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1572Assert.Equal("p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1575Assert.Equal("p, local, e, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1576Assert.Equal("e, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1577Assert.Equal("p", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1578Assert.Equal("p, local", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1603Assert.Equal("ap", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1606Assert.Equal("e", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1607Assert.Equal("p, e", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1608Assert.Equal("ap", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1609Assert.Equal("p, e, ap", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1611Assert.Equal("ap", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1612Assert.Equal("p, e", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1613Assert.Equal("Me, p, e", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1743Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 1744Assert.Equal("lock", dataFlowAnalysisResults.DataFlowsIn(1).ToDisplayString) 1749Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 1750Assert.Equal("lock", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 1757Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 1758Assert.Equal("lock", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 1792Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 1797Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 1800Assert.Equal("lock", dataFlowAnalysisResults.ReadOutside(0).ToDisplayString) 1806Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 1807Assert.Equal("lock", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 1843Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 1844Assert.Equal("lock", dataFlowAnalysisResults.DataFlowsIn(1).ToDisplayString) 1849Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 1850Assert.Equal("lock", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 1857Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 1858Assert.Equal("lock", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 1892Assert.Equal("y", GetSymbolNamesJoined(analysis.AlwaysAssigned)) 1896Assert.Equal("y", GetSymbolNamesJoined(analysis.ReadOutside)) 1897Assert.Equal("y", GetSymbolNamesJoined(analysis.WrittenInside)) 1898Assert.Equal("y", GetSymbolNamesJoined(analysis.WrittenOutside)) 1929Assert.Equal("x, y", GetSymbolNamesJoined(analysis.VariablesDeclared)) 1930Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)) 1931Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadInside)) 1933Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenInside)) 1968Assert.Equal("x, y", GetSymbolNamesJoined(analysis.VariablesDeclared)) 1969Assert.Equal("x, y", GetSymbolNamesJoined(analysis.AlwaysAssigned)) 1970Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadInside)) 1972Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenInside)) 2000Assert.Equal("x, y", GetSymbolNamesJoined(analysis.VariablesDeclared)) 2001Assert.Equal("x, y", GetSymbolNamesJoined(analysis.AlwaysAssigned)) 2002Assert.Equal("x, y", GetSymbolNamesJoined(analysis.ReadInside)) 2004Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenInside)) 2036Assert.Equal("goo, goo2, goo3, goo4", GetSymbolNamesJoined(analysis.VariablesDeclared)) 2037Assert.Equal("goo, goo2, goo3, goo4", GetSymbolNamesJoined(analysis.AlwaysAssigned)) 2038Assert.Equal("x, y, goo, goo2, goo3, goo4", GetSymbolNamesJoined(analysis.ReadInside)) 2040Assert.Equal("goo, goo2, goo3, goo4", GetSymbolNamesJoined(analysis.WrittenInside)) 2041Assert.Equal("x, y", GetSymbolNamesJoined(analysis.WrittenOutside)) 2042Assert.Equal("x, y", GetSymbolNamesJoined(analysis.DataFlowsIn)) 2075Assert.Equal("x, y, y", GetSymbolNamesJoined(analysis.VariablesDeclared)) 2076Assert.Equal("x", GetSymbolNamesJoined(analysis.AlwaysAssigned)) 2077Assert.Equal("objs, x, y", GetSymbolNamesJoined(analysis.ReadInside)) 2079Assert.Equal("x, y, y", GetSymbolNamesJoined(analysis.WrittenInside)) 2080Assert.Equal("objs", GetSymbolNamesJoined(analysis.WrittenOutside)) 2081Assert.Equal("objs", GetSymbolNamesJoined(analysis.DataFlowsIn)) 2111Assert.Equal("x", GetSymbolNamesJoined(dataflowAnalysis.VariablesDeclared)) 2112Assert.Equal("x", GetSymbolNamesJoined(dataflowAnalysis.AlwaysAssigned)) 2113Assert.Equal("x", GetSymbolNamesJoined(dataflowAnalysis.ReadInside)) 2114Assert.Equal(Nothing, GetSymbolNamesJoined(dataflowAnalysis.ReadOutside)) 2115Assert.Equal("x", GetSymbolNamesJoined(dataflowAnalysis.WrittenInside)) 2116Assert.Equal(Nothing, GetSymbolNamesJoined(dataflowAnalysis.WrittenOutside)) 2117Assert.Equal(Nothing, GetSymbolNamesJoined(dataflowAnalysis.DataFlowsIn)) 2118Assert.Equal(Nothing, GetSymbolNamesJoined(dataflowAnalysis.DataFlowsOut)) 2155Assert.Equal("i", GetSymbolNamesJoined(dataflowAnalysis.VariablesDeclared)) 2156Assert.Equal("i", GetSymbolNamesJoined(dataflowAnalysis.AlwaysAssigned)) 2157Assert.Equal("Obj1, i", GetSymbolNamesJoined(dataflowAnalysis.ReadInside)) 2158Assert.Equal(Nothing, GetSymbolNamesJoined(dataflowAnalysis.ReadOutside)) 2159Assert.Equal("i", GetSymbolNamesJoined(dataflowAnalysis.WrittenInside)) 2160Assert.Equal("args, Obj1, ex", GetSymbolNamesJoined(dataflowAnalysis.WrittenOutside)) 2161Assert.Equal("Obj1", GetSymbolNamesJoined(dataflowAnalysis.DataFlowsIn)) 2162Assert.Equal(Nothing, GetSymbolNamesJoined(dataflowAnalysis.DataFlowsOut)) 2204Assert.Equal("goo1", dataFlowAnalysisResults.AlwaysAssigned(0).ToDisplayString) 2205Assert.Equal("goo2", dataFlowAnalysisResults.AlwaysAssigned(1).ToDisplayString) 2210Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2215Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2216Assert.Equal("goo1", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 2217Assert.Equal("goo2", dataFlowAnalysisResults.ReadInside(2).ToDisplayString) 2222Assert.Equal("goo1", dataFlowAnalysisResults.VariablesDeclared(0).ToDisplayString) 2223Assert.Equal("goo2", dataFlowAnalysisResults.VariablesDeclared(1).ToDisplayString) 2226Assert.Equal("goo1", dataFlowAnalysisResults.WrittenInside(0).ToDisplayString) 2227Assert.Equal("goo2", dataFlowAnalysisResults.WrittenInside(1).ToDisplayString) 2230Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2274Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2279Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2288Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2332Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2337Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2340Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2341Assert.Equal("goo1", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 2348Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString) 2349Assert.Equal("goo1", dataFlowAnalysisResults.WrittenOutside(1).ToDisplayString) 2390Assert.Equal("x", dataFlowAnalysisResults.DataFlowsIn(0).ToDisplayString) 2395Assert.Equal("x", dataFlowAnalysisResults.ReadInside(0).ToDisplayString) 2396Assert.Equal("goo1", dataFlowAnalysisResults.ReadInside(1).ToDisplayString) 2397Assert.Equal("goo2", dataFlowAnalysisResults.ReadInside(2).ToDisplayString) 2402Assert.Equal("goo1", dataFlowAnalysisResults.VariablesDeclared(0).ToDisplayString) 2403Assert.Equal("goo2", dataFlowAnalysisResults.VariablesDeclared(1).ToDisplayString) 2406Assert.Equal("goo1", dataFlowAnalysisResults.WrittenInside(0).ToDisplayString) 2407Assert.Equal("goo2", dataFlowAnalysisResults.WrittenInside(1).ToDisplayString) 2410Assert.Equal("x", dataFlowAnalysisResults.WrittenOutside(0).ToDisplayString)
Semantics\QueryExpressions_FlowAnalysis.vb (656)
113Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 114Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 115Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 116Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 117Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 118Assert.Equal("q, y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 119Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 120Assert.Equal("Me, args, q, y, q1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 160Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 161Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 162Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 163Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 164Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 165Assert.Equal("y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 166Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 167Assert.Equal("Me, args, q, y, q1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 207Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 208Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 209Assert.Equal("q, y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 210Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 211Assert.Equal("q, y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 212Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 213Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 214Assert.Equal("Me, args, q, y, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 215Assert.Equal("y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 258Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 259Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 260Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 261Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 262Assert.Equal("s1, z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 263Assert.Equal("q, y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 264Assert.Equal("y, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 265Assert.Equal("Me, args, q, y, q1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 266Assert.Equal("y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 309Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 310Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 311Assert.Equal("y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 312Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 313Assert.Equal("y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 314Assert.Equal("q, y, s1, z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 315Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 316Assert.Equal("Me, args, q, y, q1, s1, z", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 317Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 350Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 351Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 353Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 356Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 358Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 361Assert.Equal("q, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 362Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 364Assert.Equal("Me, args, q, q1, s1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 366Assert.Equal(ss(0).Name, ss(1).Name) 369Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 402Assert.Equal("s1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 404Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 405Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 406Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 407Assert.Equal("q, s1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 408Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 409Assert.Equal("s1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 410Assert.Equal("Me, args, q, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 411Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 444Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 445Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 446Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 447Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 448Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 449Assert.Equal("q, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 451Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 452Assert.Equal("Me, args, q, q1, s1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 453Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 486Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 487Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 488Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 489Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 490Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 491Assert.Equal("q, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 492Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 493Assert.Equal("Me, args, q, q1, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 494Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 527Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 528Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 529Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 530Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 531Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 532Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 533Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 534Assert.Equal("Me, args, q, q1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 535Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 568Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 569Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 570Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 571Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 572Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 573Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 574Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 575Assert.Equal("Me, args, q, q1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 576Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 609Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 610Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 611Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 612Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 613Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 614Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 615Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 616Assert.Equal("Me, args, q, q1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 617Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 650Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 651Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 652Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 653Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 654Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 655Assert.Equal("q, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 656Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 657Assert.Equal("Me, args, q, q1, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 658Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 691Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 692Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 693Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 694Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 695Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 696Assert.Equal("q, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 697Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 698Assert.Equal("Me, args, q, q1, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 699Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 755Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 756Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 757Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 758Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 759Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 760Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 761Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 762Assert.Equal("q, q1, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 763Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 819Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 820Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 821Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 822Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 823Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 824Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 825Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 826Assert.Equal("q, q1, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 827Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 883Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 884Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 885Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 886Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 887Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 888Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 889Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 890Assert.Equal("q, q1, s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 891Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1018Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1019Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1020Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1021Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1022Assert.Equal("q, s", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1023Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1024Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1025Assert.Equal("q, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1026Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1219Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1220Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1221Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1222Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1223Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1224Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1225Assert.Equal("s", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1226Assert.Equal("q, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1227Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1274Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1275Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1276Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1277Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1278Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1279Assert.Equal("q, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1280Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1281Assert.Equal("q, q1, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1282Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1329Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1330Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1331Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1332Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1333Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1334Assert.Equal("q, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1335Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1336Assert.Equal("q, q1, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1337Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1384Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1385Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1386Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1387Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1388Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1389Assert.Equal("q, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1390Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1391Assert.Equal("q, q1, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1392Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1439Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1440Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1441Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1442Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1443Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1444Assert.Equal("q, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1445Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1446Assert.Equal("q, q1, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1447Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1494Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1495Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1496Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1497Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1498Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1499Assert.Equal("x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1500Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1501Assert.Equal("q, q1, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1502Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1549Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1550Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1551Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1552Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1553Assert.Equal("q, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1554Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1555Assert.Equal("x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1556Assert.Equal("q, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1557Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1605Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1606Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1607Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1608Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1609Assert.Equal("z", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1610Assert.Equal("q, x", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1611Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1612Assert.Equal("q, q1, z, x, y", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1613Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1649Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1650Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1651Assert.Equal("y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1652Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1653Assert.Equal("y, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1654Assert.Equal("q, y", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1655Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1656Assert.Equal("Me, args, q, y, q1, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1657Assert.Equal("y", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1699Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1700Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1701Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1702Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1703Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1704Assert.Equal("q, s1, s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1705Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1706Assert.Equal("q, q1, s1, MaxValue, s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1707Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1755Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1756Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1757Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1758Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1759Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1760Assert.Equal("q, s1, s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1761Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1762Assert.Equal("q, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1763Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1811Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1812Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1813Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1814Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1815Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1816Assert.Equal("q, s1, s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1817Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1818Assert.Equal("q, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1819Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1867Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1868Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1869Assert.Equal("s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1870Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1871Assert.Equal("s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1872Assert.Equal("q, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1873Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1874Assert.Equal("q, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1875Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1919Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1920Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1921Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1922Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1923Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1924Assert.Equal("qi, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1925Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1926Assert.Equal("qi, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1927Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 1971Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 1972Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 1973Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 1974Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 1975Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 1976Assert.Equal("q, s1, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 1977Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 1978Assert.Equal("q, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 1979Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2023Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2024Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2025Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2026Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2027Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2028Assert.Equal("q, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2029Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2030Assert.Equal("q, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2031Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2075Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2076Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2077Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2078Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2079Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2080Assert.Equal("q, s1, s2, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2081Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2082Assert.Equal("q, q1, s1, s2, s3, s4, s5", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2083Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2127Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2128Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2129Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2130Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2131Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2132Assert.Equal("q, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2133Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2134Assert.Equal("q, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2135Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2177Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2178Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2179Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2180Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2181Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2182Assert.Equal("q, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2183Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2184Assert.Equal("q, q1, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2185Assert.Equal("q", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2236Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2237Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2238Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2239Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2240Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2241Assert.Equal("qi, qs, qu, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2242Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2243Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2244Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2295Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2296Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2297Assert.Equal("qs", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2298Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2299Assert.Equal("qs", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2300Assert.Equal("qi, qb, qu, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2301Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2302Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2303Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2354Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2355Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2356Assert.Equal("qu", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2357Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2358Assert.Equal("qu", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2359Assert.Equal("qi, qb, qs, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2360Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2361Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2362Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2412Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2413Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2414Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2415Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2416Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2417Assert.Equal("qi, qb, qs, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2418Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2419Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, s4, s5", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2420Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2470Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2471Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2472Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2473Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2474Assert.Equal("s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2475Assert.Equal("qi, qb, qs, s1, s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2476Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2477Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2478Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2528Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2529Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2530Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2531Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2532Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2533Assert.Equal("qi, qb, qs, s1, s2, s3", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2534Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2535Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2536Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2593Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2594Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2595Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2596Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2597Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2598Assert.Equal("s1, i1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2599Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2600Assert.Equal("qi, q1, s1, i1, k1, Group, Count, c1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2601Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2658Assert.Equal("s1, i1, k1, Group, Count, c1", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2659Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2660Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2661Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2662Assert.Equal("qi, s1, i1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2663Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2664Assert.Equal("s1, i1, k1, Group, Count, c1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2665Assert.Equal("qi, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2666Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2723Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2724Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2725Assert.Equal("i1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2726Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2727Assert.Equal("i1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2728Assert.Equal("qi, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2729Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2730Assert.Equal("qi, q1, s1, i1, k1, Group, Count, c1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2731Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2787Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2788Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2789Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2790Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2791Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2792Assert.Equal("qi, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2793Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2794Assert.Equal("qi, q1, s1, k1, Group, Count, c1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2795Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2858Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2859Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2860Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2861Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2862Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2863Assert.Equal("qi, qs, qu, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2864Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2865Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, c1, c2, s4, Group", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2866Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 2929Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 2930Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 2931Assert.Equal("qs", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 2932Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 2933Assert.Equal("qs", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 2934Assert.Equal("qi, qb, qu, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 2935Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 2936Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, c1, c2, s4, Group", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 2937Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3000Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3001Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3002Assert.Equal("qu", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3003Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3004Assert.Equal("qu", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3005Assert.Equal("qi, qb, qs, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3006Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3007Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, c1, c2, s4, Group", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3008Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3071Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3072Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3073Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3074Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3075Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3076Assert.Equal("qi, qb, qs, qu, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3077Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3078Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, c1, c2, s4, Group", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3079Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3142Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3143Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3144Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3145Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3146Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3147Assert.Equal("qi, qb, qs, qu, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3148Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3149Assert.Equal("qi, qb, qs, qu, ql, q1, s1, s2, s3, c1, c2, s4, Group", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3150Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3213Assert.Equal("s1, s2, s3, c1, c2, s4, Group", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3214Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3215Assert.Equal("qi, qb, qs, qu", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3216Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3217Assert.Equal("qi, qb, qs, qu, s1, s2, s3, s4", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3218Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3219Assert.Equal("s1, s2, s3, c1, c2, s4, Group", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3220Assert.Equal("qi, qb, qs, qu, ql, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3221Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3268Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3269Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3270Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3271Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3272Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3273Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3274Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3275Assert.Equal("qi, q1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3276Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3323Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3324Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3325Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3326Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3327Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3328Assert.Equal("s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3329Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3330Assert.Equal("qi, q1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3331Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3378Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3379Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3380Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3381Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3382Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3383Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3384Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3385Assert.Equal("qi, q1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3386Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3433Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3434Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3435Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3436Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3437Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3438Assert.Equal("qi, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3439Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3440Assert.Equal("qi, q1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3441Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3488Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3489Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3490Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3491Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3492Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3493Assert.Equal("qi, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3494Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3495Assert.Equal("qi, q1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3496Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3543Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3544Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3545Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3546Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3547Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3548Assert.Equal("qi, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3549Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3550Assert.Equal("qi, q1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3551Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3598Assert.Equal("s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3599Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3600Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3601Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3602Assert.Equal("qi, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3603Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3604Assert.Equal("s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3605Assert.Equal("qi, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3606Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3653Assert.Equal("s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3654Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3655Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3656Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3657Assert.Equal("qi, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3658Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3659Assert.Equal("s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3660Assert.Equal("qi, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3661Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3710Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3711Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3712Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3713Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3714Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3715Assert.Equal("qi, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3716Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3717Assert.Equal("qi, qb, q1, t1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3718Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3767Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3768Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3769Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3770Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3771Assert.Equal("qb", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3772Assert.Equal("qi, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3773Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3774Assert.Equal("qi, qb, q1, t1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3775Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3824Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3825Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3826Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3827Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3828Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3829Assert.Equal("qb, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3830Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3831Assert.Equal("qi, qb, q1, t1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3832Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3881Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3882Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3883Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3884Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3885Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3886Assert.Equal("qb, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3887Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3888Assert.Equal("qi, qb, q1, t1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3889Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3938Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3939Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3940Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3941Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3942Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 3943Assert.Equal("qi, qb", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 3944Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 3945Assert.Equal("qi, qb, q1, t1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 3946Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 3995Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 3996Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 3997Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 3998Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 3999Assert.Equal("s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 4000Assert.Equal("qi, qb, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 4001Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 4002Assert.Equal("qi, qb, q1, t1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 4003Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 4052Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 4053Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 4054Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 4055Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 4056Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 4057Assert.Equal("qi, qb, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 4058Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 4059Assert.Equal("qi, qb, q1, t1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 4060Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 4109Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 4110Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 4111Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 4112Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 4113Assert.Equal("s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 4114Assert.Equal("qi, qb, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 4115Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 4116Assert.Equal("qi, qb, q1, t1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 4117Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 4166Assert.Equal("t1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 4167Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 4168Assert.Equal("qi, qb", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 4169Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 4170Assert.Equal("qi, qb, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 4171Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 4172Assert.Equal("t1, s1, s2, Count", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 4173Assert.Equal("qi, qb, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 4174Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 4223Assert.Equal("t1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 4224Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 4225Assert.Equal("qi, qb", GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 4226Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 4227Assert.Equal("qi, qb, s1, s2", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 4228Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 4229Assert.Equal("t1, s1, s2, Count, c", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 4230Assert.Equal("qi, qb, q1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 4231Assert.Equal("qi", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 4259Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 4260Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 4261Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 4262Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 4263Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 4264Assert.Equal("arr", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 4265Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 4266Assert.Equal("arr, q2, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 4267Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured)) 4292Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.VariablesDeclared)) 4293Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.AlwaysAssigned)) 4294Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsIn)) 4295Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.DataFlowsOut)) 4296Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.ReadInside)) 4297Assert.Equal("arr", GetSymbolNamesJoined(dataFlowAnalysisResults.ReadOutside)) 4298Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenInside)) 4299Assert.Equal("arr, q2, s1", GetSymbolNamesJoined(dataFlowAnalysisResults.WrittenOutside)) 4300Assert.Equal(Nothing, GetSymbolNamesJoined(dataFlowAnalysisResults.Captured))
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (103)
SymbolDisplay\ObjectDisplayTests.vb (97)
16Assert.Equal("1", FormatPrimitive(CByte(1))) 17Assert.Equal("123", FormatPrimitive(CByte(123))) 18Assert.Equal("255", FormatPrimitive(Byte.MaxValue)) 19Assert.Equal("1", FormatPrimitive(CSByte(1))) 20Assert.Equal("123", FormatPrimitive(CSByte(123))) 21Assert.Equal("-1", FormatPrimitive(CSByte(-1))) 22Assert.Equal("1", FormatPrimitive(CUShort(1))) 23Assert.Equal("123", FormatPrimitive(CUShort(123))) 24Assert.Equal("65535", FormatPrimitive(UShort.MaxValue)) 25Assert.Equal("1", FormatPrimitive(CShort(1))) 26Assert.Equal("123", FormatPrimitive(CShort(123))) 27Assert.Equal("-1", FormatPrimitive(CShort(-1))) 28Assert.Equal("1", FormatPrimitive(CUInt(1))) 29Assert.Equal("123", FormatPrimitive(CUInt(123))) 30Assert.Equal("4294967295", FormatPrimitive(UInteger.MaxValue)) 31Assert.Equal("1", FormatPrimitive(CInt(1))) 32Assert.Equal("123", FormatPrimitive(CInt(123))) 33Assert.Equal("-1", FormatPrimitive(CInt(-1))) 34Assert.Equal("1", FormatPrimitive(CULng(1))) 35Assert.Equal("123", FormatPrimitive(CULng(123))) 36Assert.Equal("18446744073709551615", FormatPrimitive(ULong.MaxValue)) 37Assert.Equal("1", FormatPrimitive(CLng(1))) 38Assert.Equal("123", FormatPrimitive(CLng(123))) 39Assert.Equal("-1", FormatPrimitive(CLng(-1))) 42Assert.Equal("&H00", FormatPrimitiveUsingHexadecimalNumbers(CByte(0))) 43Assert.Equal("&H01", FormatPrimitiveUsingHexadecimalNumbers(CByte(1))) 44Assert.Equal("&H7F", FormatPrimitiveUsingHexadecimalNumbers(CByte(&H7F))) 45Assert.Equal("&HFF", FormatPrimitiveUsingHexadecimalNumbers(Byte.MaxValue)) 46Assert.Equal("&H00", FormatPrimitiveUsingHexadecimalNumbers(CSByte(0))) 47Assert.Equal("&H01", FormatPrimitiveUsingHexadecimalNumbers(CSByte(1))) 48Assert.Equal("&H7F", FormatPrimitiveUsingHexadecimalNumbers(CSByte(&H7F))) 49Assert.Equal("&HFFFFFFFF", FormatPrimitiveUsingHexadecimalNumbers(CSByte(-1))) 50Assert.Equal("&HFFFFFFFE", FormatPrimitiveUsingHexadecimalNumbers(CSByte((-2)))) 51Assert.Equal("&H0000", FormatPrimitiveUsingHexadecimalNumbers(CUShort(0))) 52Assert.Equal("&H0001", FormatPrimitiveUsingHexadecimalNumbers(CUShort(1))) 53Assert.Equal("&H007F", FormatPrimitiveUsingHexadecimalNumbers(CUShort(&H7F))) 54Assert.Equal("&HFFFF", FormatPrimitiveUsingHexadecimalNumbers(UShort.MaxValue)) 55Assert.Equal("&H0000", FormatPrimitiveUsingHexadecimalNumbers(CShort(0))) 56Assert.Equal("&H0001", FormatPrimitiveUsingHexadecimalNumbers(CShort(1))) 57Assert.Equal("&H007F", FormatPrimitiveUsingHexadecimalNumbers(CShort(&H7F))) 58Assert.Equal("&HFFFFFFFF", FormatPrimitiveUsingHexadecimalNumbers(CShort(-1))) 59Assert.Equal("&HFFFFFFFE", FormatPrimitiveUsingHexadecimalNumbers(CShort((-2)))) 60Assert.Equal("&H00000000", FormatPrimitiveUsingHexadecimalNumbers(CUInt(0))) 61Assert.Equal("&H00000001", FormatPrimitiveUsingHexadecimalNumbers(CUInt(1))) 62Assert.Equal("&H0000007F", FormatPrimitiveUsingHexadecimalNumbers(CUInt(&H7F))) 63Assert.Equal("&HFFFFFFFF", FormatPrimitiveUsingHexadecimalNumbers(UInteger.MaxValue)) 64Assert.Equal("&H00000000", FormatPrimitiveUsingHexadecimalNumbers(CInt(0))) 65Assert.Equal("&H00000001", FormatPrimitiveUsingHexadecimalNumbers(CInt(1))) 66Assert.Equal("&H0000007F", FormatPrimitiveUsingHexadecimalNumbers(CInt(&H7F))) 67Assert.Equal("&HFFFFFFFF", FormatPrimitiveUsingHexadecimalNumbers(CInt(-1))) 68Assert.Equal("&HFFFFFFFE", FormatPrimitiveUsingHexadecimalNumbers(CInt((-2)))) 69Assert.Equal("&H0000000000000000", FormatPrimitiveUsingHexadecimalNumbers(CULng(0))) 70Assert.Equal("&H0000000000000001", FormatPrimitiveUsingHexadecimalNumbers(CULng(1))) 71Assert.Equal("&H000000000000007F", FormatPrimitiveUsingHexadecimalNumbers(CULng(&H7F))) 72Assert.Equal("&HFFFFFFFFFFFFFFFF", FormatPrimitiveUsingHexadecimalNumbers(ULong.MaxValue)) 73Assert.Equal("&H0000000000000000", FormatPrimitiveUsingHexadecimalNumbers(CLng(0))) 74Assert.Equal("&H0000000000000001", FormatPrimitiveUsingHexadecimalNumbers(CLng(1))) 75Assert.Equal("&H000000000000007F", FormatPrimitiveUsingHexadecimalNumbers(CLng(&H7F))) 76Assert.Equal("&HFFFFFFFFFFFFFFFF", FormatPrimitiveUsingHexadecimalNumbers(CLng(-1))) 77Assert.Equal("&HFFFFFFFFFFFFFFFE", FormatPrimitiveUsingHexadecimalNumbers(CLng((-2)))) 82Assert.Equal("True", FormatPrimitive(True)) 83Assert.Equal("False", FormatPrimitive(False)) 88Assert.Equal("Nothing", FormatPrimitive(Nothing)) 93Assert.Equal("2", FormatPrimitive(CType(2, Decimal))) 98Assert.Equal("2", FormatPrimitive(CType(2, Single))) 103Assert.Equal("2", FormatPrimitive(CType(2, Double))) 109Assert.Equal("""x""c", FormatPrimitive("x"c, quoteStrings:=True)) 110Assert.Equal("x", FormatPrimitive("x"c, quoteStrings:=False)) 111Assert.Equal("""x""c", FormatPrimitiveUsingHexadecimalNumbers("x"c, quoteStrings:=True)) 112Assert.Equal("x", FormatPrimitiveUsingHexadecimalNumbers("x"c, quoteStrings:=False)) 147Assert.Equal("", FormatPrimitive("", quoteStrings:=False)) 148Assert.Equal("a", FormatPrimitive("a", quoteStrings:=False)) 149Assert.Equal("""", FormatPrimitive("""", quoteStrings:=False)) 150Assert.Equal("""""", FormatPrimitive("", quoteStrings:=True)) 151Assert.Equal("""""""""", FormatPrimitive("""", quoteStrings:=True)) 186Assert.Equal("ChrW(8232) & ""x""", literal.Text) 188Assert.Equal("ChrW(56319)", literal.Text) 232Assert.Equal("31.01.2001 00:00:00", dateValue.ToString("dd.MM.yyyy HH:mm:ss")) 233Assert.Equal("#1/31/2001 12:00:00 AM#", FormatPrimitive(dateValue)) 236Assert.Equal("12,5", decimalValue.ToString()) 237Assert.Equal("12.5", FormatPrimitive(decimalValue)) 242Assert.Equal("12,5", doubleValue.ToString()) 243Assert.Equal("12.5", FormatPrimitive(doubleValue)) 248Assert.Equal("12,5", singleValue.ToString()) 249Assert.Equal("12.5", FormatPrimitive(singleValue)) 261Assert.Equal("True", FormatPrimitiveIncludingTypeSuffix(booleanValue)) 264Assert.Equal("42", FormatPrimitiveIncludingTypeSuffix(sbyteValue)) 267Assert.Equal("42", FormatPrimitiveIncludingTypeSuffix(byteValue)) 270Assert.Equal("42S", FormatPrimitiveIncludingTypeSuffix(shortValue)) 273Assert.Equal("42US", FormatPrimitiveIncludingTypeSuffix(ushortValue)) 276Assert.Equal("42I", FormatPrimitiveIncludingTypeSuffix(integerValue)) 279Assert.Equal("42UI", FormatPrimitiveIncludingTypeSuffix(uintegerValue)) 282Assert.Equal("42L", FormatPrimitiveIncludingTypeSuffix(longValue)) 285Assert.Equal("42UL", FormatPrimitiveIncludingTypeSuffix(ulongValue)) 288Assert.Equal("3.14159F", FormatPrimitiveIncludingTypeSuffix(singleValue)) 291Assert.Equal("26.2R", FormatPrimitiveIncludingTypeSuffix(doubleValue)) 294Assert.Equal("12.5D", FormatPrimitiveIncludingTypeSuffix(decimalValue, useHexadecimalNumbers:=True))
SymbolsTests\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.vb (5)
120Assert.Equal(SymbolKind.ErrorType, m.Parameters.[Where](Function(arg) arg.Name = "c1").[Select](Function(arg) arg).[Single]().[Type].BaseType.Kind) 124Assert.Equal(SymbolKind.ErrorType, m.ReturnType.BaseType.Kind) 370Assert.Equal(SymbolKind.Parameter, m.Parameters.[Where](Function(arg) arg.Name = "c1").[Select](Function(arg) arg).[Single]().Kind) 375Assert.Equal(SymbolKind.NamedType, m.ReturnType.Kind) 483Assert.Equal(SymbolKind.ErrorType, m.ReturnType.Kind)
SymbolsTests\Retargeting\RetargetCustomModifiers.vb (1)
60Assert.Equal("System.Runtime.CompilerServices.IsConst", p2Mod.Modifier.ToTestDisplayString())
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (71)
Parser\DeclarationTests.vb (3)
58Assert.Equal("", decl1.Name) 59Assert.Equal("", decl2.Name) 198Assert.Equal("", decl1.Name)
Syntax\ManualTests.vb (8)
39Assert.Equal(expectedText, actualText) 109Assert.Equal(" ", node.GetLeadingTrivia().First().ToString()) 119Assert.Equal(" ", node.GetLeadingTrivia().First().ToString()) 164Assert.Equal("", null1.ToString()) 176Assert.Equal("", empty1.ToString()) 188Assert.Equal("a", singleton1.ToString()) 200Assert.Equal("a,b,c", list1.ToString()) 228Assert.Equal(">", token.ToString())
Syntax\SeparatedSyntaxListTests.vb (32)
25Assert.Equal("A", list(0).ToString()) 26Assert.Equal("B", list(1).ToString()) 27Assert.Equal("C", list(2).ToString()) 28Assert.Equal("A,B,C", list.ToFullString()) 43Assert.Equal("A,B,C,D", newList.ToFullString()) 47Assert.Equal("A,B,C,D,E", newList.ToFullString()) 51Assert.Equal("D,A,B,C", newList.ToFullString()) 55Assert.Equal("A,D,B,C", newList.ToFullString()) 59Assert.Equal("A,B,D,C", newList.ToFullString()) 63Assert.Equal("A,B,C,D", newList.ToFullString()) 67Assert.Equal("D,E,A,B,C", newList.ToFullString()) 71Assert.Equal("A,D,E,B,C", newList.ToFullString()) 75Assert.Equal("A,B,D,E,C", newList.ToFullString()) 79Assert.Equal("A,B,C,D,E", newList.ToFullString()) 83Assert.Equal("B,C", newList.ToFullString()) 87Assert.Equal("A,B", newList.ToFullString()) 91Assert.Equal("B,C", newList.ToFullString()) 95Assert.Equal("A,C", newList.ToFullString()) 99Assert.Equal("A,B", newList.ToFullString()) 103Assert.Equal("D,B,C", newList.ToFullString()) 107Assert.Equal("A,D,C", newList.ToFullString()) 111Assert.Equal("A,B,D", newList.ToFullString()) 115Assert.Equal("D,E,B,C", newList.ToFullString()) 119Assert.Equal("A,D,E,C", newList.ToFullString()) 123Assert.Equal("A,B,D,E", newList.ToFullString()) 127Assert.Equal("B,C", newList.ToFullString()) 131Assert.Equal("A,C", newList.ToFullString()) 135Assert.Equal("A,B", newList.ToFullString()) 167Assert.Equal("D", newList.ToFullString()) 171Assert.Equal("D,E", newList.ToFullString()) 175Assert.Equal("D", newList.ToFullString()) 179Assert.Equal("D,E", newList.ToFullString())
Syntax\SyntaxNormalizerTests.vb (5)
28Assert.Equal(expected, actual) 80Assert.Equal(expected, actual) 751Assert.Equal(expected, actual) 759Assert.Equal(expected, actual) 796Assert.Equal(expected, actual)
Syntax\SyntaxTokenFactoryTests.vb (23)
20Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword)) 25Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.XmlKeyword)) 44Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 49Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 54Assert.Equal(keywordToken.ToString(), SyntaxFacts.GetText(SyntaxKind.AddHandlerKeyword).ToUpperInvariant) 64Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken)) 69Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.XmlKeyword)) 88Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 93Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 98Assert.Equal(punctuationToken.ToString(), SyntaxFacts.GetText(SyntaxKind.ExclamationToken).ToUpperInvariant) 124Assert.Equal(token.ToString(), SyntaxFacts.GetText(CType(k, SyntaxKind))) 128Assert.Equal(token.ToString(), SyntaxFacts.GetText(CType(k, SyntaxKind)).ToUpperInvariant) 132Assert.Equal(token.ToString(), String.Empty) 159Assert.Equal("#if true then" & Environment.NewLine & "a + " & Environment.NewLine, expr2.ToFullString()) 170Assert.Equal("a", id.ValueText) 176Assert.Equal("a + b", bex2.ToFullString()) 177Assert.Equal("a + b", bex.ToFullString()) 190Assert.Equal("a + b", rtext) 203Assert.Equal("a + (c - b)", rtext) 212Assert.Equal("a ' goo + b", rtext) 222Assert.Equal("a ", id2.ToFullString()) 223Assert.Equal("a ", id.ToFullString()) 233Assert.Equal("a ", id2.ToFullString())
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (7)
CompilationTestUtils.vb (3)
1182Assert.Equal(ExpectedDispName(count), item.ToDisplayString()) 1214Assert.Equal(symbolDescriptions(i), descriptions(i)) 1223Assert.Equal(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat), description)
ParserTestUtilities.vb (3)
116Assert.Equal(source, root.ToFullString) 240Assert.Equal(x1.ToString, x2.ToString) 768Assert.Equal(tk.ToString().Trim(), tk.ToString())
SemanticModelTestBase.vb (1)
42Assert.Equal(bindText, node.ToString())
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (112)
CodeGeneration\AddImportsTests.vb (1)
103Assert.Equal(importsAddedText, actualText)
CodeGeneration\SyntaxGeneratorTests.vb (102)
51Assert.Equal(expectedText, text) 2591Assert.Equal("c", Generator.GetName(Generator.ClassDeclaration("c"))) 2592Assert.Equal("s", Generator.GetName(Generator.StructDeclaration("s"))) 2593Assert.Equal("i", Generator.GetName(Generator.EnumDeclaration("i"))) 2594Assert.Equal("e", Generator.GetName(Generator.EnumDeclaration("e"))) 2595Assert.Equal("d", Generator.GetName(Generator.DelegateDeclaration("d"))) 2596Assert.Equal("m", Generator.GetName(Generator.MethodDeclaration("m"))) 2597Assert.Equal("m", Generator.GetName(Generator.MethodDeclaration("m", modifiers:=DeclarationModifiers.Abstract))) 2598Assert.Equal("", Generator.GetName(Generator.ConstructorDeclaration())) 2599Assert.Equal("p", Generator.GetName(Generator.ParameterDeclaration("p"))) 2600Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract))) 2601Assert.Equal("p", Generator.GetName(Generator.PropertyDeclaration("p", Generator.IdentifierName("t")))) 2602Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t")))) 2603Assert.Equal("Item", Generator.GetName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract))) 2604Assert.Equal("f", Generator.GetName(Generator.FieldDeclaration("f", Generator.IdentifierName("t")))) 2605Assert.Equal("v", Generator.GetName(Generator.EnumMember("v"))) 2606Assert.Equal("ef", Generator.GetName(Generator.EventDeclaration("ef", Generator.IdentifierName("t")))) 2607Assert.Equal("ep", Generator.GetName(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t")))) 2608Assert.Equal("n", Generator.GetName(Generator.NamespaceDeclaration("n"))) 2609Assert.Equal("u", Generator.GetName(Generator.NamespaceImportDeclaration("u"))) 2610Assert.Equal("loc", Generator.GetName(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"))) 2611Assert.Equal("a", Generator.GetName(Generator.Attribute("a"))) 2616Assert.Equal("c", Generator.GetName(Generator.WithName(Generator.ClassDeclaration("x"), "c"))) 2617Assert.Equal("s", Generator.GetName(Generator.WithName(Generator.StructDeclaration("x"), "s"))) 2618Assert.Equal("i", Generator.GetName(Generator.WithName(Generator.EnumDeclaration("x"), "i"))) 2619Assert.Equal("e", Generator.GetName(Generator.WithName(Generator.EnumDeclaration("x"), "e"))) 2620Assert.Equal("d", Generator.GetName(Generator.WithName(Generator.DelegateDeclaration("x"), "d"))) 2621Assert.Equal("m", Generator.GetName(Generator.WithName(Generator.MethodDeclaration("x"), "m"))) 2622Assert.Equal("m", Generator.GetName(Generator.WithName(Generator.MethodDeclaration("x", modifiers:=DeclarationModifiers.Abstract), "m"))) 2623Assert.Equal("", Generator.GetName(Generator.WithName(Generator.ConstructorDeclaration(), ".ctor"))) 2624Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.ParameterDeclaration("x"), "p"))) 2625Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.IdentifierName("t")), "p"))) 2626Assert.Equal("p", Generator.GetName(Generator.WithName(Generator.PropertyDeclaration("x", Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract), "p"))) 2627Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t")), "X"))) 2628Assert.Equal("X", Generator.GetName(Generator.WithName(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), modifiers:=DeclarationModifiers.Abstract), "X"))) 2629Assert.Equal("f", Generator.GetName(Generator.WithName(Generator.FieldDeclaration("x", Generator.IdentifierName("t")), "f"))) 2630Assert.Equal("v", Generator.GetName(Generator.WithName(Generator.EnumMember("x"), "v"))) 2631Assert.Equal("ef", Generator.GetName(Generator.WithName(Generator.EventDeclaration("x", Generator.IdentifierName("t")), "ef"))) 2632Assert.Equal("ep", Generator.GetName(Generator.WithName(Generator.CustomEventDeclaration("x", Generator.IdentifierName("t")), "ep"))) 2633Assert.Equal("n", Generator.GetName(Generator.WithName(Generator.NamespaceDeclaration("x"), "n"))) 2634Assert.Equal("u", Generator.GetName(Generator.WithName(Generator.NamespaceImportDeclaration("x"), "u"))) 2635Assert.Equal("loc", Generator.GetName(Generator.WithName(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "x"), "loc"))) 2636Assert.Equal("a", Generator.GetName(Generator.WithName(Generator.Attribute("x"), "a"))) 2764Assert.Equal("t", Generator.GetType(Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"))).ToString()) 2767Assert.Equal("t", Generator.GetType(Generator.FieldDeclaration("f", Generator.IdentifierName("t"))).ToString()) 2768Assert.Equal("t", Generator.GetType(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"))).ToString()) 2769Assert.Equal("t", Generator.GetType(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("t"))).ToString()) 2770Assert.Equal("t", Generator.GetType(Generator.ParameterDeclaration("p", Generator.IdentifierName("t"))).ToString()) 2772Assert.Equal("t", Generator.GetType(Generator.EventDeclaration("ef", Generator.IdentifierName("t"))).ToString()) 2773Assert.Equal("t", Generator.GetType(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"))).ToString()) 2775Assert.Equal("t", Generator.GetType(Generator.DelegateDeclaration("t", returnType:=Generator.IdentifierName("t"))).ToString()) 2778Assert.Equal("t", Generator.GetType(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "v")).ToString()) 2786Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2787Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.MethodDeclaration("m"), Generator.IdentifierName("t"))).ToString()) 2788Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.FieldDeclaration("f", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2789Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.PropertyDeclaration("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2790Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("pt"))}, Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2791Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.ParameterDeclaration("p", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2793Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t", returnType:=Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2794Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.DelegateDeclaration("t"), Generator.IdentifierName("t"))).ToString()) 2796Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.EventDeclaration("ef", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2797Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("x")), Generator.IdentifierName("t"))).ToString()) 2799Assert.Equal("t", Generator.GetType(Generator.WithType(Generator.LocalDeclarationStatement(Generator.IdentifierName("x"), "v"), Generator.IdentifierName("t"))).ToString()) 2881Assert.Equal("x", Generator.GetExpression(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), initializer:=Generator.IdentifierName("x"))).ToString()) 2882Assert.Equal("x", Generator.GetExpression(Generator.ParameterDeclaration("p", Generator.IdentifierName("t"), initializer:=Generator.IdentifierName("x"))).ToString()) 2883Assert.Equal("x", Generator.GetExpression(Generator.LocalDeclarationStatement("loc", initializer:=Generator.IdentifierName("x"))).ToString()) 2888Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("x"))).ToString()) 2889Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("x"))).ToString()) 2890Assert.Equal("x", Generator.GetExpression(Generator.ValueReturningLambdaExpression("p", Generator.IdentifierName("x"))).ToString()) 2891Assert.Equal("x", Generator.GetExpression(Generator.VoidReturningLambdaExpression("p", Generator.IdentifierName("x"))).ToString()) 2899Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.FieldDeclaration("f", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString()) 2900Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.ParameterDeclaration("p", Generator.IdentifierName("t")), Generator.IdentifierName("x"))).ToString()) 2901Assert.Equal("x", Generator.GetExpression(Generator.WithExpression(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Generator.IdentifierName("x"))).ToString()) 2904Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", {Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString()) 2905Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", {Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString()) 2906Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression({Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString()) 2907Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression({Generator.IdentifierName("x")}), Generator.IdentifierName("y"))).ToString()) 2908Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression("p", Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()) 2909Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression("p", Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()) 2910Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.ValueReturningLambdaExpression(Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()) 2911Assert.Equal("y", Generator.GetExpression(Generator.WithExpression(Generator.VoidReturningLambdaExpression(Generator.IdentifierName("x")), Generator.IdentifierName("y"))).ToString()) 3145Assert.Equal(expected, actual) 3208Assert.Equal("B", baseListBI(0).ToString()) 3209Assert.Equal("I", baseListBI(1).ToString()) 3220Assert.Equal("X", baseListXY(0).ToString()) 3221Assert.Equal("Y", baseListXY(1).ToString()) 3488Assert.Equal("Integer", Generator.GetType(declX).ToString()) 3489Assert.Equal("X", Generator.GetName(declX)) 3494Assert.Equal("Integer", Generator.GetType(declY).ToString()) 3495Assert.Equal("Y", Generator.GetName(declY)) 3500Assert.Equal("Integer", Generator.GetType(declZ).ToString()) 3501Assert.Equal("Z", Generator.GetName(declZ)) 3508Assert.Equal("T", Generator.GetType(xTypedT).ToString()) 3513Assert.Equal("Q", Generator.GetName(xNamedQ).ToString()) 3518Assert.Equal("e", Generator.GetExpression(xInitialized).ToString()) 3534Assert.Equal("<A>", Generator.GetAttributes(xAttributed)(0).ToString()) 3738Assert.Equal("X", Generator.GetName(declX)) 3739Assert.Equal("Y", Generator.GetName(declY)) 3740Assert.Equal("Z", Generator.GetName(declZ)) 3745Assert.Equal("<Q>", xNamedQ.ToString()) 3750Assert.Equal("<X(e)>", xWithArg.ToString()) 3871Assert.Equal("Imports Q", xRenamedQ.ToString())
EmbeddedLanguages\VirtualChars\VisualBasicVirtualCharServiceTests.vb (1)
38Assert.Equal(expected, actual)
Formatting\FormattingTests.vb (2)
3789Assert.Equal(expected, result) 4212Assert.Equal(actual, actual)
VisualBasicCommandLineArgumentsFactoryServiceTests.vb (6)
27Assert.Equal("true", options.Features("test")) 33Assert.Equal("dog", options.Features("test")) 39Assert.Equal("true", options.Features("test1")) 40Assert.Equal("true", options.Features("test2")) 46Assert.Equal("dog", options.Features("test1")) 47Assert.Equal("cat", options.Features("test2"))
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (49)
MSBuildWorkspaceTestBase.cs (1)
121Assert.Equal("EmittedCSharpProject.dll", Path.GetFileName(p1.OutputFilePath));
NetCoreTests.cs (6)
124Assert.Equal(libraryProject.FilePath, workspace.CurrentSolution.GetProject(projectRefId).FilePath); 170Assert.Equal(projectRefFilePath, project.Solution.GetProject(projectRefId).FilePath); 240Assert.Equal("Project.NetCore", project.DefaultNamespace); 244Assert.Equal("Project.NetStandard", project.DefaultNamespace); 248Assert.Equal("Project.NetFramework", project.DefaultNamespace); 480Assert.Equal(projectRefFilePath, project.Solution.GetProject(projectRefId).FilePath);
RpcTests.cs (1)
102Assert.Equal("Hello, World!", rpcTarget.Message);
VisualStudioMSBuildWorkspaceTests.cs (41)
246Assert.Equal("CSharpProject.dll", Path.GetFileName(p1.OutputFilePath)); 247Assert.Equal("VisualBasicProject.dll", Path.GetFileName(p2.OutputFilePath)); 261Assert.Equal("CSharpProject.dll", Path.GetFileName(p1.CompilationOutputInfo.AssemblyPath)); 262Assert.Equal("VisualBasicProject.dll", Path.GetFileName(p2.CompilationOutputInfo.AssemblyPath)); 316Assert.Equal("CSharpProject.dll", Path.GetFileName(p1.OutputFilePath)); 439Assert.Equal(expectedFileName, tree.FilePath); 460Assert.Equal(expectedFileName, tree.FilePath); 478Assert.Equal(expectedFileName, tree.FilePath); 808Assert.Equal("ReproApp", comp.AssemblyName); 810Assert.Equal(expectedOutputPath, Path.GetDirectoryName(project.OutputFilePath)); 826Assert.Equal("ReproApp", comp.AssemblyName); 828Assert.Equal(expectedOutputPath, Path.GetDirectoryName(Path.GetFullPath(project.OutputFilePath))); 861Assert.Equal(expected, e.Message); 879Assert.Equal(expected, e.Message); 1132Assert.Equal(expected, e.Message); 1154Assert.Equal(expected, e.Message); 1172Assert.Equal(expected, workspace.Diagnostics.Single().Message); 1187Assert.Equal(expected, e.Message); 1995Assert.Equal("Blah", folder); 2001Assert.Equal(Resources.SourceFiles.CSharp.OtherStuff_Foo, text); 2024Assert.Equal(newText.ToString(), text2.ToString()); 2029Assert.Equal(newText.ToString(), textOnDisk); 2067Assert.Equal(newText.ToString(), text2.ToString()); 2071Assert.Equal(newText.ToString(), textOnDisk); 2076Assert.Equal(originalText.ToString(), text.ToString()); 2103Assert.Equal(originalText.ToString(), text.ToString()); 2126Assert.Equal(newText.ToString(), text2.ToString()); 2130Assert.Equal(newText.ToString(), textOnDisk); 2153Assert.Equal(newText.ToString(), text2.ToString()); 2157Assert.Equal(newText.ToString(), textOnDisk); 2179Assert.Equal(newText.ToString(), text2.ToString()); 2183Assert.Equal(newText.ToString(), textOnDisk); 2352Assert.Equal("XamlFile.xaml", doc.Name); 2603Assert.Equal(cscomment, vbcomment); 2834Assert.Equal("//\u201C", text.ToString()); 2893Assert.Equal(encoding.EncodingName, text.Encoding.EncodingName); 2894Assert.Equal(fileContent, text.ToString()); 2900Assert.Equal(encoding.EncodingName, doc3text.Encoding.EncodingName); 3245Assert.Equal(".editorconfig", analyzerConfigDocument.Name); 3247Assert.Equal("root = true", text.ToString()); 3278Assert.Equal(LanguageNames.CSharp, csharpProject.Language);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Formatting\FormattingTestBase.cs (1)
75Assert.Equal(expected, newRootNode.ToFullString());
Microsoft.CodeAnalysis.Workspaces.UnitTests (281)
CodeStyle\NamingStylePreferencesUpgradeTests.cs (1)
26=> Assert.Equal(expected.Trim(), actual.Trim());
CommandLineProject\CommandLineProjectTests.cs (16)
29Assert.Equal("goo.cs", docInfo.Name); 60Assert.Equal("goo.cs", docInfo.Name); 71Assert.Equal("subdir", docInfo.Folders[0]); 72Assert.Equal("goo.cs", docInfo.Name); 83Assert.Equal("goo.cs", docInfo.Name); 94Assert.Equal("subdir", docInfo.Folders[0]); 95Assert.Equal("goo.cs", docInfo.Name); 106Assert.Equal("goo.cs", docInfo.Name); 117Assert.Equal("goo.cs", docInfo.Name); 128Assert.Equal("goo.cs", firstDoc.Name); 129Assert.Equal("bar.cs", secondDoc.Name); 139Assert.Equal(".editorconfig", document.Name); 140Assert.Equal(Path.Combine(@"C:\ProjectDirectory", ".editorconfig"), document.FilePath); 154Assert.Equal("goo.cs", firstDoc.Name); 155Assert.Equal(pathToAssembly, analyzerRef.FullPath); 168Assert.Equal(pathToAssembly, analyzerRef.FullPath);
CommandLineProject\CommandLineProjectWorkspaceTests.cs (9)
32Assert.Equal("TestProject", project.Name); 33Assert.Equal("goo", project.AssemblyName); 40Assert.Equal(tempFile.Path, gooDoc.FilePath); 43Assert.Equal(tempFile.ReadAllText(), text); 60Assert.Equal("TestProject", project.Name); 61Assert.Equal("goo", project.AssemblyName); 68Assert.Equal(@"C:\ProjectDirectory\goo.cs", gooDoc.FilePath); 72Assert.Equal("subdir", barDoc.Folders[0]); 73Assert.Equal(@"C:\ProjectDirectory\subdir\bar.cs", barDoc.FilePath);
Differencing\LongestCommonSubsequenceTests.cs (2)
42Assert.Equal(expectedPairsStr, actualPairsStr); 75Assert.Equal(editedStr, newStr);
Editing\SyntaxEditorTests.cs (1)
32Assert.Equal(expectedText, actualText);
ExtensionOrdererTests.cs (1)
217Assert.Equal(expected, actualOrder);
Formatter\FormatterTests.cs (2)
141Assert.Equal("\r", formattingOptions.NewLine); 209Assert.Equal("\r", options.NewLine);
FormattingTests.cs (1)
89Assert.Equal(expected, actualFormattedText);
ObjectSerializationTests.cs (14)
451Assert.Equal("YYY", reader.ReadString()); 452Assert.Equal("\uD800\uDC00", reader.ReadString()); // valid surrogate pair 453Assert.Equal("\uDC00\uD800", reader.ReadString()); // invalid surrogate pair 454Assert.Equal("\uD800", reader.ReadString()); // incomplete surrogate pair 519Assert.Equal("YYY", (String)reader.ReadScalarValue()); 520Assert.Equal("\uD800\uDC00", (String)reader.ReadScalarValue()); // valid surrogate pair 521Assert.Equal("\uDC00\uD800", (String)reader.ReadScalarValue()); // invalid surrogate pair 522Assert.Equal("\uD800", (String)reader.ReadScalarValue()); // incomplete surrogate pair 714Assert.Equal(GooString, string1); 715Assert.Equal(BarString, string2); 716Assert.Equal(largeString, string3); 728Assert.Equal(largeString, string4); 729Assert.Equal(BarString, string5); 730Assert.Equal(GooString, string6);
Options\OptionKeyTests.cs (10)
81Assert.Equal("config", ((IOption)option1).Feature); 82Assert.Equal("name", ((IOption)option1).Name); 84Assert.Equal("name", option1.ToString()); 87Assert.Equal("config", ((IOption)option2).Feature); 88Assert.Equal("name", ((IOption)option2).Name); 90Assert.Equal("name", option2.ToString()); 102Assert.Equal("FooFeature - BarName", toStringResult); 113Assert.Equal("FooFeature - BarName", toStringResult); 124Assert.Equal("(BazLanguage) FooFeature - BarName", toStringResult); 133Assert.Equal("", toStringResult);
Remote\ServiceDescriptorTests.cs (1)
358Assert.Equal(expectedName, descriptorCoreClr64ServerGC.GetFeatureDisplayName());
SolutionTests\DocumentInfoTests.cs (4)
44Assert.Equal("doc", info.Name); 63Assert.Equal("doc", info.Name); 75Assert.Equal("folder", ((ImmutableArray<string>)info1.Folders).Single()); 97Assert.Equal(path, info.FilePath);
SolutionTests\ProjectDependencyGraphTests.cs (1)
96Assert.Equal(expectedResult, actualResult);
SolutionTests\ProjectInfoTests.cs (2)
168Assert.Equal(@"ProjectInfo Goo C:\", projectInfo.GetDebuggerDisplay()); 175Assert.Equal(@"ProjectInfo Goo", projectInfo.GetDebuggerDisplay());
SolutionTests\SolutionInfoTests.cs (1)
54Assert.Equal(path, info.FilePath);
SolutionTests\SolutionTests.cs (56)
179Assert.Equal(name, newSolution1.GetDocument(documentId)!.Name); 311Assert.Equal(root.ToString(), actualRoot!.ToString()); 444Assert.Equal(text1.ToString(), text2.ToString()); 488Assert.Equal(text1.ToString(), text2.ToString()); 532Assert.Equal(text1.ToString(), text2.ToString()); 576Assert.Equal(text1.ToString(), text2.ToString()); 611Assert.Equal(text1.ToString(), text2.ToString()); 662Assert.Equal(text1.ToString(), text2.ToString()); 697Assert.Equal(text1.ToString(), text2.ToString()); 742Assert.Equal(text1.ToString(), text2.ToString()); 774Assert.Equal(text1.ToString(), text2.ToString()); 818Assert.Equal(text1.ToString(), text2.ToString()); 927Assert.Equal("new text", newSolution1.GetDocument(documentId)!.GetTextSynchronously(CancellationToken.None).ToString()); 949Assert.Equal("new text", newSolution1.GetAdditionalDocument(documentId)!.GetTextSynchronously(CancellationToken.None).ToString()); 971Assert.Equal("new text", newSolution1.GetAnalyzerConfigDocument(documentId)!.GetTextSynchronously(CancellationToken.None).ToString()); 1144Assert.Equal("class NewD1;", newText1.ToString()); 1153Assert.Equal("class NewD3;", newDocument3.GetTextSynchronously(CancellationToken.None).ToString()); 1165Assert.Equal("new text1", newAddText1.ToString()); 1174Assert.Equal("new text3", newAddDocument3.GetTextSynchronously(CancellationToken.None).ToString()); 1186Assert.Equal("#new empty1", newConfigText1.ToString()); 1195Assert.Equal("#new empty3", newConfigDocument3.GetTextSynchronously(CancellationToken.None).ToString()); 1353Assert.Equal(assemblyName, newSolution.GetProject(projectId)!.AssemblyName); 2256Assert.Equal("text", sourceText.ToString()); 2346Assert.Equal("class C {}", sourceText.ToString()); 2375Assert.Equal("class C {}", sourceText.ToString()); 2404Assert.Equal("bar", project.AssemblyName); 3004Assert.Equal(text, root.ToString()); 3027Assert.Equal("class Class { }", newText); 3128Assert.Equal(OldFilePath, oldDocument.FilePath); 3129Assert.Equal(OldFilePath, oldDocument.GetSyntaxTreeAsync().Result.FilePath); 3136Assert.Equal(NewFilePath, newDocument.FilePath); 3137Assert.Equal(NewFilePath, newDocument.GetSyntaxTreeAsync().Result.FilePath); 3165Assert.Equal(text2, textOnDisk); 3172Assert.Equal(text1, observedText2.ToString()); 3192Assert.Equal(text, docText.ToString()); 3214Assert.Equal(text, docText.ToString()); 3239Assert.Equal(text, docText.ToString()); 3259Assert.Equal(text, docTree.GetRoot().ToString()); 3280Assert.Equal(text, docTree.GetRoot().ToString()); 3322Assert.Equal(text, docRoot.ToString()); 3388Assert.Equal(expectedText, observedText.ToString()); 3419Assert.Equal(expectedText, observedText.ToString()); 3639Assert.Equal("new path", tree2.FilePath); 3667Assert.Equal("old path", tree3.FilePath); 3678Assert.Equal("old path", tree4.FilePath); 3777Assert.Equal(@"C:\doesnotexist.cs: (0,0)-(0,0)", diagnostic.Location.GetLineSpan().ToString()); 3778Assert.Equal("", text.ToString()); 3783Assert.Equal("", syntaxTree.ToString()); 3939Assert.Equal("DocumentToFreeze.cs", tree.FilePath); 3964Assert.Equal("DocumentToFreeze.cs", tree.FilePath); 4379Assert.Equal(expected, ex.Message); 4393Assert.Equal(expected, ex.Message); 4705Assert.Equal("CS8602", diagnostic.Id); 5601Assert.Equal("// source1", generatedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 5623Assert.Equal("// source1", forkedGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 5627Assert.Equal("// source2", forkedGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString());
SolutionTests\SolutionWithSourceGeneratorTests.cs (5)
265Assert.Equal(expectedGeneratedContents, generatedSyntaxTree.GetText().ToString()); 838Assert.Equal("// Frozen Document", (await frozenWithSingleDocument.GetTextAsync()).ToString()); 841Assert.Equal("// Frozen Document", frozenTree.ToString()); 866Assert.Equal("// Frozen 1", (await (await solutionWithFrozenDocuments.GetRequiredProject(projectId1).GetSourceGeneratedDocumentsAsync()).Single().GetTextAsync()).ToString()); 867Assert.Equal("// Frozen 2", (await (await solutionWithFrozenDocuments.GetRequiredProject(projectId2).GetSourceGeneratedDocumentsAsync()).Single().GetTextAsync()).ToString());
SolutionTests\TryApplyChangesTests.cs (2)
108Assert.Equal(WorkspacesResources.Changing_compilation_options_is_not_supported, exception.Message); 156Assert.Equal(WorkspacesResources.Changing_parse_options_is_not_supported, exception.Message);
SymbolKeyTests.cs (6)
422Assert.Equal("x", resolved?.Name); 446Assert.Equal("b", resolved?.Name); 1179Assert.Equal("Collections", propType.ContainingNamespace.Name); 1180Assert.Equal("System", propType.ContainingNamespace.ContainingNamespace.Name); 1226Assert.Equal("Collections", propType.ContainingNamespace.Name); 1227Assert.Equal("System", propType.ContainingNamespace.ContainingNamespace.Name);
SyntaxNodeTests.cs (3)
41Assert.Equal(expected, actual); 75Assert.Equal(expected, actual); 124Assert.Equal("public class C\r\n{\r\n private int X;\r\n void M()\r\n {\r\n }\r\n}", finalClassDecl.NormalizeWhitespace().ToString());
SyntaxPathTests.cs (15)
164Assert.Equal("M1", ((MethodDeclarationSyntax)n1).Identifier.ValueText); 167Assert.Equal("M2", ((MethodDeclarationSyntax)n2).Identifier.ValueText); 170Assert.Equal("M3", ((MethodDeclarationSyntax)n3).Identifier.ValueText); 197Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 199Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText); 232Assert.Equal("M1", ((MethodDeclarationSyntax)n1).Identifier.ValueText); 235Assert.Equal("M2", ((MethodDeclarationSyntax)n2).Identifier.ValueText); 262Assert.Equal("D", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 293Assert.Equal("D", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 321Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 323Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText); 350Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 352Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText); 389Assert.Equal("C", ((TypeDeclarationSyntax)n1).Identifier.ValueText); 391Assert.Equal("D", ((TypeDeclarationSyntax)n2).Identifier.ValueText);
UtilityTest\DocumentationCommentIdTests.cs (3)
26Assert.Equal(expectedId, id); 48Assert.Equal(expectedId, id); 54Assert.Equal(expectedId, id);
UtilityTest\DocumentationCommentTests.cs (67)
39Assert.Equal("Hello, world!", comment.SummaryText); 40Assert.Equal("42.", comment.ReturnsText); 41Assert.Equal("43.", comment.ValueText); 42Assert.Equal("goo.Bar();", comment.ExampleText); 43Assert.Equal("goo", comment.ParameterNames[0]); 44Assert.Equal("A goo.", comment.GetParameterText("goo")); 45Assert.Equal("T", comment.TypeParameterNames[0]); 46Assert.Equal("A type.", comment.GetTypeParameterText("T")); 47Assert.Equal("System.Exception", comment.ExceptionTypes[0]); 48Assert.Equal("An exception", comment.GetExceptionTexts("System.Exception")[0]); 49Assert.Equal("A remark", comment.RemarksText); 65Assert.Equal(string.Empty, comment.SummaryText); 66Assert.Equal(string.Empty, comment.ReturnsText); 67Assert.Equal(string.Empty, comment.ValueText); 68Assert.Equal(string.Empty, comment.ExampleText); 69Assert.Equal("goo", comment.ParameterNames[0]); 70Assert.Equal(string.Empty, comment.GetParameterText("goo")); 71Assert.Equal("T", comment.TypeParameterNames[0]); 72Assert.Equal(string.Empty, comment.GetTypeParameterText("T")); 73Assert.Equal("System.Exception", comment.ExceptionTypes[0]); 74Assert.Equal(string.Empty, comment.GetExceptionTexts("System.Exception")[0]); 75Assert.Equal(string.Empty, comment.RemarksText); 83Assert.Equal("Summary 1", comment.SummaryText); 95Assert.Equal("Summary 1 Summary 2", comment.SummaryText); 115Assert.Equal("z", comment.ParameterNames[0]); 116Assert.Equal("a", comment.ParameterNames[1]); 117Assert.Equal("b", comment.ParameterNames[2]); 128Assert.Equal("z", comment.TypeParameterNames[0]); 129Assert.Equal("a", comment.TypeParameterNames[1]); 130Assert.Equal("b", comment.TypeParameterNames[2]); 141Assert.Equal("z", comment.ExceptionTypes[0]); 142Assert.Equal("a", comment.ExceptionTypes[1]); 143Assert.Equal("b", comment.ExceptionTypes[2]); 154Assert.Equal("This is a summary.", comment.SummaryText); 155Assert.Equal("a", comment.ParameterNames[0]); 156Assert.Equal("The param named 'a'", comment.GetParameterText("a")); 167Assert.Equal("This is a summary.", comment.SummaryText); 168Assert.Equal("a", comment.ParameterNames[0]); 169Assert.Equal("The param named 'a'", comment.GetParameterText("a")); 182Assert.Equal("This is a summary.", comment.SummaryText); 183Assert.Equal("a", comment.ParameterNames[0]); 184Assert.Equal("The param named 'a'", comment.GetParameterText("a")); 195Assert.Equal("a", comment.ParameterNames[0]); 196Assert.Equal("This comment should be retained.", comment.GetParameterText("a")); 207Assert.Equal("a", comment.TypeParameterNames[0]); 208Assert.Equal("This comment should be retained.", comment.GetTypeParameterText("a")); 221Assert.Equal("A", comment.ExceptionTypes[0]); 222Assert.Equal("B", comment.ExceptionTypes[1]); 224Assert.Equal("First A description", comment.GetExceptionTexts("A")[0]); 225Assert.Equal("Second A description", comment.GetExceptionTexts("A")[1]); 227Assert.Equal("First B description", comment.GetExceptionTexts("B")[0]); 228Assert.Equal("Second B description", comment.GetExceptionTexts("B")[1]); 256Assert.Equal(fragment, comments.FullXmlFragment); 296Assert.Equal(expected, comment.SummaryText); 297Assert.Equal(expected, comment.ReturnsText); 298Assert.Equal(expected, comment.ValueText); 299Assert.Equal(expected, comment.ExampleText); 300Assert.Equal(expected, comment.GetParameterText("goo")); 301Assert.Equal(expected, comment.GetTypeParameterText("T")); 302Assert.Equal(expected, comment.RemarksText); 343Assert.Equal(expected, comment.SummaryText); 344Assert.Equal(expected, comment.ReturnsText); 345Assert.Equal(expected, comment.ValueText); 346Assert.Equal(expected, comment.ExampleText); 347Assert.Equal(expected, comment.GetParameterText("goo")); 348Assert.Equal(expected, comment.GetTypeParameterText("T")); 349Assert.Equal(expected, comment.RemarksText);
UtilityTest\SourceTextSerializationTests.cs (1)
46Assert.Equal(originalText.ToString(), recovered.ToString());
UtilityTest\XmlDocumentationProviderTests.cs (2)
44Assert.Equal("member", xmlDocument.Root!.Name.LocalName); 45Assert.Equal("T:Microsoft.CodeAnalysis.AdditionalTextFile", xmlDocument.Root!.Attribute("name")!.Value);
WorkspaceServiceTests\GlobalOptionServiceTests.cs (12)
102Assert.Equal("EOLN", newSet.GetOption<string>(perLanguageOptionKey)); 105Assert.Equal("EOLN", newSolution1.Options.GetOption<string>(perLanguageOptionKey)); 113Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 114Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 120Assert.Equal("EOLN", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 121Assert.Equal("EOLN", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 128Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 129Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 134Assert.Equal("NEW_LINE", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 135Assert.Equal("NEW_LINE", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 139Assert.Equal("NEW_LINE2", workspace1.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey)); 140Assert.Equal("NEW_LINE2", workspace2.CurrentSolution.Options.GetOption<string>(perLanguageOptionKey));
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (1)
83Assert.Equal(text.ToString(), text2.ToString());
WorkspaceTests\AdhocWorkspaceTests.cs (33)
38Assert.Equal(info.Name, project.Name); 40Assert.Equal(info.AssemblyName, project.AssemblyName); 41Assert.Equal(info.Language, project.Language); 50Assert.Equal("TestProject", project.Name); 51Assert.Equal(LanguageNames.CSharp, project.Language); 63Assert.Equal(info.Name, doc.Name); 75Assert.Equal(name, doc.Name); 76Assert.Equal(source, (await doc.GetTextAsync()).ToString()); 100Assert.Equal(pinfo.Name, project.Name); 102Assert.Equal(pinfo.AssemblyName, project.AssemblyName); 103Assert.Equal(pinfo.Language, project.Language); 132Assert.Equal(info1.Name, project1.Name); 134Assert.Equal(info1.AssemblyName, project1.AssemblyName); 135Assert.Equal(info1.Language, project1.Language); 138Assert.Equal(info2.Name, project2.Name); 140Assert.Equal(info2.AssemblyName, project2.AssemblyName); 141Assert.Equal(info2.Language, project2.Language); 175Assert.Equal("NewProject", proj.Name); 176Assert.Equal("NewProject.dll", proj.AssemblyName); 177Assert.Equal(LanguageNames.CSharp, proj.Language); 181Assert.Equal("MyDoc.cs", doc.Name); 416Assert.Equal("TestDocument", originalDoc.Name); 420Assert.Equal(newName, changedDoc.Name); 435Assert.Equal(newName, appliedDoc.Name); 469Assert.Equal("A", appliedDoc.Folders[0]); 470Assert.Equal("B", appliedDoc.Folders[1]); 487Assert.Equal(newPath, changedDoc.FilePath); 502Assert.Equal(newPath, appliedDoc.FilePath); 546Assert.Equal("TestDocument", originalDoc.Name); 563Assert.Equal(newName, appliedDoc.Name); 565Assert.Equal("A", appliedDoc.Folders[0]); 566Assert.Equal("B", appliedDoc.Folders[1]); 567Assert.Equal(newPath, appliedDoc.FilePath);
WorkspaceTests\WorkspaceTests.cs (9)
29Assert.Equal(WorkspacesResources.Changing_documents_is_not_supported, 39Assert.Equal("TestDocument", originalDoc.Name); 43Assert.Equal(newName, changedDoc.Name); 45Assert.Equal(WorkspacesResources.Changing_document_property_is_not_supported, 63Assert.Equal(WorkspacesResources.Changing_document_property_is_not_supported, 78Assert.Equal(newPath, changedDoc.FilePath); 80Assert.Equal(WorkspacesResources.Changing_document_property_is_not_supported, 96Assert.Equal(WorkspacesResources.Changing_document_property_is_not_supported, 108Assert.Equal(WorkspacesResources.Adding_analyzer_references_is_not_supported,
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (3)
ExampleTests.cs (1)
23Assert.Equal("Method textDocument/didOpen was implemented more than once.", ex.Message);
RequestExecutionQueueTests.cs (2)
105Assert.Equal("stuff", response?.Response); 115Assert.Equal("true", response?.Response);
Microsoft.Data.Analysis.Tests (181)
ArrowStringColumnTests.cs (9)
28Assert.Equal("foo", stringColumn[0]); 29Assert.Equal("bar", stringColumn[1]); 43Assert.Equal("joe", stringColumn[0]); 45Assert.Equal("mark", stringColumn[2]); 46Assert.Equal("", stringColumn[3]); 49Assert.Equal("joe", ret[0]); 51Assert.Equal("mark", ret[2]); 52Assert.Equal("", ret[3]); 89Assert.Equal(column[i] + "123", ret[i]);
DataFrame.IOTests.cs (42)
225Assert.Equal("payment_type", df.Columns[5].Name); 226Assert.Equal("payment_type.1", df.Columns[6].Name); 227Assert.Equal("payment_type.2", df.Columns[7].Name); 332Assert.Equal("vendor_id", df.Columns[0].Name); 333Assert.Equal("rate_code", df.Columns[1].Name); 334Assert.Equal("passenger_count", df.Columns[2].Name); 335Assert.Equal("trip_time_in_secs", df.Columns[3].Name); 336Assert.Equal("trip_distance", df.Columns[4].Name); 337Assert.Equal("payment_type", df.Columns[5].Name); 338Assert.Equal("fare_amount", df.Columns[6].Name); 440Assert.Equal("vendor_id", df.Columns[0].Name); 441Assert.Equal("rate_code", df.Columns[1].Name); 442Assert.Equal("passenger_count", df.Columns[2].Name); 443Assert.Equal("trip_time_in_secs", df.Columns[3].Name); 444Assert.Equal("trip_distance", df.Columns[4].Name); 445Assert.Equal("payment_type", df.Columns[5].Name); 446Assert.Equal("fare_amount", df.Columns[6].Name); 503Assert.Equal("vendor_id", df.Columns[0].Name); 504Assert.Equal("rate_code", df.Columns[1].Name); 505Assert.Equal("passenger_count", df.Columns[2].Name); 506Assert.Equal("trip_time_in_secs", df.Columns[3].Name); 507Assert.Equal("trip_distance", df.Columns[4].Name); 508Assert.Equal("payment_type", df.Columns[5].Name); 509Assert.Equal("fare_amount", df.Columns[6].Name); 510Assert.Equal("date", df.Columns[7].Name); 710Assert.Equal("IndexColumn", dataFrame.Columns[0].Name); 780Assert.Equal("vendor_id", df.Columns[0].Name); 781Assert.Equal("rate_code", df.Columns[1].Name); 782Assert.Equal("passenger_count", df.Columns[2].Name); 783Assert.Equal("trip_time_in_secs", df.Columns[3].Name); 823Assert.Equal("vendor_id", df.Columns[0].Name); 824Assert.Equal("rate_code", df.Columns[1].Name); 825Assert.Equal("passenger_count", df.Columns[2].Name); 826Assert.Equal("trip_time_in_secs", df.Columns[3].Name); 885Assert.Equal("vendor_id", df.Columns[0].Name); 886Assert.Equal("rate_code", df.Columns[1].Name); 887Assert.Equal("passenger_count", df.Columns[2].Name); 888Assert.Equal("trip_time_in_secs", df.Columns[3].Name); 1128Assert.Equal("vendor_id", df.Columns[0].Name); 1129Assert.Equal("empty", df.Columns[1].Name); 1146Assert.Equal("", emptyColumn[i]); 1289Assert.Equal(_columnNames[j], df.Columns[j].Name);
DataFrameGroupByTests.cs (1)
52Assert.Equal("even", grouping.First().Key);
DataFrameIDataViewTests.cs (53)
27Assert.Equal("Byte", preview.ColumnView[0].Column.Name); 31Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); 35Assert.Equal("Double", preview.ColumnView[2].Column.Name); 39Assert.Equal("Float", preview.ColumnView[3].Column.Name); 43Assert.Equal("Int", preview.ColumnView[4].Column.Name); 47Assert.Equal("Long", preview.ColumnView[5].Column.Name); 51Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); 55Assert.Equal("Short", preview.ColumnView[7].Column.Name); 59Assert.Equal("Uint", preview.ColumnView[8].Column.Name); 63Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); 67Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); 71Assert.Equal("String", preview.ColumnView[11].Column.Name); 72Assert.Equal("0".ToString(), preview.ColumnView[11].Values[0].ToString()); 73Assert.Equal("1".ToString(), preview.ColumnView[11].Values[1].ToString()); 75Assert.Equal("Char", preview.ColumnView[12].Column.Name); 79Assert.Equal("DateTime", preview.ColumnView[13].Column.Name); 83Assert.Equal("Bool", preview.ColumnView[14].Column.Name); 87Assert.Equal("ArrowString", preview.ColumnView[15].Column.Name); 88Assert.Equal("foo".ToString(), preview.ColumnView[15].Values[0].ToString()); 89Assert.Equal("foo".ToString(), preview.ColumnView[15].Values[1].ToString()); 91Assert.Equal("VBuffer", preview.ColumnView[16].Column.Name); 92Assert.Equal("Dense vector of size 5", preview.ColumnView[16].Values[0].ToString()); 93Assert.Equal("Dense vector of size 5", preview.ColumnView[16].Values[1].ToString()); 114Assert.Equal("Bool", schema[0].Name); 120Assert.Equal("BoolClone", schema[1].Name); 133Assert.Equal("Byte", preview.ColumnView[0].Column.Name); 140Assert.Equal("Decimal", preview.ColumnView[1].Column.Name); 147Assert.Equal("Double", preview.ColumnView[2].Column.Name); 154Assert.Equal("Float", preview.ColumnView[3].Column.Name); 161Assert.Equal("Int", preview.ColumnView[4].Column.Name); 168Assert.Equal("Long", preview.ColumnView[5].Column.Name); 175Assert.Equal("Sbyte", preview.ColumnView[6].Column.Name); 182Assert.Equal("Short", preview.ColumnView[7].Column.Name); 189Assert.Equal("Uint", preview.ColumnView[8].Column.Name); 196Assert.Equal("Ulong", preview.ColumnView[9].Column.Name); 203Assert.Equal("Ushort", preview.ColumnView[10].Column.Name); 210Assert.Equal("String", preview.ColumnView[11].Column.Name); 211Assert.Equal("0", preview.ColumnView[11].Values[0].ToString()); 212Assert.Equal("1", preview.ColumnView[11].Values[1].ToString()); 213Assert.Equal("4", preview.ColumnView[11].Values[4].ToString()); 214Assert.Equal("", preview.ColumnView[11].Values[5].ToString()); // null row 215Assert.Equal("6", preview.ColumnView[11].Values[6].ToString()); 217Assert.Equal("Char", preview.ColumnView[12].Column.Name); 224Assert.Equal("DateTime", preview.ColumnView[13].Column.Name); 231Assert.Equal("Bool", preview.ColumnView[14].Column.Name); 238Assert.Equal("ArrowString", preview.ColumnView[15].Column.Name); 239Assert.Equal("foo", preview.ColumnView[15].Values[0].ToString()); 240Assert.Equal("foo", preview.ColumnView[15].Values[1].ToString()); 241Assert.Equal("foo", preview.ColumnView[15].Values[4].ToString()); 242Assert.Equal("", preview.ColumnView[15].Values[5].ToString()); // null row 243Assert.Equal("foo", preview.ColumnView[15].Values[6].ToString()); 245Assert.Equal("VBuffer", preview.ColumnView[16].Column.Name); 306Assert.Equal(df.Columns[i].Name, newDf.Columns[i].Name);
DataFrameTests.cs (39)
25Assert.Equal("Int1", dataFrame.Columns[0].Name); 54Assert.Equal("a1", dc.Name); 70Assert.Equal("IntColumn", dataFrame.Columns[0].Name); 72Assert.Equal("FloatColumn", dataFrame.Columns[1].Name); 192Assert.Equal("Town", renamedColumn.Name); 211Assert.Equal("Town", renamedColumn.Name); 332Assert.Equal(originalColumn[r].ToString(), headColumn[verify[r]].ToString()); 355Assert.Equal(originalColumn[originalColumnVerify[r]].ToString(), tailColumn[tailColumnVerity[r]].ToString()); 369Assert.Equal(((long)(r == 0 ? 8 : 9)).ToString(), maxColumn[r].ToString()); 392Assert.Equal(r == 0 ? "0" : "1", minColumn[r].ToString()); 395Assert.Equal("0", productColumn[r].ToString()); 398Assert.Equal("20", sumColumn[r].ToString()); 509Assert.Equal("01234<null>6789", actualStrings.ToString()); 524Assert.Equal("foofoofoofoofoo<null>foofoofoofoo", actualStrings.ToString()); 539Assert.Equal("01234<null>6789", actualStrings.ToString()); 554Assert.Equal("01234<null>6789", actualStrings.ToString()); 617Assert.Equal("3", column[i].ToString()); 619Assert.Equal(4.ToString(), column[4].ToString()); 621Assert.Equal(6.ToString(), column[6].ToString()); 624Assert.Equal("7", column[i].ToString()); 666Assert.Equal(First.Name, Second.Name); 670Assert.Equal(First.Name, "Prefix_" + Second.Name); 678Assert.Equal("Prefix_" + First.Name, Second.Name); 685Assert.Equal(First.Name, "Prefix_" + Second.Name); 689Assert.Equal("Prefix_" + First.Name + "_Suffix", Second.Name); 697Assert.Equal("Prefix_" + First.Name + "_Suffix", Second.Name); 728Assert.Equal("Description", descriptionColumn.Name); 736Assert.Equal(df.Columns[i - 1].Name, column.Name); 746Assert.Equal("DateTime", dateTimeColumn.Name); 769Assert.Equal("Info", infoColumn.Name); 776Assert.Equal(df.Columns[i - 1].DataType.ToString(), column[0].ToString()); 837Assert.Equal("foo", strColumn[0]); 838Assert.Equal("foo", strColumn[1]); 850Assert.Equal("foo", arrowColumnFilled[1]); 851Assert.Equal(arrowColumn[0], arrowColumnFilled[0]); 852Assert.Equal(arrowColumn[2], arrowColumnFilled[2]); 1008Assert.Equal("12", value.ToString()); 1045Assert.Equal(row[j]?.ToString(), (check2.Rows[i - check1.Rows.Count][j])?.ToString()); 1245Assert.Equal(i.ToString(), column[i].ToString());
DataFrameTests.Filter.cs (1)
42Assert.Equal(verify[j].ToString(), column[j].ToString());
DataFrameTests.Merge.cs (2)
31Assert.Equal("Left", (string)merge.Columns["String_left"][0]); 32Assert.Equal("Right", (string)merge.Columns["String_right"][0]);
DataFrameTests.Sort.cs (2)
58Assert.Equal("0", sortedStrColumn[0]); 63Assert.Equal("4", sortedStrColumn[0]);
PrimitiveDataFrameColumnTests.cs (10)
260Assert.Equal(intColumn.Name, copy.Name); 280Assert.Equal(column.Name, clonedColumn.Name); 300Assert.Equal(column.Name, clonedColumn.Name); 322Assert.Equal(column.Name, clonedColumn.Name); 343Assert.Equal(column.Name, clonedColumn.Name); 364Assert.Equal(column.Name, clonedColumn.Name); 385Assert.Equal(column.Name, clonedColumn.Name); 406Assert.Equal(column.Name, clonedColumn.Name); 427Assert.Equal(column.Name, clonedColumn.Name); 448Assert.Equal(column.Name, clonedColumn.Name);
StringDataFrameColumnTests.cs (6)
23Assert.Equal(stringColumn.Name, clonedColumn.Name); 28Assert.Equal(stringColumn[i], clonedColumn[i]); 39Assert.Equal(stringColumn.Name, clonedColumn.Name); 55Assert.Equal(stringColumn.Name, clonedColumn.Name); 71Assert.Equal(stringColumn.Name, clonedColumn.Name); 88Assert.Equal(stringColumn.Name, clonedColumn.Name);
TextFieldParserTests.cs (16)
133Assert.Equal( 143Assert.Equal("abc", parser.ReadLine()); 147Assert.Equal("123", parser.ReadToEnd()); 154Assert.Equal("abc", parser.ReadLine()); 158Assert.Equal("123", parser.ReadLine()); 181Assert.Equal("", parser.ErrorLine); 185Assert.Equal("", parser.ErrorLine); 189Assert.Equal("def 45", parser.ErrorLine); 193Assert.Equal("def 45", parser.ErrorLine); 250Assert.Equal("a", parser.PeekChars(1)); 251Assert.Equal("abc,123", parser.PeekChars(10)); 253Assert.Equal("abc,123", parser.ReadLine()); 258Assert.Equal("d", parser.PeekChars(1)); 259Assert.Equal("def,456", parser.PeekChars(10)); 265Assert.Equal("g", parser.PeekChars(1)); 266Assert.Equal("ghi,789", parser.PeekChars(10));
Microsoft.DotNet.Arcade.Sdk.Tests (6)
CalculateAssemblyAndFileVersionsTests.cs (4)
25Assert.Equal(expectedAssemblyVersion, task.AssemblyVersion); 26Assert.Equal(expectedFileVersion, task.FileVersion); 44Assert.Equal(expectedVersion, task.AssemblyVersion); 45Assert.Equal(expectedVersion, task.FileVersion);
GenerateResxSourceTests.cs (1)
72Assert.Equal(expectedIdentifier, GenerateResxSource.GetIdentifierFromResourceName(name));
GetLicenseFilePathTests.cs (1)
30Assert.Equal(licensePath, task.Path);
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
PublishToSymbolServerTest.cs (1)
407Assert.Equal(containerId, test);
Microsoft.DotNet.Build.Tasks.Templating.Tests (3)
GenerateFileFromTemplateTests.cs (3)
27Assert.Equal(ReadAllText("Directory.Build.props.in").Replace("${DefaultNetCoreTargetFramework}", "net6.0"), File.ReadAllText(filePath)); 55Assert.Equal(ReadAllText("Directory.Build.props.in").Replace("${DefaultNetCoreTargetFramework}", string.Empty), File.ReadAllText(filePath)); 80Assert.Equal(ReadAllText(filename), File.ReadAllText(filePath));
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (11)
OptProf\FindLatestDropTests.cs (1)
14Assert.Equal("OptimizationData/dotnet/roslyn/master-vs-deps/41416da1e8531ab0f4e5e7dc67318237323acf23/202326/813349/1",
OptProf\GenerateTrainingInputFilesTests.cs (4)
179Assert.Equal( 190Assert.Equal( 201Assert.Equal( 211Assert.Equal(
OptProf\GenerateTrainingPropsFileTests.cs (2)
28Assert.Equal(@"<?xml version=""1.0""?> 56Assert.Equal(@"<?xml version=""1.0""?>
OptProf\GetRunSettingsSessionConfigurationTests.cs (4)
400Assert.Equal(expectedUrl, GetRunSettingsSessionConfiguration.GetTestsDropName(jsonString)); 433Assert.Equal( 457Assert.Equal(expectedContainerString, actualContainerString); 458Assert.Equal(expectedTestCaseFilterString, actualTestCaseFilterString);
Microsoft.DotNet.Build.Tasks.Workloads.Tests (30)
CreateVisualStudioWorkloadSetTests.cs (1)
69Assert.Equal(DefaultValues.PackageTypeMsiWorkloadSet, workloadSetSwixItem.GetMetadata(Metadata.PackageType));
CreateVisualStudioWorkloadTests.cs (8)
81Assert.Equal("{C4F269D9-6B65-36C5-9556-75B78EFE9EDA}", MsiUtils.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.UpgradeCode)); 84Assert.Equal("6.33.28", MsiUtils.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.ProductVersion)); 85Assert.Equal("Microsoft.NET.Workload.Emscripten,6.0.200,x64", MsiUtils.GetProviderKeyName(manifestMsiItem.ItemSpec)); 90Assert.Equal("x64;1033", si.Template); 217Assert.Equal("{CBA7CF4A-F3C9-3B75-8F1F-0D08AF7CD7BE}", MsiUtils.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.UpgradeCode)); 220Assert.Equal("6.33.28", MsiUtils.GetProperty(manifestMsiItem.ItemSpec, MsiProperty.ProductVersion)); 221Assert.Equal("Microsoft.NET.Workload.Emscripten,6.0.200,arm64", MsiUtils.GetProviderKeyName(manifestMsiItem.ItemSpec)); 226Assert.Equal("Arm64;1033", si.Template);
MsiTests.cs (10)
61Assert.Equal("Microsoft.NET.Workload.Mono.ToolChain,6.0.200,6.0.3,x64", MsiUtils.GetProviderKeyName(msiPath603)); 62Assert.Equal("Microsoft.NET.Workload.Mono.ToolChain,6.0.200,6.0.4,x64", MsiUtils.GetProviderKeyName(msiPath604)); 97Assert.Equal("{E4761192-882D-38E9-A3F4-14B6C4AD12BD}", MsiUtils.GetProperty(msiPath, MsiProperty.UpgradeCode)); 98Assert.Equal("1.2.3", MsiUtils.GetProperty(msiPath, MsiProperty.ProductVersion)); 99Assert.Equal("Microsoft.NET.Workload.Mono.ToolChain,6.0.200,x64", MsiUtils.GetProviderKeyName(msiPath)); 100Assert.Equal("x64;1033", si.Template); 129Assert.Equal("{EC4D6B34-C9DE-3984-97FD-B7AC96FA536A}", MsiUtils.GetProperty(msiPath, MsiProperty.UpgradeCode)); 131Assert.Equal("15.2.302.0", MsiUtils.GetProperty(msiPath, MsiProperty.ProductVersion)); 132Assert.Equal("Microsoft.iOS.Templates,15.2.302-preview.14.122,x64", MsiUtils.GetProviderKeyName(msiPath)); 133Assert.Equal("x64;1033", si.Template);
PackageTests.cs (3)
27Assert.Equal("Microsoft.NET.Workload.Mono.ToolChain", p.ManifestId); 40Assert.Equal(expectedVersion, actualSdkVersion); 65Assert.Equal(expectedWorkloadSetVerion, workloadSetVersion);
SwixDependencyTests.cs (1)
23Assert.Equal(expectedVersionRange, dep.GetVersionRange());
SwixPackageGroupTests.cs (3)
33Assert.Equal(expectedPackageId, packageGroup.Name); 42Assert.Equal(expectedFeatureBand, packageGroupItem.GetMetadata(Metadata.SdkFeatureBand)); 43Assert.Equal(DefaultValues.PackageTypeManifestPackageGroup, packageGroupItem.GetMetadata(Metadata.PackageType));
SwixPackageTests.cs (2)
35Assert.Equal(@"Relative package path exceeds the maximum length (182): Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100,version=6.0.0.0,chip=x64,productarch=neutral,machinearch=x64\Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100.6.0.0-preview.7.21377.12-x64.msi.", e.Message); 55Assert.Equal($"Microsoft.iOS.Templates.{packageVersion}", msiItem.GetMetadata(Metadata.SwixPackageId));
WorkloadManifestTests.cs (2)
18Assert.Equal(expectedVersion, actualSdkVersion); 32Assert.Equal(expectedVersion, $"{actualFeatureBandVersion}");
Microsoft.DotNet.Helix.JobSender.Tests (2)
Payloads\AdHocPayloadTests.cs (2)
18Assert.Equal("files", exception.ParamName); 26Assert.Equal("files", exception.ParamName);
Microsoft.DotNet.Helix.Sdk.Tests (3)
HelpersTests.cs (3)
21Assert.Equal(workItemNameWithEncodedChars, actual); 31Assert.Equal(WebUtility.UrlDecode(workItemName), actual); 42Assert.Equal(workItemNameExpected, actual);
Microsoft.DotNet.NuGetRepack.Tests (4)
ReplacePackagePartsTests.cs (1)
56Assert.Equal("<replacement>", reader.ReadToEnd());
TestHelpers\AssertEx.cs (2)
351Assert.Equal(parameterName, e.ParamName); 363Assert.Equal(parameterName, e.ParamName);
VersionUpdaterTests.cs (1)
43Assert.Equal(expectedParts[i].name, actualParts[i].name);
Microsoft.DotNet.Open.Api.Tools.Tests (14)
OpenApiAddURLTests.cs (13)
42Assert.Equal(Content, content); 75Assert.Equal(Content, content); 108Assert.Equal(Content, content); 141Assert.Equal(Content, content); 173Assert.Equal(Content, content); 205Assert.Equal(Content, content); 233Assert.Equal(Content, content); 265Assert.Equal(Content, content); 297Assert.Equal(Content, content); 329Assert.Equal(Content, content); 362Assert.Equal(Content, content); 387Assert.Equal(Content, content); 426Assert.Equal($"The given url returned 'NotFound', " +
OpenApiRefreshTests.cs (1)
95Assert.Equal(Content, await File.ReadAllTextAsync(expectedJsonPath));
Microsoft.DotNet.SourceBuild.Tasks.Tests (5)
ValidateUsageAgainstBaselineTests.cs (3)
41Assert.Equal( 112Assert.Equal(a.IdentityGlob, b.IdentityGlob); 113Assert.Equal(a.IdentityRegex, b.IdentityRegex);
WriteBuildOutputPropsTests.cs (2)
13Assert.Equal( 17Assert.Equal(
Microsoft.DotNet.XliffTasks.Tests (13)
AssertHelper.cs (1)
12Assert.Equal(
XElementExtensionsTests.cs (11)
23Assert.Equal(expected: "target text", actual: targetValue); 36Assert.Equal(expected: string.Empty, actual: targetValue); 48Assert.Equal(expected: "source text", actual: targetValue); 62Assert.Equal(expected: "new target text", actual: transUnitElement.Element(Target).Value); 75Assert.Equal(expected: "new target text", actual: transUnitElement.Element(Target).Value); 89Assert.Equal(expected: "original state value", actual: stateValue); 101Assert.Equal(expected: "new", actual: stateValue); 111Assert.Equal(expected: "new", actual: stateValue); 126Assert.Equal(expected: "translated", actual: transUnitElement.Element(Target).Attribute("state").Value); 139Assert.Equal(expected: "translated", actual: transUnitElement.Element(Target).Attribute("state").Value); 151Assert.Equal(expected: "translated", actual: transUnitElement.Element(Target).Attribute("state").Value);
XlfDocumentTests.cs (1)
605e => Assert.Equal(expected: "The element 'trans-unit' in namespace 'urn:oasis:names:tc:xliff:document:1.2' has invalid child element 'target' in namespace 'urn:oasis:names:tc:xliff:document:1.2'. List of possible elements expected: 'source' in namespace 'urn:oasis:names:tc:xliff:document:1.2'.", actual: e.Message)
Microsoft.DotNet.XUnitAssert.Tests (576)
AsyncCollectionAssertsTests.cs (38)
42 Assert.Equal( 94 Assert.Equal( 144 Assert.Equal( 215 Assert.Equal( 310 Assert.Equal( 379 Assert.Equal( 412 Assert.Equal( 428 Assert.Equal( 453 Assert.Equal( 486 Assert.Equal( 556 Assert.Equal( 597 Assert.Equal( 642 Assert.Equal( 664 Assert.Equal( 770 Assert.Equal(message.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ex.Message); 795 Assert.Equal( 876 Assert.Equal( 928 Assert.Equal( 968 Assert.Equal( 1029 Assert.Equal( 1056 Assert.Equal( 1095 Assert.Equal( 1144 Assert.Equal( 1194 Assert.Equal( 1235 Assert.Equal( 1277 Assert.Equal( 1335 Assert.Equal( 1362 Assert.Equal( 1395 Assert.Equal("Assert.Single() Failure: The collection was empty", ex.Message); 1405 Assert.Equal("Hello", item); 1416 Assert.Equal( 1431 Assert.Equal( 1456 Assert.Equal( 1480 Assert.Equal("Hello", result); 1491 Assert.Equal( 1507 Assert.Equal( 1524 Assert.Equal( 1551 Assert.Equal(
BooleanAssertsTests.cs (6)
21 Assert.Equal( 35 Assert.Equal( 51 Assert.Equal("Custom User Message", ex.Message); 69 Assert.Equal( 83 Assert.Equal( 99 Assert.Equal("Custom User Message", ex.Message);
CollectionAssertsTests.cs (69)
40 Assert.Equal( 92 Assert.Equal( 142 Assert.Equal( 215 Assert.Equal( 310 Assert.Equal( 372 Assert.Equal( 413 Assert.Equal( 446 Assert.Equal( 462 Assert.Equal( 487 Assert.Equal( 520 Assert.Equal( 554 Assert.Equal( 572 Assert.Equal( 634 Assert.Equal( 675 Assert.Equal( 715 Assert.Equal( 732 Assert.Equal( 804 Assert.Equal(message, ex.Message); 872 Assert.Equal(message.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ex.Message); 881 Assert.Equal( 1026 Assert.Equal(message.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ex.Message); 1041 Assert.Equal( 1110 Assert.Equal( 1155 Assert.Equal( 1185 Assert.Equal( 1237 Assert.Equal( 1278 Assert.Equal( 1295 Assert.Equal( 1328 Assert.Equal( 1372 Assert.Equal( 1402 Assert.Equal( 1484 Assert.Equal( 1540 Assert.Equal( 1558 Assert.Equal( 1575 Assert.Equal( 1619 Assert.Equal( 1656 Assert.Equal( 1693 Assert.Equal( 1709 Assert.Equal( 1744 Assert.Equal( 1782 Assert.Equal( 1810 Assert.Equal( 1846 Assert.Equal( 1892 Assert.Equal( 1912 Assert.Equal( 1935 Assert.Equal( 1952 Assert.Equal( 2021 Assert.Equal( 2060 Assert.Equal( 2118 Assert.Equal( 2171 Assert.Equal( 2193 Assert.Equal( 2214 Assert.Equal( 2292 Assert.Equal("Assert.Single() Failure: The collection was empty", ex.Message); 2313 Assert.Equal( 2328 Assert.Equal( 2368 Assert.Equal( 2384 Assert.Equal( 2401 Assert.Equal( 2427 Assert.Equal("Assert.Single() Failure: The collection was empty", ex.Message); 2437 Assert.Equal("Hello", item); 2448 Assert.Equal( 2463 Assert.Equal( 2488 Assert.Equal( 2512 Assert.Equal("Hello", result); 2523 Assert.Equal( 2539 Assert.Equal( 2556 Assert.Equal( 2583 Assert.Equal(
DictionaryAssertsTests.cs (2)
46 Assert.Equal( 98 Assert.Equal(
EqualityAssertsTests.cs (152)
29 Assert.Equal( 48 Assert.Equal( 81 Assert.Equal( 109 Assert.Equal( 132 Assert.Equal( 170 Assert.Equal( 184 Assert.Equal( 205 Assert.Equal( 236 Assert.Equal( 266 Assert.Equal( 300 Assert.Equal( 331 Assert.Equal( 357 Assert.Equal( 383 Assert.Equal( 409 Assert.Equal( 439 Assert.Equal( 474 Assert.Equal( 504 Assert.Equal( 530 Assert.Equal( 559 Assert.Equal( 591 Assert.Equal( 617 Assert.Equal( 643 Assert.Equal( 669 Assert.Equal( 699 Assert.Equal( 729 Assert.Equal( 766 Assert.Equal( 801 Assert.Equal( 825 Assert.Equal( 862 Assert.Equal( 894 Assert.Equal( 925 Assert.Equal( 959 Assert.Equal( 989 Assert.Equal( 1008 Assert.Equal( 1031 Assert.Equal( 1045 Assert.Equal( 1090 Assert.Equal( 1143 Assert.Equal( 1177 Assert.Equal( 1207 Assert.Equal( 1236 Assert.Equal( 1262 Assert.Equal( 1279 Assert.Equal( 1296 Assert.Equal( 1326 Assert.Equal( 1349 Assert.Equal( 1382 Assert.Equal( 1421 Assert.Equal( 1447 Assert.Equal( 1486 Assert.Equal( 1525 Assert.Equal( 1555 Assert.Equal( 1584 Assert.Equal( 1612 Assert.Equal( 1642 Assert.Equal( 1672 Assert.Equal( 1709 Assert.Equal( 1746 Assert.Equal( 1784 Assert.Equal( 1795 Assert.Equal( 1832 Assert.Equal( 1865 Assert.Equal( 1903 Assert.Equal( 1914 Assert.Equal( 1952 Assert.Equal( 1963 Assert.Equal( 1991 Assert.Equal( 2020 Assert.Equal( 2047 Assert.Equal( 2065 Assert.Equal("tolerance", argEx.ParamName); 2084 Assert.Equal( 2108 Assert.Equal( 2132 Assert.Equal( 2150 Assert.Equal( 2180 Assert.Equal( 2207 Assert.Equal( 2225 Assert.Equal("tolerance", argEx.ParamName); 2244 Assert.Equal( 2268 Assert.Equal( 2292 Assert.Equal( 2310 Assert.Equal( 2330 Assert.Equal( 2359 Assert.Equal( 2393 Assert.Equal( 2416 Assert.Equal( 2439 Assert.Equal( 2471 Assert.Equal( 2491 Assert.Equal( 2512 Assert.Equal( 2527 Assert.Equal( 2548 Assert.Equal( 2577 Assert.Equal( 2612 Assert.Equal( 2643 Assert.Equal( 2670 Assert.Equal( 2696 Assert.Equal( 2722 Assert.Equal( 2750 Assert.Equal( 2787 Assert.Equal( 2817 Assert.Equal( 2843 Assert.Equal( 2872 Assert.Equal( 2901 Assert.Equal( 2930 Assert.Equal( 2956 Assert.Equal( 2982 Assert.Equal( 3012 Assert.Equal( 3042 Assert.Equal( 3077 Assert.Equal( 3112 Assert.Equal( 3161 Assert.Equal( 3192 Assert.Equal( 3220 Assert.Equal( 3282 Assert.Equal( 3310 Assert.Equal( 3361 Assert.Equal( 3396 Assert.Equal( 3427 Assert.Equal( 3456 Assert.Equal( 3482 Assert.Equal( 3510 Assert.Equal( 3548 Assert.Equal( 3568 Assert.Equal( 3607 Assert.Equal( 3659 Assert.Equal( 3698 Assert.Equal( 3741 Assert.Equal( 3756 Assert.Equal( 3781 Assert.Equal( 3802 Assert.Equal( 3830 Assert.Equal( 3861 Assert.Equal( 3891 Assert.Equal( 3928 Assert.Equal( 3959 Assert.Equal( 3988 Assert.Equal( 4015 Assert.Equal( 4039 Assert.Equal("tolerance", argEx.ParamName); 4052 Assert.Equal( 4076 Assert.Equal( 4100 Assert.Equal( 4136 Assert.Equal( 4163 Assert.Equal( 4187 Assert.Equal("tolerance", argEx.ParamName); 4200 Assert.Equal( 4224 Assert.Equal( 4248 Assert.Equal( 4278 Assert.Equal( 4304 Assert.Equal( 4331 Assert.Equal( 4345 Assert.Equal(
EquivalenceAssertsTests.cs (67)
32 Assert.Equal( 64 Assert.Equal( 92 Assert.Equal( 107 Assert.Equal( 136 Assert.Equal( 165 Assert.Equal( 188 Assert.Equal( 202 Assert.Equal( 225 Assert.Equal( 248 Assert.Equal( 280 Assert.Equal( 303 Assert.Equal( 352 Assert.Equal( 381 Assert.Equal( 410 Assert.Equal( 439 Assert.Equal( 468 Assert.Equal( 514 Assert.Equal( 535 Assert.Equal( 559 Assert.Equal( 591 Assert.Equal( 608 Assert.Equal( 640 Assert.Equal( 654 Assert.Equal( 671 Assert.Equal( 688 Assert.Equal( 722 Assert.Equal( 739 Assert.Equal( 771 Assert.Equal( 785 Assert.Equal( 802 Assert.Equal( 819 Assert.Equal( 859 Assert.Equal( 876 Assert.Equal( 914 Assert.Equal( 931 Assert.Equal( 948 Assert.Equal( 965 Assert.Equal( 1003 Assert.Equal( 1020 Assert.Equal( 1058 Assert.Equal( 1075 Assert.Equal( 1092 Assert.Equal( 1109 Assert.Equal( 1200 Assert.Equal( 1217 Assert.Equal( 1234 Assert.Equal( 1251 Assert.Equal( 1289 Assert.Equal( 1306 Assert.Equal( 1323 Assert.Equal( 1340 Assert.Equal( 1369 Assert.Equal( 1386 Assert.Equal( 1415 Assert.Equal( 1432 Assert.Equal( 1463 Assert.Equal( 1480 Assert.Equal( 1518 Assert.Equal( 1590 Assert.Equal( 1608 Assert.Equal( 1641 Assert.Equal("Assert.Equivalent() Failure: Circular reference found in 'expected.Other'", ex.Message); 1653 Assert.Equal("Assert.Equivalent() Failure: Circular reference found in 'actual.Other'", ex.Message); 1668 Assert.Equal( 1700 Assert.Equal( 1729 Assert.Equal( 1758 Assert.Equal(
EventAssertsTests.cs (16)
24 Assert.Equal( 46 Assert.Equal("Assert.Raises() Failure: No event was raised", ex.Message); 81 Assert.Equal( 106 Assert.Equal( 146 Assert.Equal( 191 Assert.Equal( 250 Assert.Equal( 272 Assert.Equal( 365 Assert.Equal( 424 Assert.Equal( 446 Assert.Equal( 539 Assert.Equal( 561 Assert.Equal("Assert.Raises() Failure: No event was raised", ex.Message); 596 Assert.Equal( 621 Assert.Equal( 661 Assert.Equal(
ExceptionAssertsTests.cs (36)
30 Assert.Equal( 55 Assert.Equal( 73 Assert.Equal( 102 Assert.Equal("You must call Assert.ThrowsAsync when testing async code", ex.Message); 113 Assert.Equal( 138 Assert.Equal( 156 Assert.Equal( 186 Assert.Equal( 211 Assert.Equal( 229 Assert.Equal( 255 Assert.Equal("You must call Assert.ThrowsAsync when testing async code", ex.Message); 266 Assert.Equal( 291 Assert.Equal( 309 Assert.Equal( 338 Assert.Equal( 362 Assert.Equal( 380 Assert.Equal( 398 Assert.Equal( 424 Assert.Equal( 448 Assert.Equal( 466 Assert.Equal( 484 Assert.Equal( 513 Assert.Equal( 538 Assert.Equal( 572 Assert.Equal("You must call Assert.ThrowsAnyAsync when testing async code", ex.Message); 583 Assert.Equal( 608 Assert.Equal( 643 Assert.Equal( 668 Assert.Equal( 702 Assert.Equal( 727 Assert.Equal( 745 Assert.Equal( 771 Assert.Equal( 795 Assert.Equal( 813 Assert.Equal( 831 Assert.Equal(
FailAssertsTests.cs (2)
12 Assert.Equal("Assert.Fail() Failure", ex.Message); 21 Assert.Equal("This is a user message", ex.Message);
IdentityAssertsTests.cs (2)
17 Assert.Equal("Assert.NotSame() Failure: Values are the same instance", ex.Message); 43 Assert.Equal(
MemoryAssertsTests.cs (31)
33 Assert.Equal( 47 Assert.Equal( 73 Assert.Equal( 87 Assert.Equal( 106 Assert.Equal( 147 Assert.Equal( 161 Assert.Equal( 175 Assert.Equal( 226 Assert.Equal( 241 Assert.Equal( 256 Assert.Equal( 271 Assert.Equal( 298 Assert.Equal( 313 Assert.Equal( 328 Assert.Equal( 370 Assert.Equal( 385 Assert.Equal( 408 Assert.Equal( 438 Assert.Equal( 460 Assert.Equal( 491 Assert.Equal( 514 Assert.Equal( 642 Assert.Equal( 662 Assert.Equal( 739 Assert.Equal( 763 Assert.Equal( 819 Assert.Equal( 855 Assert.Equal( 877 Assert.Equal( 908 Assert.Equal( 931 Assert.Equal(
MultipleAssertsTests.cs (1)
65 Assert.Equal(
NullAssertsTests.cs (4)
32 Assert.Equal("Assert.NotNull() Failure: Value is null", ex.Message); 43 Assert.Equal("Assert.NotNull() Failure: Value of type 'Nullable<int>' does not have a value", ex.Message); 69 Assert.Equal( 85 Assert.Equal(
PropertyAssertsTests.cs (4)
27 Assert.Equal("Assert.PropertyChanged() failure: Property 'Property1' was not set", ex.Message); 38 Assert.Equal("Assert.PropertyChanged() failure: Property 'Property1' was not set", ex.Message); 80 Assert.Equal("Assert.PropertyChanged() failure: Property 'Property1' was not set", ex.Message); 93 Assert.Equal("Assert.PropertyChanged() failure: Property 'Property1' was not set", ex.Message);
RangeAssertsTests.cs (9)
20 Assert.Equal( 40 Assert.Equal( 54 Assert.Equal( 74 Assert.Equal( 107 Assert.Equal( 130 Assert.Equal( 150 Assert.Equal( 170 Assert.Equal( 187 Assert.Equal(
Sdk\ArgumentFormatterTests.cs (29)
20 Assert.Equal("null", ArgumentFormatter.Format(null)); 83 Assert.Equal(expected.Replace("$$ELLIPSIS$$", ArgumentFormatter.Ellipsis), ArgumentFormatter.Format(value)); 124 Assert.Equal(expected, ArgumentFormatter.Format(value)); 136 Assert.Equal(floatPI.ToString("G9"), ArgumentFormatter.Format(floatPI)); 146 Assert.Equal(Math.PI.ToString("G17"), ArgumentFormatter.Format(Math.PI)); 156 Assert.Equal(123.45M.ToString(), ArgumentFormatter.Format(123.45M)); 168 Assert.Equal(now.ToString("o"), ArgumentFormatter.Format(now)); 180 Assert.Equal(now.ToString("o"), ArgumentFormatter.Format(now)); 189 Assert.Equal("Task { Status = RanToCompletion }", ArgumentFormatter.Format(task)); 198 Assert.Equal("Task<int> { Status = Faulted }", ArgumentFormatter.Format(taskCompletionSource.Task)); 227 Assert.Equal(expected, ArgumentFormatter.Format(type)); 253 Assert.Equal(expected, actual); 280 Assert.Equal(expected, actual); 296 Assert.Equal(expected, ArgumentFormatter.Format(kvp)); 319 Assert.Equal(expected, ArgumentFormatter.Format(collection)); 336 Assert.Equal(expected, ArgumentFormatter.Format(value)); 353 Assert.Equal($"[0, 1, 2, 3, 4, {ArgumentFormatter.Ellipsis}]", ArgumentFormatter.Format(collection)); 367 Assert.Equal($"[42, [42, [{ArgumentFormatter.Ellipsis}]]]", ArgumentFormatter.Format(looping)); 382 Assert.Equal(expected, ArgumentFormatter.Format(new MyComplexType())); 412 Assert.Equal(expected, ArgumentFormatter.Format(new MyComplexTypeWrapper())); 429 Assert.Equal("Object { }", ArgumentFormatter.Format(new object())); 439 Assert.Equal("ThrowingGetter { MyThrowingProperty = (throws NotImplementedException) }", ArgumentFormatter.Format(new ThrowingGetter())); 456 Assert.Equal(expected, ArgumentFormatter.Format(new Big())); 489 Assert.Equal($"Looping {{ Me = Looping {{ Me = Looping {{ {ArgumentFormatter.Ellipsis} }} }} }}", ArgumentFormatter.Format(new Looping())); 502 Assert.Equal("This is what you should show", ArgumentFormatter.Format(new TypeWithToString())); 528 Assert.Equal(expectedResult, ArgumentFormatter.Format(type)); 537 Assert.Equal("typeof(T)", ArgumentFormatter.Format(parameterType)); 546 Assert.Equal("typeof(TKey)", ArgumentFormatter.Format(parameterTKey)); 549 Assert.Equal("typeof(TValue)", ArgumentFormatter.Format(parameterTValue));
Sdk\CollectionTrackerTests.cs (22)
20 Assert.Equal($"[{ArgumentFormatter.Ellipsis}]", result); 32 Assert.Equal("[42, 2112]", result); 44 Assert.Equal($"[1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]", result); 56 Assert.Equal($"[{ArgumentFormatter.Ellipsis}, 2, 3, 4, 5, 6, {ArgumentFormatter.Ellipsis}]", result); 68 Assert.Equal($"[{ArgumentFormatter.Ellipsis}, 3, 4, 5, 6, 7]", result); 84 Assert.Equal($"[{ArgumentFormatter.Ellipsis}]", result); 96 Assert.Equal("[42, 2112]", result); 108 Assert.Equal($"[1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]", result); 120 Assert.Equal($"[{ArgumentFormatter.Ellipsis}, 2, 3, 4, 5, 6, {ArgumentFormatter.Ellipsis}]", result); 132 Assert.Equal($"[{ArgumentFormatter.Ellipsis}, 3, 4, 5, 6, 7]", result); 146 Assert.Equal("[]", tracker.FormatStart()); 154 Assert.Equal($"[{ArgumentFormatter.Ellipsis}]", tracker.FormatStart(ArgumentFormatter.MAX_DEPTH)); 166 Assert.Equal($"[1, {2.3M}, \"Hello, world!\"]", tracker.FormatStart()); 178 Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {ArgumentFormatter.Ellipsis}]", tracker.FormatStart()); 189 Assert.Equal("[]", CollectionTracker<object>.FormatStart(collection)); 197 Assert.Equal($"[{ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(collection, ArgumentFormatter.MAX_DEPTH)); 209 Assert.Equal($"[1, {2.3M}, \"Hello, world!\"]", CollectionTracker<object>.FormatStart(collection)); 221 Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(collection)); 233 Assert.Equal("[]", CollectionTracker<object>.FormatStart(span)); 241 Assert.Equal($"[{ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(span, ArgumentFormatter.MAX_DEPTH)); 253 Assert.Equal($"[1, {2.3M}, \"Hello, world!\"]", CollectionTracker<object>.FormatStart(span)); 265 Assert.Equal($"[1, {2.3M}, \"Hello, world!\", 42, 2112, {ArgumentFormatter.Ellipsis}]", CollectionTracker<object>.FormatStart(span));
SetAssertsTests.cs (12)
41 Assert.Equal( 91 Assert.Equal( 129 Assert.Equal( 155 Assert.Equal( 169 Assert.Equal( 195 Assert.Equal( 221 Assert.Equal( 235 Assert.Equal( 279 Assert.Equal( 293 Assert.Equal( 336 Assert.Equal( 350 Assert.Equal(
SpanAssertsTests.cs (31)
33 Assert.Equal( 47 Assert.Equal( 73 Assert.Equal( 87 Assert.Equal( 106 Assert.Equal( 147 Assert.Equal( 161 Assert.Equal( 175 Assert.Equal( 226 Assert.Equal( 241 Assert.Equal( 256 Assert.Equal( 271 Assert.Equal( 298 Assert.Equal( 313 Assert.Equal( 328 Assert.Equal( 370 Assert.Equal( 385 Assert.Equal( 408 Assert.Equal( 438 Assert.Equal( 460 Assert.Equal( 491 Assert.Equal( 514 Assert.Equal( 642 Assert.Equal( 662 Assert.Equal( 739 Assert.Equal( 763 Assert.Equal( 819 Assert.Equal( 855 Assert.Equal( 877 Assert.Equal( 908 Assert.Equal( 931 Assert.Equal(
StringAssertsTests.cs (27)
34 Assert.Equal( 63 Assert.Equal( 90 Assert.Equal( 109 Assert.Equal( 189 Assert.Equal( 225 Assert.Equal( 255 Assert.Equal( 285 Assert.Equal( 315 Assert.Equal( 358 Assert.Equal( 388 Assert.Equal( 418 Assert.Equal( 452 Assert.Equal( 481 Assert.Equal( 524 Assert.Equal( 543 Assert.Equal( 682 Assert.Equal(message, ex.Message); 712 Assert.Equal( 722 verify(() => Assert.Equal(expected, actual)); 756 Assert.Equal( 770 Assert.Equal( 805 Assert.Equal( 819 Assert.Equal( 854 Assert.Equal( 883 Assert.Equal( 926 Assert.Equal( 945 Assert.Equal(
TypeAssertsTests.cs (16)
23 Assert.Equal( 74 Assert.Equal( 92 Assert.Equal( 143 Assert.Equal( 169 Assert.Equal( 185 Assert.Equal( 201 Assert.Equal( 232 Assert.Equal( 248 Assert.Equal( 264 Assert.Equal( 295 Assert.Equal( 327 Assert.Equal( 369 Assert.Equal( 405 Assert.Equal( 431 Assert.Equal( 467 Assert.Equal(
Microsoft.DotNet.XUnitExtensions.Tests (2)
ConditionalAttributeTests.cs (2)
46Assert.Equal("outerloop", res[0].Value); 57Assert.Equal("outerloop", res[0].Value);
Microsoft.Extensions.ApiDescription.Client.Tests (26)
CSharpIdentifierTest.cs (4)
58Assert.Equal(expectdOutput, output); 72Assert.Equal(expectdOutput, output); 88Assert.Equal(expectdOutput, output); 104Assert.Equal(expectdOutput, output);
GetCurrentOpenApiReferenceTest.cs (1)
44Assert.Equal(expectedIdentity, output.ItemSpec);
GetOpenApiReferenceMetadataTest.cs (9)
53Assert.Equal(identity, output.ItemSpec); 111Assert.Equal(identity, output.ItemSpec); 169Assert.Equal(identity, output.ItemSpec); 227Assert.Equal(identity, output.ItemSpec); 377Assert.Equal(identity, output.ItemSpec); 440Assert.Equal(identity, output.ItemSpec); 540Assert.Equal(identity12, output.ItemSpec); 552Assert.Equal(identity12, output.ItemSpec); 564Assert.Equal(identity3, output.ItemSpec);
MetadataSerializerTest.cs (12)
82Assert.Equal(value, item.GetMetadata(key)); 126Assert.Equal(identity, item.ItemSpec); 152Assert.Equal(identity, item.ItemSpec); 153Assert.Equal(value, item.GetMetadata("Value")); 167Assert.Equal(value, item.ItemSpec); 168Assert.Equal("a value", item.GetMetadata("Value")); 197Assert.Equal(expectedResult, result); 214Assert.Equal(expectedResult, result); 230Assert.Equal(expectedResult, result); 262Assert.Equal(expectedResult, result); 286Assert.Equal(expectedResult, result); 309Assert.Equal(expectedResult, result);
Microsoft.Extensions.ApiDescription.Tool.Tests (4)
GetDocumentTests.cs (4)
43Assert.Equal("GetDocumentSample | v1", document.Info.Title); 68Assert.Equal("GetDocumentSample | v1", document.Info.Title); 94Assert.Equal("GetDocumentSample | v1", document.Info.Title); 120Assert.Equal("GetDocumentSample | internal", document.Info.Title);
Microsoft.Extensions.Caching.Hybrid.Tests (6)
ServiceConstructionTests.cs (2)
96Assert.Equal(expected, actual); 109Assert.Equal(expected, actual);
SizeTests.cs (4)
31Assert.Equal(expected, actual); 43Assert.Equal(expected, actual); 74Assert.Equal(expected, actual.Value); 82Assert.Equal(expected, actual.Value);
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
88Assert.Equal("The absolute expiration value must be in the future.", exception.Message);
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (5)
RedisCacheSetAndRemoveTests.cs (4)
144Assert.Equal(Hex(payload), Hex(raw)); 149Assert.Equal(payload, value); 167Assert.Equal(Hex(payload), Hex(raw)); 172Assert.Equal(payload, value);
TimeExpirationAsyncTests.cs (1)
25Assert.Equal(paramName, ex.ParamName);
Microsoft.Extensions.Compliance.Abstractions.Tests (21)
Classification\DataClassificationAttributeTests.cs (1)
29Assert.Equal("Hello", attribute.Notes);
Classification\DataClassificationTests.cs (5)
17Assert.Equal(TaxonomyName, dc.TaxonomyName); 18Assert.Equal(Value, dc.Value); 47Assert.Equal($"{TaxonomyName}:{Value}", dc.ToString()); 49Assert.Equal("None", DataClassification.None.ToString()); 50Assert.Equal("Unknown", DataClassification.Unknown.ToString());
Redaction\NullRedactorTest.cs (2)
18Assert.Equal(string.Empty, emptyStringRedacted); 22Assert.Equal(string.Empty, emptyStringRedacted);
Redaction\RedactorTest.cs (13)
18Assert.Equal(string.Empty, r.Redact((string?)null)); 19Assert.Equal(string.Empty, r.Redact<object?>(null)); 20Assert.Equal(string.Empty, r.Redact(string.Empty.AsSpan())); 40Assert.Equal(data, redacted); 68Assert.Equal(extBuffer.ToString(), buffer.ToString()); 86Assert.Equal(redactedDirectly, redacted); 125Assert.Equal(redactedDirectly, redacted); 164Assert.Equal(redactedDirectly, redacted); 194Assert.Equal("", redacted); 203Assert.Equal("", redacted); 252Assert.Equal(data.ToString(), new string(buffer, 0, charsWritten)); 270Assert.Equal(data.ToString(), new string(buffer, 0, charsWritten)); 288Assert.Equal(data.ToString("R"), new string(buffer, 0, charsWritten));
Microsoft.Extensions.Compliance.Redaction.Tests (4)
HmacRedactorTest.cs (2)
114Assert.Equal(example.Hash, result); 139Assert.Equal(example.Hash, result);
RedactionAcceptanceTests.cs (2)
32Assert.Equal(redacted, data); 36Assert.Equal(redacted, data);
Microsoft.Extensions.Compliance.Testing.Tests (14)
FakeRedactorProviderTests.cs (1)
18Assert.Equal("Hello", redactor.Redact("Hello"));
FakeRedactorTests.cs (4)
29Assert.Equal(redacted1, redacted2); 30Assert.Equal(redacted1, redacted3); 48Assert.Equal(RedactedConstOutput, redacted); 58Assert.Equal(redacted, data);
RedactionFakesAcceptanceTests.cs (9)
129Assert.Equal($"xxx{data}xxx", redacted); 149Assert.Equal($"xxx{data}xxx", redacted); 169Assert.Equal($"xxx{data}xxx", redacted); 189Assert.Equal($"xxx{data}xxx", redacted); 213Assert.Equal(data2, collector.LastRedactedData.Original); 214Assert.Equal(redacted2, collector.LastRedactedData.Redacted); 218Assert.Equal(data, collector.AllRedactedData[0].Original); 219Assert.Equal(redacted, collector.AllRedactedData[0].Redacted); 255Assert.Equal(redacted, collector.LastRedactedData.Redacted);
Microsoft.Extensions.Configuration.KeyPerFile.Tests (37)
ConfigurationProviderTestBase.cs (5)
135Assert.Equal("Value1", options.Key1); 136Assert.Equal("Value12", options.Section1.Key2); 137Assert.Equal("Value123", options.Section1.Section2.Key3); 138Assert.Equal("Value344", options.Section3.Section4.Key4); 181Assert.Equal(
KeyPerFileTests.cs (32)
50Assert.Equal("SecretValue1", config["Secret1"]); 51Assert.Equal("SecretValue2", config["Secret2"]); 66Assert.Equal("SecretValue1", config["Secret1"]); 67Assert.Equal("SecretValue2", config["Secret2"]); 82Assert.Equal("SecretValue0", config["Secret0:Key"]); 83Assert.Equal("SecretValue1", config["Secret0:Secret1:Key"]); 84Assert.Equal("SecretValue2", config["Secret0:Secret1:Secret2:Key"]); 103Assert.Equal("SecretValue0", config["Secret0:Key"]); 104Assert.Equal("SecretValue1", config["Secret0:Secret1:Key"]); 105Assert.Equal("SecretValue2", config["Secret0:Secret1:Secret2:Key"]); 122Assert.Equal("SecretValue2", config["Secret2"]); 141Assert.Equal("SecretValue0", config["ignore.Secret0"]); 142Assert.Equal("SecretValue1", config["ignore.Secret1"]); 143Assert.Equal("SecretValue2", config["Secret2"]); 183Assert.Equal("SecretValue2", config["Secret2"]); 202Assert.Equal("SecretValue0", config["ignore.Secret0"]); 203Assert.Equal("SecretValue1", config["ignore.Secret1"]); 204Assert.Equal("SecretValue2", config["Secret2"]); 239Assert.Equal("Foo", options.Text); 256Assert.Equal("SecretValue1", config["Secret1"]); 257Assert.Equal("SecretValue2", config["Secret2"]); 263Assert.Equal("NewSecretValue1", config["Secret1"]); 265Assert.Equal("NewSecretValue3", config["Secret3"]); 282Assert.Equal("SecretValue1", config["Secret1"]); 283Assert.Equal("SecretValue2", config["Secret2"]); 289Assert.Equal("SecretValue1", config["Secret1"]); 290Assert.Equal("SecretValue2", config["Secret2"]); 312Assert.Equal("SecretValue1", config["Secret1"]); 313Assert.Equal("SecretValue2", config["Secret2"]); 341Assert.Equal("NewSecretValue1", config["Secret1"]); 343Assert.Equal("NewSecretValue3", config["Secret3"]); 394Assert.Equal("SecretValue1", config["Secret1"]);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
ApplicationLifecycleHealthChecksExtensionsTests.cs (1)
62Assert.Equal("ApplicationLifecycle", r.Name);
ManualHealthCheckExtensionsTests.cs (1)
57Assert.Equal(r.Name, name);
TelemetryHealthChecksPublisherTests.cs (1)
105Assert.Equal(expectedLogMessage, collector.LatestRecord.Message);
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (50)
DefaultHealthCheckServiceTest.cs (38)
87Assert.Equal("DegradedCheck", actual.Key); 88Assert.Equal(DegradedMessage, actual.Value.Description); 96Assert.Equal("HealthyCheck", actual.Key); 97Assert.Equal(HealthyMessage, actual.Value.Description); 102Assert.Equal(DataKey, item.Key); 109Assert.Equal("UnhealthyCheck", actual.Key); 110Assert.Equal(UnhealthyMessage, actual.Value.Description); 141Assert.Equal("ExceptionCheck", actual.Key); 142Assert.Equal(ExceptionMessage, actual.Value.Description); 144Assert.Equal(ExceptionMessage, actual.Value.Exception!.Message); 150Assert.Equal("OperationExceptionCheck", actual.Key); 151Assert.Equal("A timeout occurred while running check.", actual.Value.Description); 153Assert.Equal(OperationCancelledMessage, actual.Value.Exception!.Message); 189Assert.Equal("HealthyCheck", actual.Key); 190Assert.Equal(HealthyMessage, actual.Value.Description); 195Assert.Equal(DataKey, item.Key); 223Assert.Equal("A", actual.Key); 230Assert.Equal("B", actual.Key); 237Assert.Equal("C", actual.Key); 295Assert.Equal("Throws", actual.Key); 296Assert.Equal(thrownException.Message, actual.Value.Description); 302Assert.Equal("Faults", actual.Key); 303Assert.Equal(faultedException.Message, actual.Value.Description); 309Assert.Equal("Succeeds", actual.Key); 326Assert.Equal(actual.LoggerName, typeof(DefaultHealthCheckService).FullName); 330Assert.Equal("HealthCheckName", item.Key); 352Assert.Equal("TestScope", actual.Key); 376Assert.Equal("Test", actual.Key); 400Assert.Equal("Test", actual.Key); 426Assert.Equal("Test", actual.Key); 431Assert.Equal("Test2", actual.Key); 480Assert.Equal("Test", actual.Key); 523Assert.Equal("test1", entry.Key); 528Assert.Equal("test2", entry.Key); 554Assert.Equal("timeout", actual.Key); 611Assert.Equal("degraded", actual.Key); 616Assert.Equal("healthy", actual.Key); 621Assert.Equal("unhealthy", actual.Key);
DependencyInjection\HealthChecksBuilderTest.cs (11)
36Assert.Equal("test", registration.Name); 56Assert.Equal("test", registration.Name); 79Assert.Equal("test", registration.Name); 101Assert.Equal("test", registration.Name); 107Assert.Equal("hi", check.S); 127Assert.Equal("test", registration.Name); 150Assert.Equal("test", registration.Name); 173Assert.Equal("test", registration.Name); 196Assert.Equal("test", registration.Name); 219actual => Assert.Equal("Foo", actual.Name), 220actual => Assert.Equal("Bar", actual.Name));
HealthCheckPublisherHostedServiceTest.cs (1)
370Assert.Equal("CheckDefault", Assert.Single(Assert.Single(publisher.Entries).report.Entries.Keys));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (10)
Linux\LinuxUtilizationProviderTests.cs (1)
206Assert.Equal(ResourceUtilizationInstruments.MeterName, meter.Name);
Linux\OSFileSystemTests.cs (6)
37Assert.Equal(Content, s); 51Assert.Equal(Content, s); 82Assert.Equal(expected, actual); 113Assert.Equal(expectedLines[i], line.ToString()); 161Assert.Equal(expectedLines[i], line.ToString()); 209Assert.Equal(expectedLines.ElementAt(cnt), line.ToString().Replace("\r", ""));
ResourceMonitoringOptionsCustomValidatorTests.cs (1)
78Assert.Equal("Property PublishingWindow: Value must be <= to CollectionWindow (00:00:01), but is 00:00:02.", failureMessage);
Windows\WindowsContainerSnapshotProviderTests.cs (1)
345Assert.Equal(ResourceUtilizationInstruments.MeterName, meter.Name);
Windows\WindowsSnapshotProviderTests.cs (1)
169Assert.Equal(ResourceUtilizationInstruments.MeterName, meter.Name);
Microsoft.Extensions.Diagnostics.Testing.Tests (38)
Logging\FakeLogCollectorTests.cs (16)
44Assert.Equal("[00:00.001, trace] Hello world!", output.Last); 47Assert.Equal("[00:00.001, debug] Hello world!", output.Last); 50Assert.Equal("[00:00.001, info] Hello world!", output.Last); 53Assert.Equal("[00:00.001, warn] Hello world!", output.Last); 56Assert.Equal("[00:00.001, error] Hello world!", output.Last); 59Assert.Equal("[00:00.001, crit] Hello world!", output.Last); 62Assert.Equal("[00:00.001, none] Hello world!", output.Last); 65Assert.Equal("[00:00.001, invld] Hello world!", output.Last); 86Assert.Equal("[00:00.001, trace] Hello world!", output.Last); 89Assert.Equal("[00:00.001, debug] Hello world!", output.Last); 92Assert.Equal("[00:00.001, info] Hello world!", output.Last); 95Assert.Equal("[00:00.001, warn] Hello world!", output.Last); 98Assert.Equal("[00:00.001, error] Hello world!", output.Last); 101Assert.Equal("[00:00.001, crit] Hello world!", output.Last); 104Assert.Equal("[00:00.001, none] Hello world!", output.Last); 107Assert.Equal("[00:00.001, invld] Hello world!", output.Last);
Logging\FakeLoggerProviderTests.cs (3)
20Assert.Equal("Storage", logger.LatestRecord.Category); 32Assert.Equal("Microsoft.Extensions.Logging.Testing.Test.Logging.FakeLoggerProviderTests", logger.LatestRecord.Category); 50Assert.Equal("Storage", records[1].Category);
Logging\FakeLoggerTests.cs (19)
36Assert.Equal("Hello", records[0].Message); 43Assert.Equal("[00:00.000, info] Hello", records[0].ToString()); 45Assert.Equal("World", records[1].Message); 53Assert.Equal("World", logger.LatestRecord.Message); 72Assert.Equal("42", (string)logger.LatestRecord.State!); 89Assert.Equal("V0", ss["K0"]); 90Assert.Equal("V1", ss["K1"]); 92Assert.Equal("[\"0\",\"1\",\"2\"]", ss["K3"]); 94Assert.Equal("V0", logger.LatestRecord.GetStructuredStateValue("K0")); 95Assert.Equal("V1", logger.LatestRecord.GetStructuredStateValue("K1")); 96Assert.Equal("[\"0\",\"1\",\"2\"]", logger.LatestRecord.GetStructuredStateValue("K3")); 105Assert.Equal("Bob", ss["name"]); 106Assert.Equal("Hello {name}", ss["{OriginalFormat}"]); 130Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), (string)logger.LatestRecord.State!); 138Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), logger.LatestRecord.StructuredState![0].Value!); 196Assert.Equal("BEFORE", logger.LatestRecord.Message); 218Assert.Equal("M4", logger.LatestRecord.Message); 242Assert.Equal("M2", logger.LatestRecord.Message); 284Assert.Equal("Hello World", (string)logger.LatestRecord.Scopes[1]!);
Microsoft.Extensions.Features.Tests (1)
FeatureCollectionTests.cs (1)
56Assert.Equal("System.Int32 does not exist in the feature collection and because it is a struct the method can't return null. Use 'featureCollection[typeof(System.Int32)] is not null' to check if the feature exists.", ex.Message);
Microsoft.Extensions.FileProviders.Embedded.Tests (16)
EmbeddedFileProviderTests.cs (6)
55Assert.Equal("File.txt", fileInfo.Name); 121Assert.Equal("File3.txt", fileInfo.Name); 159Assert.Equal("File.txt", fileInfo.Name); 197Assert.Equal("File3.txt", fileInfo.Name); 213file => Assert.Equal("File.txt", file.Name), 214file => Assert.Equal("ResourcesInSubdirectory.File3.txt", file.Name));
ManifestEmbeddedFileProviderTests.cs (10)
31Assert.Equal("jquery.validate.js", jqueryValidate.Name); 38Assert.Equal("jquery.min.js", jqueryMin.Name); 45Assert.Equal("site.css", siteCss.Name); 68Assert.Equal("jquery.validate.js", jqueryValidate.Name); 75Assert.Equal("jquery.min.js", jqueryMin.Name); 82Assert.Equal("site.css", siteCss.Name); 167Assert.Equal("jquery.validate.js", jqueryValidate.Name); 190Assert.Equal("jquery.validate.js", jqueryValidate.Name); 237Assert.Equal(path, file.Name); 441Assert.Equal("jquery.validate.js", jqueryValidate.Name);
Microsoft.Extensions.Hosting.Testing.Tests (27)
FakeConfigurationSourceTests.cs (4)
22Assert.Equal("testKey", item.Key); 23Assert.Equal("testValue", item.Value); 27Assert.Equal("anotherTestKey", item.Key); 28Assert.Equal("anotherTestValue", item.Value);
HostingFakesExtensionsTests.cs (21)
55Assert.Equal("No fake log collector registered", exception.Message); 146Assert.Equal("testKey", item.Key); 147Assert.Equal("testValue", item.Value); 172Assert.Equal("testKey1", item.Key); 173Assert.Equal("testValue1", item.Value); 177Assert.Equal("testKey2", item.Key); 178Assert.Equal("testValue2", item.Value); 201Assert.Equal("testKey", item.Key); 202Assert.Equal("testValue", item.Value); 206Assert.Equal("anotherTestKey", item.Key); 207Assert.Equal("anotherTestValue", item.Value); 232Assert.Equal("testKey", item.Key); 233Assert.Equal("testValue", item.Value); 258Assert.Equal("testKey1", item.Key); 259Assert.Equal("testValue1", item.Value); 263Assert.Equal("testKey2", item.Key); 264Assert.Equal("testValue2", item.Value); 287Assert.Equal("testKey", item.Key); 288Assert.Equal("testValue", item.Value); 292Assert.Equal("anotherTestKey", item.Key); 293Assert.Equal("anotherTestValue", item.Value);
HostTerminatorServiceTests.cs (2)
46Assert.Equal( 62Assert.Equal(
Microsoft.Extensions.Http.Diagnostics.Tests (32)
Logging\AcceptanceTests.cs (8)
46Assert.Equal(LoggingCategory, logRecord.Category); 47Assert.Equal($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message); 78Assert.Equal(LoggingCategory, firstLogRecord.Category); 87Assert.Equal(LoggingCategory, secondLogRecord.Category); 88Assert.Equal($"{HttpMethod.Get} {_unreachableRequestUri.Host}/{TelemetryConstants.Redacted}", secondLogRecord.Message); 117Assert.Equal($"{httpRequestMessage.Method} {httpRequestMessage.RequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message); 624r => Assert.Equal("RequestPipelineStart", r.Id.Name), 625r => Assert.Equal("RequestPipelineEnd", r.Id.Name));
Logging\HttpClientLoggerTest.cs (5)
441Assert.Equal($"{httpRequestMessage.Method} {httpRequestMessage.RequestUri.Host}/{TelemetryConstants.Redacted}", logRecord.Message); 780Assert.Equal(nameof(Log.EnrichmentError), logRecords[0].Id.Name); 783Assert.Equal(nameof(Log.OutgoingRequest), logRecords[1].Id.Name); 825Assert.Equal(nameof(Log.EnrichmentError), logRecords[0].Id.Name); 828Assert.Equal(nameof(Log.OutgoingRequestError), logRecords[1].Id.Name);
Logging\Internal\LogRecordExtensions.cs (1)
30Assert.Equal(expectedValue, actualValue);
Logging\LoggerMessageStateExtensionsTests.cs (2)
45Assert.Equal(prefix + NormalizedHeader1, state.TagArray[0].Key); 48Assert.Equal(prefix + NormalizedHeader2, state.TagArray[1].Key);
Telemetry\DownstreamDependencyMetadataManagerTests.cs (8)
56Assert.Equal(new BackslashDownstreamDependencyMetadata().DependencyName, requestMetadata.DependencyName); 57Assert.Equal(expectedRequestName, requestMetadata.RequestName); 58Assert.Equal(expectedRequestRoute, requestMetadata.RequestRoute); 59Assert.Equal(httpMethod, requestMetadata.MethodType); 77Assert.Equal("EmptyRouteService", requestMetadata.DependencyName); 78Assert.Equal(expectedRequestName, requestMetadata.RequestName); 79Assert.Equal("GET", requestMetadata.MethodType); 80Assert.Equal(expectedRequestRoute, requestMetadata.RequestRoute);
TelemetryCommonExtensionsTests.cs (8)
22Assert.Equal(TelemetryConstants.Unknown, requestMetadata.DependencyName); 34Assert.Equal(TelemetryConstants.Unknown, requestMetadata.RequestRoute); 79Assert.Equal(metadata.DependencyName, extractedMetadata!.DependencyName); 80Assert.Equal(metadata.RequestName, extractedMetadata!.RequestName); 81Assert.Equal(metadata.RequestRoute, extractedMetadata!.RequestRoute); 97Assert.Equal(TelemetryConstants.Unknown, extractedMetadata!.DependencyName); 98Assert.Equal(TelemetryConstants.Unknown, extractedMetadata!.RequestName); 99Assert.Equal(TelemetryConstants.Unknown, extractedMetadata!.RequestRoute);
Microsoft.Extensions.Http.Polly.Tests (1)
PolicyHttpMessageHandlerTest.cs (1)
220Assert.Equal(
Microsoft.Extensions.Http.Resilience.Tests (9)
Hedging\HedgingTests.cs (6)
131Assert.Equal("https://enpoint-1:80/some-path?query", Requests[0]); 153Assert.Equal("The routing strategy did not provide any route URL on the first attempt.", exception.Message); 175Assert.Equal("Something went wrong!", exception.Message); 303Assert.Equal("https://enpoint-1:80/some-path?query", Requests[0]); 304Assert.Equal("https://enpoint-2:80/some-path?query", Requests[1]); 305Assert.Equal("https://enpoint-3:80/some-path?query", Requests[2]);
Hedging\StandardHedgingTests.cs (1)
89Assert.Equal(ClientId, Builder.RoutingStrategyBuilder.Name);
Resilience\PipelineNameHelperTest.cs (1)
14Assert.Equal("client-pipeline", PipelineNameHelper.GetName("client", "pipeline"));
Resilience\RequestMessageSnapshotTests.cs (1)
29Assert.Equal("StreamContent content cannot by cloned.", exception.Message);
Microsoft.Extensions.Localization.RootNamespace.Tests (1)
StringLocalizerOfTRootNamespaceTest.cs (1)
24Assert.Equal("ValFromResource", value);
Microsoft.Extensions.Localization.Tests (13)
ResourceManagerStringLocalizerFactoryTest.cs (6)
87Assert.Equal(typeFactory.BaseName, stringFactory.BaseName); 88Assert.Equal(typeFactory.Assembly!.FullName, stringFactory.Assembly!.FullName); 152Assert.Equal($"{rootNamespace}.{nameof(Model)}", typeFactory.BaseName); 181Assert.Equal($"{rootNamespace}.My.Resources.{nameof(Model)}", typeFactory.BaseName); 203Assert.Equal("Microsoft.Extensions.Localization.Tests.My.Resources." + nameof(ResourceManagerStringLocalizerFactoryTest), factory.BaseName); 283Assert.Equal("Microsoft.Extensions.Localization.Tests.My.Resources.baseName", factory.BaseName);
ResourceManagerStringLocalizerTest.cs (4)
113Assert.Equal("Resources.TestResource", value.SearchedLocation); 140Assert.Equal("ResourceManagerStringLocalizer searched for 'a key!' in 'Resources.TestResource' with culture 'en-US'.", write.State.ToString()); 170Assert.Equal("TestName", value.Value); 208Assert.Equal(expected, exception.Message);
StringLocalizerOfTTest.cs (3)
19Assert.Equal("factory", exception.ParamName); 49Assert.Equal("name", exception.ParamName); 84Assert.Equal("name", exception.ParamName);
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (2)
DependencyInjectionExtensionsTests.cs (2)
136Assert.Equal(TestDependency.DefaultMessage, pool!.Get().ReadMessage()); 151Assert.Equal(TestDependency.DefaultMessage, pool!.Get().ReadMessage());
Microsoft.Extensions.Options.Contextual.Tests (4)
AcceptanceTests.cs (2)
96Assert.Equal("Fahrenheit", (await forecastService.GetForecast(new WeatherForecastContext { Country = "US" }, CancellationToken.None)).First().TemperatureScale); 97Assert.Equal("Celsius", (await forecastService.GetForecast(new WeatherForecastContext { Country = "CA" }, CancellationToken.None)).First().TemperatureScale);
ContextualOptionsServiceCollectionExtensionsTests.cs (2)
38Assert.Equal(string.Empty, loader.Name); 48Assert.Equal(string.Empty, loader.Name);
Microsoft.Extensions.SecretManager.Tools.Tests (11)
InitCommandTest.cs (4)
57Assert.Equal(SecretId, idResolver.Resolve(null, null)); 71Assert.Equal(SecretId, idResolver.Resolve(null, null)); 85Assert.Equal(SecretId, idResolver.Resolve(null, null)); 128Assert.Equal(NewId, idResolver.Resolve(null, null));
MsBuildProjectFinderTest.cs (1)
25Assert.Equal(Path.Combine(files.Root, filename), finder.FindMsBuildProject(null));
SetCommandTest.cs (6)
42Assert.Equal("str value", secretStore["Key1"]); 43Assert.Equal("1234", secretStore["Key2"]); 44Assert.Equal("False", secretStore["Key3"]); 70Assert.Equal("value", secretStore["Key1:nested"]); 71Assert.Equal("1", secretStore["array:0"]); 72Assert.Equal("2", secretStore["array:1"]);
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (7)
DnsServicePublicApiTests.cs (6)
20Assert.Equal(nameof(services), exception.ParamName); 32Assert.Equal(nameof(services), exception.ParamName); 44Assert.Equal(nameof(configureOptions), exception.ParamName); 55Assert.Equal(nameof(services), exception.ParamName); 67Assert.Equal(nameof(services), exception.ParamName); 79Assert.Equal(nameof(configureOptions), exception.ParamName);
DnsSrvServiceEndpointResolverTests.cs (1)
220Assert.Equal("basket", hostNameFeature.HostName);
Microsoft.Extensions.ServiceDiscovery.Tests (7)
ConfigurationServiceEndpointResolverTests.cs (3)
178Assert.Equal("basket", hostNameFeature.HostName); 310Assert.Equal("basket", hostNameFeature.HostName); 332Assert.Equal("basket", hostNameFeature.HostName);
ServiceEndpointResolverTests.cs (4)
30Assert.Equal("No provider which supports the provided service name, 'https://basket', has been configured.", exception.Message); 41Assert.Equal("No service endpoint providers are configured.", exception.Message); 43Assert.Equal("No service endpoint providers are configured.", exception.Message); 64Assert.Equal("No provider which supports the provided service name, 'http://foo', has been configured.", exception.Message);
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (4)
YarpServiceDiscoveryPublicApiTests.cs (3)
21Assert.Equal(nameof(builder), exception.ParamName); 32Assert.Equal(nameof(services), exception.ParamName); 43Assert.Equal(nameof(services), exception.ParamName);
YarpServiceDiscoveryTests.cs (1)
262Assert.Equal(expectedScheme, uri.Scheme);
Microsoft.Extensions.Telemetry.Abstractions.Tests (60)
Http\AbstractionTests.cs (11)
15Assert.Equal("GET", requestMetadata.MethodType); 16Assert.Equal(TelemetryConstants.Unknown, requestMetadata.DependencyName); 17Assert.Equal(TelemetryConstants.Unknown, requestMetadata.RequestName); 18Assert.Equal(TelemetryConstants.Unknown, requestMetadata.RequestRoute); 29Assert.Equal("POST", requestMetadata.MethodType); 30Assert.Equal("MyDependency", requestMetadata.DependencyName); 31Assert.Equal("TestRequest", requestMetadata.RequestName); 32Assert.Equal("/v1/temp/route/{routeId}", requestMetadata.RequestRoute); 38Assert.Equal("Extensions-RequestMetadata", TelemetryConstants.RequestMetadataKey); 39Assert.Equal("unknown", TelemetryConstants.Unknown); 40Assert.Equal("REDACTED", TelemetryConstants.Redacted);
Latency\CheckpointTests.cs (2)
15Assert.Equal(name, c.Name); 45Assert.Equal(name, c.Name);
Latency\MeasureTests.cs (2)
16Assert.Equal(c.Name, name); 45Assert.Equal(c.Name, name);
Latency\TagTests.cs (3)
16Assert.Equal(t.Name, name); 17Assert.Equal(t.Value, value); 26Assert.Equal(c.Name, name);
Logging\LoggerMessageHelperTests.cs (7)
20Assert.Equal(expected, LoggerMessageHelper.Stringify(enumerable)); 26Assert.Equal("null", LoggerMessageHelper.Stringify((IEnumerable<KeyValuePair<string, string>>?)null)); 32Assert.Equal("{\"One\"=\"Un\"}", LoggerMessageHelper.Stringify(d0)); 39Assert.Equal("{\"One\"=\"Un\",\"Two\"=\"Deux\"}", LoggerMessageHelper.Stringify(d1)); 46Assert.Equal("{null=\"Un\",\"Two\"=null}", LoggerMessageHelper.Stringify(d2)); 54Assert.Equal("{\"Zero\"=\"0\",\"One\"=\"1\",\"Two\"=\"2\"}", LoggerMessageHelper.Stringify(d3)); 62Assert.Equal("{\"0\"=\"Zero\",\"1\"=\"One\",\"2\"=\"Two\"}", LoggerMessageHelper.Stringify(d4));
Logging\LoggerMessageStateTests.cs (22)
26Assert.Equal(PropName, lms.TagArray[0].Key); 28Assert.Equal("Name=Value", lms.ToString()); 32Assert.Equal("", lms.ToString()); 38Assert.Equal(PropName, lms.TagArray[0].Key); 40Assert.Equal("Name=Value", lms.ToString()); 45Assert.Equal(PropName, lms.TagArray[0].Key); 49Assert.Equal(PropName, lms.ClassifiedTagArray[0].Name); 52Assert.Equal("Name=Value,Name=<omitted> ([Microsoft.Extensions.Compliance.Testing.FakeTaxonomy:PrivateData,Microsoft.Extensions.Compliance.Testing.FakeTaxonomy:PublicData])", 59Assert.Equal(PropName, lms.TagArray[0].Key); 61Assert.Equal(PropName + "X", lms.TagArray[1].Key); 63Assert.Equal("Name=Value,NameX=Value,Name=<omitted> ([Microsoft.Extensions.Compliance.Testing.FakeTaxonomy:PrivateData,Microsoft.Extensions.Compliance.Testing.FakeTaxonomy:PublicData])", 79Assert.Equal("K1", lms.TagArray[0].Key); 97Assert.Equal(PropertyNamPrefix + "." + PropName, lms.TagArray[0].Key); 102Assert.Equal(PropertyNamPrefix + "." + PropName, lms.TagArray[0].Key); 106Assert.Equal(PropertyNamPrefix + "." + PropName, lms.ClassifiedTagArray[0].Name); 115Assert.Equal(PropName, lms.TagArray[0].Key); 120Assert.Equal(PropName, lms.TagArray[0].Key); 124Assert.Equal(PropName, lms.ClassifiedTagArray[0].Name); 142Assert.Equal(PropName, list[0].Key); 152Assert.Equal(PropName, list[0].Key); 158Assert.Equal(PropName, list[0].Key); 168Assert.Equal(current.Key, list[count].Key);
Logging\TagNameAttributeTests.cs (1)
15Assert.Equal("a", a.Name);
Logging\TagProviderAttributeTests.cs (1)
44Assert.Equal(ProviderMethod, attr.ProviderMethod);
Metrics\MetricAttributeTests.cs (11)
22Assert.Equal(MyMetric, attribute.Name); 35Assert.Equal(MyMetric, attribute.Name); 48Assert.Equal(MyMetric, attribute.Name); 61Assert.Equal(MyMetric, attribute.Name); 74Assert.Equal(MyMetric, attribute.Name); 88Assert.Equal(MyMetric, attribute.Name); 102Assert.Equal(MyMetric, attribute.Name); 116Assert.Equal(MyMetric, attribute.Name); 130Assert.Equal(MyMetric, attribute.Name); 144Assert.Equal(MyMetric, attribute.Name); 153Assert.Equal("testName", attribute.Name);
Microsoft.Extensions.Telemetry.Tests (180)
Http\HttpParserTests.cs (11)
66Assert.Equal(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage, ex.Message); 390Assert.Equal("api/routes/{routeId}/chats/{chatId}", routeSegments.RouteTemplate); 402Assert.Equal("api/routes/{routeId}/chats/{chatId}/messages", routeSegments.RouteTemplate); 420Assert.Equal("api/routes/{routeId}/chats/{chatId}/messages", routeSegments.RouteTemplate); 433Assert.Equal("api/routes/{routeId}/chats/{chatId}/messages", routeSegments.RouteTemplate); 451Assert.Equal(httpRoute, routeSegments.RouteTemplate); 485Assert.Equal(name, parameter.Name); 486Assert.Equal(value, parameter.Value); 493Assert.Equal(content, segment.Content); 495Assert.Equal(paramName, segment.ParamName); 496Assert.Equal(defaultValue, segment.DefaultValue);
Http\HttpRouteFormatterTests.cs (56)
28Assert.Equal($"api/routes/{TelemetryConstants.Redacted}/chats/{TelemetryConstants.Redacted}", formattedPath); 32Assert.Equal($"api/routes/routeId123/chats/chatId123", formattedPath); 41Assert.Equal($"api/routes/{TelemetryConstants.Redacted}/chats/{TelemetryConstants.Redacted}", formattedPath); 45Assert.Equal($"api/routes/routeId123/chats/chatId123", formattedPath); 54Assert.Equal($"api/routes/{TelemetryConstants.Redacted}/chats/{TelemetryConstants.Redacted}", formattedPath); 58Assert.Equal($"api/routes/routeId123/chats/chatId123", formattedPath); 67Assert.Equal($"api/chats:{TelemetryConstants.Redacted}@{TelemetryConstants.Redacted}", formattedPath); 71Assert.Equal($"api/chats:chatId123@routeId123", formattedPath); 80Assert.Equal($"api/chats:{TelemetryConstants.Redacted}@{TelemetryConstants.Redacted}/messages", formattedPath); 84Assert.Equal($"api/chats:chatId123@routeId123/messages", formattedPath); 102Assert.Equal(httpPath.TrimStart('/'), formattedPath); 108Assert.Equal(httpPath.TrimStart('/'), formattedPath); 114Assert.Equal(httpPath.TrimStart('/'), formattedPath); 120Assert.Equal(httpPath.TrimStart('/'), formattedPath); 126Assert.Equal(httpPath.TrimStart('/'), formattedPath); 146Assert.Equal(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage, ex.Message); 169Assert.Equal($"api/routes/Redacted:routeId123/chats/{TelemetryConstants.Redacted}", formattedPath); 174Assert.Equal($"api/routes/Redacted:routeId123/chats/chatId123", formattedPath); 179Assert.Equal($"api/routes/routeId123/chats/chatId123", formattedPath); 184Assert.Equal($"api/routes/{redactedPrefix}routeId123/chats/{redactedPrefix}chatId123", formattedPath); 190Assert.Equal($"api/routes/{redactedPrefix}routeId123/chats/{redactedPrefix}chatId123", formattedPath); 196Assert.Equal($"api/routes/{redactedPrefix}routeId123/chats/{redactedPrefix}chatId123", formattedPath); 205Assert.Equal($"api/routes/{TelemetryConstants.Redacted}/chats/{TelemetryConstants.Redacted}", formattedPath); 209Assert.Equal($"api/routes/routeId123/chats/chatId123", formattedPath); 228Assert.Equal($"api/routes/routeId123/chats/chatId123", formattedPath); 249Assert.Equal($"api/routes/routeId123/chats/{redactedPrefix}chatId123", formattedPath); 265Assert.Equal($"Redacted:routeId123/chats/{TelemetryConstants.Redacted}", formattedPath); 270Assert.Equal($"Redacted:routeId123/chats/chatId123", formattedPath); 275Assert.Equal($"routeId123/chats/chatId123", formattedPath); 285Assert.Equal($"Redacted:routeId123/chats/{TelemetryConstants.Redacted}", formattedPath); 290Assert.Equal($"Redacted:routeId123/chats/chatId123", formattedPath); 295Assert.Equal($"routeId123/chats/chatId123", formattedPath); 305Assert.Equal($"Redacted:routeId123/chats/{TelemetryConstants.Redacted}", formattedPath); 310Assert.Equal($"Redacted:routeId123/chats/chatId123", formattedPath); 315Assert.Equal($"routeId123/chats/chatId123", formattedPath); 332Assert.Equal($"api/routes/{TelemetryConstants.Redacted}/chats/Redacted:chatId123", formattedPath); 337Assert.Equal($"api/routes/routeId123/chats/Redacted:chatId123", formattedPath); 342Assert.Equal($"api/routes/routeId123/chats/chatId123", formattedPath); 359Assert.Equal($"api/routes/{redactedPrefix}routeId123", formattedPath); 364Assert.Equal("api/routes", formattedPath); 380Assert.Equal($"users/list/{redactedPrefix}top10", formattedPath); 386Assert.Equal("users/list", formattedPath); 392Assert.Equal("users", formattedPath); 397Assert.Equal("", formattedPath); 406Assert.Equal($"{redactedPrefix}users", formattedPath); 421Assert.Equal($"api/routes/{redactedPrefix}routeId123", formattedPath); 426Assert.Equal("api/routes", formattedPath); 441Assert.Equal($"api/routes/{redactedPrefix}routeId123", formattedPath); 457Assert.Equal($"api/routes/static_route", formattedPath); 461Assert.Equal($"api/routes/static_route", formattedPath); 468Assert.Equal($"api/routes/{redactedPrefix}routeId123", formattedPath); 472Assert.Equal($"api/routes/{redactedPrefix}routeId123", formattedPath); 476Assert.Equal("api/routes", formattedPath); 480Assert.Equal("api/routes", formattedPath); 488Assert.Equal("", formattedPath); 492Assert.Equal("", formattedPath);
Http\TelemetryCommonExtensionsTests.cs (2)
20Assert.Equal(TelemetryConstants.Unknown, requestMetadata.DependencyName); 32Assert.Equal(TelemetryConstants.Unknown, requestMetadata.RequestRoute);
Latency\Internal\LatencyConsoleExporterTests.cs (4)
86Assert.Equal(_fullResult, result); 108Assert.Equal(_longResult, result); 130Assert.Equal(_truncatedResult, result); 152Assert.Equal(_emptyResult, result);
Latency\Internal\LatencyContextTests.cs (4)
121Assert.Equal(TokenName, measures[0].Name); 147Assert.Equal(TokenName, measures[0].Name); 205Assert.Equal(Tag, tags[0].Value); 282Assert.Equal(TokenName, checkpoints[0].Name);
Latency\Internal\LatencyContextTokenIssuerTests.cs (6)
24Assert.Equal("cb", ct.Name); 28Assert.Equal("mc", mt.Name); 32Assert.Equal("ta", tt.Name); 43Assert.Equal("ta", ct.Name); 47Assert.Equal("cb", mt.Name); 51Assert.Equal("mc", tt.Name);
Latency\Internal\RegistryTests.cs (1)
50Assert.Equal(ok1[i], ok2[i]);
Logging\ExtendedLoggerFactoryTests.cs (29)
229Assert.Equal(activity1String, loggerProvider.LogText[1]); 230Assert.Equal(activity2String, loggerProvider.LogText[4]); 270Assert.Equal("Message1", loggerProvider.LogText[0]); 271Assert.Equal("testKey3:testValue, testKey2:, testKey1:", loggerProvider.LogText[2]); 299Assert.Equal("Message1", loggerProvider.LogText[0]); 300Assert.Equal("testKey1:, testKey2:, testKey3:testValue, testKey4:DummyToString", loggerProvider.LogText[2]); 325Assert.Equal("Message1", loggerProvider.LogText[0]); 326Assert.Equal(traceIdActivityLogString, loggerProvider.LogText[1]); 327Assert.Equal("testTagKey1:testTagValue", loggerProvider.LogText[2]); 328Assert.Equal("testBaggageKey1:testBaggageValue", loggerProvider.LogText[3]); 383Assert.Equal("Message1", loggerProvider.LogText[0]); 384Assert.Equal("MyTagKey1:1", loggerProvider.LogText[2]); 385Assert.Equal("MyBaggageKey1:1", loggerProvider.LogText[3]); 387Assert.Equal("Message2", loggerProvider.LogText[4]); 388Assert.Equal("MyTagKey1:1, MyTagKey2:2", loggerProvider.LogText[6]); 389Assert.Equal("MyBaggageKey2:2, MyBaggageKey1:1", loggerProvider.LogText[7]); 390Assert.Equal("Scope1", loggerProvider.LogText[8]); 392Assert.Equal("Message3", loggerProvider.LogText[9]); 393Assert.Equal("MyTagKey1:1, MyTagKey2:2, MyTagKey3:4", loggerProvider.LogText[11]); 394Assert.Equal("MyBaggageKey3:4, MyBaggageKey2:2, MyBaggageKey1:1", loggerProvider.LogText[12]); 395Assert.Equal("Scope1", loggerProvider.LogText[13]); 396Assert.Equal("Scope2", loggerProvider.LogText[14]); 397Assert.Equal("Scope3", loggerProvider.LogText[15]); 399Assert.Equal("Message4", loggerProvider.LogText[16]); 400Assert.Equal("MyTagKey1:1, MyTagKey2:2, MyTagKey3:4", loggerProvider.LogText[18]); 401Assert.Equal("MyBaggageKey3:4, MyBaggageKey2:2, MyBaggageKey1:1", loggerProvider.LogText[19]); 402Assert.Equal("Scope1", loggerProvider.LogText[20]); 425Assert.Equal("Message1", loggerProvider.LogText[0]); 426Assert.Equal(traceIdActivityLogString, loggerProvider.LogText[1]);
Logging\ExtendedLoggerTests.cs (58)
72Assert.Equal(Category, sink.Category); 77Assert.Equal(Category, snap[0].Category); 80Assert.Equal("MSG0", snap[0].Message); 84Assert.Equal("SEV1", snap[0].GetStructuredStateValue("SEK1")); 85Assert.Equal("EV1", snap[0].GetStructuredStateValue("EK1")); 93Assert.Equal(Category, snap[1].Category); 96Assert.Equal("MSG2", snap[1].Message); 97Assert.Equal("PV2", snap[1].GetStructuredStateValue("PK2")); 101Assert.Equal("REDACTED<PV3>", snap[1].GetStructuredStateValue("PK3")); 105Assert.Equal("PV3", snap[1].GetStructuredStateValue("PK3")); 112Assert.Equal("SEV1", snap[1].GetStructuredStateValue("SEK1")); 113Assert.Equal("EV1", snap[1].GetStructuredStateValue("EK1")); 157Assert.Equal(Category, sink.Category); 162Assert.Equal(Category, snap[0].Category); 165Assert.Equal("MSG0", snap[0].Message); 166Assert.Equal("EV1", snap[0].GetStructuredStateValue("EK1")); 167Assert.Equal("EV2", snap[0].GetStructuredStateValue("EK2")); 169Assert.Equal(Category, snap[1].Category); 172Assert.Equal("MSG2", snap[1].Message); 173Assert.Equal("PV2", snap[1].GetStructuredStateValue("PK2")); 174Assert.Equal("EV1", snap[1].GetStructuredStateValue("EK1")); 175Assert.Equal("EV2", snap[1].GetStructuredStateValue("EK2")); 222Assert.Equal(Category, sink.Category); 227Assert.Equal(Category, snap[0].Category); 230Assert.Equal("MSG0", snap[0].Message); 231Assert.Equal("EV1", snap[0].GetStructuredStateValue("EK1")); 232Assert.Equal("SEV1", snap[0].GetStructuredStateValue("SEK1")); 234Assert.Equal(Category, snap[1].Category); 237Assert.Equal("MSG0b", snap[1].Message); 238Assert.Equal("EV1", snap[1].GetStructuredStateValue("EK1")); 239Assert.Equal("SEV1", snap[1].GetStructuredStateValue("SEK1")); 241Assert.Equal(Category, snap[2].Category); 244Assert.Equal("MSG2", snap[2].Message); 245Assert.Equal("EV1", snap[2].GetStructuredStateValue("EK1")); 246Assert.Equal("SEV1", snap[2].GetStructuredStateValue("SEK1")); 248Assert.Equal(Category, snap[3].Category); 251Assert.Equal("MSG2b", snap[3].Message); 252Assert.Equal("EV1", snap[3].GetStructuredStateValue("EK1")); 253Assert.Equal("SEV1", snap[3].GetStructuredStateValue("SEK1")); 282Assert.Equal(Category, sink.Category); 287Assert.Equal(Category, snap[0].Category); 290Assert.Equal("MSG0", snap[0].Message); 291Assert.Equal("V1", snap[0].GetStructuredStateValue("K1")); 351Assert.Equal(Category, sink.Category); 356Assert.Equal(Category, snap[0].Category); 359Assert.Equal("MSG0", snap[0].Message); 360Assert.Equal("PAYLOAD", snap[0].GetStructuredStateValue("{OriginalFormat}")); 460Assert.Equal(Category, sink.Category); 465Assert.Equal(Category, snap[0].Category); 468Assert.Equal("MSG0", snap[0].Message); 470Assert.Equal(Category, snap[1].Category); 473Assert.Equal("MSG0b", snap[1].Message); 475Assert.Equal(Category, snap[2].Category); 478Assert.Equal("MSG2", snap[2].Message); 480Assert.Equal(Category, snap[3].Category); 483Assert.Equal("MSG2b", snap[3].Message); 486Assert.Equal("System.AggregateException", exceptionType); 497Assert.Equal("EM4 (EM1) (EM2) (EM3)", exceptionMessage);
Logging\JustInTimeRedactorTests.cs (8)
43Assert.Equal($"{ShortRedactorPrefix}<{redactorInput}>", r.ToString()); 47Assert.Equal($"{ShortRedactorPrefix}<{redactorInput}>", d.Slice(0, charsWritten).ToString()); 55Assert.Equal($"{ShortRedactorPrefix}<{redactorInput}>", r.ToString()); 60Assert.Equal($"{ShortRedactorPrefix}<{redactorInput}>", r.ToString()); 67Assert.Equal($"{longRedactorPrefix}<{redactorInput}>", r.ToString()); 71Assert.Equal($"{longRedactorPrefix}<{redactorInput}>", d.Slice(0, charsWritten).ToString()); 76Assert.Equal($"{longRedactorPrefix}<{redactorInput}>", r.ToString()); 81Assert.Equal($"{longRedactorPrefix}<{redactorInput}>", r.ToString());
Logging\SerialExtendedLoggerTests.cs (1)
59Assert.Equal(Category, sink.Category);
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
FakeTimeProviderTests.cs (1)
220Assert.Equal("2022-01-02T03:04:05.006", timeProvider.ToString());
Microsoft.Extensions.WebEncoders.Tests (7)
EncoderServiceCollectionExtensionsTests.cs (6)
49Assert.Equal("a&#x62;c&#x64;e", htmlEncoder.Encode("abcde")); 53Assert.Equal(@"a\u0062c\u0064e", javaScriptEncoder.Encode("abcde")); 57Assert.Equal("a%62c%64e", urlEncoder.Encode("abcde")); 81Assert.Equal("HtmlEncode[[abcde]]", htmlEncoder.Encode("abcde")); 84Assert.Equal("JavaScriptEncode[[abcde]]", javaScriptEncoder.Encode("abcde")); 87Assert.Equal("a%62c%64e", urlEncoder.Encode("abcde"));
HtmlTestEncoderTest.cs (1)
23Assert.Equal(expectedOutput, output);
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
GeneratorTests.cs (2)
87Assert.Equal(golden, generated); 133Assert.Equal("AUDREPGEN001", diag.Id);
Microsoft.Gen.ContextualOptions.Unit.Tests (7)
EmitterTests.cs (1)
151Assert.Equal(golden, result);
ParserTests.cs (2)
33Assert.Equal("TestClasses.ClassWithUnusableProperties", result.Single().HintName); 50Assert.Equal(".NamespacelessRecord", result.Single().HintName);
SyntaxContextReceiverTests.cs (4)
36Assert.Equal(declaration.Key.Name, declaration.Value.Single().Identifier.Text); 37Assert.Equal("TestClasses", declaration.Key.ContainingNamespace.ToString()); 73Assert.Equal("TestClasses", declaration.Key.ContainingNamespace.ToString()); 75Assert.All(declaration.Value.Select(dec => dec.Identifier.Text), className => Assert.Equal("Class2", className));
Microsoft.Gen.Logging.Generated.Tests (224)
DataClassificationTests.cs (1)
23Assert.Equal("M2", collector.LatestRecord.Message);
LoggerFromMemberTests.cs (12)
25Assert.Equal("M0 arg0", collector.LatestRecord.Message); 42Assert.Equal("M0 arg0", collector.LatestRecord.Message); 63Assert.Equal("M0 arg0", collector.LatestRecord.Message); 80Assert.Equal("M0 arg0", collector.LatestRecord.Message); 101Assert.Equal("M0 arg0", collector.LatestRecord.Message); 115Assert.Equal("M0 arg0", collector.LatestRecord.Message); 131Assert.Equal("M1 arg0", logger.Collector.LatestRecord.Message); 141Assert.Equal("M1 arg1", logger.Collector.LatestRecord.Message); 144Assert.Equal("M0 arg1", logger2.Collector.LatestRecord.Message); 158Assert.Equal("M0 arg0", collector.LatestRecord.Message); 175Assert.Equal("M0 arg0", collector.LatestRecord.Message); 180Assert.Equal("M1 arg0", collector.LatestRecord.Message);
LoggerMessageAttributeTests.cs (13)
22Assert.Equal("M0 arg0", collector.LatestRecord.Message); 35Assert.Equal("M0 arg0", collector.LatestRecord.Message); 48Assert.Equal("M1 ---- arg1", collector.LatestRecord.Message); 54Assert.Equal("M2 ---- arg1", collector.LatestRecord.Message); 67Assert.Equal("M8 ------", collector.LatestRecord.Message); 73Assert.Equal("M9 ----", collector.LatestRecord.Message); 79Assert.Equal("M10 ------------------------", collector.LatestRecord.Message); 92Assert.Equal("M3 ---- ---- ---- ----", collector.LatestRecord.Message); 98Assert.Equal("M4 ---- ---- ---- ------------------------", collector.LatestRecord.Message); 111Assert.Equal("M5 ---- ---- ---- ---- ---- ---- ---- ---- ++++ ++++ +++++", collector.LatestRecord.Message); 139Assert.Equal("M1 ----", collector.LatestRecord.Message); 145Assert.Equal("M2 ---- ---- ----", collector.LatestRecord.Message); 157Assert.Equal(string.Empty, collector.LatestRecord.Message);
LogMethodTests.cs (114)
27Assert.Equal("Could not open socket to `microsoft.com`", collector.LatestRecord.Message); 34Assert.Equal("Could not open socket to `microsoft.com`", collector.LatestRecord.Message); 41Assert.Equal("Could not open socket to `microsoft.com`", collector.LatestRecord.Message); 54Assert.Equal("Could not open socket to `microsoft.com`", collector.LatestRecord.Message); 90Assert.Equal("Hello World", collector.LatestRecord.Message); 92Assert.Equal("Hello", collector.LatestRecord.StructuredState!.GetValue("p1")); 93Assert.Equal("World", collector.LatestRecord.StructuredState!.GetValue("p2")); 98Assert.Equal("Hello World", collector.LatestRecord.Message); 100Assert.Equal("Hello", collector.LatestRecord.StructuredState!.GetValue("p1")); 101Assert.Equal("World", collector.LatestRecord.StructuredState!.GetValue("p2")); 113Assert.Equal("M1", collector.LatestRecord.Message); 119Assert.Equal("M2 arg1", collector.LatestRecord.Message); 125Assert.Equal("M3 arg1 2", collector.LatestRecord.Message); 130Assert.Equal("A", collector.LatestRecord.Exception!.Message); 131Assert.Equal("M4", collector.LatestRecord.Message); 136Assert.Equal("A", collector.LatestRecord.Exception!.Message); 137Assert.Equal("M5 System.InvalidOperationException: B", collector.LatestRecord.Message); 142Assert.Equal("A", collector.LatestRecord.Exception!.Message); 143Assert.Equal("M6 2", collector.LatestRecord.Message); 148Assert.Equal("B", collector.LatestRecord.Exception!.Message); 149Assert.Equal("M7 1", collector.LatestRecord.Message); 154Assert.Equal("M81234567", collector.LatestRecord.Message); 159Assert.Equal("M9 1 2 3 4 5 6 7", collector.LatestRecord.Message); 164Assert.Equal("M101", collector.LatestRecord.Message); 224Assert.Equal("M0 Zero", collector.LatestRecord.Message); 232Assert.Equal("M1 One", collector.LatestRecord.Message); 240Assert.Equal(string.Empty, collector.LatestRecord.Message); 248Assert.Equal(string.Empty, collector.LatestRecord.Message); 256Assert.Equal("M4 Four", collector.LatestRecord.Message); 264Assert.Equal("M5 Five", collector.LatestRecord.Message); 272Assert.Equal(string.Empty, collector.LatestRecord.Message); 283Assert.Equal(string.Empty, logRecord.Message); 286Assert.Equal("M7", logRecord.Id.Name); 294Assert.Equal("M8", logRecord.Message); 297Assert.Equal("EN1", logRecord.Id.Name); 309Assert.Equal(string.Empty, collector.LatestRecord.Message); 316Assert.Equal(string.Empty, collector.LatestRecord.Message); 323Assert.Equal(string.Empty, collector.LatestRecord.Message); 330Assert.Equal("\"Hello\" World", collector.LatestRecord.Message); 337Assert.Equal("\"p\" -> \"q\"", collector.LatestRecord.Message); 345Assert.Equal("\"\n\r\\", collector.LatestRecord.Message); 362Assert.Equal("M0", collector.LatestRecord.Message); 369Assert.Equal("M1 Foo", collector.LatestRecord.Message); 379Assert.Equal(string.Empty, logRecord.Message); 383Assert.Equal("p1", logRecord.StructuredState![0].Key); 384Assert.Equal("param", logRecord.StructuredState[0].Value); 404Assert.Equal("M2", collector.LatestRecord.Message); 411Assert.Equal("M3", collector.LatestRecord.Message); 418Assert.Equal("M4", collector.LatestRecord.Message); 425Assert.Equal("M5", collector.LatestRecord.Message); 432Assert.Equal("M6", collector.LatestRecord.Message); 439Assert.Equal("M7", collector.LatestRecord.Message); 446Assert.Equal("M8", collector.LatestRecord.Message); 453Assert.Equal("M9", collector.LatestRecord.Message); 460Assert.Equal("M10 Warning", collector.LatestRecord.Message); 482Assert.Equal("No params here...", collector.LatestRecord.Message); 489Assert.Equal("No params here as well...", collector.LatestRecord.Message); 496Assert.Equal("No params here as well...", collector.LatestRecord.Message); 510Assert.Equal("M2 --- --- -----", collector.LatestRecord.Message); 526Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 527Assert.Equal("M0 System.ArgumentException: Bar", collector.LatestRecord.Message); 533Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 534Assert.Equal("M1 System.ArgumentException: Bar", collector.LatestRecord.Message); 540Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 541Assert.Equal("M2 One: System.ArgumentException: Foo", collector.LatestRecord.Message); 550Assert.Equal(exception.Message, collector.LatestRecord.Exception!.Message); 552Assert.Equal(string.Empty, collector.LatestRecord.Message); 565Assert.Equal("M0", collector.LatestRecord.Message); 568Assert.Equal("CustomEventName", collector.LatestRecord.Id.Name); 576Assert.Equal(string.Empty, logRecord.Message); 579Assert.Equal("M1_Event", logRecord.Id.Name); 591Assert.Equal("M8", collector.LatestRecord.Message); 598Assert.Equal("M9", collector.LatestRecord.Message); 605Assert.Equal("M10", collector.LatestRecord.Message); 612Assert.Equal("M11", collector.LatestRecord.Message); 619Assert.Equal("M12", collector.LatestRecord.Message); 633Assert.Equal("M0 0", collector.LatestRecord.Message); 641Assert.Equal("M1 42 42", collector.LatestRecord.Message); 649Assert.Equal("M2 42 43 44 45 46 47 48", collector.LatestRecord.Message); 663Assert.Equal("M3 43 42", collector.LatestRecord.Message); 679Assert.Equal("M0", collector.LatestRecord.Message); 693Assert.Equal("M0", collector.LatestRecord.Message); 739Assert.Equal("M0 Test", record.Message); 754Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("@myevent2")); 755Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("otherevent")); 756Assert.Equal("UseAtSymbol3, 42 42", collector.LatestRecord.Message); 760Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("@myevent3")); 761Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("otherevent")); 762Assert.Equal("UseAtSymbol4 with error, 42 42", collector.LatestRecord.Message); 767Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("event.class")); 771Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("class")); 775Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("class")); 776Assert.Equal("M6 class 42", collector.LatestRecord.Message); 780Assert.Equal("42", collector.LatestRecord.StructuredState!.GetValue("@param")); 781Assert.Equal("M7 param 42", collector.LatestRecord.Message); 802Assert.Equal("M0 (null)", collector.LatestRecord.Message); 805Assert.Equal("M1 (null)", collector.LatestRecord.Message); 808Assert.Equal("M3 (null)", collector.LatestRecord.Message); 811Assert.Equal("M4 (null) (null) (null) (null) (null) (null) (null) (null) (null)", collector.LatestRecord.Message); 814Assert.Equal("M5 (null) (null) (null) (null) (null) (null) (null) (null) (null)", collector.LatestRecord.Message); 833Assert.Equal(dt.ToString(CultureInfo.InvariantCulture), collector.LatestRecord.StructuredState!.GetValue("p0")); 834Assert.Equal("M0 " + dt.ToString(CultureInfo.InvariantCulture), collector.LatestRecord.Message); 857Assert.Equal("[\"1\",\"2\",\"3\"]", collector.LatestRecord.StructuredState!.GetValue("p1")); 858Assert.Equal("[\"4\",\"5\",\"6\"]", collector.LatestRecord.StructuredState!.GetValue("p2")); 859Assert.Equal("{\"Seven\"=\"7\",\"Eight\"=\"8\",\"Nine\"=\"9\"}", collector.LatestRecord.StructuredState!.GetValue("p3")); 875Assert.Equal("[\"1\",\"2\",\"3\"]", collector.LatestRecord.StructuredState!.GetValue("p1")); 885Assert.Equal("[\"1\",\"2\",\"3\"]", collector.LatestRecord.StructuredState!.GetValue("class")); 890Assert.Equal("[\"1\",\"2\",\"3\"]", collector.LatestRecord.StructuredState!.GetValue("p1")); 897Assert.Equal("[\"1\",\"2\",\"3\"]", collector.LatestRecord.StructuredState!.GetValue("p1")); 913Assert.Equal("Formatted!", collector.LatestRecord.StructuredState!.GetValue("p1")); 918Assert.Equal("Formatted!", collector.LatestRecord.StructuredState!.GetValue("p1.P1")); 923Assert.Equal("Converted!", collector.LatestRecord.StructuredState!.GetValue("p1")); 932Assert.Equal(kvp.Value, rol.GetValue(kvp.Key)); 948Assert.Equal(kvp.Value, rol!.GetValue(kvp.Key));
LogPropertiesRedactionTests.cs (6)
31Assert.Equal("LogProperties with redaction: ----", collector.LatestRecord.Message); 57Assert.Equal(string.Empty, collector.LatestRecord.Message); 80Assert.Equal("No template params", collector.LatestRecord.Message); 111Assert.Equal(string.Empty, collector.LatestRecord.Message); 140Assert.Equal("Only ----------- as param", collector.LatestRecord.Message); 166Assert.Equal(string.Empty, collector.LatestRecord.Message);
LogPropertiesTests.cs (48)
46Assert.Equal("[\"1\",\"2\",\"3\"]", ss["myProps.P5"]); 47Assert.Equal("[\"4\",\"5\",\"6\"]", ss["myProps.P6"]); 48Assert.Equal("{\"Seven\"=\"7\",\"Eight\"=\"8\",\"Nine\"=\"9\"}", ss["myProps.P7"]); 64Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state!.GetValue("P0")); 65Assert.Equal(props.P1, state!.GetValue("P1")); 81Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state!.GetValue("P0")); 82Assert.Equal(props.P1, state!.GetValue("P1")); 125Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state!.GetValue("p.P0")); 126Assert.Equal(props.P1.ToString(CultureInfo.InvariantCulture), state!.GetValue("p.P1")); 127Assert.Equal(props.P2.ToString(null, CultureInfo.InvariantCulture), state!.GetValue("p.P2")); 128Assert.Equal(props.P3.ToString(), state!.GetValue("p.P3")); 129Assert.Equal(props.P4.ToString(), state!.GetValue("p.P4")); 130Assert.Equal(props.P5.ToString(), state!.GetValue("p.P5")); 131Assert.Equal(props.P6.ToString(), state!.GetValue("p.P6")); 132Assert.Equal(props.P7.ToString(), state!.GetValue("p.P7")); 133Assert.Equal(props.P8.ToString(), state!.GetValue("p.P8")); 134Assert.Equal(props.P9.ToString(), state!.GetValue("p.P9")); 135Assert.Equal(props.P10.ToString(CultureInfo.InvariantCulture), state!.GetValue("p.P10")); 136Assert.Equal(props.P11.ToString(CultureInfo.InvariantCulture), state!.GetValue("p.P11")); 137Assert.Equal(props.P12.ToString(), state!.GetValue("p.P12")); 138Assert.Equal(props.P13.ToString(), state!.GetValue("p.P13")); 139Assert.Equal(props.P14.ToString(), state!.GetValue("p.P14")); 140Assert.Equal(props.P15.ToString(), state!.GetValue("p.P15")); 141Assert.Equal(props.P16.ToString(), state!.GetValue("p.P16")); 142Assert.Equal(props.P17.ToString(), state!.GetValue("p.P17")); 143Assert.Equal(props.P18.ToString(), state!.GetValue("p.P18")); 146Assert.Equal(props.P19.ToString(CultureInfo.InvariantCulture), state!.GetValue("p.P19")); 147Assert.Equal(props.P20.ToString(CultureInfo.InvariantCulture), state!.GetValue("p.P20")); 180Assert.Equal(props.P2.ToString(null, CultureInfo.InvariantCulture), ss["p.P2"]); 182Assert.Equal("I refuse to be formatted", ss["p.P4"]); 185Assert.Equal("-", ss["p.P7"]); 187Assert.Equal("------------------------", ss["p.P9"]); 188Assert.Equal("null", ss["p.P10"]); 196Assert.Equal(props.P2.ToString(null, CultureInfo.InvariantCulture), ss["p.P2"]); 197Assert.Equal("I refuse to be formatted", ss["p.P4"]); 198Assert.Equal("-", ss["p.P7"]); 199Assert.Equal("------------------------", ss["p.P9"]); 303Assert.Equal($"Both {StringProperty} and {classToLog} as params", _logger.Collector.LatestRecord.Message); 324Assert.Equal($"Testing nullable property within class here...", _logger.Collector.LatestRecord.Message); 344Assert.Equal($"Testing nullable property within class here...", _logger.Collector.LatestRecord.Message); 366Assert.Equal($"LogProperties: {StringParamValue}", latestRecord.Message); 390Assert.Equal("Testing non-nullable struct here...", latestRecord.Message); 420Assert.Equal("Testing nullable struct here...", latestRecord.Message); 449Assert.Equal("Testing explicit nullable struct here...", latestRecord.Message); 475Assert.Equal(string.Empty, latestRecord.Message); 502Assert.Equal("Testing interface-typed argument here...", latestRecord.Message); 551Assert.Equal($"Struct is: {recordToLog}", latestRecord.Message); 577Assert.Equal($"Readonly struct is: {recordToLog}", latestRecord.Message);
PrimaryConstructorTests.cs (4)
24Assert.Equal("Test.", collector.LatestRecord.Message); 38Assert.Equal("Test.", collector.LatestRecord.Message); 52Assert.Equal("Test.", collector.LatestRecord.Message); 66Assert.Equal("Test.", collector.LatestRecord.Message);
TagNameTests.cs (1)
33Assert.Equal("0", logger.Collector.LatestRecord.Message);
TagProviderTests.cs (25)
35Assert.Equal($"Custom provided properties for {obj}.", latestRecord.Message); 58Assert.Equal($"LogProperties with provider: {StringParamValue}, {classToLog}", latestRecord.Message); 85Assert.Equal(string.Empty, latestRecord.Message); 108Assert.Equal(string.Empty, latestRecord.Message); 129Assert.Equal(string.Empty, latestRecord.Message); 140Assert.Equal(string.Empty, latestRecord.Message); 164Assert.Equal(string.Empty, latestRecord.Message); 168Assert.Equal("P0", state[0].Key); 169Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state[0].Value); 170Assert.Equal("Custom_property_name", state[1].Key); 171Assert.Equal(props.P1, state[1].Value); 190Assert.Equal(string.Empty, latestRecord.Message); 194Assert.Equal("P0", state[0].Key); 195Assert.Equal(props.P0.ToString(CultureInfo.InvariantCulture), state[0].Value); 196Assert.Equal("Custom_property_name", state[1].Key); 197Assert.Equal(props.P1, state[1].Value); 209Assert.Equal("Custom provided properties for (null).", latestRecord.Message); 228Assert.Equal("Custom provided properties for (null).", latestRecord.Message); 248Assert.Equal($"Custom provided properties for {classToLog}.", latestRecord.Message); 270Assert.Equal($"Custom provided properties for struct.", latestRecord.Message); 291Assert.Equal($"Custom provided properties for interface.", latestRecord.Message); 332Assert.Equal("No params.", latestRecord.Message); 359Assert.Equal($"Custom provided properties for both complex params and {StringParamValue}.", latestRecord.Message); 397Assert.Equal($"Custom provided properties for both complex params and {StringParamValue}.", latestRecord.Message); 422Assert.Equal($"Custom provided properties for both complex params and {StringParamValue}.", latestRecord.Message);
Microsoft.Gen.Logging.Unit.Tests (12)
AttributeParserTests.cs (4)
142Assert.Equal(DiagDescriptors.MissingLoggerParameter.Id, diagnostics[0].Id); 170Assert.Equal(DiagDescriptors.LoggingMethodShouldBeStatic.Id, diagnostics[0].Id); 192Assert.Equal(DiagDescriptors.CantUseDataClassificationWithLogPropertiesOrTagProvider.Id, diagnostics[0].Id); 222Assert.Equal(DiagDescriptors.CantUseDataClassificationWithLogPropertiesOrTagProvider.Id, diagnostics[0].Id);
EmitterUtilsTests.cs (3)
22Assert.Equal("\"" + expected + "\"", Emitter.EscapeMessageString(input)); 34Assert.Equal(expected, Emitter.EscapeMessageStringForXmlDocumentation(input)); 64Assert.Equal(ParamName, Emitter.GetLoggerMethodLogLevel(lm));
LoggingMethodParameterTests.cs (4)
64Assert.Equal(lp.ParameterName, lp.ParameterNameWithAtIfNeeded); 71Assert.Equal(lp.Type, lp.PotentiallyNullableType); 75Assert.Equal(lp.Type, lp.PotentiallyNullableType); 83Assert.Equal(lp.Type, lp.PotentiallyNullableType);
LoggingMethodTests.cs (1)
18Assert.Equal("_logger", instance.LoggerMember);
Microsoft.Gen.Metrics.Unit.Tests (32)
EmitterTests.cs (2)
50Assert.Equal(goldenCache, result); 53Assert.Equal(goldenMetrics, result);
ParserTests.cs (19)
30Assert.Equal(DiagDescriptors.ErrorInvalidMethodName.Id, d[0].Id); 46Assert.Equal(DiagDescriptors.ErrorInvalidMethodReturnTypeLocation.Id, d[0].Id); 62Assert.Equal(DiagDescriptors.ErrorInvalidMethodReturnTypeArity.Id, d[0].Id); 83Assert.Equal(DiagDescriptors.ErrorInvalidMethodReturnType.Id, d[0].Id); 110Assert.Equal(DiagDescriptors.ErrorInvalidAttributeGenericType.Id, d[0].Id); 124Assert.Equal(DiagDescriptors.ErrorInvalidTagNames.Id, d[0].Id); 138Assert.Equal(DiagDescriptors.ErrorInvalidTagNames.Id, d[0].Id); 178Assert.Equal(DiagDescriptors.ErrorNotPartialMethod.Id, d[0].Id); 192Assert.Equal(DiagDescriptors.ErrorNotStaticMethod.Id, d[0].Id); 206Assert.Equal(DiagDescriptors.ErrorInvalidMetricName.Id, d[0].Id); 220Assert.Equal(DiagDescriptors.ErrorInvalidMetricName.Id, d[0].Id); 234Assert.Equal(DiagDescriptors.ErrorMethodIsGeneric.Id, d[0].Id); 248Assert.Equal(DiagDescriptors.ErrorInvalidParameterName.Id, d[0].Id); 357Assert.Equal(DiagDescriptors.ErrorMetricNameReuse.Id, d[0].Id); 405Assert.Equal(DiagDescriptors.ErrorMissingMeter.Id, diag.Id); 419Assert.Equal(DiagDescriptors.ErrorMissingMeter.Id, diag.Id); 434Assert.Equal(DiagDescriptors.ErrorMethodHasBody.Id, d[0].Id); 616Assert.Equal(DiagDescriptors.ErrorGaugeNotSupported.Id, d[0].Id); 699Assert.Equal(DiagDescriptors.ErrorXmlNotLoadedCorrectly.Id, d[0].Id);
ParserTests.Diagnostics.cs (11)
34Assert.Equal(DiagDescriptors.ErrorTagTypeCycleDetected.Id, diag.Id); 64Assert.Equal(DiagDescriptors.ErrorTagTypeCycleDetected.Id, diag.Id); 95Assert.Equal(DiagDescriptors.ErrorTagTypeCycleDetected.Id, diag.Id); 125Assert.Equal(DiagDescriptors.ErrorGaugeNotSupported.Id, d[0].Id); 191Assert.Equal(DiagDescriptors.ErrorGaugeNotSupported.Id, d[0].Id); 216Assert.Equal(DiagDescriptors.ErrorDuplicateTagName.Id, d[0].Id); 243Assert.Equal(DiagDescriptors.ErrorDuplicateTagName.Id, d[0].Id); 274Assert.Equal(DiagDescriptors.ErrorDuplicateTagName.Id, d[0].Id); 305Assert.Equal(DiagDescriptors.ErrorDuplicateTagName.Id, d[0].Id); 359Assert.Equal(DiagDescriptors.ErrorInvalidTagNameType.Id, d[0].Id); 385Assert.Equal(DiagDescriptors.ErrorTooManyTagNames.Id, d[0].Id);
Microsoft.Gen.MetricsReports.Unit.Tests (4)
EmitterTests.cs (3)
95Assert.Equal(string.Empty, emitter.GenerateReport(null!, CancellationToken.None)); 102Assert.Equal(string.Empty, emitter.GenerateReport(Array.Empty<ReportedMetricClass>(), CancellationToken.None)); 183Assert.Equal(expected, json);
GeneratorTests.cs (1)
71Assert.Equal(golden, generated);
Microsoft.JSInterop.Tests (70)
DotNetObjectReferenceTest.cs (1)
60Assert.Equal(expected, ex.Message);
Infrastructure\ByteArrayJsonConverterTest.cs (9)
26Assert.Equal("JSON serialization is attempting to deserialize an unexpected byte array.", ex.Message); 39Assert.Equal("Unexpected JSON Token EndObject, expected 'PropertyName'.", ex.Message); 52Assert.Equal("Unexpected JSON Property foo.", ex.Message); 92Assert.Equal("JSON serialization is attempting to deserialize an unexpected byte array.", ex.Message); 124Assert.Equal("Unexpected JSON Token PropertyName, expected 'EndObject'.", ex.Message); 140Assert.Equal("Unexpected JSON Token String, expected 'Number'.", ex.Message); 156Assert.Equal("Unexpected number, expected 32-bit integer.", ex.Message); 172Assert.Equal("Byte array -5 not found.", ex.Message); 227Assert.Equal($"{{\"__byte[]\":{i + 1}}}", json);
Infrastructure\DotNetDispatcherTest.cs (25)
47Assert.Equal($"There is no loaded assembly with the name '{assemblyName}'.", ex.Message); 69Assert.Equal($"The assembly '{thisAssemblyName}' does not contain a public invokable method with [JSInvokableAttribute(\"{methodIdentifier}\")].", ex.Message); 94Assert.Equal("Test", result.StringVal); 107Assert.Equal("InvokableMethodWithoutCustomIdentifier", result.StringVal); 136Assert.Equal("ANOTHER STRING", resultDto1.StringVal); 146Assert.Equal("MY STRING", resultDto2.StringVal); 171Assert.Equal($"In call to '{method}', parameter of type '{nameof(TestDTO)}' at index 3 must be declared as type 'DotNetObjectRef<TestDTO>' to receive the incoming value.", ex.Message); 279Assert.Equal(testDTO.StringVal, result.StringVal); 297Assert.Equal(expected, ex.Message); 461Assert.Equal("[\"You passed myvalue\",{\"__dotNetObject\":3}]", resultJson); 464Assert.Equal("MY STRING", resultDto.StringVal); 480Assert.Equal("\"hello world\"", resultJson); 496Assert.Equal("\"hello world\"", resultJson); 556Assert.Equal("The call to 'InvocableStaticWithParams' expects '3' parameters, but received '2'.", ex.Message); 579Assert.Equal("Unexpected JSON token Number. Ensure that the call to `InvocableStaticWithParams' is supplied with exactly '3' parameters.", ex.Message); 607Assert.Equal(callId, jsRuntime.LastCompletionCallId); 612Assert.Equal("STRING VIA JSON", result.SomeDTO.StringVal); 617Assert.Equal("MY STRING", resultDto2.StringVal); 647Assert.Equal(callId, jsRuntime.LastCompletionCallId); 671Assert.Equal(callId, jsRuntime.LastCompletionCallId); 689Assert.Equal(callId, jsRuntime.LastCompletionCallId); 711Assert.Equal(callId, jsRuntime.LastCompletionCallId); 731Assert.Equal(callId, jsRuntime.LastCompletionCallId); 747Assert.Equal(callId, jsRuntime.LastCompletionCallId); 834Assert.Equal($"In call to '{method}', parameter of type '{nameof(TestDTO)}' at index 2 must be declared as type 'DotNetObjectRef<TestDTO>' to receive the incoming value.", ex.Message);
Infrastructure\DotNetObjectReferenceJsonConverterTest.cs (4)
24Assert.Equal("Required property __dotNetObject not found.", ex.Message); 38Assert.Equal("Unexpected JSON property foo.", ex.Message); 141Assert.Equal($"{{\"__dotNetObject\":{dotNetObjectRef.ObjectId}}}", json1); 142Assert.Equal(json1, json2);
Infrastructure\DotNetStreamReferenceJsonConverterTest.cs (2)
40Assert.Equal("{\"__dotNetStream\":1}", json); 53Assert.Equal($"{{\"__dotNetStream\":{i}}}", json);
Infrastructure\JSObjectReferenceJsonConverterTest.cs (3)
28Assert.Equal("Required property __jsObjectId not found.", ex.Message); 39Assert.Equal("Unexpected JSON property foo.", ex.Message); 88Assert.Equal($"{{\"__jsObjectId\":{jsObjectRef.Id}}}", json);
Infrastructure\JSStreamReferenceJsonConverterTest.cs (4)
28Assert.Equal("Required property __jsObjectId not found.", ex.Message); 39Assert.Equal("Unexpected JSON property foo.", ex.Message); 73Assert.Equal("Required property __jsStreamReferenceLength not found.", ex.Message); 118Assert.Equal($"{{\"__jsObjectId\":{jsObjectRef.Id}}}", json);
JSInProcessRuntimeTest.cs (5)
25Assert.Equal("Hello", syncResult.StringValue); 26Assert.Equal("test identifier 1", call.Identifier); 27Assert.Equal("[\"arg1\",123,true]", call.ArgsJson); 54Assert.Equal("test identifier", call.Identifier); 55Assert.Equal("[{\"__dotNetObject\":1},{\"obj2\":{\"__dotNetObject\":2},\"obj3\":{\"__dotNetObject\":3}}]", call.ArgsJson);
JSRuntimeExtensionsTest.cs (4)
30Assert.Equal("Hello", result); 54Assert.Equal("Hello", result); 108Assert.Equal(expected, result); 131Assert.Equal(expected, result);
JSRuntimeTest.cs (13)
28Assert.Equal("test identifier 1", call.Identifier); 29Assert.Equal("[\"arg1\",123,true]", call.ArgsJson); 33Assert.Equal("test identifier 2", call.Identifier); 34Assert.Equal("[\"some other arg\"]", call.ArgsJson); 125Assert.Equal("my result", task.Result); 150Assert.Equal("Test", poco.Name); 175Assert.Equal("Test", poco.Name); 203Assert.Equal("This is a test exception", jsException.Message); 256Assert.Equal("Some data", result); 285Assert.Equal("test identifier", call.Identifier); 286Assert.Equal("[{\"__dotNetObject\":1},{\"obj2\":{\"__dotNetObject\":2},\"obj3\":{\"__dotNetObject\":3},\"obj1SameRef\":{\"__dotNetObject\":1},\"obj1DifferentRef\":{\"__dotNetObject\":4}}]", call.ArgsJson); 311Assert.Equal("0", call.CallId); 396Assert.Equal("Element id '7' cannot be added to the byte arrays to be revived with length '2'.", ex.Message);
Microsoft.ML.AutoML.Tests (31)
AutoFitTests.cs (2)
634Assert.Equal(col.Name, resTrainTest.Schema[col.Index].Name); 635Assert.Equal(col.Name, resCV.Schema[col.Index].Name);
ColumnInferenceTests.cs (20)
63Assert.Equal("hours-per-week", labelCol.Name); 64Assert.Equal("hours-per-week", result.ColumnInformation.LabelColumnName); 74Assert.Equal(DefaultColumnNames.Label, labelCol.Name); 75Assert.Equal(DefaultColumnNames.Label, result.ColumnInformation.LabelColumnName); 100Assert.Equal("Bool", result.ColumnInformation.NumericColumnNames.First()); 101Assert.Equal(DefaultColumnNames.Label, result.ColumnInformation.LabelColumnName); 145Assert.Equal("Username", result.ColumnInformation.TextColumnNames.First()); 146Assert.Equal(DefaultColumnNames.Label, result.ColumnInformation.LabelColumnName); 163Assert.Equal(DefaultColumnNames.Label, result.ColumnInformation.LabelColumnName); 164Assert.Equal(DefaultColumnNames.Weight, result.ColumnInformation.ExampleWeightColumnName); 165Assert.Equal(DefaultColumnNames.User, result.ColumnInformation.UserIdColumnName); 166Assert.Equal(DefaultColumnNames.Item, result.ColumnInformation.ItemIdColumnName); 180Assert.Equal(DefaultColumnNames.Label, result.ColumnInformation.LabelColumnName); 181Assert.Equal(DefaultColumnNames.Weight, result.ColumnInformation.ExampleWeightColumnName); 183Assert.Equal(DefaultColumnNames.Features, result.ColumnInformation.NumericColumnNames.First()); 194Assert.Equal(DatasetUtil.MlNetGeneratedRegressionLabel, result.ColumnInformation.LabelColumnName); 196Assert.Equal(DefaultColumnNames.Features, result.ColumnInformation.NumericColumnNames.First()); 229Assert.Equal("id", result.ColumnInformation.LabelColumnName); 230Assert.Equal("description", result.ColumnInformation.TextColumnNames.First()); 231Assert.Equal("animal", result.ColumnInformation.CategoricalColumnNames.First());
UserInputValidationTests.cs (8)
39Assert.Equal("Provided label column cannot be null", ex.Message); 51Assert.Equal($"Provided label column '{columnName}' not found in training data.", ex.Message); 65Assert.Equal($"Provided label column '{mistypedColumnName}' not found in training data. Did you mean '{originalColumnName}'.", 79Assert.Equal("Provided label column 'Label' was of type Boolean, but only type Single is allowed.", ex.Message); 90Assert.Equal("Null column string was specified as numeric in column information", ex.Message); 229Assert.Equal("Provided text column 'TextColumn' was of type Single, but only type String is allowed.", ex.Message); 406Assert.Equal($"Provided label column '{mistypedColumnName}' not found in training data. Did you mean '{originalColumnName}'.", 421Assert.Equal($"Provided label column '{mistypedColumnName}' not found in training data.",
Util.cs (1)
21Assert.Equal(expectedJson, actualJson);
Microsoft.ML.CodeGenerator.Tests (80)
CodeGenTests.cs (8)
38Assert.Equal(expected, actual.Item1); 40Assert.Equal("using Microsoft.ML.Trainers.LightGbm;\r\n", actual.Item2.First()); 60Assert.Equal(expectedTrainer, actual.Item1); 61Assert.Equal(expectedUsing, actual.Item2[0]); 74Assert.Equal(expected, actual[0].Item1); 88Assert.Equal(expectedTransform, actual[0].Item1); 133Assert.Equal(expectedTrainer, actual.Item1); 134Assert.Equal(expectedUsings, actual.Item2[0]);
TrainerGeneratorTests.cs (58)
47Assert.Equal(expectedTrainerString, actual.Item1); 68Assert.Equal(expectedTrainerString, actual.Item1); 91Assert.Equal(expectedTrainerString, actual.Item1); 92Assert.Equal(expectedUsings, actual.Item2[0]); 108Assert.Equal(expectedTrainerString, actual.Item1); 129Assert.Equal(expectedTrainerString, actual.Item1); 130Assert.Equal(expectedUsings, actual.Item2[0]); 145Assert.Equal(expectedTrainerString, actual.Item1); 166Assert.Equal(expectedTrainerString, actual.Item1); 167Assert.Equal(expectedUsings, actual.Item2[0]); 182Assert.Equal(expectedTrainerString, actual.Item1); 203Assert.Equal(expectedTrainerString, actual.Item1); 204Assert.Equal(expectedUsings, actual.Item2[0]); 219Assert.Equal(expectedTrainerString, actual.Item1); 240Assert.Equal(expectedTrainerString, actual.Item1); 241Assert.Equal(expectedUsings, actual.Item2[0]); 256Assert.Equal(expectedTrainerString, actual.Item1); 277Assert.Equal(expectedTrainerString, actual.Item1); 278Assert.Equal(expectedUsings, actual.Item2[0]); 292Assert.Equal(expectedTrainerString, actual.Item1); 318Assert.Equal(expectedTrainerString, actual.Item1); 333Assert.Equal(expectedTrainerString, actual.Item1); 354Assert.Equal(expectedTrainerString, actual.Item1); 355Assert.Equal(expectedUsings, actual.Item2[0]); 370Assert.Equal(expectedTrainerString, actual.Item1); 391Assert.Equal(expectedTrainerString, actual.Item1); 392Assert.Equal(expectedUsings, actual.Item2[0]); 407Assert.Equal(expectedTrainerString, actual.Item1); 428Assert.Equal(expectedTrainerString, actual.Item1); 429Assert.Equal(expectedUsings, actual.Item2[0]); 444Assert.Equal(expectedTrainerString, actual.Item1); 465Assert.Equal(expectedTrainerString, actual.Item1); 466Assert.Equal(expectedUsings, actual.Item2[0]); 481Assert.Equal(expectedTrainerString, actual.Item1); 502Assert.Equal(expectedTrainerString, actual.Item1); 503Assert.Equal(expectedUsings, actual.Item2[0]); 518Assert.Equal(expectedTrainerString, actual.Item1); 539Assert.Equal(expectedTrainerString, actual.Item1); 540Assert.Equal(expectedUsings, actual.Item2[0]); 556Assert.Equal(expectedTrainerString, actual.Item1); 577Assert.Equal(expectedTrainerString, actual.Item1); 578Assert.Equal(expectedUsings, actual.Item2[0]); 594Assert.Equal(expectedTrainerString, actual.Item1); 615Assert.Equal(expectedTrainerString, actual.Item1); 616Assert.Equal(expectedUsings, actual.Item2[0]); 632Assert.Equal(expectedTrainerString, actual.Item1); 653Assert.Equal(expectedTrainerString, actual.Item1); 654Assert.Equal(expectedUsings, actual.Item2[0]); 670Assert.Equal(expectedTrainerString, actual.Item1); 690Assert.Equal(expectedTrainerString, actual.Item1); 691Assert.Equal(expectedUsings, actual.Item2[0]); 707Assert.Equal(expectedTrainerString, actual.Item1); 728Assert.Equal(expectedTrainerString, actual.Item1); 729Assert.Equal(expectedUsings, actual.Item2[0]); 745Assert.Equal(expectedTrainerString, actual.Item1); 766Assert.Equal(expectedTrainerString, actual.Item1); 767Assert.Equal(expectedUsings, actual.Item2[0]); 780Assert.Equal(expectedTrainerString, actual.Item1);
TransformGeneratorTests.cs (13)
31Assert.Equal(expectedTransform, actual[0].Item1); 45Assert.Equal(expectedTransform, actual[0].Item1); 59Assert.Equal(expectedTransform, actual[0].Item1); 73Assert.Equal(expectedTransform, actual[0].Item1); 87Assert.Equal(expectedTransform, actual[0].Item1); 101Assert.Equal(expectedTransform, actual[0].Item1); 115Assert.Equal(expectedTransform, actual[0].Item1); 129Assert.Equal(expectedTransform, actual[0].Item1); 143Assert.Equal(expectedTransform, actual[0].Item1); 157Assert.Equal(expectedTransform, actual[0].Item1); 171Assert.Equal(expectedTransform, actual[0].Item1); 185Assert.Equal(expectedTransform, actual[0].Item1); 199Assert.Equal(expectedTransform, actual[0].Item1);
UtilTest.cs (1)
201Assert.Equal(expectedStrArray[i], actualStr);
Microsoft.ML.Core.Tests (24)
UnitTests\DataTypes.cs (7)
96Assert.Equal("Value could not be parsed from text to sbyte.", ex.Message); 102Assert.Equal("Value could not be parsed from text to sbyte.", ex.Message); 136Assert.Equal("Value could not be parsed from text to short.", ex.Message); 142Assert.Equal("Value could not be parsed from text to short.", ex.Message); 176Assert.Equal("Value could not be parsed from text to int.", ex.Message); 182Assert.Equal("Value could not be parsed from text to int.", ex.Message); 222Assert.Equal("Value could not be parsed from text to long.", ex.Message);
UnitTests\TestCustomTypeRegister.cs (3)
198Assert.Equal(tribeEnumerable[0].Name, "Super " + tribe[0].Name); 210Assert.Equal(superAlien.Name, "Super " + alien.Name); 233Assert.Equal(superAlien.Name, "Super " + alien.Name);
UnitTests\TestEntryPoints.cs (9)
376Assert.Equal("OtherWeight", instance.ExampleWeightColumnName); 380Assert.Equal("AnotherWeight", instance.ExampleWeightColumnName); 2548Assert.Equal(cat.ToString(), catValue.ToString()); 3377Assert.Equal(expected, json); 3419Assert.Equal(expected, json); 3435Assert.Equal(expected, json); 3454Assert.Equal(expected, json); 4849Assert.Equal(expected[i], schema[i].Name); 6575Assert.Equal("Softmax", schema[2].Name);
UnitTests\TestModelLoad.cs (5)
33Assert.Equal("Image", result.Schema[0].Name); 34Assert.Equal("Class", result.Schema[1].Name); 51Assert.Equal("Label", result.Schema[0].Name); 52Assert.Equal("Features", result.Schema[1].Name); 53Assert.Equal("Features", result.Schema[2].Name);
Microsoft.ML.IntegrationTests (4)
Common.cs (2)
110Assert.Equal(schemaPair.Item1.Name, schemaPair.Item2.Name); 156Assert.Equal(testType1.Tx.ToString(), testType2.Tx.ToString());
Debugging.cs (2)
140Assert.Equal("Label", column.Name); 142Assert.Equal(HousingRegression.Features[i - 1], column.Name);
Microsoft.ML.OnnxTransformerTest (1)
DnnImageFeaturizerTest.cs (1)
243Assert.Equal("tomato", result.Prediction);
Microsoft.ML.Predictor.Tests (1)
TestTransposer.cs (1)
73Assert.Equal(view.Schema[viewCol].Name, trans.Schema[col].Name);
Microsoft.ML.Sweeper.Tests (8)
TestSweeper.cs (8)
34Assert.Equal(name, value.Name); 35Assert.Equal(valueText, value.ValueText); 45Assert.Equal("5", unNormalizedValue.ValueText); 49Assert.Equal("5", param.ValueText); 61Assert.Equal(name, value.Name); 62Assert.Equal(valueText, value.ValueText); 86Assert.Equal("bla", value.Name); 87Assert.Equal(expected, value.ValueText);
Microsoft.ML.TensorFlow.Tests (16)
TensorflowTests.cs (16)
591Assert.Equal("Placeholder", opType.ToString()); 602Assert.Equal("Identity", opType.ToString()); 608Assert.Equal("conv2d/kernel", inputOps.GetValues()[0].ToString()); 617Assert.Equal("Conv2D", opType.ToString()); 622Assert.Equal("reshape/Reshape", inputOps.GetValues()[0].ToString()); 623Assert.Equal("conv2d/Conv2D/ReadVariableOp", inputOps.GetValues()[1].ToString()); 632Assert.Equal("Softmax", opType.ToString()); 637Assert.Equal("sequential/dense_1/BiasAdd", inputOps.GetValues()[0].ToString()); 644Assert.Equal(name.ToString(), schema[i].Name); 1362Assert.Equal(input.A[i], textOutput.AOut[i]); 1363Assert.Equal(string.Join(" ", input.B).Replace("/", " "), textOutput.BOut[0]); 1392Assert.Equal("This is fine.Thank you very much!.", primitiveOutput.string_merge); 1583Assert.Equal("daisy", predictionFirst.PredictedLabel); 1584Assert.Equal("roses", predictionSecond.PredictedLabel); 1742Assert.Equal("daisy", predictionFirst.PredictedLabel); 1743Assert.Equal("roses", predictionSecond.PredictedLabel);
Microsoft.ML.TestFramework (7)
BaseTestBaseline.cs (1)
800Assert.Equal(expected.ToString(), actual.ToString());
DataPipe\Parquet.cs (1)
32Assert.Equal("Nullable object must have a value.", ex.Message);
DataPipe\TestDataPipe.cs (4)
1193Assert.Equal("Foo", view.Schema[0].Name); 1194Assert.Equal("Bar", view.Schema[1].Name); 1195Assert.Equal("Biz", view.Schema[2].Name); 1610Assert.Equal(ex.Message, string.Format("The specified documents are all empty in column '{0}'.", colName));
DataPipe\TestDataPipeBase.cs (1)
162Assert.Equal(p.Name, d.Name);
Microsoft.ML.Tests (152)
FakeSchemaTest.cs (3)
38Assert.Equal("A", columnA.Name); 42Assert.Equal("B", columnB.Name); 46Assert.Equal("C", columnC.Name);
ImagesTests.cs (3)
1238Assert.Equal(image1.Tag, image2.Tag); 1249Assert.Equal("image1", image1.Tag); 1251Assert.Equal("image2", image2.Tag);
OnnxConversionTest.cs (1)
1529Assert.Equal(mlNetSlotNames[j].ToString(), onnxSlotNames[j].ToString());
OnnxSequenceTypeWithAttributesTest.cs (1)
110Assert.Equal(expectedExceptionMessage, ex.Message.Substring(0, 387));
PermutationFeatureImportanceTests.cs (48)
75Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 76Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["X2Important"])); 77Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["X3"])); 78Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["X4Rand"])); 149Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 150Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["X2Important"])); 151Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["X3"])); 152Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["X4Rand"])); 221Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 222Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["X2Important"])); 223Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["X3"])); 224Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["X4Rand"])); 307Assert.Equal(JsonConvert.SerializeObject(results[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 308Assert.Equal(JsonConvert.SerializeObject(results[1]), JsonConvert.SerializeObject(pfiDict["Slot 1"])); 309Assert.Equal(JsonConvert.SerializeObject(results[2]), JsonConvert.SerializeObject(pfiDict["Slot 2"])); 310Assert.Equal(JsonConvert.SerializeObject(results[3]), JsonConvert.SerializeObject(pfiDict["Slot 3"])); 311Assert.Equal(JsonConvert.SerializeObject(results[4]), JsonConvert.SerializeObject(pfiDict["Slot 4"])); 312Assert.Equal(JsonConvert.SerializeObject(results[5]), JsonConvert.SerializeObject(pfiDict["X3Important"])); 381Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 382Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["X2Important"])); 383Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["X3"])); 384Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["X4Rand"])); 456Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 457Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["Slot 1"])); 458Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["Slot 2"])); 459Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["Slot 3"])); 460Assert.Equal(JsonConvert.SerializeObject(pfi[4]), JsonConvert.SerializeObject(pfiDict["Slot 4"])); 461Assert.Equal(JsonConvert.SerializeObject(pfi[5]), JsonConvert.SerializeObject(pfiDict["X3Important"])); 562Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 563Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["X2Important"])); 564Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["X3"])); 565Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["X4Rand"])); 637Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 638Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["Slot 1"])); 639Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["Slot 2"])); 640Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["Slot 3"])); 641Assert.Equal(JsonConvert.SerializeObject(pfi[4]), JsonConvert.SerializeObject(pfiDict["Slot 4"])); 642Assert.Equal(JsonConvert.SerializeObject(pfi[5]), JsonConvert.SerializeObject(pfiDict["X3Important"])); 715Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 716Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["X2Important"])); 717Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["X3"])); 718Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["X4Rand"])); 784Assert.Equal(JsonConvert.SerializeObject(pfi[0]), JsonConvert.SerializeObject(pfiDict["X1"])); 785Assert.Equal(JsonConvert.SerializeObject(pfi[1]), JsonConvert.SerializeObject(pfiDict["Slot 1"])); 786Assert.Equal(JsonConvert.SerializeObject(pfi[2]), JsonConvert.SerializeObject(pfiDict["Slot 2"])); 787Assert.Equal(JsonConvert.SerializeObject(pfi[3]), JsonConvert.SerializeObject(pfiDict["Slot 3"])); 788Assert.Equal(JsonConvert.SerializeObject(pfi[4]), JsonConvert.SerializeObject(pfiDict["Slot 4"])); 789Assert.Equal(JsonConvert.SerializeObject(pfi[5]), JsonConvert.SerializeObject(pfiDict["X3Important"]));
Scenarios\Api\Estimators\PredictAndMetadata.cs (9)
54Assert.Equal("Iris-setosa", originalLabels.GetItemOrDefault(0).ToString()); 55Assert.Equal("Iris-versicolor", originalLabels.GetItemOrDefault(1).ToString()); 56Assert.Equal("Iris-virginica", originalLabels.GetItemOrDefault(2).ToString()); 95Assert.Equal("Iris-setosa", metrics.ConfusionMatrix.PredictedClassesIndicators[0].ToString()); 96Assert.Equal("Iris-versicolor", metrics.ConfusionMatrix.PredictedClassesIndicators[1].ToString()); 97Assert.Equal("Iris-virginica", metrics.ConfusionMatrix.PredictedClassesIndicators[2].ToString()); 129Assert.Equal("0", metrics2.ConfusionMatrix.PredictedClassesIndicators[0].ToString()); 130Assert.Equal("1", metrics2.ConfusionMatrix.PredictedClassesIndicators[1].ToString()); 131Assert.Equal("2", metrics2.ConfusionMatrix.PredictedClassesIndicators[2].ToString());
Scenarios\Api\TestApi.cs (1)
338Assert.Equal(col.Name, split.Schema[col.Index].Name);
TextLoaderTests.cs (18)
303Assert.Equal("This text contains comma, within quotes.", text.ToString()); 313Assert.Equal("This text contains extra punctuations and special characters.;*<>?!@#$%^&*()_+=-{}|[]:;'", text.ToString()); 323Assert.Equal("This text has no quotes", text.ToString()); 564Assert.Equal("There is a space at the end", text.ToString()); 574Assert.Equal("There is no space at the end", text.ToString()); 753Assert.Equal("SepalLength", previewIris.Schema[0].Name); 758Assert.Equal(entry.Key, previewIris.RowView[0].Values[index].Key); 761Assert.Equal("Type", previewIris.RowView[0].Values[index].Key); 762Assert.Equal("Iris-setosa", previewIris.RowView[0].Values[index].Value.ToString()); 774Assert.Equal("Features", previewIrisStartEnd.RowView[0].Values[0].Key); 851Assert.Equal("SepalLength", previewIris.Schema[0].Name); 856Assert.Equal(entry.Key, previewIris.RowView[0].Values[index].Key); 859Assert.Equal("Type", previewIris.RowView[0].Values[index].Key); 860Assert.Equal("Iris-setosa", previewIris.RowView[0].Values[index].Value.ToString()); 1352Assert.Equal(ids[i], line); 1359Assert.Equal(descriptions[i], line); 1365Assert.Equal(animals[i], line); 1559Assert.Equal(baselineDescription.ToString(), testDescription.ToString());
TrainerEstimators\TreeEnsembleFeaturizerTest.cs (9)
60Assert.Equal(treesColumnName, treeValuesColumn.Name); 71Assert.Equal("Tree000", slotNames.GetItemOrDefault(0).ToString()); 72Assert.Equal("Tree009", slotNames.GetItemOrDefault(9).ToString()); 78Assert.Equal(leavesColumnName, treeLeafIdsColumn.Name); 94Assert.Equal("Tree000Leaf000", leafIdsSlotNames.GetItemOrDefault(0).ToString()); 95Assert.Equal("Tree009Leaf004", leafIdsSlotNames.GetItemOrDefault(49).ToString()); 101Assert.Equal(pathsColumnName, treePathIdsColumn.Name); 117Assert.Equal("Tree000Node000", pathIdsSlotNames.GetItemOrDefault(0).ToString()); 118Assert.Equal("Tree009Node003", pathIdsSlotNames.GetItemOrDefault(39).ToString());
TrainerEstimators\TreeEstimators.cs (2)
821Assert.Equal("Tree node", row.IsLeaf); 844Assert.Equal("Leaf node", row.IsLeaf);
Transformers\CategoricalTests.cs (3)
146Assert.Equal("hello", slotNames.GetItemOrDefault(0).ToString()); 147Assert.Equal("my", slotNames.GetItemOrDefault(1).ToString()); 148Assert.Equal("friend", slotNames.GetItemOrDefault(2).ToString());
Transformers\ConvertTests.cs (3)
299Assert.Equal("hello", slotNames.GetItemOrDefault(0).ToString()); 300Assert.Equal("my", slotNames.GetItemOrDefault(1).ToString()); 301Assert.Equal("friend", slotNames.GetItemOrDefault(2).ToString());
Transformers\GroupUngroup.cs (16)
64Assert.Equal("Amy", grouped[0].UserName[0]); 65Assert.Equal("Willy", grouped[0].UserName[1]); 67Assert.Equal("Girl", grouped[0].Gender[0]); 68Assert.Equal("Boy", grouped[0].Gender[1]); 73Assert.Equal("Dori", grouped[1].UserName[0]); 74Assert.Equal("Ariel", grouped[1].UserName[1]); 76Assert.Equal("Fish", grouped[1].Gender[0]); 77Assert.Equal("Mermaid", grouped[1].Gender[1]); 94Assert.Equal("Amy", ungrouped[0].UserName); 95Assert.Equal("Girl", ungrouped[0].Gender); 98Assert.Equal("Willy", ungrouped[1].UserName); 99Assert.Equal("Boy", ungrouped[1].Gender); 102Assert.Equal("Dori", ungrouped[2].UserName); 103Assert.Equal("Fish", ungrouped[2].Gender); 106Assert.Equal("Ariel", ungrouped[3].UserName); 107Assert.Equal("Mermaid", ungrouped[3].Gender);
Transformers\LineParserTests.cs (2)
38Assert.Equal(expectedKey, result.key); 67Assert.Equal("word", result.key);
Transformers\NormalizerTests.cs (2)
646Assert.Equal("output", t.GetColumnPairs()[0].OutputColumnName); 647Assert.Equal("input", t.GetColumnPairs()[0].InputColumnName);
Transformers\SelectColumnsTests.cs (4)
188Assert.Equal("A", result.Schema[0].Name); 189Assert.Equal("B", result.Schema[1].Name); 208Assert.Equal("A", result.Schema[0].Name); 209Assert.Equal("B", result.Schema[1].Name);
Transformers\TextFeaturizerTests.cs (24)
56Assert.Equal("text english stop words", string.Join(" ", prediction.OutputTokens)); 59Assert.Equal("stop words", string.Join(" ", prediction.OutputTokens)); 81Assert.Equal(data[0].A.ToLower(), string.Join(" ", prediction.OutputTokens)); 86Assert.Equal(data[1].A.ToLower(), string.Join(" ", prediction.OutputTokens)); 194Assert.Equal(data[0].A, string.Join(" ", prediction.OutputTokens)); 199Assert.Equal(data[1].A, string.Join(" ", prediction.OutputTokens)); 222Assert.Equal(data[0].A, string.Join(" ", prediction.OutputTokens)); 230Assert.Equal(data[1].A, string.Join(" ", prediction.OutputTokens)); 255Assert.Equal("This is some text with english", string.Join(" ", prediction.OutputTokens)); 258Assert.Equal("No", string.Join(" ", prediction.OutputTokens)); 292Assert.Equal(expected1, string.Join(" ", prediction1.OutputTokens)); 293Assert.Equal(expected2, string.Join(" ", prediction2.OutputTokens)); 325Assert.Equal(data[0].A, string.Join(" ", prediction1.OutputTokens)); 326Assert.Equal(data[1].A, string.Join(" ", prediction2.OutputTokens)); 330Assert.Equal(data[0].A.Replace("123 ", "").Replace("425", "").Replace("25", "").Replace("23", ""), string.Join(" ", prediction1.OutputTokens)); 331Assert.Equal(data[1].A, string.Join(" ", prediction2.OutputTokens)); 362Assert.Equal(data[0].A, string.Join(" ", prediction1.OutputTokens)); 363Assert.Equal(data[1].A, string.Join(" ", prediction2.OutputTokens)); 368Assert.Equal(expected, string.Join(" ", prediction1.OutputTokens)); 369Assert.Equal(data[1].A, string.Join(" ", prediction2.OutputTokens)); 400Assert.Equal(data[0].A, string.Join(" ", prediction1.OutputTokens)); 401Assert.Equal(data[1].A, string.Join(" ", prediction2.OutputTokens)); 405Assert.Equal("This is some text with diacritics", string.Join(" ", prediction1.OutputTokens)); 406Assert.Equal(data[1].A, string.Join(" ", prediction2.OutputTokens));
Transformers\ValueMappingTests.cs (1)
792Assert.Equal(expectedCategories[i], feature.PriceCategory);
Transformers\WordTokenizeTests.cs (2)
75Assert.Equal(tokenizeA[i], nativeResult.TokenizeA[i]); 83Assert.Equal(tokenizeB[i], nativeResult.TokenizeB[i]);
Microsoft.ML.TimeSeries.Tests (5)
TimeSeriesDirectApi.cs (5)
968Assert.Equal("DataCenter", rootCause.Items[0].Path[0]); 997Assert.Equal("DataCenter", preparedCauses[0].Items[0].Path[0]); 1013Assert.Equal("DeviceType", preparedCauses[1].Items[0].Path[0]); 1045Assert.Equal("DataCenter", rootCause.Items[0].Path[0]); 1195Assert.Equal("DataCenter", rootCause.Items[0].Path[0]);
Microsoft.ML.Tokenizers.Tests (101)
BpeTests.cs (5)
266Assert.Equal(decodedTokens, tokenizer.Decode(encodingIds)); 267Assert.Equal(decodedTokensWithoutUnknownToken, bpe.Decode(encodingIds, considerSpecialTokens: false)); 276Assert.Equal(expectedTokens[i], encoding[i].Value); 280Assert.Equal(encoding[i].Value, reverseVocabulary[encodingIds[i]]); 320Assert.Equal(expectedDecoded, destinationBuffer.AsSpan().ToString());
CodeGenTests.cs (17)
254Assert.Equal(text, tokenizer.Decode(ids)); 257Assert.Equal(text, tokenizer.Decode(ids)); 262Assert.Equal(text, codeGenTokenizer.Decode(ids)); 265Assert.Equal(text, codeGenTokenizer.Decode(ids)); 270Assert.Equal(text, codeGenTokenizer.Decode(ids)); 273Assert.Equal(text, codeGenTokenizer.Decode(ids)); 278Assert.Equal(text, codeGenTokenizer.Decode(ids)); 281Assert.Equal(text, codeGenTokenizer.Decode(ids)); 286Assert.Equal(text, codeGenTokenizer.Decode(ids, hasPrefixSpace: true, considerSpecialTokens: false)); 289Assert.Equal(text, codeGenTokenizer.Decode(ids, hasPrefixSpace: true, considerSpecialTokens: false)); 295Assert.Equal(targetText, codeGenTokenizer.Decode(ids, hasPrefixSpace: true, considerSpecialTokens: true)); 298Assert.Equal(targetText, codeGenTokenizer.Decode(ids, hasPrefixSpace: true, considerSpecialTokens: true)); 328Assert.Equal(expectedDecoded, destinationBuffer.AsSpan().ToString()); 503Assert.Equal(tokens[i], MapIdToToken(ids[i])); 978Assert.Equal(DefaultSpecialToken, codeGenTokenizer.BeginningOfSentenceToken); 979Assert.Equal(DefaultSpecialToken, codeGenTokenizer.EndOfSentenceToken); 980Assert.Equal(DefaultSpecialToken, codeGenTokenizer.UnknownToken);
EnglishRobertaTests.cs (5)
280Assert.Equal(expectedDecodedString, tokenizer.Decode(encodingIds)); 294Assert.Equal(filteredToken![i], reverseVocab[encodingIds[i]].Replace("\u0120", " ")); 298Assert.Equal(tokens[i], reverseVocab[encodingIds[i]]); 300Assert.Equal(unfilteredToken![i], reverseVocab[encodingIds[i]]); 331Assert.Equal(expectedDecoded, destinationBuffer.AsSpan().ToString());
LlamaTests.cs (59)
248Assert.Equal(input, llamaTokenizer.Decode(ids)); 257Assert.Equal(tokens[i], reverseVocabulary[ids[i]]); 270Assert.Equal(input, llamaTokenizer.Decode(extractedIds)); 280Assert.Equal(input, llamaTokenizer.Decode(extractedIds)); 290Assert.Equal(input, llamaTokenizer.Decode(extractedIds)); 324Assert.Equal(expectedDecoded, destinationBuffer.AsSpan().ToString()); 358Assert.Equal("▁Hello,▁World!", llamaTokenizer.Normalizer.Normalize("Hello, World!")); 364Assert.Equal("<unk>", bpe.UnknownToken); 366Assert.Equal("<s>", bpe.BeginningOfSentenceToken); 368Assert.Equal("</s>", bpe.EndOfSentenceToken); 390Assert.Equal(llamaTokenizer.EndOfSentenceToken, destinationBuffer.ToString()); 398Assert.Equal("Hello, World!", normalizer.Normalize("Hello, World!")); 399Assert.Equal("Hello, World!", normalizer.Normalize("Hello, World!".AsSpan())); 402Assert.Equal("Hello, World!", normalizer.Normalize("Hello, World!")); 403Assert.Equal("Hello, World!", normalizer.Normalize("Hello, World!".AsSpan())); 406Assert.Equal(" Hello, World!", normalizer.Normalize("Hello, World!")); 407Assert.Equal(" Hello, World!", normalizer.Normalize("Hello, World!".AsSpan())); 410Assert.Equal("▁Hello,▁World!", normalizer.Normalize("Hello, World!")); 411Assert.Equal("▁Hello,▁World!", normalizer.Normalize("Hello, World!".AsSpan())); 414Assert.Equal("▁Hello,▁▁▁▁▁▁World!", normalizer.Normalize("Hello, World!")); 415Assert.Equal("▁Hello,▁▁▁▁▁▁World!", normalizer.Normalize("Hello, World!".AsSpan())); 418Assert.Equal("Hello,▁World!▁", normalizer.Normalize("Hello, World!")); 419Assert.Equal("Hello,▁World!▁", normalizer.Normalize("Hello, World!".AsSpan())); 422Assert.Equal("Hello,▁World!", normalizer.Normalize("Hello, World!")); 423Assert.Equal("Hello,▁World!", normalizer.Normalize("Hello, World!".AsSpan())); 426Assert.Equal("Hello,▁▁▁▁▁▁World!▁", normalizer.Normalize("Hello, World!")); 427Assert.Equal("Hello,▁▁▁▁▁▁World!▁", normalizer.Normalize("Hello, World!".AsSpan())); 430Assert.Equal("Hello, World! ", normalizer.Normalize("Hello, World!")); 431Assert.Equal("Hello, World! ", normalizer.Normalize("Hello, World!".AsSpan())); 434Assert.Equal("<|user|>", normalizer.Normalize("<|user|>")); 435Assert.Equal("<|user|><|system|><|assistant|><|endoftext|>", normalizer.Normalize("<|user|><|system|><|assistant|><|endoftext|>")); 436Assert.Equal("▁Hello<|user|>", normalizer.Normalize("Hello<|user|>")); 437Assert.Equal("▁Hello,▁<|user|>World", normalizer.Normalize("Hello, <|user|>World")); 438Assert.Equal("<|endoftext|>▁Hello<|user|>", normalizer.Normalize("<|endoftext|>Hello<|user|>")); 439Assert.Equal("", normalizer.Normalize("")); 442Assert.Equal("<|user|>", normalizer.Normalize("<|user|>")); 443Assert.Equal("<|user|><|system|><|assistant|><|endoftext|>", normalizer.Normalize("<|user|><|system|><|assistant|><|endoftext|>")); 444Assert.Equal("Hello▁<|user|>", normalizer.Normalize("Hello<|user|>")); 445Assert.Equal("Hello,▁<|user|>World▁", normalizer.Normalize("Hello, <|user|>World")); 446Assert.Equal("<|endoftext|>Hello▁<|user|>", normalizer.Normalize("<|endoftext|>Hello<|user|>")); 447Assert.Equal("", normalizer.Normalize("")); 559Assert.Equal(normalizedText, normalizedString); 562Assert.Equal(normalizedText, normalizedString); 593Assert.Equal(considerNormalization ? normalizedText : null, normalizedString); 604Assert.Equal(considerNormalization ? normalizedText : null, normalizedString); 636Assert.Equal(normalizedText, normalizedString); 639Assert.Equal(normalizedText, normalizedString); 643Assert.Equal(normalizedText, normalizedString); 646Assert.Equal(normalizedText, normalizedString); 667Assert.Equal($"{kvp.Key}", normalizedString); 682Assert.Equal(expectedNormalizedString, normalizedString); 837Assert.Equal(decodedWithNoSpecialTokens, tokenizer.Decode(expectedIds)); 839Assert.Equal(textWithSpecialTokens, tokenizer.Decode(expectedIds, considerSpecialTokens: true)); 856Assert.Equal(decodedWithNoSpecialTokens, destinationBuffer.AsSpan().ToString()); 870Assert.Equal(textWithSpecialTokens, destinationBuffer.AsSpan().ToString()); 876Assert.Equal(decodedWithNoSpecialTokens, tokenizerWithSuffix.Decode(expectedIdsWithSuffix)); 877Assert.Equal(textWithSpecialTokens, tokenizerWithSuffix.Decode(expectedIdsWithSuffix, considerSpecialTokens: true)); 895Assert.Equal(decodedWithNoSpecialTokens, destinationBuffer.AsSpan().Slice(0, charactersWritten).ToString()); 914Assert.Equal(textWithSpecialTokens, destinationBuffer.AsSpan(0, charactersWritten).ToString());
NormalizerTests.cs (2)
62Assert.Equal(normalized, normalizedText); 66Assert.Equal(normalized, normalizedString);
TitokenTests.cs (12)
139Assert.Equal(text, tokenizer.Decode(encoded)!); 183Assert.Equal(expectedDecoded, destinationBuffer.AsSpan().ToString()); 192Assert.Equal(text, GPT4.Decode(encoded)); 223Assert.Equal(text, gpt4Tokenizer.Decode(encoded)); 235Assert.Equal(text, GPT4.Decode(encoded)); 270Assert.Equal(text, GPT4.Decode(encoded)); 296Assert.Equal(text, GPT4o.Decode(encoded)); 304Assert.Equal(text, GPT4o.Decode(encoded)); 332Assert.Equal(text, GPT2.Decode(encoded)); 351Assert.Equal(text, P50kBase.Decode(encoded)); 370Assert.Equal(text, P50kEdit.Decode(encoded)); 389Assert.Equal(text, R50kBase.Decode(encoded));
TokenizerTests.cs (1)
24Assert.Equal(
Microsoft.ML.TorchSharp.Tests (18)
NerTests.cs (6)
76Assert.Equal("outputColumn", estimatorSchema[2].Name); 83Assert.Equal("outputColumn", transformerSchema[4].Name); 155Assert.Equal("outputColumn", estimatorSchema[2].Name); 162Assert.Equal("outputColumn", transformerSchema[4].Name); 229Assert.Equal("outputColumn", estimatorSchema[2].Name); 263Assert.Equal("outputColumn", transformerSchema[4].Name);
QATests.cs (4)
47Assert.Equal("Answer", estimatorSchema[4].Name); 48Assert.Equal("Score", estimatorSchema[5].Name); 56Assert.Equal("Answer", transformerSchema[4].Name); 57Assert.Equal("Score", transformerSchema[5].Name);
TextClassificationTests.cs (8)
105Assert.Equal("outputColumn", estimatorSchema[3].Name); 114Assert.Equal("outputColumn", transformerSchema[3].Name); 243Assert.Equal("outputColumn", estimatorSchema[3].Name); 250Assert.Equal("outputColumn", transformerSchema[4].Name); 327Assert.Equal("outputColumn", estimatorSchema[3].Name); 334Assert.Equal("outputColumn", transformerSchema[5].Name); 393Assert.Equal("Score", estimatorSchema[3].Name); 400Assert.Equal("Score", estimatorSchema[3].Name);
Microsoft.Net.Http.Headers.Tests (66)
CacheControlHeaderValueTest.cs (19)
71Assert.Equal("", cacheControl.ToString()); 80Assert.Equal("no-store", cacheControl.ToString()); 82Assert.Equal("no-store, no-cache", cacheControl.ToString()); 84Assert.Equal("no-store, no-cache, max-age=70", cacheControl.ToString()); 86Assert.Equal("no-store, no-cache, max-age=70, max-stale", cacheControl.ToString()); 88Assert.Equal("no-store, no-cache, max-age=70, max-stale=125", cacheControl.ToString()); 90Assert.Equal("no-store, no-cache, max-age=70, max-stale=125, min-fresh=180", cacheControl.ToString()); 94Assert.Equal("no-transform", cacheControl.ToString()); 96Assert.Equal("no-transform, only-if-cached", cacheControl.ToString()); 99Assert.Equal("no-transform, only-if-cached, custom, customName=customValue", cacheControl.ToString()); 103Assert.Equal("custom", cacheControl.ToString()); 110Assert.Equal("", cacheControl.ToString()); 113Assert.Equal("no-cache", cacheControl.ToString()); 115Assert.Equal("no-cache=\"PLACEHOLDER1\"", cacheControl.ToString()); 117Assert.Equal("public, no-cache=\"PLACEHOLDER1\"", cacheControl.ToString()); 121Assert.Equal("private", cacheControl.ToString()); 124Assert.Equal("private=\"PLACEHOLDER2, PLACEHOLDER3\"", cacheControl.ToString()); 126Assert.Equal("must-revalidate, private=\"PLACEHOLDER2, PLACEHOLDER3\"", cacheControl.ToString()); 128Assert.Equal("must-revalidate, proxy-revalidate, private=\"PLACEHOLDER2, PLACEHOLDER3\"", cacheControl.ToString());
ContentDispositionHeaderValueTest.cs (9)
395Assert.Equal("inline", contentDisposition.ToString()); 398Assert.Equal("inline; name=myname", contentDisposition.ToString()); 401Assert.Equal("inline; name=myname; filename=\"my File Name\"", contentDisposition.ToString()); 404Assert.Equal("inline; name=myname; filename=\"my File Name\"; creation-date=" 408Assert.Equal("inline; name=myname; filename=\"my File Name\"; creation-date=" 412Assert.Equal("inline; filename=\"my File Name\"; creation-date=" 416Assert.Equal("inline; filename=\"my File Name\"; creation-date=" 421Assert.Equal("inline; creation-date=\"Tue, 15 Feb 2011 08:00:00 GMT\"; custom=\"custom value\";" 425Assert.Equal("inline; custom=\"custom value\"; filename*=UTF-8\'\'File%25Name",
ContentRangeHeaderValueTest.cs (3)
91Assert.Equal("myunit 1-2/3", range.ToString()); 94Assert.Equal("bytes 123456789012345678-123456789012345679/*", range.ToString()); 97Assert.Equal("bytes */150", range.ToString());
CookieHeaderValueTest.cs (3)
204Assert.Equal(expectedValue, input.ToString()); 214Assert.Equal(expectedValue, header.ToString()); 224Assert.Equal(expectedValue, header!.ToString());
DateParserTest.cs (2)
45Assert.Equal("Sat, 31 Jul 2010 15:38:57 GMT", 48Assert.Equal("Fri, 01 Jan 2010 01:01:01 GMT",
EntityTagHeaderValueTest.cs (3)
51Assert.Equal("\"e tag\"", etag.ToString()); 54Assert.Equal("W/\"e tag\"", etag.ToString()); 57Assert.Equal("\"\"", etag.ToString());
HeaderUtilitiesTest.cs (3)
21Assert.Equal(expected, actual); 106Assert.Equal(value.ToString(CultureInfo.InvariantCulture), HeaderUtilities.FormatNonNegativeInt64(value)); 128Assert.Equal(value.ToString(CultureInfo.InvariantCulture), HeaderUtilities.FormatInt64(value));
MediaTypeHeaderValueTest.cs (4)
330Assert.Equal("text/plain", mediaType.ToString()); 333Assert.Equal("text/plain; charset=utf-8", mediaType.ToString()); 336Assert.Equal("text/plain; charset=utf-8; custom=\"custom value\"", mediaType.ToString()); 339Assert.Equal("text/plain; custom=\"custom value\"", mediaType.ToString());
NameValueHeaderValueTest.cs (4)
153Assert.Equal("text=token", nameValue.ToString()); 156Assert.Equal("text=\"quoted string\"", nameValue.ToString()); 159Assert.Equal("text", nameValue.ToString()); 162Assert.Equal("text", nameValue.ToString());
RangeConditionHeaderValueTest.cs (2)
42Assert.Equal("\"x\"", rangeCondition.ToString()); 45Assert.Equal("Thu, 15 Jul 2010 12:33:57 GMT", rangeCondition.ToString());
RangeHeaderValueTest.cs (2)
34Assert.Equal("myunit=1-3", range.ToString()); 38Assert.Equal("myunit=1-3, 5-, -17", range.ToString());
RangeItemHeaderValueTest.cs (3)
45Assert.Equal("1000000000-2000000000", rangeItem.ToString()); 48Assert.Equal("5-", rangeItem.ToString()); 51Assert.Equal("-10", rangeItem.ToString());
SetCookieHeaderValueTest.cs (4)
350Assert.Equal(expectedValue, input.ToString()); 361Assert.Equal(expectedValue, builder.ToString()); 371Assert.Equal(expectedValue, header.ToString()); 381Assert.Equal(expectedValue, header!.ToString());
StringWithQualityHeaderValueTest.cs (5)
39Assert.Equal("token", value.ToString()); 42Assert.Equal("token; q=0.1", value.ToString()); 45Assert.Equal("token; q=0.0", value.ToString()); 48Assert.Equal("token; q=1.0", value.ToString()); 52Assert.Equal("token; q=0.568", value.ToString());
Microsoft.VisualBasic.Tests (43)
Microsoft\VisualBasic\ApplicationServices\ApplicationBaseTests.cs (4)
18Assert.Equal("en-US", app.Culture.Name); 36Assert.Equal("en-US", app.UICulture.Name); 50Assert.Equal(value, app.GetEnvironmentVariable(key)); 82Assert.Equal(assemblyName.Name, app.Info.AssemblyName);
Microsoft\VisualBasic\ApplicationServices\AssemblyInfoTests.cs (8)
22Assert.Equal(assemblyName.Name, assemblyInfo.AssemblyName); 23Assert.Equal(Path.GetDirectoryName(assembly.Location), assemblyInfo.DirectoryPath); 24Assert.Equal(GetAttributeValue<AssemblyCompanyAttribute>(assembly, attr => attr.Company), assemblyInfo.CompanyName); 25Assert.Equal(GetAttributeValue<AssemblyCopyrightAttribute>(assembly, attr => attr.Copyright), assemblyInfo.Copyright); 26Assert.Equal(GetAttributeValue<AssemblyDescriptionAttribute>(assembly, attr => attr.Description), assemblyInfo.Description); 27Assert.Equal(GetAttributeValue<AssemblyProductAttribute>(assembly, attr => attr.Product), assemblyInfo.ProductName); 28Assert.Equal(GetAttributeValue<AssemblyTitleAttribute>(assembly, attr => attr.Title), assemblyInfo.Title); 29Assert.Equal(GetAttributeValue<AssemblyTrademarkAttribute>(assembly, attr => attr.Trademark), assemblyInfo.Trademark);
Microsoft\VisualBasic\ApplicationServices\UserTests.cs (1)
15Assert.Equal(System.Threading.Thread.CurrentPrincipal.Identity.Name, user.Name);
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBaseTests.cs (4)
23Assert.Equal(expectedId, GetAppID(assembly)); 42Assert.Equal($"{guid}1.2", GetUniqueIDFromAssembly(guid, new Version(1, 2, 3, 4))); 49Assert.Equal($"{guid}0.0", GetUniqueIDFromAssembly(guid, new Version())); 56Assert.Equal($"{guid}0.0", GetUniqueIDFromAssembly(guid, version: null));
Microsoft\VisualBasic\Devices\ComputerInfoTests.cs (3)
13Assert.Equal(System.Environment.OSVersion.Platform.ToString(), info.OSPlatform); 14Assert.Equal(System.Environment.OSVersion.Version.ToString(), info.OSVersion); 43Assert.Equal(System.Runtime.InteropServices.RuntimeInformation.OSDescription, fullName);
Microsoft\VisualBasic\Devices\ServerComputerTests.cs (1)
13Assert.Equal(System.Environment.MachineName, computer.Name);
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (19)
40Assert.Equal(_fileSystem.CombinePath(Root, "Test2"), Path.Combine(Root, "Test2")); 46Assert.Equal(_fileSystem.CombinePath(TestDirectory, null), TestDirectory); 47Assert.Equal(_fileSystem.CombinePath(TestDirectory, ""), TestDirectory); 48Assert.Equal(_fileSystem.CombinePath(TestDirectory, "Test"), Path.Combine(TestDirectory, "Test")); 192Assert.Equal(_fileSystem.CurrentDirectory, CurrentDirectory); 200Assert.Equal(TestDirectory, _fileSystem.CurrentDirectory); 202Assert.Equal(_fileSystem.CurrentDirectory, SavedCurrentDirectory); 349Assert.Equal(info.Extension, infoFromIO.Extension); 350Assert.Equal(info.FullName, TestDirectory); 352Assert.Equal(info.Name, infoFromIO.Name); 353Assert.Equal(info.Parent.ToString(), infoFromIO.Parent.ToString()); 354Assert.Equal(info.Root.Name, infoFromIO.Root.Name); 362Assert.Equal(_fileSystem.GetDriveInfo(Drives[0].Name).Name, new DriveInfo(Drives[0].Name).Name); 379Assert.Equal(info.DirectoryName, FileInfoFromSystemIO.DirectoryName); 380Assert.Equal(info.Extension, FileInfoFromSystemIO.Extension); 381Assert.Equal(info.FullName, FileInfoFromSystemIO.FullName); 386Assert.Equal(info.Name, FileInfoFromSystemIO.Name); 470Assert.Equal(_fileSystem.GetName(TestDirectory), Path.GetFileName(TestDirectory)); 476Assert.Equal(_fileSystem.GetParentPath(TestDirectory), Path.GetDirectoryName(TestDirectory));
Microsoft\VisualBasic\MyServices\Internal\ContextValueTests.cs (2)
41Assert.Equal("World", context.Value); 45Assert.Equal("Hello", context.Value);
Microsoft\VisualBasic\MyServices\SpecialDirectoriesProxyTests.cs (1)
38Assert.Equal(expected, actual);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (89)
CodeModel\FileCodeClassTests.cs (2)
71Assert.Equal("Goo", parentClass.FullName); 90Assert.Equal("Goo", parentClass.FullName);
CodeModel\FileCodeFunctionTests.cs (16)
138Assert.Equal("A.MethodD", testObject.FullName); 210Assert.Equal("MethodC", testObject.Name); 228Assert.Equal("A", ((CodeClass)testObject.Parent).FullName); 236Assert.Equal("System.Int32", testObject.Type.AsFullName); 246Assert.Equal(expected, testObject.Comment); 256Assert.Equal(expected, testObject.DocComment); 474Assert.Equal("dynamic", returnType.AsFullName); 475Assert.Equal("dynamic", returnType.AsString); 476Assert.Equal("System.Object", returnType.CodeType.FullName); 486Assert.Equal("dynamic", returnType.AsFullName); 487Assert.Equal("dynamic", returnType.AsString); 488Assert.Equal("System.Object", returnType.CodeType.FullName); 502Assert.Equal("DynamicMethod", element.Name); 518Assert.Equal("A", element.Name); 525Assert.Equal("operator +", functionObject.Name); 533Assert.Equal("implicit operator Ref<T>", element.Name);
CodeModel\FileCodeImportTests.cs (2)
58Assert.Equal("System", import.Namespace); 66Assert.Equal("Goo", import.Alias);
CodeModel\FileCodeNamespaceTests.cs (4)
77Assert.Equal(outer.Name, ((CodeNamespace)inner.Parent).Name); 93Assert.Equal("Goo", testObject.Name); 101Assert.Equal("A.B", testObject.Name); 294Assert.Equal(CodeModelLanguageConstants.vsCMLanguageCSharp, testObject.Language);
CodeModel\FileCodeVariableManipulationTests.cs (1)
31Assert.Equal(@"class Goo
CodeModel\FileCodeVariableTests.cs (4)
96Assert.Equal("This is a comment.\r\n", testObject.Comment); 106Assert.Equal(expected, testObject.DocComment); 180Assert.Equal("A", testObjectParent.Name); 188Assert.Equal("System.Int32", testObject.Type.AsFullName);
Interactive\Commands\InteractiveCommandHandlerTests.cs (1)
168Assert.Equal(expectedBufferText, workspace.WindowCurrentLanguageBuffer.CurrentSnapshot.GetText());
PersistentStorage\AbstractPersistentStorageTests.cs (38)
146Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName1, GetChecksum1(withChecksum)))); 147Assert.Equal(GetData2(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName2, GetChecksum2(withChecksum)))); 167Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName1, GetChecksum1(withChecksum)))); 168Assert.Equal(GetData2(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName2, GetChecksum2(withChecksum)))); 190Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName1, GetChecksum1(withChecksum)))); 191Assert.Equal(GetData2(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName2, GetChecksum2(withChecksum)))); 207Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName1, GetChecksum1(withChecksum)))); 208Assert.Equal(GetData2(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName2, GetChecksum2(withChecksum)))); 225Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(project, streamName1, GetChecksum1(withChecksum)))); 226Assert.Equal(GetData2(size), ReadStringToEnd(await storage.ReadStreamAsync(project, streamName2, GetChecksum2(withChecksum)))); 243Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1, GetChecksum1(withChecksum)))); 244Assert.Equal(GetData2(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName2, GetChecksum2(withChecksum)))); 356Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(streamName1, checksum: null))); 494Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 515Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 536Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 557Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 578Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 581Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 602Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 605Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 626Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 629Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 650Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 653Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 674Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 695Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 716Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 737Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 758Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 761Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 782Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 785Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 806Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 809Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 830Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(document, streamName1))); 833Assert.Equal(GetData1(size), ReadStringToEnd(await storage.ReadStreamAsync(DocumentKey.ToDocumentKey(document), streamName1))); 922Assert.Equal(expectedValue, await read());
ProjectSystemShim\CPS\AdditionalPropertiesTests.cs (1)
35Assert.Equal(rootNamespace, DefaultNamespaceOfSingleProject(environment));
ProjectSystemShim\CPS\CSharpCompilerOptionsTests.cs (5)
146Assert.Equal("Test", project.DisplayName); 152Assert.Equal(newProjectDisplayName, project.DisplayName); 153Assert.Equal(initialProjectFilePath, project.ProjectFilePath); 172Assert.Equal(newFilePath, project.ProjectFilePath); 173Assert.Equal(initialProjectDisplayName, project.DisplayName);
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (11)
110Assert.Equal(initialPath, project.GetOutputFileName()); 115Assert.Equal(initialPath, getCurrentCompilationOutputAssemblyPath()); 120Assert.Equal(newPath, project.GetOutputFileName()); 122Assert.Equal(newPath, getCurrentCompilationOutputAssemblyPath()); 127Assert.Equal(newPath, project.GetOutputFileName()); 129Assert.Equal(newPath, getCurrentCompilationOutputAssemblyPath()); 134Assert.Equal(newPath, project.GetOutputFileName()); 136Assert.Equal(newPath, getCurrentCompilationOutputAssemblyPath()); 157Assert.Equal(@"C:\a\2.dll", getCurrentCompilationOutputAssemblyPath()); 161Assert.Equal(@"C:\a\3.dll", getCurrentCompilationOutputAssemblyPath()); 165Assert.Equal(@"C:\a\3.dll", getCurrentCompilationOutputAssemblyPath());
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (2)
63Assert.Equal("lib", mdReader.GetString(mdReader.GetAssemblyDefinition().Name)); 102Assert.Equal("lib", mdReader.GetString(mdReader.GetAssemblyDefinition().Name));
UnifiedSettings\CSharpUnifiedSettingsTests.cs (2)
110Assert.Equal("C#", actual: categoriesTitle.ToString()); 112Assert.Equal(Guids.CSharpOptionPageIntelliSenseIdString, optionPageId!.ToString());
Microsoft.Web.Xdt.Extensions.Tests (24)
InsertOrAppendAttributeTests.cs (24)
27Assert.Equal("add", firstChild.Name); 28Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 29Assert.Equal("InsertValue1", firstChild.Attributes["value"].Value); 32Assert.Equal("add", secondChild.Name); 33Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 34Assert.Equal("InsertValue2", secondChild.Attributes["value"].Value); 51Assert.Equal("add", firstChild.Name); 52Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 53Assert.Equal("InsertValue1", firstChild.Attributes["value"].Value); 56Assert.Equal("add", secondChild.Name); 57Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 58Assert.Equal("InsertValue2", secondChild.Attributes["value"].Value); 75Assert.Equal("add", firstChild.Name); 76Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 77Assert.Equal("InsertValue1", firstChild.Attributes["value"].Value); 80Assert.Equal("add", secondChild.Name); 81Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 82Assert.Equal("InsertValue2", secondChild.Attributes["value"].Value); 99Assert.Equal("add", firstChild.Name); 100Assert.Equal("KeyName1", firstChild.Attributes["name"].Value); 101Assert.Equal("ExistingValue1;InsertValue1", firstChild.Attributes["value"].Value); 104Assert.Equal("add", secondChild.Name); 105Assert.Equal("KeyName2", secondChild.Attributes["name"].Value); 106Assert.Equal("ExistingValue2;InsertValue2", secondChild.Attributes["value"].Value);
Mvc.Analyzers.Test (4)
TopLevelParameterNameAnalyzerTest.cs (4)
442Assert.Equal("testModelName", name); 467Assert.Equal("param", name); 491Assert.Equal("param", name); 515Assert.Equal("name1", name);
Mvc.Api.Analyzers.Test (3)
ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest.cs (1)
77Assert.Equal(descriptor.Id, diagnostic.Id);
ApiConventionAnalyzerIntegrationTest.cs (2)
293Assert.Equal(descriptor.Id, diagnostic.Id); 296Assert.Equal(string.Format(CultureInfo.InvariantCulture, descriptor.MessageFormat.ToString(CultureInfo.InvariantCulture), args), diagnostic.GetMessage(CultureInfo.InvariantCulture));
Roslyn.Test.PdbUtilities (3)
Reader\MockSymUnmanagedReader.cs (1)
61Assert.Equal("MD2", name);
Reader\PdbValidation.cs (2)
578Assert.Equal(pdbPath, codeViewData.Path); 612Assert.Equal(hashAlgorithm.Name, pdbChecksumData.AlgorithmName);
Roslyn.VisualStudio.Next.UnitTests (27)
Remote\SnapshotSerializationTests.cs (2)
627Assert.Equal(sourceText.ToString(), newText.GetText(CancellationToken.None).ToString()); 645Assert.Equal(sourceText.ToString(), newText.GetText(CancellationToken.None).ToString());
Services\ServiceHubServicesTests.cs (18)
103Assert.Equal(newText.ToString(), (await serializableRemoteText.GetTextAsync(CancellationToken.None)).ToString()); 157Assert.Equal("Form", info.Category); 481Assert.Equal(localDoc.HintName, remoteDoc.HintName); 486Assert.Equal(localText.ToString(), remoteText.ToString()); 752Assert.Equal("// generated document 2", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 757Assert.Equal("// generated document 1", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 834Assert.Equal("// generated document 1", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 888Assert.Equal("// generated document 2", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 1377Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1390Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1395Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1418Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1439Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1446Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1453Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1458Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1568Assert.Equal(WorkspaceKind.RemoteWorkspace, solution1.WorkspaceKind); 1569Assert.Equal(WorkspaceKind.RemoteWorkspace, solution2.WorkspaceKind);
Services\SolutionServiceTests.cs (7)
268Assert.Equal("Name" + version, project.Name); 269Assert.Equal("AssemblyName" + version, project.AssemblyName); 270Assert.Equal("FilePath" + version, project.FilePath); 271Assert.Equal("OutputFilePath" + version, project.OutputFilePath); 272Assert.Equal("OutputRefFilePath" + version, project.OutputRefFilePath); 273Assert.Equal("AssemblyPath" + version, project.CompilationOutputInfo.AssemblyPath); 274Assert.Equal("DefaultNamespace" + version, project.DefaultNamespace);
Security.TransportSecurity.IntegrationTests (37)
Https\HttpsTests.4.1.0.cs (5)
258Assert.Equal(testString, result); 299Assert.Equal(testString, result); 387Assert.Equal(testString, result); 497Assert.Equal(testString, result); 561Assert.Equal(testString, result);
Https\HttpsTests.4.1.1.cs (3)
51Assert.Equal(testString, result); 160Assert.Equal(testString, result); 205Assert.Equal(testString, result);
Negotiate\NegotiateStream_Http_Tests.4.1.0.cs (7)
93Assert.Equal(testString, result); 145Assert.Equal(testString, result); 197Assert.Equal(testString, result); 245Assert.Equal(testString, result); 289Assert.Equal(testString, result); 345Assert.Equal(testString, result); 395Assert.Equal(testString, result);
Negotiate\NegotiateStream_Tcp_Tests.4.1.0.cs (6)
79Assert.Equal(testString, result); 128Assert.Equal(testString, result); 173Assert.Equal(testString, result); 214Assert.Equal(testString, result); 269Assert.Equal(testString, result); 316Assert.Equal(testString, result);
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (3)
55Assert.Equal(testString, result); 131Assert.Equal(testString, result); 217Assert.Equal(testString, result);
Tcp\ClientCredentialTypeTests.4.1.0.cs (3)
51Assert.Equal(testString, result); 104Assert.Equal(testString, result); 146Assert.Equal(testString, result);
Tcp\ClientCredentialTypeTests.4.1.1.cs (3)
51Assert.Equal(testString, result); 158Assert.Equal(testString, result); 205Assert.Equal(testString, result);
Tcp\ClientCredentialTypeTests.OSX.cs (1)
78Assert.Equal(testString, result);
Tcp\IdentityTests.4.1.0.cs (1)
37Assert.Equal(testString, result);
Tcp\IdentityTests.4.1.1.cs (1)
39Assert.Equal(testString, result);
Tcp\StreamingTests.4.1.0.cs (4)
48Assert.Equal(testString, result); 89Assert.Equal(testString, result); 131Assert.Equal(testString, result); 182Assert.Equal(testString, result);
ServerComparison.FunctionalTests (20)
HelloWorldTest.cs (4)
74Assert.Equal($"Hello World {expectedName}", responseText); 88Assert.Equal("Microsoft-HTTPAPI/2.0", serverHeader); 94Assert.Equal("Kestrel", serverHeader); 100Assert.Equal("Kestrel", serverHeader);
NtlmAuthenticationTest.cs (3)
59Assert.Equal("Hello World", responseText); 64Assert.Equal("Anonymous?True", responseText); 93Assert.Equal("Authenticated", responseText);
ResponseCompressionTests.cs (5)
150Assert.Equal("Running", responseText); 173Assert.Equal(HelloWorldBody, responseText); 174Assert.Equal(HelloWorldBody.Length.ToString(CultureInfo.InvariantCulture), GetContentLength(response)); 206Assert.Equal(HelloWorldBody, responseText); 208Assert.Equal("gzip", response.Content.Headers.ContentEncoding.First());
ResponseTests.cs (8)
112Assert.Equal("Running", responseText); 138Assert.Equal("Content Length", responseText); 141Assert.Equal("14", GetContentLength(response)); 158Assert.Equal("Connnection Close", responseText); 183Assert.Equal("Connnection Close", responseText); 208Assert.Equal("Chunked", responseText); 233Assert.Equal("Manually Chunked", responseText); 253Assert.Equal("Manually Chunked and Close", responseText);
Shared.Tests (107)
Data.Validation\LengthAttributeTests.cs (2)
396Assert.Equal("My custom message for 'CustomMessage'.", results.Single().ErrorMessage); 416Assert.Equal("The field DefaultMessage length must be greater or equal than 5.", results.Single().ErrorMessage);
Throw\DoubleTests.cs (18)
19Assert.Equal("paramName", exception.ParamName); 23Assert.Equal("paramName", exception.ParamName); 38Assert.Equal("paramName", exception.ParamName); 42Assert.Equal("paramName", exception.ParamName); 57Assert.Equal("paramName", exception.ParamName); 61Assert.Equal("paramName", exception.ParamName); 76Assert.Equal("paramName", exception.ParamName); 80Assert.Equal("paramName", exception.ParamName); 97Assert.Equal("paramName", exception.ParamName); 116Assert.Equal("foo", exception.ParamName); 120Assert.Equal("foo", exception.ParamName); 127Assert.Equal("foo", exception.ParamName); 139Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 150Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 161Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 172Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 183Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 194Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
Throw\IntegerTests.cs (26)
19Assert.Equal("paramName", exception.ParamName); 34Assert.Equal("paramName", exception.ParamName); 49Assert.Equal("paramName", exception.ParamName); 64Assert.Equal("paramName", exception.ParamName); 79Assert.Equal("paramName", exception.ParamName); 94Assert.Equal("foo", exception.ParamName); 98Assert.Equal("foo", exception.ParamName); 113Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 124Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 135Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 146Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 157Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 168Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 179Assert.Equal("paramName", exception.ParamName); 194Assert.Equal("paramName", exception.ParamName); 209Assert.Equal("paramName", exception.ParamName); 224Assert.Equal("paramName", exception.ParamName); 239Assert.Equal("paramName", exception.ParamName); 254Assert.Equal("foo", exception.ParamName); 258Assert.Equal("foo", exception.ParamName); 273Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 284Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 295Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 306Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 317Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 328Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
Throw\LongTests.cs (26)
19Assert.Equal("paramName", exception.ParamName); 34Assert.Equal("paramName", exception.ParamName); 49Assert.Equal("paramName", exception.ParamName); 64Assert.Equal("paramName", exception.ParamName); 79Assert.Equal("paramName", exception.ParamName); 94Assert.Equal("foo", exception.ParamName); 98Assert.Equal("foo", exception.ParamName); 113Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 124Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 135Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 146Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 157Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 168Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 179Assert.Equal("paramName", exception.ParamName); 194Assert.Equal("paramName", exception.ParamName); 209Assert.Equal("paramName", exception.ParamName); 224Assert.Equal("paramName", exception.ParamName); 239Assert.Equal("paramName", exception.ParamName); 254Assert.Equal("foo", exception.ParamName); 258Assert.Equal("foo", exception.ParamName); 273Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 284Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 295Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 306Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 317Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 328Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
Throw\ThrowTest.cs (35)
43Assert.Equal(paramName, exception.ParamName); 56Assert.Equal(paramName, exception.ParamName); 65Assert.Equal(paramName, exception.ParamName); 75Assert.Equal(paramName, exception.ParamName); 83Assert.Equal(paramName, exception.ParamName); 93Assert.Equal(paramName, exception.ParamName); 105Assert.Equal(paramName, exception.ParamName); 117Assert.Equal("paramName", exception.ParamName); 124Assert.Equal("paramName", exception.ParamName); 149Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 163Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 177Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 185Assert.Equal(expectedMessage, exceptionImplicitArgumentName.Message); 191Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 199Assert.Equal(expectedMessage, exceptionImplicitArgumentName.Message); 225Assert.Equal("paramName", exception.ParamName); 232Assert.Equal("paramName", exception.ParamName); 247Assert.Equal("paramName", exception.ParamName); 254Assert.Equal("paramName", exception.ParamName); 273Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 284Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 295Assert.Equal("paramName", exception.ParamName); 323Assert.Equal("foo", exception.ParamName); 326Assert.Equal("foo", exception.ParamName); 329Assert.Equal("foo", exception.ParamName); 332Assert.Equal("foo", exception.ParamName); 335Assert.Equal("foo", exception.ParamName); 340Assert.Equal("foo", exception.ParamName); 344Assert.Equal("foo", exception.ParamName); 348Assert.Equal("foo", exception.ParamName); 354Assert.Equal("foo", exception.ParamName); 360Assert.Equal("foo", exception.ParamName); 404Assert.Equal("foo", exception.ParamName); 408Assert.Equal("foo", exception.ParamName); 420Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
Sockets.BindTests (23)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
126Assert.Equal(expected, actualText); 135Assert.Equal("", text);
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (21)
217Assert.Equal(uri.ToString(), response); 264Assert.Equal(expectedUrl, response); 337Assert.Equal(new Uri(testUrlWithPort).ToString(), response); 392Assert.Equal(new Uri(testUrl).ToString(), response); 439Assert.Equal(new Uri(testUrl).ToString(), response); 526Assert.Equal(new Uri(address).ToString(), await HttpClientSlim.GetStringAsync(address, validateCertificate: false)); 558Assert.Equal(expectedMessage, exception.Message); 593Assert.Equal(expectedMessage, exception.Message); 635Assert.Equal(serverAddresses.First(), useUrlsAddressWithPort); 641Assert.Equal(new Uri(useUrlsAddressWithPort).ToString(), await HttpClientSlim.GetStringAsync(useUrlsAddressWithPort)); 680Assert.Equal(serverAddresses.First(), endPointAddress); 686Assert.Equal(new Uri(endPointAddress).ToString(), await HttpClientSlim.GetStringAsync(endPointAddress, validateCertificate: false)); 720Assert.Equal(serverAddresses.First(), endPointAddress); 722Assert.Equal(new Uri(endPointAddress).ToString(), await HttpClientSlim.GetStringAsync(endPointAddress, validateCertificate: false)); 811Assert.Equal(endPointAddress, await HttpClientSlim.GetStringAsync(endPointAddress)); 831Assert.Equal(endPointAddress, await HttpClientSlim.GetStringAsync(endPointAddress)); 862Assert.Equal(ipv4endPointAddress, await HttpClientSlim.GetStringAsync(ipv4endPointAddress)); 863Assert.Equal(ipv6endPointAddress, await HttpClientSlim.GetStringAsync(ipv6endPointAddress)); 884Assert.Equal(ipv4endPointAddress, await HttpClientSlim.GetStringAsync(ipv4endPointAddress)); 885Assert.Equal(ipv6endPointAddress, await HttpClientSlim.GetStringAsync(ipv6endPointAddress)); 986Assert.Equal(CoreStrings.FormatEndpointAlreadyInUse(thisAddressString), exception.Message);
Sockets.FunctionalTests (10)
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
14Assert.Equal(KestrelMetrics.GetErrorType(expectedReason), errorType);
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
126Assert.Equal(expected, actualText); 135Assert.Equal("", text);
src\Servers\Kestrel\test\FunctionalTests\Http2\HandshakeTests.cs (3)
61Assert.Equal("HTTP/2 over TLS is not supported on Windows 7 due to missing ALPN support.", ex.Message); 88Assert.Equal("hello world HTTP/2", result); 116Assert.Equal("hello world HTTP/2", result);
src\Servers\Kestrel\test\FunctionalTests\Http2\ShutdownTests.cs (2)
93Assert.Equal("hello world HTTP/2", response); 154Assert.Equal("hello world HTTP/2", await requestTask);
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
1130Assert.Equal(expectAddress, facts["RemoteIPAddress"].Value<string>());
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
139Assert.Equal(headers.GetValues(headerName).Single(), expectedValue);
System.Drawing.Common.Tests (112)
Design\CategoryNameCollectionTests.cs (1)
35Assert.Equal(expectedValue, sourceCollection[i]);
mono\System.Drawing\BitmapTests.cs (7)
451Assert.Equal("7256C44FB1450981DADD4CA7D0B8E94E8EC8A76D1D6F1839A8B5DB237DDD852D", RotateBmp(bmp, RotateFlipType.Rotate90FlipNone)); 452Assert.Equal("D90EDBC221EF524E98D23B8E2B32AECBCEF14FCE5E402E602AFCCBAF0DC581B1", RotateBmp(bmp, RotateFlipType.Rotate180FlipNone)); 453Assert.Equal("9110140D17122EC778F5861ED186C28E839FA218955BFA088A5801DDFDF420DE", RotateBmp(bmp, RotateFlipType.Rotate270FlipNone)); 454Assert.Equal("29B195F4387B399930BAA50399B0F98EEA8115147FF47A4088E9DA7D29B48DF1", RotateBmp(bmp, RotateFlipType.RotateNoneFlipX)); 455Assert.Equal("27D1EA173316A50C9F4186BBA03F4EFE78C1D5FEBC4D973EB9ED87620930AB89", RotateBmp(bmp, RotateFlipType.Rotate90FlipX)); 456Assert.Equal("1687AFD5202BCF470B91AFA2E6A43793FA316679B0CE4EB1BC956B230A063A5C", RotateBmp(bmp, RotateFlipType.Rotate180FlipX)); 457Assert.Equal("297D4E905D773277CEA86276B15AC70EB02BE4B7FE06120330DABBE92D1DF4E2", RotateBmp(bmp, RotateFlipType.Rotate270FlipX));
mono\System.Drawing\GraphicsTests.cs (1)
352Assert.Equal("image", argumentException.ParamName);
System\Drawing\ColorTranslatorTests.cs (2)
212Assert.Equal("htmlColor", argumentException.ParamName); 258Assert.Equal(expected, ColorTranslator.ToHtml(color));
System\Drawing\FontConverterTests.cs (4)
20Assert.Equal("Times New Roman", converter.ConvertFrom("Times") as string); 24Assert.Equal("Times", converter.ConvertFrom("Times") as string); 52Assert.Equal(expectedName, font.Name); 124Assert.Equal(font.Name, newFont.Name);
System\Drawing\FontFamilyTests.cs (9)
20Assert.Equal(expectedName, fontFamily.Name); 31Assert.Equal(expectedName, fontFamily.Name); 41Assert.Equal("Code New Roman", fontFamily.Name); 108Assert.Equal(families[i].Name, familiesWithGraphics[i].Name); 114Assert.Equal(fontFamily.Name, copy.Name); 125Assert.Equal("Courier New", fontFamily2.Name); 134Assert.Equal("Microsoft Sans Serif", fontFamily2.Name); 143Assert.Equal("Times New Roman", fontFamily2.Name); 225Assert.Equal(expectedName, fontFamily.GetName(languageCode));
System\Drawing\FontTests.cs (9)
301Assert.Equal(family.Name, font.Name); 302Assert.Equal($"@{family.Name}", font.OriginalFontName); 320Assert.Equal(family.Name, copy.Name); 399Assert.Equal(font.Name, clone.FontFamily.Name); 722Assert.Equal($"{expectedNamePrefix}{family.Name}", logFont.lfFaceName); 756Assert.Equal(family.Name, logFont.lfFaceName); 820Assert.Equal(font.Name, newFont.Name); 853Assert.Equal($"[Font: Name={family.Name}, Size=10, Units=4, GdiCharSet=10, GdiVerticalFont=True]", font.ToString()); 858Assert.Equal(expectedName, font.Name);
System\Drawing\GraphicsTests.cs (1)
270Assert.Equal("image", argumentException.ParamName);
System\Drawing\IconConverterTests.cs (8)
135Assert.Equal(_iconStr, (string)_icoConv.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(string))); 136Assert.Equal(_iconStr, (string)_icoConv.ConvertTo(_icon, typeof(string))); 152Assert.Equal(_iconStr, (string)_icoConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _icon, typeof(string))); 153Assert.Equal(_iconStr, (string)_icoConvFrmTD.ConvertTo(_icon, typeof(string))); 171Assert.Equal("(none)", (string)_icoConv.ConvertTo(null, typeof(string))); 172Assert.Equal("(none)", (string)_icoConv.ConvertTo(null, CultureInfo.CreateSpecificCulture("ru-RU"), null, typeof(string))); 174Assert.Equal("(none)", (string)_icoConvFrmTD.ConvertTo(null, typeof(string))); 175Assert.Equal("(none)", (string)_icoConvFrmTD.ConvertTo(null, CultureInfo.CreateSpecificCulture("de-DE"), null, typeof(string)));
System\Drawing\ImageConverterTests.cs (8)
157Assert.Equal(_imageStr, (string)_imgConv.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(string))); 158Assert.Equal(_imageStr, (string)_imgConv.ConvertTo(_image, typeof(string))); 159Assert.Equal(_imageStr, (string)_imgConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _image, typeof(string))); 160Assert.Equal(_imageStr, (string)_imgConvFrmTD.ConvertTo(_image, typeof(string))); 164Assert.Equal("(none)", (string)_imgConv.ConvertTo(null, typeof(string))); 165Assert.Equal("(none)", (string)_imgConv.ConvertTo(null, CultureInfo.CreateSpecificCulture("ru-RU"), null, typeof(string))); 167Assert.Equal("(none)", (string)_imgConvFrmTD.ConvertTo(null, typeof(string))); 168Assert.Equal("(none)", (string)_imgConvFrmTD.ConvertTo(null, CultureInfo.CreateSpecificCulture("de-DE"), null, typeof(string)));
System\Drawing\ImageFormatConverterTests.cs (8)
130Assert.Equal(_imageFmtStr, (string)_imgFmtConv.ConvertTo(null, CultureInfo.InvariantCulture, _imageFmt, typeof(string))); 131Assert.Equal(_imageFmtStr, (string)_imgFmtConv.ConvertTo(_imageFmt, typeof(string))); 133Assert.Equal(_imageFmtStr, (string)_imgFmtConvFrmTD.ConvertTo(null, CultureInfo.InvariantCulture, _imageFmt, typeof(string))); 134Assert.Equal(_imageFmtStr, (string)_imgFmtConvFrmTD.ConvertTo(_imageFmt, typeof(string))); 136Assert.Equal(string.Empty, (string)_imgFmtConv.ConvertTo(null, typeof(string))); 137Assert.Equal(string.Empty, (string)_imgFmtConv.ConvertTo(null, CultureInfo.CreateSpecificCulture("ru-RU"), null, typeof(string))); 139Assert.Equal(string.Empty, (string)_imgFmtConvFrmTD.ConvertTo(null, typeof(string))); 140Assert.Equal(string.Empty, (string)_imgFmtConvFrmTD.ConvertTo(null, CultureInfo.CreateSpecificCulture("de-DE"), null, typeof(string)));
System\Drawing\ImageTests.cs (17)
45Assert.Equal("LEAD Technologies Inc. V1.01\0", Encoding.ASCII.GetString(items[0].Value)); 102Assert.Equal("LEAD Technologies Inc. V1.01\0", Encoding.ASCII.GetString(item.Value)); 243Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 258Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 262Assert.Equal("New Value\0", Encoding.ASCII.GetString(items[1].Value)); 273Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 277Assert.Equal("New Value\0", Encoding.ASCII.GetString(items[1].Value)); 301Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 344Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 376Assert.Equal("New Value\0", Encoding.ASCII.GetString(items[3].Value)); 387Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 419Assert.Equal("New Value\0", Encoding.ASCII.GetString(items[3].Value)); 444Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 459Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 463Assert.Equal("New Value\0", Encoding.ASCII.GetString(items[1].Value)); 474Assert.Equal("Hello World\0", Encoding.ASCII.GetString(items[0].Value)); 478Assert.Equal("New Value\0", Encoding.ASCII.GetString(items[1].Value));
System\Drawing\Imaging\FrameDimensionTests.cs (1)
74Assert.Equal(expected, imageFormat.ToString());
System\Drawing\Imaging\ImageCodecInfoTests.cs (4)
98Assert.Equal(DllName, codecInfo.DllName); 107Assert.Equal(mask, BitConverter.ToString(codecInfo.SignatureMasks[i])); 111Assert.Equal(pattern, BitConverter.ToString(codecInfo.SignaturePatterns[0])); 113Assert.Equal(pattern2, BitConverter.ToString(codecInfo.SignaturePatterns[1]));
System\Drawing\Imaging\ImageFormatTests.cs (2)
99Assert.Equal(expected, imageFormat.ToString()); 107Assert.Equal(expected, img.RawFormat.ToString());
System\Drawing\Printing\MarginsConverterTests.cs (2)
143Assert.Equal(string.Empty, (string)mc.ConvertTo(null, typeof(string))); 144Assert.Equal(string.Empty, (string)mc.ConvertTo(context, CultureInfo.CreateSpecificCulture("ru-RU"), null, typeof(string)));
System\Drawing\Printing\MarginsTests.cs (1)
137Assert.Equal(expected, margins.ToString());
System\Drawing\Printing\PageSettingsTests.cs (2)
52Assert.Equal(ps.PaperSize.PaperName, clone.PaperSize.PaperName); 64Assert.Equal(ps.PaperSource.SourceName, clone.PaperSource.SourceName);
System\Drawing\Printing\PaperSizeTests.cs (4)
53Assert.Equal(name, size.PaperName); 138Assert.Equal(value, size.PaperName); 142Assert.Equal(value, size.PaperName); 228Assert.Equal(expected, size.ToString());
System\Drawing\Printing\PaperSourceTests.cs (2)
86Assert.Equal(value, source.SourceName); 90Assert.Equal(value, source.SourceName);
System\Drawing\Printing\PrintDocumentTests.cs (4)
42Assert.Equal("document", document.DocumentName); 73Assert.Equal(documentName, document.DocumentName); 81Assert.Equal(string.Empty, document.DocumentName); 229Assert.Equal(expected, document.ToString());
System\Drawing\Printing\PrinterResolutionTests.cs (1)
97Assert.Equal(expected, resolution.ToString());
System\Drawing\Printing\PrinterSettingsTests.cs (4)
272Assert.Equal(printFileName, printerSettings.PrintFileName); 351Assert.Equal(printerName, printerSettings.PrinterName); 597Assert.Equal(newPrinterSettings.PrinterName, printerSettings.PrinterName); 616Assert.Equal(expected, printerSettings.ToString());
System\Drawing\StringFormatTests.cs (1)
423Assert.Equal("[StringFormat, FormatFlags=DirectionVertical]", format.ToString());
System\Drawing\SystemFontsTests.cs (3)
31Assert.Equal(font.Name, otherFont.Name); 84Assert.Equal(systemFontName, font.SystemFontName); 89Assert.Equal(windowsFontName, font.Name);
System\Drawing\Text\PrivateFontCollectionTests.cs (6)
31Assert.Equal("Code New Roman", fontFamily.Name); 48Assert.Equal("Code New Roman", fontFamily.Name); 65Assert.Equal("Code New Roman", fontFamily.Name); 85Assert.Equal("Code New Roman", fontFamily.Name); 86Assert.Equal("Bonjour", fontFamily.GetName(FrenchLCID)); 147Assert.Equal("Code New Roman", font.Name);
System.ServiceModel.Federation.Tests (5)
WSTrustChannelSecurityTokenProviderTest.cs (5)
67Assert.Equal(claims.Dialect, trustRequest.Claims.Dialect); 70Assert.Equal(claimUri, ctype.Uri); 71Assert.Equal(claimValue, ctype.Value); 74Assert.Equal(eln1, trustRequest.AdditionalXmlElements[0].Name); 75Assert.Equal(eln2, trustRequest.AdditionalXmlElements[1].Name);
System.ServiceModel.Http.Tests (32)
Channels\HttpRequestMessagePropertyTest.cs (8)
19Assert.Equal("POST", requestMsgProperty.Method); 20Assert.Equal(string.Empty, requestMsgProperty.QueryString); 41Assert.Equal(original.QueryString, copy.QueryString); 42Assert.Equal(original.Method, copy.Method); 45Assert.Equal(original.Headers[testKeyName], copy.Headers[testKeyName]); 51Assert.Equal("httpRequest", HttpRequestMessageProperty.Name); 60Assert.Equal(newMethod, requestMsgProperty.Method); 76Assert.Equal(newQueryString, requestMsgProperty.QueryString);
ServiceModel\BasicHttpBindingTest.cs (14)
23Assert.Equal("BasicHttpBinding", binding.Name); 24Assert.Equal("http://tempuri.org/", binding.Namespace); 25Assert.Equal("http", binding.Scheme); 27Assert.Equal(Encoding.GetEncoding("utf-8").WebName, binding.TextEncoding.WebName); 48Assert.Equal("BasicHttpBinding", binding.Name); 49Assert.Equal("http://tempuri.org/", binding.Namespace); 50Assert.Equal("https", binding.Scheme); 52Assert.Equal(Encoding.GetEncoding("utf-8").WebName, binding.TextEncoding.WebName); 72Assert.Equal("BasicHttpBinding", binding.Name); 73Assert.Equal("http://tempuri.org/", binding.Namespace); 74Assert.Equal("http", binding.Scheme); 76Assert.Equal(Encoding.GetEncoding("utf-8").WebName, binding.TextEncoding.WebName); 168Assert.Equal(value, binding.Name); 188Assert.Equal(value, binding.Namespace);
ServiceModel\BasicHttpsBindingTest.cs (10)
21Assert.Equal("BasicHttpsBinding", binding.Name); 22Assert.Equal("http://tempuri.org/", binding.Namespace); 23Assert.Equal("https", binding.Scheme); 25Assert.Equal(Encoding.GetEncoding("utf-8").WebName, binding.TextEncoding.WebName); 46Assert.Equal("BasicHttpsBinding", binding.Name); 47Assert.Equal("http://tempuri.org/", binding.Namespace); 48Assert.Equal("https", binding.Scheme); 50Assert.Equal(Encoding.GetEncoding("utf-8").WebName, binding.TextEncoding.WebName); 156Assert.Equal(value, binding.Name); 176Assert.Equal(value, binding.Namespace);
System.ServiceModel.NetTcp.Tests (2)
Channels\TcpConnectionPoolSettingsTest.cs (1)
23Assert.Equal(groupName, settings.GroupName);
ServiceModel\NetTcpBindingTest.cs (1)
25Assert.Equal("net.tcp", binding.Scheme);
System.ServiceModel.Primitives.Tests (76)
Channels\CustomBindingTest.cs (1)
47Assert.Equal(bindingName, actualBindingName);
Channels\MessageTest.cs (11)
29Assert.Equal(s_action, message.Headers.Action); 41Assert.Equal(s_action, message.Headers.Action); 47Assert.Equal(content, messageBody); 56Assert.Equal(s_action, message.Headers.Action); 62Assert.Equal(string.Empty, messageBody); 78Assert.Equal(expected, actual); 91Assert.Equal(s_action, message.Headers.Action); 96Assert.Equal(faultReason, msgFault.Reason.GetMatchingTranslation().Text); 101Assert.Equal(s_action, message.Headers.Action); 106Assert.Equal(faultReason, msgFault.Reason.GetMatchingTranslation().Text); 110Assert.Equal(((FaultDetail)faultDetail).Message, msgFDetail.Message);
Description\ContractDescriptionTest.cs (2)
202Assert.Equal(typeof(IDescriptionTestsService).Name, contractDescription.ContractType.Name); 203Assert.Equal("http://tempuri.org/", contractDescription.Namespace);
Description\OperationBehaviorTest.cs (3)
84Assert.Equal("Rpc", serializerBehavior.XmlSerializerFormatAttribute.Style.ToString()); 88Assert.Equal("Document", serializerBehavior.XmlSerializerFormatAttribute.Style.ToString()); 119Assert.Equal(obj.Members[i].Name, deserialized.Members[i].Name);
IdentityModel\SecurityTokenProviderTest.cs (27)
25Assert.Equal("GetTokenCore", token.Id); 28Assert.Equal("RenewTokenCore", token.Id); 30Assert.Equal("CancelTokenCore", provider.CancelTokenMethodCalled); 35Assert.Equal("GetTokenCore", token.Id); 39Assert.Equal("RenewTokenCore", token.Id); 42Assert.Equal("CancelTokenCore", provider.CancelTokenMethodCalled); 46Assert.Equal("GetTokenCore", token.Id); 49Assert.Equal("RenewTokenCore", token.Id); 51Assert.Equal("CancelTokenCore", provider.CancelTokenMethodCalled); 61Assert.Equal("GetTokenCore", token.Id); 64Assert.Equal("RenewTokenCore", token.Id); 66Assert.Equal("CancelTokenCore", provider.CancelTokenMethodCalled); 71Assert.Equal("BeginGetTokenCore", token.Id); 75Assert.Equal("BeginRenewTokenCore", token.Id); 78Assert.Equal("BeginCancelTokenCore", provider.CancelTokenMethodCalled); 82Assert.Equal("BeginGetTokenCore", token.Id); 85Assert.Equal("BeginRenewTokenCore", token.Id); 87Assert.Equal("BeginCancelTokenCore", provider.CancelTokenMethodCalled); 99Assert.Equal("GetTokenCore", token.Id); 102Assert.Equal("RenewTokenCore", token.Id); 104Assert.Equal("CancelTokenCore", provider.CancelTokenMethodCalled); 109Assert.Equal("GetTokenCore", token.Id); 113Assert.Equal("RenewTokenCore", token.Id); 116Assert.Equal("CancelTokenCore", provider.CancelTokenMethodCalled); 120Assert.Equal("GetTokenCoreAsync", token.Id); 123Assert.Equal("RenewTokenCoreAsync", token.Id); 125Assert.Equal("CancelTokenCoreAsync", provider.CancelTokenMethodCalled);
Security\SecurityNegotiationExceptionTest.cs (2)
24Assert.Equal(exceptionMessage, exception2.Message); 27Assert.Equal(exceptionMessage, exception3.InnerException.Message);
Security\SecurityTokenRequirementTest.cs (2)
20Assert.Equal(NetValue, tokenrequirement.TokenType); 30Assert.Equal(value, tokenrequirement.TokenType);
ServiceModel\ChannelFactoryTest.cs (3)
49Assert.Equal(toStringExpected, toStringResult); 106Assert.Equal(toStringExpected, toStringResult); 159Assert.Equal(toStringExpected, toStringResult);
ServiceModel\DuplexChannelFactoryTest.cs (1)
239Assert.Equal(toStringExpected, toStringResult);
ServiceModel\FaultExceptionTest.cs (22)
50Assert.Equal(netfxBsl, sr.ReadToEnd()); 54Assert.Equal("Fault Message", faultException.Detail.Message); 71Assert.Equal(netfxBsl, sr.ReadToEnd()); 74Assert.Equal("The creator of this fault did not specify a Reason.", faultException.Message); 77Assert.Equal("Sender", faultException.Code.Name); 78Assert.Equal(string.Empty, faultException.Code.Namespace); 84Assert.Equal(CultureInfo.CurrentCulture.Name, faultReasonText.XmlLang); 85Assert.Equal("The creator of this fault did not specify a Reason.", faultReasonText.Text); 98Assert.Equal(reason, exception.Reason.ToString()); 112Assert.Equal(detail.Message, exception.Detail.Message); 114Assert.Equal(reason.ToString(), exception.Message); 137Assert.Equal(reason, exception.Reason.ToString()); 138Assert.Equal(reason, exception.Message); 146Assert.Equal(string.Empty, exception.Reason.ToString()); 147Assert.Equal(string.Empty, exception.Message); 163Assert.Equal(reason, exception.Reason.ToString()); 164Assert.Equal(reason, exception.Message); 192Assert.Equal(reason, exception.Reason.ToString()); 193Assert.Equal(reason, exception.Message); 195Assert.Equal(action, exception.Action); 203Assert.Equal(string.Empty, exception.Reason.ToString()); 204Assert.Equal(string.Empty, exception.Message);
ServiceModel\MessageContractTest.cs (2)
44Assert.Equal(wrapperName, messageCA.WrapperName); 73Assert.Equal(wrapperNamespace, messageCA.WrapperNamespace);
System.ServiceModel.UnixDomainSocket.Tests (1)
ServiceModel\UnixDomainSocketBindingTest.cs (1)
26Assert.Equal("net.uds", binding.Scheme);
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Generators\ApplicationConfigurationInitializeBuilderTests.cs (1)
43Assert.Equal(expected, output);
System.Windows.Forms.Design.Tests (273)
CodeDomHelpers.cs (1)
17Assert.Equal(GetConstructionString(expected[i]), GetConstructionString(actual[i]));
Serialization\PrimitiveCodeDomSerializerTests.cs (1)
48Assert.Equal(typeof(byte).ToString(), cast.TargetType.BaseType);
System\ComponentModel\Design\ArrayEditorTests.cs (3)
32Assert.Equal("net.ComponentModel.CollectionEditor", editor.HelpTopic); 44Assert.Equal("net.ComponentModel.CollectionEditor", editor.HelpTopic); 123Assert.Equal(expected, editor.GetDisplayText(value));
System\ComponentModel\Design\ByteViewerTests.cs (5)
103Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 805Assert.Equal(expected, textBox.Text); 812Assert.Equal("123", textBox.Text); 835Assert.Equal(expected, textBox.Text); 842Assert.Equal("123", textBox.Text);
System\ComponentModel\Design\CollectionEditorTests.cs (3)
35Assert.Equal("net.ComponentModel.CollectionEditor", editor.HelpTopic); 47Assert.Equal("net.ComponentModel.CollectionEditor", editor.HelpTopic); 805Assert.Equal(expected, editor.GetDisplayText(value));
System\ComponentModel\Design\ComponentDesignerTests.cs (31)
847Assert.Equal("StringValue", component1.StringProperty); 851Assert.Equal(uniqueMethodName, component3.StringProperty); 868Assert.Equal("StringValue", component1.StringProperty); 872Assert.Equal(uniqueMethodName, component3.StringProperty); 961Assert.Equal(uniqueName, component.StringProperty); 974Assert.Equal(uniqueName, component.StringProperty); 1076Assert.Equal("StringValue", component1.StringProperty); 1080Assert.Equal(uniqueMethodName, component3.StringProperty); 1100Assert.Equal("StringValue", component1.StringProperty); 1104Assert.Equal(uniqueMethodName, component3.StringProperty); 1179Assert.Equal("StringValue", component.StringProperty); 1190Assert.Equal("StringValue", component.StringProperty); 1272Assert.Equal("StringValue", component.StringProperty); 1283Assert.Equal("StringValue", component.StringProperty); 1362Assert.Equal("StringValue", component.StringProperty); 1373Assert.Equal("StringValue", component.StringProperty); 1459Assert.Equal("StringValue", component.StringProperty); 1472Assert.Equal("StringValue", component.StringProperty); 1566Assert.Equal("StringValue", component.StringProperty); 1579Assert.Equal("StringValue", component.StringProperty); 1660Assert.Equal("StringValue", component.StringProperty); 1670Assert.Equal("StringValue", component.StringProperty); 1933Assert.Equal("StringValue", component.StringProperty); 1945Assert.Equal("StringValue", component.StringProperty); 2317Assert.Equal(descriptor.Name, result.Name); 2337Assert.Equal(descriptor.Name, result.Name); 2441Assert.Equal("Event", result.Name); 2643Assert.Equal(expectedValue, component.Value); 2747Assert.Equal(descriptor.Name, result.Name); 2768Assert.Equal(descriptor.Name, result.Name); 2881Assert.Equal("Event", result.Name);
System\ComponentModel\Design\DesignerActionHeaderItemTests.cs (4)
18Assert.Equal(expectedDisplayName, item.DisplayName); 19Assert.Equal(category, item.Category); 36Assert.Equal(expectedDisplayName, item.DisplayName); 37Assert.Equal(displayName, item.Category);
System\ComponentModel\Design\DesignerActionItemTests.cs (3)
18Assert.Equal(expectedDisplayName, item.DisplayName); 19Assert.Equal(category, item.Category); 20Assert.Equal(description, item.Description);
System\ComponentModel\Design\DesignerActionListTests.cs (20)
73Assert.Equal("AnnotatedMethod", item1.MemberName); 74Assert.Equal("DisplayName", item1.DisplayName); 75Assert.Equal("Description", item1.Description); 76Assert.Equal("Category", item1.Category); 79Assert.Equal("AnnotatedProperty", item2.MemberName); 80Assert.Equal("DisplayName", item2.DisplayName); 81Assert.Equal("Description", item2.Description); 82Assert.Equal("Category", item2.Category); 85Assert.Equal("EmptyAnnotatedMethod", item3.MemberName); 86Assert.Equal("EmptyAnnotatedMethod", item3.DisplayName); 91Assert.Equal("EmptyAnnotatedProperty", item4.MemberName); 92Assert.Equal("EmptyAnnotatedProperty", item4.DisplayName); 97Assert.Equal("NullAnnotatedMethod", item5.MemberName); 98Assert.Equal("NullAnnotatedMethod", item5.DisplayName); 103Assert.Equal("NullAnnotatedProperty", item6.MemberName); 104Assert.Equal("NullAnnotatedProperty", item6.DisplayName); 109Assert.Equal("PublicMethod", item7.MemberName); 110Assert.Equal("PublicMethod", item7.DisplayName); 115Assert.Equal("PublicProperty", item8.MemberName); 116Assert.Equal("PublicProperty", item8.DisplayName);
System\ComponentModel\Design\DesignerActionMethodItemTests.cs (20)
24Assert.Equal(memberName, item.MemberName); 25Assert.Equal(expectedDisplayName, item.DisplayName); 26Assert.Equal(category, item.Category); 27Assert.Equal(description, item.Description); 50Assert.Equal(memberName, item.MemberName); 51Assert.Equal(expectedDisplayName, item.DisplayName); 52Assert.Equal(category, item.Category); 53Assert.Equal(description, item.Description); 76Assert.Equal(memberName, item.MemberName); 77Assert.Equal(expectedDisplayName, item.DisplayName); 78Assert.Equal(category, item.Category); 102Assert.Equal(memberName, item.MemberName); 103Assert.Equal(expectedDisplayName, item.DisplayName); 104Assert.Equal(category, item.Category); 128Assert.Equal(memberName, item.MemberName); 129Assert.Equal(expectedDisplayName, item.DisplayName); 154Assert.Equal(memberName, item.MemberName); 155Assert.Equal(expectedDisplayName, item.DisplayName); 196Assert.Equal(memberName, list.CalledMethod); 201Assert.Equal(memberName, list.CalledMethod);
System\ComponentModel\Design\DesignerActionPropertyItemTests.cs (9)
18Assert.Equal(memberName, item.MemberName); 19Assert.Equal(expectedDisplayName, item.DisplayName); 20Assert.Equal(category, item.Category); 21Assert.Equal(description, item.Description); 38Assert.Equal(memberName, item.MemberName); 39Assert.Equal(expectedDisplayName, item.DisplayName); 40Assert.Equal(category, item.Category); 58Assert.Equal(memberName, item.MemberName); 59Assert.Equal(expectedDisplayName, item.DisplayName);
System\ComponentModel\Design\DesignerActionServiceTests.cs (1)
505Assert.Equal("Verbs", actionItem.Category);
System\ComponentModel\Design\DesignerActionTextItemTests.cs (2)
18Assert.Equal(expectedDisplayName, item.DisplayName); 19Assert.Equal(category, item.Category);
System\ComponentModel\Design\DesignerHostTests.cs (59)
287Assert.Equal(expectedName, component1.Site.Name); 298Assert.Equal(expectedName, component2.Site.Name); 309Assert.Equal(expectedName, component3.Site.Name); 320Assert.Equal(expectedName, component4.Site.Name); 336Assert.Equal("name1", host.RootComponentClassName); 342Assert.Equal("name1", component1.Site.Name); 348Assert.Equal("name1", host.RootComponentClassName); 353Assert.Equal("name2", component2.Site.Name); 359Assert.Equal("name1", host.RootComponentClassName); 370Assert.Equal("name1", host.RootComponentClassName); 444Assert.Equal("name", component.Site.Name); 514Assert.Equal("name", component.Site.Name); 608Assert.Equal("name", component.Site.Name); 638Assert.Equal("name", component.Site.Name); 642Assert.Equal("name", component.Site.Name); 693Assert.Equal("name", component.Site.Name); 697Assert.Equal("name", component.Site.Name); 735Assert.Equal("name2", component2.Site.Name); 788Assert.Equal("name1", component1.Site.Name); 799Assert.Equal("name2", component2.Site.Name); 835Assert.Equal("name1", component.Site.Name); 879Assert.Equal("name1", component.Site.Name); 1286Assert.Equal("NAME", component.Site.Name); 1290Assert.Equal("NAME", component.Site.Name); 1352Assert.Equal(oldRootComponentClassName, host.RootComponentClassName); 1356Assert.Equal(oldName, component.Site.Name); 1357Assert.Equal(oldRootComponentClassName, host.RootComponentClassName); 1361Assert.Equal(expectedName, component.Site.Name); 1362Assert.Equal(expectedRootComponentClassName, host.RootComponentClassName); 1380Assert.Equal("oldName", e.OldName); 1399Assert.Equal("name", component.Site.Name); 1435Assert.Equal("oldName", component.Site.Name); 1439Assert.Equal(expectedName, component.Site.Name); 1667Assert.Equal(component.GetType().FullName, host.RootComponentClassName); 1720Assert.Equal("name", component.Site.Name); 1874Assert.Equal("No Description Available", transaction1.Description); 1876Assert.Equal("No Description Available", host.TransactionDescription); 1881Assert.Equal("No Description Available", transaction2.Description); 1883Assert.Equal("No Description Available", host.TransactionDescription); 1899Assert.Equal(expectedDescription, transaction1.Description); 1901Assert.Equal(expectedDescription, host.TransactionDescription); 1906Assert.Equal("CustomDescription", transaction2.Description); 1908Assert.Equal("CustomDescription", host.TransactionDescription); 1971Assert.Equal("Description1", transaction1.Description); 1974Assert.Equal("Description2", transaction2.Description); 1976Assert.Equal("Description1", host.TransactionDescription); 1982Assert.Equal("Description1", transaction1.Description); 1985Assert.Equal("Description2", transaction2.Description); 1987Assert.Equal("Description1", host.TransactionDescription); 1993Assert.Equal("Description1", transaction1.Description); 1996Assert.Equal("Description2", transaction2.Description); 2084Assert.Equal("Description1", transaction1.Description); 2087Assert.Equal("Description2", transaction2.Description); 2089Assert.Equal("Description1", host.TransactionDescription); 2095Assert.Equal("Description1", transaction1.Description); 2098Assert.Equal("Description2", transaction2.Description); 2100Assert.Equal("Description1", host.TransactionDescription); 2106Assert.Equal("Description1", transaction1.Description); 2109Assert.Equal("Description2", transaction2.Description);
System\ComponentModel\Design\DesignSurfaceTests.cs (13)
88Assert.Equal(typeof(RootDesignerComponent).FullName, surface.Host.RootComponentClassName); 110Assert.Equal(typeof(RootDesignerComponent).FullName, surface.Host.RootComponentClassName); 157Assert.Equal(typeof(RootDesignerComponent).FullName, surface.Host.RootComponentClassName); 936Assert.Equal(typeof(RootDesignerComponent).FullName, host.RootComponentClassName); 1213Assert.Equal("Transaction1", host.TransactionDescription); 1217Assert.Equal("Transaction1", host.TransactionDescription); 1223Assert.Equal("Transaction1", host.TransactionDescription); 1332Assert.Equal("Transaction1", host.TransactionDescription); 1336Assert.Equal("Transaction1", host.TransactionDescription); 1342Assert.Equal("Transaction1", host.TransactionDescription); 1357Assert.Equal("Transaction1", host.TransactionDescription); 1361Assert.Equal("Transaction1", host.TransactionDescription); 1367Assert.Equal("Transaction1", host.TransactionDescription);
System\ComponentModel\Design\ProjectTargetFrameworkAttributeTests.cs (1)
13Assert.Equal(targetFrameworkMoniker, attribute.TargetFrameworkMoniker);
System\ComponentModel\Design\Serialization\CodeDomComponentSerializationServiceTests.cs (15)
172Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName); 257Assert.Equal("name", Assert.Single(names)); 260Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName); 359Assert.Equal("name", Assert.Single(names)); 362Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName); 404Assert.Equal("name", Assert.Single(names)); 407Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName); 450Assert.Equal("name", Assert.Single(names)); 453Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName); 496Assert.Equal("name", Assert.Single(names)); 499Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName); 545Assert.Equal("name", Assert.Single(names)); 548Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName); 594Assert.Equal("name", Assert.Single(names)); 597Assert.Equal(typeof(DataClass).Assembly.GetName(true).FullName, Assert.Single(assemblies).FullName);
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (9)
210Assert.Equal("Category", property.Category); 213Assert.Equal("Description", property.Description); 215Assert.Equal("DisplayName", property.DisplayName); 219Assert.Equal("Value", property.Name); 306Assert.Equal(nameof(PropertyProvider.Value), property.Name); 314Assert.Equal(nameof(OtherPropertyProvider.OtherValue), otherProperty.Name); 1927Assert.Equal("OtherName", iManager.GetName(instance2)); 1958Assert.Equal(name, iManager.GetName(instance)); 1972Assert.Equal(name, iManager.GetName(instance));
System\ComponentModel\Design\SiteNestedContainerTests.cs (11)
80Assert.Equal(expectedFullName, nestedSite.FullName); 84Assert.Equal(componentName, host.RootComponentClassName); 96Assert.Equal(componentName, component1.Site.Name); 240Assert.Equal("name1", host.RootComponentClassName); 246Assert.Equal("name1", component1.Site.Name); 252Assert.Equal("name1", host.RootComponentClassName); 257Assert.Equal("name2", component2.Site.Name); 263Assert.Equal("name1", host.RootComponentClassName); 274Assert.Equal("name1", host.RootComponentClassName); 436Assert.Equal("name", component.Site.Name); 584Assert.Equal(component.GetType().FullName, host.RootComponentClassName);
System\ComponentModel\Design\UndoUnitTests.cs (1)
38Assert.Equal(expectedName, unit.Name);
System\Drawing\Design\BitmapEditorTests.cs (1)
58Assert.Equal("Bitmap files", editor.GetFileDialogDescription());
System\Drawing\Design\ImageEditorTests.cs (3)
34Assert.Equal(expected, SubImageEditor.CreateExtensionsString(extensions, sep)); 44Assert.Equal("CustomGetImageExtendersEditor(*.PublicImageEditor,*.PrivateImageEditor)|*.PublicImageEditor;*.PrivateImageEditor", SubImageEditor.CreateFilterEntry(editor)); 105Assert.Equal("All image files", editor.GetFileDialogDescription());
System\Drawing\Design\MetafileEditorTests.cs (1)
41Assert.Equal("Metafiles", editor.GetFileDialogDescription());
System\Drawing\Design\ToolboxItemTests.cs (32)
22Assert.Equal(".NET Component", item.ComponentType); 62Assert.Equal(value.FullName, item.AssemblyName.FullName); 65Assert.Equal(value.FullName, ((AssemblyName)item.Properties["AssemblyName"]).FullName); 68Assert.Equal(value.Version?.ToString() ?? string.Empty, item.Version); 81Assert.Equal(value.FullName, item.AssemblyName.FullName); 84Assert.Equal(value.FullName, ((AssemblyName)item.Properties["AssemblyName"]).FullName); 87Assert.Equal(value.Version?.ToString() ?? string.Empty, item.Version); 136Assert.Equal(expected, item.Company); 141Assert.Equal(expected, item.Company); 212Assert.Equal(expected, item.Description); 217Assert.Equal(expected, item.Description); 236Assert.Equal(expected, item.DisplayName); 241Assert.Equal(expected, item.DisplayName); 347Assert.Equal(expected, item.TypeName); 352Assert.Equal(expected, item.TypeName); 1163Assert.Equal(expectedName.FullName, Assert.IsType<AssemblyName>(actual).FullName); 1363Assert.Equal("Microsoft Corporation", item.Company); 1364Assert.Equal("Description", item.Description); 1365Assert.Equal(type.Assembly.FullName, item.AssemblyName.FullName); 1367Assert.Equal(type.Name, item.DisplayName); 1371Assert.Equal("Microsoft Corporation", item.Company); 1372Assert.Equal("Description", item.Description); 1373Assert.Equal(type.Assembly.FullName, item.AssemblyName.FullName); 1375Assert.Equal(type.Name, item.DisplayName); 1400Assert.Equal("Microsoft Corporation", item.Company); 1402Assert.Equal(typeof(object).Assembly.FullName, item.AssemblyName.FullName); 1404Assert.Equal("Object", item.DisplayName); 1427Assert.Equal("AssemblyName", item.AssemblyName.FullName); 1429Assert.Equal("Company", item.Company); 1430Assert.Equal("Description", item.Description); 1432Assert.Equal("DisplayName", item.DisplayName); 1528Assert.Equal(expected, item.ToString());
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (12)
233Assert.Equal("TestValue", (string)nameProperty.GetValue(obj: null)); 264Assert.Equal("TestValue", (string)nameProperty.GetValue(obj: null)); 293Assert.Equal("TestValue", (string)nameProperty.GetValue(obj: null)); 565Assert.Equal(key, result); 573Assert.Equal("Invalid_Resource_", result); 581Assert.Equal("Resource_Name", result); 589Assert.Equal("_1_name", result); 597Assert.Equal(expectedResult, result); 643Assert.Equal(changedUrl, mediaPlayer.URL); 646Assert.Equal(expectedUrl, mediaPlayer.URL); 691Assert.Equal("hello test\r\n!", resourceTxtFileContents); 705Assert.Equal("HELLO", Encoding.UTF8.GetString(contents));
System\Windows\Forms\Design\Behavior\SnapLineTests.cs (3)
33Assert.Equal(DefaultFilter, snapLine.Filter); 55Assert.Equal(DefaultFilter, snapLine.Filter); 237Assert.Equal(expected, snapLine.ToString());
System\Windows\Forms\Design\FileNameEditorTests.cs (2)
49Assert.Equal("All Files(*.*)|*.*", openFileDialog.Filter); 50Assert.Equal("Open File", openFileDialog.Title);
System\Windows\Forms\Design\FolderNameEditorTests.cs (2)
62Assert.Equal(expected, browser.Description); 66Assert.Equal(expected, browser.Description);
System\Windows\Forms\Design\WindowsFormsDesignerOptionServiceTests.cs (5)
34Assert.Equal("DesignerOptions", childCollection.Name); 58Assert.Equal("DesignerOptions", childCollection.Name); 75Assert.Equal("DesignerOptions", childCollection.Name); 82Assert.Equal("DesignerOptions", otherChildCollection.Name); 98Assert.Equal("DesignerOptions", childCollection.Name);
System.Windows.Forms.Interop.Tests (5)
AccessibleObjectTests.cs (1)
729Assert.Equal(getter.Name, $"get_{member.Name}");
PropertyGridTests.cs (2)
38Assert.Equal("Error From StandardErrorInfoUsageTest", ex.Message); 69Assert.Equal("Error From RawErrorInfoUsageTest", ex.Message);
RichTextBoxTests.cs (2)
83Assert.Equal("Fine Text", Marshal.PtrToStringUni((IntPtr)value.lpstrText)); 159Assert.Equal("Fine Text", Marshal.PtrToStringAnsi(value.lpstrText));
System.Windows.Forms.Primitives.Tests (36)
Interop\ComCtl32\LVITEMWTests.cs (2)
37Assert.Equal(expected, text); 68Assert.Equal("012345", text);
Interop\Ole32\CALPOLESTRTests.cs (1)
18Assert.Equal("Swizzle", values[0]);
Interop\Oleaut32\ITypeInfoTests.cs (3)
92Assert.Equal("Width", name.ToString()); 198Assert.Equal("Width", rgszNames[0].ToString()); 199Assert.Equal("Name2", rgszNames[1].ToString());
Interop\User32\GetWindowTextTests.cs (1)
40Assert.Equal(longText, result);
Interop\User32\SystemParametersInfoWTests.cs (1)
35Assert.Equal(expected.Name, actual.Name);
System\Windows\Forms\Automation\UiaTextRangeTests.cs (2)
878Assert.Equal(expected, actual.ToString()); 1185Assert.Equal(faceName ?? "", actual);
System\Windows\Forms\FileDialogCustomPlaceTests.cs (1)
91Assert.Equal(expected, place.ToString());
System\Windows\Forms\Internals\ArgumentValidationTests.cs (22)
13Assert.Equal(nameof(param), exception.ParamName); 22Assert.Equal(paramName, exception.ParamName); 40Assert.Equal(nameof(param), exception.ParamName); 51Assert.Equal(paramName, exception.ParamName); 68Assert.Equal(nameof(param), exception.ParamName); 77Assert.Equal(paramName, exception.ParamName); 93Assert.Equal(nameof(param), exception.ParamName); 108Assert.Equal("paramName", exception.ParamName); 123Assert.Equal(nameof(param), exception.ParamName); 131Assert.Equal(nameof(param), exception.ParamName); 146Assert.Equal("paramName", exception.ParamName); 154Assert.Equal("paramName", exception.ParamName); 171Assert.Equal(nameof(param), exception.ParamName); 181Assert.Equal(nameof(param), exception.ParamName); 198Assert.Equal("paramName", exception.ParamName); 208Assert.Equal("paramName", exception.ParamName); 216Assert.Equal(param, value); 224Assert.Equal(nameof(param), exception.ParamName); 232Assert.Equal(nameof(param), exception.ParamName); 240Assert.Equal(param, value); 248Assert.Equal("paramName", exception.ParamName); 256Assert.Equal("paramName", exception.ParamName);
Windows\Win32\System\Com\SafeArrayScopeTests.cs (3)
74Assert.Equal(message, e.Message); 79Assert.Equal(message, e.Message); 94Assert.Equal("Wanted SafeArrayScope<System.String> but got SAFEARRAY with VarType=VT_INT", e.Message);
System.Windows.Forms.Primitives.TestUtilities (9)
Extensions\AssertExtensions.cs (8)
30Assert.Equal(expectedMessage, Assert.Throws<T>(action).Message); 54Assert.Equal(expectedParamName, exception.ParamName); 73Assert.Equal(expectedParamName, exception.ParamName); 81Assert.Equal(expectedParamName, exception.ParamName); 133Assert.Equal(expectedParamName, exception.ParamName); 143Assert.Equal(expectedParamName, exception.ParamName); 159Assert.Equal(expectedParamName, ((ArgumentException)exception).ParamName); 543Assert.Equal(expected, actual);
Metafiles\Validators\TextOutValidator.cs (1)
40Assert.Equal(_text, textOut->emrtext.GetText().ToString());
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
EnumValidationTests.cs (1)
341Assert.Equal(expected, line);
System.Windows.Forms.Tests (3297)
BindingNavigatorTests.cs (15)
44Assert.Equal("container", ex.ParamName); 60Assert.Equal("bindingNavigatorPositionItem", bn.PositionItem.Name); 61Assert.Equal("bindingNavigatorCountItem", bn.CountItem.Name); 102Assert.Equal(itemNames[i], item.Name.Trim()); 103Assert.Equal(itemTexts[i], item.Text.Trim()); 138Assert.Equal("1", control.PositionItem.Text); 139Assert.Equal($"of {rowsCount}", control.CountItem.Text); 145Assert.Equal("0", control.PositionItem.Text); 146Assert.Equal("of 0", control.CountItem.Text); 174Assert.Equal("1", control.PositionItem.Text); 175Assert.Equal($"of {rowsCount1}", control.CountItem.Text); 180Assert.Equal("1", control.PositionItem.Text); 181Assert.Equal($"of {rowsCount2}", control.CountItem.Text); 190Assert.Equal("1", control.PositionItem.Text); 191Assert.Equal($"of {rowsCount2}", control.CountItem.Text);
CheckedListBoxTests.cs (4)
64Assert.Equal(expected, box.DisplayMember); 157Assert.Equal(expected, box.ValueMember); 260Assert.Equal("index", ex.ParamName); 361Assert.Equal("index", ex.ParamName);
ContextMenuStripTests.cs (1)
28Assert.Equal("container", ex.ParamName);
KeyboardTooltipStateMachineTests.cs (2)
76Assert.Equal("Shown", currentState); 107Assert.Equal(isPersistent && OsVersion.IsWindows11_OrGreater() ? "Hidden" : "Shown", currentState);
misc\CollectionHelperTests.cs (12)
80Assert.Equal("key-one", firstTargetItem.Key); 81Assert.Equal("value-one", firstTargetItem.Value); 85Assert.Equal("key-two", secondTargetItem.Key); 86Assert.Equal("value-two", secondTargetItem.Value); 103Assert.Equal("key-one", (string)firstTargetItem.Key); 104Assert.Equal("value-one", (string)firstTargetItem.Value); 108Assert.Equal("key-two", (string)secondTargetItem.Key); 109Assert.Equal("value-two", (string)secondTargetItem.Value); 125Assert.Equal("key-one", (string)firstTargetItem.Key); 126Assert.Equal("value-one", (string)firstTargetItem.Value); 129Assert.Equal("key-two", (string)secondTargetItem.Key); 130Assert.Equal("value-two", (string)secondTargetItem.Value);
NumericUpDownTests.cs (1)
17Assert.Equal("0", nud.Text);
SerializableTypesTests.cs (18)
56Assert.Equal(licenseKey, result.LicenseKey); 57Assert.Equal(licenseKey, state.LicenseKey); 65Assert.Equal(payload, Encoding.UTF8.GetString(buffer)); 145Assert.Equal("Header", result.Header); 148Assert.Equal("GroupName", result.Name); 151Assert.Equal("Item", item.Text); 183Assert.Equal("Item1", result.Text); 187Assert.Equal("Item1", item.Text); 191Assert.Equal(FontFamily.GenericSansSerif.Name, result.Font.FontFamily.Name); 232Assert.Equal("SubItem1", result.Text); 239Assert.Equal(FontFamily.GenericSansSerif.Name, result.Font.FontFamily.Name); 368Assert.Equal("node1", result.Text); 370Assert.Equal("key", result.SelectedImageKey); 372Assert.Equal("node2", result.FirstNode.Text); 373Assert.Equal("node3", result.LastNode.Text); 374Assert.Equal("tool tip text", result.ToolTipText); 375Assert.Equal("node1", result.Name); 380Assert.Equal(FontFamily.GenericSansSerif.Name, result.NodeFont.FontFamily.Name);
System\Resources\ResxDataNodeTests.cs (1)
22Assert.Equal(nodeName, dataNode.Name);
System\Resources\ResXFileRef.ConverterTests.cs (4)
58Assert.Equal(expected, result); 70Assert.Equal(expected, result); 82Assert.Equal(expected, Encoding.Default.GetString(result)); 94Assert.Equal(expected, Encoding.Default.GetString(result.ToArray()));
System\Resources\ResXFileRefTests.cs (4)
19Assert.Equal(fileName, fileRef.FileName); 20Assert.Equal(typeName, fileRef.TypeName); 33Assert.Equal(fileName, fileRef.FileName); 34Assert.Equal(typeName, fileRef.TypeName);
System\Resources\ResXResourceReaderTests.cs (1)
30Assert.Equal("axWindowsMediaPlayer1.OcxState", key);
System\Resources\ResXResourceSetTests.cs (2)
26Assert.Equal(expected, strResXValue); 47Assert.Equal(expected, strResXValue);
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (19)
661Assert.Equal("Text", accessibleObject.Name); 786Assert.Equal("Text", accessibleObject.Name); 807Assert.Equal("Text", accessibleObject.Name); 1524Assert.Equal(result, iAccessible.get_accDefaultAction(varChild)); 1569Assert.Equal(result, iAccessible.get_accDefaultAction(varChild)); 1624Assert.Equal(result, iAccessible.get_accDescription(varChild)); 1672Assert.Equal(result, iAccessible.get_accDescription(varChild)); 1727Assert.Equal(result, iAccessible.get_accHelp(varChild)); 1775Assert.Equal(result, iAccessible.get_accHelp(varChild)); 1838Assert.Equal(stringResult, pszHelpFile); 1891Assert.Equal(stringResult, pszHelpFile); 1945Assert.Equal(result, iAccessible.get_accKeyboardShortcut(varChild)); 1993Assert.Equal(result, iAccessible.get_accKeyboardShortcut(varChild)); 2051Assert.Equal(result, iAccessible.get_accName(varChild)); 2099Assert.Equal(result, iAccessible.get_accName(varChild)); 2346Assert.Equal(result, iAccessible.get_accValue(varChild)); 2394Assert.Equal(result, iAccessible.get_accValue(varChild)); 2640Assert.Equal("MSAA Button", accessible.accName); 2643Assert.Equal("Press", accessible.accDefaultAction);
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (1)
243Assert.Equal(expected, ((BSTR)actual).ToString());
System\Windows\Forms\AccessibleObjects\CategoryGridEntryAccessibleObjectTests.cs (2)
157Assert.Equal(expected, ((BSTR)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LocalizedControlTypePropertyId)).ToStringAndFree()); 184Assert.Equal("Collapse", ((BSTR)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\CheckBox.CheckBoxAccessibleObjectTests.cs (3)
186Assert.Equal("TestDescription", checkBoxAccessibleObject.Description); 201Assert.Equal("TestName", checkBoxAccessibleObject.Name); 303Assert.Equal(checkBox.AccessibilityObject.DefaultAction, ((BSTR)checkBox.AccessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\CheckedListBoxItemAccessibleObjectTests.cs (6)
48Assert.Equal(testName, checkedListBox.AccessibilityObject.GetChild(0).Name); 170Assert.Equal(string.Empty, checkedListBox.AccessibilityObject.GetChild(0).DefaultAction); 189Assert.Equal(expected, checkedListBox.AccessibilityObject.GetChild(0).DefaultAction); 202Assert.Equal(expected, ((BSTR)checkedListBox.AccessibilityObject.GetChild(0).GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree()); 215Assert.Equal(isChecked.ToString(), checkedListBox.AccessibilityObject.GetChild(0).Value); 265Assert.Equal(checkValue.ToString(), ((BSTR)checkedListBox.AccessibilityObject.GetChild(0).GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\ColumnHeader.ListViewColumnHeaderAccessibleObjectTests.cs (2)
36Assert.Equal(testText, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 37Assert.Equal(testText, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleNamePropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\ComboBox.ChildAccessibleObjectTests.cs (1)
38Assert.Equal(testName, accessibleObject.Name);
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxAccessibleObjectTests.cs (5)
119Assert.Equal(name, ((BSTR)comboBox.AccessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 120Assert.Equal(name, ((BSTR)comboBox.AccessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleNamePropertyId)).ToStringAndFree()); 311Assert.Equal(comboBox.AccessibleDefaultActionDescription, comboBox.AccessibilityObject.DefaultAction); 351Assert.Equal(expectedAction, comboBox.AccessibilityObject.DefaultAction); 362Assert.Equal(expectedAction, ((BSTR)comboBox.AccessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (7)
76Assert.Equal(person.Name, itemAccessibleObject.Name); 99Assert.Equal("aaa", comboBoxItem1.Name); 106Assert.Equal("aaa", comboBoxItem2.Name); 114Assert.Equal("aaa", comboBoxItem3.Name); 139Assert.Equal("aaa", comboBoxItem3.Name); 147Assert.Equal("aaa", comboBoxItem2.Name); 155Assert.Equal("aaa", comboBoxItem1.Name);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (41)
68Assert.Equal(string.Empty, accessibleObject.Value); 192Assert.Equal(accessibleDefaultActionDescription, accessibleObject.DefaultAction); 206Assert.Equal(accessibleDefaultActionDescription, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree()); 223Assert.Equal(accessibleDescription, accessibleObject.Description); 290Assert.Equal(result, accessibleObject.Help); 294Assert.Equal(result, accessibleObject.Help); 335Assert.Equal(expected, accessibleObject.KeyboardShortcut); 350Assert.Equal(expected, accessibleObject.KeyboardShortcut); 365Assert.Equal(expected, accessibleObject.KeyboardShortcut); 435Assert.Equal(expected, accessibleObject.KeyboardShortcut); 460Assert.Equal(expected, accessibleObject.KeyboardShortcut); 484Assert.Equal(expected, accessibleObject.KeyboardShortcut); 535Assert.Equal(expected, accessibleObject.Name); 551Assert.Equal(expected, accessibleObject.Name); 567Assert.Equal(expected, accessibleObject.Name); 676Assert.Equal(expected, accessibleObject.Name); 702Assert.Equal(expected, accessibleObject.Name); 727Assert.Equal(expected, accessibleObject.Name); 739Assert.Equal(value, accessibleObject.Name); 741Assert.Equal(value, ownerControl.AccessibleName); 745Assert.Equal(value, accessibleObject.Name); 747Assert.Equal(value, ownerControl.AccessibleName); 858Assert.Equal(string.Empty, accessibleObject.Value); 862Assert.Equal(string.Empty, accessibleObject.Value); 962Assert.Equal(helpNamespace, fileName); 967Assert.Equal(helpNamespace, fileName); 1096Assert.Equal("ControlAccessibleObject: Owner = System.Windows.Forms.Control", accessibleObject.ToString()); 1277Assert.Equal(expectedValue, ((BSTR)controlAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AccessKeyPropertyId)).ToStringAndFree()); 1314Assert.Equal("Test Accessible Description", accessibleObjectDescription); 1332Assert.Equal("Test Name", ((BSTR)controlAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleNamePropertyId)).ToStringAndFree()); 1333Assert.Equal("Test Name", ((BSTR)controlAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 1373Assert.Equal(expectedName, ((BSTR)controlAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 1603Assert.Equal(expected, ((BSTR)actual).ToStringAndFree()); 1666Assert.Equal("Alt+c", accessibleObject.KeyboardShortcut); 1683Assert.Equal("Alt+l", accessibleObject.KeyboardShortcut); 1691Assert.Equal("Alt+c", accessibleObject.KeyboardShortcut); 1696Assert.Equal("Alt+l", accessibleObject.KeyboardShortcut); 1709Assert.Equal("control", accessibleObject.Name); 1713Assert.Equal("&control", accessibleObject.Name); 1717Assert.Equal("CustomName", accessibleObject.Name); 1721Assert.Equal("CustomName", accessibleObject.Name);
System\Windows\Forms\AccessibleObjects\DataGridView.DataGridViewEditingPanelAccessibleObjectTests.cs (1)
116Assert.Equal(string.Empty, ((BSTR)editingPanel.AccessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_HelpTextPropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
42Assert.Equal(expectedStatus, itemStatus);
System\Windows\Forms\AccessibleObjects\DataGridViewCellAccessibleObjectTests.cs (15)
147Assert.Equal(expected, accessibleObject.DefaultAction); 156Assert.Equal(expected, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree()); 184Assert.Equal(string.Empty, accessibleObject.Name); 196Assert.Equal(string.Empty, accessibleObject.Name); 207Assert.Equal(string.Empty, accessibleObject.Name); 221Assert.Equal(expected, accessibleObject.Name); 238Assert.Equal(expected, accessibleObject.Name); 257Assert.Equal(expected, accessibleObject.Name); 277Assert.Equal(expected, accessibleObject.Name); 358Assert.Equal(expected, accessibleObject.Value); 684Assert.Equal(accessibleObject.Name, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 685Assert.Equal(accessibleObject.Name, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleNamePropertyId)).ToStringAndFree()); 700Assert.Equal(accessibleObject.Help ?? string.Empty, ((BSTR)actual).ToStringAndFree()); 1044Assert.Equal(expected, ((BSTR)dataGridViewCellAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AutomationIdPropertyId)).ToStringAndFree()); 1483Assert.Equal($"{string.Format(SR.DataGridView_AccRowName, expectedIndex)}, Not sorted.", dataGridView.Rows[0].Cells[0].AccessibilityObject.Name);
System\Windows\Forms\AccessibleObjects\DataGridViewCheckBoxCellAccessibleObjectTests.cs (3)
118Assert.Equal(string.Empty, cell.AccessibilityObject.DefaultAction); 147Assert.Equal(expected, accessibleObject.DefaultAction); 171Assert.Equal(expected, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\DataGridViewColumnHeaderCellAccessibleObjectTests.cs (3)
53Assert.Equal(testHeaderName, accessibleObject.Name); 66Assert.Equal(testHeaderName, accessibleObject.Value); 149Assert.Equal("Header text 1", ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\DataGridViewImageCellAccessibleObjectTests.cs (2)
24Assert.Equal(string.Empty, accessibleObject.DefaultAction); 85Assert.Equal(testDescription, cell.AccessibilityObject.Description);
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (18)
71Assert.Equal(string.Format(SR.DataGridView_AccRowName, -1), accessibilityObject.Name); 88Assert.Equal(string.Format(SR.DataGridView_AccRowName, 1), accessibleObject1.Name); 89Assert.Equal(string.Format(SR.DataGridView_AccRowName, 2), accessibleObject2.Name); 90Assert.Equal(string.Format(SR.DataGridView_AccRowName, 3), accessibleObject3.Name); 109Assert.Equal(string.Format(SR.DataGridView_AccRowName, -1), accessibleObject1.Name); 110Assert.Equal(string.Format(SR.DataGridView_AccRowName, 1), accessibleObject2.Name); 111Assert.Equal(string.Format(SR.DataGridView_AccRowName, 2), accessibleObject3.Name); 130Assert.Equal(string.Format(SR.DataGridView_AccRowName, 1), accessibleObject1.Name); 131Assert.Equal(string.Format(SR.DataGridView_AccRowName, -1), accessibleObject2.Name); 132Assert.Equal(string.Format(SR.DataGridView_AccRowName, 2), accessibleObject3.Name); 151Assert.Equal(string.Format(SR.DataGridView_AccRowName, 1), accessibleObject1.Name); 152Assert.Equal(string.Format(SR.DataGridView_AccRowName, 2), accessibleObject2.Name); 153Assert.Equal(string.Format(SR.DataGridView_AccRowName, -1), accessibleObject3.Name); 230Assert.Equal(expected, accessibleObject.Value); 314Assert.Equal("Selected Row Cells", selectedAccessibleObject.Name); 318Assert.Equal("Selected Row Cells", selectedAccessibleObject.Value); 2384Assert.Equal("test1", ((BSTR)dataGridView.Rows[0].AccessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree()); 2399Assert.Equal(string.Format(SR.DataGridView_AccRowName, expectedIndex), dataGridView.Rows[0].AccessibilityObject.Name);
System\Windows\Forms\AccessibleObjects\DataGridViewRowHeaderCellAccessibleObjectTests.cs (3)
41Assert.Equal(string.Empty, accessibleObject.Value); 58Assert.Equal(row.AccessibilityObject.Name, row.HeaderCell.AccessibilityObject.Name); 79Assert.Equal(expected, accessibleObject.DefaultAction);
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedCellsAccessibleObjectTests.cs (1)
205Assert.Equal("Selected Cells", ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedRowCellsAccessibleObjectTests.cs (1)
214Assert.Equal("Selected Row Cells", ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\DataGridViewTopLeftHeaderCellAccessibleObjectTests.cs (4)
76Assert.Equal(expected, cell.AccessibilityObject.DefaultAction); 85Assert.Equal(string.Empty, cell.AccessibilityObject.Value); 128Assert.Equal(expected, cell.AccessibilityObject.Name); 141Assert.Equal(string.Empty, cell.AccessibilityObject.Name);
System\Windows\Forms\AccessibleObjects\DataGridViewTopRowAccessibleObjectTests.cs (2)
1241Assert.Equal(string.Empty, ((BSTR)topRowAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_HelpTextPropertyId)).ToStringAndFree()); 1244Assert.Equal("Top Row", ((BSTR)topRowAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\DateTimePicker.DateTimePickerAccessibleObjectTests.cs (6)
56Assert.Equal(expected, actual); 115Assert.Equal(dt.ToLongDateString(), ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree()); 282Assert.Equal(string.Empty, dateTimePicker.AccessibilityObject.Name); 292Assert.Equal(testAccessibleName, dateTimePicker.AccessibilityObject.Name); 317Assert.Equal(expected, accessibleObject.DefaultAction); 374Assert.Equal("Alt+d", keyboardShortcut);
System\Windows\Forms\AccessibleObjects\ErrorProvider.ControlItem.ControlItemAccessibleObjectTests.cs (1)
126Assert.Equal(testError, accessibleObject.Name);
System\Windows\Forms\AccessibleObjects\ErrorProviderAccessibleObjectTests.cs (4)
96Assert.Equal(expected, actual); 99Assert.Equal(expected, actual); 104Assert.Equal(expected, actual); 107Assert.Equal(expected, actual);
System\Windows\Forms\AccessibleObjects\GroupBoxAccessibleObjectTests.cs (4)
25Assert.Equal(testAccName, ((BSTR)groupBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 26Assert.Equal(testAccName, ((BSTR)groupBoxAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleNamePropertyId)).ToStringAndFree()); 80Assert.Equal(testAccDescription, groupBoxAccessibleObject.Description); 129Assert.Equal(expected, actual);
System\Windows\Forms\AccessibleObjects\HScrollBar.HScrollBarAccessibleObjectTests.cs (2)
50Assert.Equal(accessibleDescription, accessibleObject.Description); 65Assert.Equal(accessibleName, accessibleObject.Name);
System\Windows\Forms\AccessibleObjects\HScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
44Assert.Equal(string.Empty, accessibleObject.DefaultAction);
System\Windows\Forms\AccessibleObjects\LabelAccessibleObjectTests.cs (2)
27Assert.Equal(expected, value); 81Assert.Equal(testAccDescription, labelAccessibleObject.Description);
System\Windows\Forms\AccessibleObjects\LinkLabel.Link.LinkAccessibleObjectTests.cs (3)
202Assert.Equal(testName, actual); 224Assert.Equal(names[index], actual); 238Assert.Equal(accessibleObject.Help ?? string.Empty, actual);
System\Windows\Forms\AccessibleObjects\ListBox.ListBoxItemAccessibleObjectTests.cs (3)
42Assert.Equal(person.Name, itemAccessibleObject.Name); 65Assert.Equal(itemAccessibleObject.Name, ((BSTR)actual).ToStringAndFree()); 116Assert.Equal(itemAccessibleObject.Help ?? string.Empty, actual);
System\Windows\Forms\AccessibleObjects\ListVIew.ListViewAccessibleObjectTests.cs (3)
72Assert.Equal(((int)(listView.View)).ToString(), accessibleObject.GetMultiViewProviderViewName((int)View.Details)); 212Assert.Equal("ListView", accessibleName); 215Assert.Equal("List", automationId);
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (8)
61Assert.Equal("Group1", accessibleName); 64Assert.Equal("ListViewGroup-0", automationId); 93Assert.Equal("Group1", ((BSTR)groupAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 94Assert.Equal("Group1", ((BSTR)groupAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleNamePropertyId)).ToStringAndFree()); 96Assert.Equal("ListViewGroup-0", ((BSTR)defaultGroupAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AutomationIdPropertyId)).ToStringAndFree()); 97Assert.Equal("ListViewGroup-1", ((BSTR)groupAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AutomationIdPropertyId)).ToStringAndFree()); 107Assert.Equal("WinForm", ((BSTR)groupAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_FrameworkIdPropertyId)).ToStringAndFree()); 125Assert.Equal($"{name}. {subtitle}", accessibleName);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (2)
100Assert.Equal("ListItem", accessibleName); 104Assert.Equal("ListViewItem-0", automationId);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemBaseAccessibleObjectTests.cs (2)
262Assert.Equal("WinForm", ((BSTR)actual).ToString()); 398Assert.Equal(expected, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AutomationIdPropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (4)
198Assert.Equal("sub1", listItemAccessibleObject.GetChild(2).Name); 202Assert.Equal("sub2", listItemAccessibleObject.GetChild(2).Name); 222Assert.Equal("sub1", listItemAccessibleObject.GetChild(1).Name); 226Assert.Equal("sub2", listItemAccessibleObject.GetChild(1).Name);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (3)
81Assert.Equal($"Test {childId + 1}", accessibleName); 84Assert.Equal($"ListViewSubItem-{childId}", automationId); 87Assert.Equal("WinForm", frameworkId);
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (3)
29Assert.Equal(accessibilityObject.Name, ((BSTR)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 35Assert.Equal("1", ((BSTR)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AutomationIdPropertyId)).ToStringAndFree()); 116Assert.Equal(listView.Items[0].Text, accessibilityObject.Name);
System\Windows\Forms\AccessibleObjects\MaskedTextBox.MaskedTextBoxAccessibleObjectTests.cs (3)
91Assert.Equal(expectedAccessibleName, ((BSTR)actual).ToStringAndFree()); 109Assert.Equal(expectedAccessibleName, actual); 124Assert.Equal(maskedTextBox.WindowText, actual);
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (2)
24Assert.Equal("Test Name", ((BSTR)accessibleName).ToStringAndFree()); 83Assert.Equal("Test Description", accessibleObjectDescription);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarAccessibleObjectTests.cs (2)
23Assert.Equal(name, calendar.Name); 247Assert.Equal(initName, calendar.Name);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarBodyAccessibleObjectTests.cs (1)
153Assert.Equal(expected, calendarBody.Name);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarCellAccessibleObjectTests.cs (1)
157Assert.Equal(expected, cellAccessibleObject.Name);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarTodayLinkAccessibleObjectTests.cs (1)
83Assert.Equal(expected, actual);
System\Windows\Forms\AccessibleObjects\MonthCalendar.MonthCalendarAccessibleObjectTests.cs (1)
84Assert.Equal(dt.ToLongDateString(), ((BSTR)monthCalendar.AccessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ValueValuePropertyId)).ToStringAndFree());
System\Windows\Forms\AccessibleObjects\Panel.PanelAccessibleObjectTests.cs (2)
40Assert.Equal(expected, panelAccessibleObject.Description); 56Assert.Equal(expected, panelAccessibleObject.Name);
System\Windows\Forms\AccessibleObjects\PictureBox.PictureBoxAccessibleObjectTests.cs (2)
39Assert.Equal("TestDescription", pictureBoxAccessibleObject.Description); 54Assert.Equal("TestName", pictureBoxAccessibleObject.Name);
System\Windows\Forms\AccessibleObjects\ProgressBarAccessibleObjectTests.cs (4)
34Assert.Equal("5%", accessibilityObject.Value); 59Assert.Equal(string.Empty, accessibilityObject.Value); 88Assert.Equal(expectedValue, accessibilityObject.Value); 93Assert.Equal(expectedValue, accessibilityObject.Value);
System\Windows\Forms\AccessibleObjects\PropertyGridView.GridViewListBoxItemAccessibleObjectTests.cs (1)
54Assert.Equal(itemEntry.ToString(), accessibleObject.Name);
System\Windows\Forms\AccessibleObjects\PropertyGridView.PropertyGridViewAccessibleObjectTests.cs (1)
313Assert.Equal(name, listAccessibleName);
System\Windows\Forms\AccessibleObjects\RadioButton.RadioButtonAccessibleObjectTests.cs (4)
40Assert.Equal("TestActionDescription", radioButtonAccessibleObject.DefaultAction); 54Assert.Equal("TestActionDescription", ((BSTR)radioButtonAccessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleDefaultActionPropertyId)).ToStringAndFree()); 69Assert.Equal("TestDescription", radioButtonAccessibleObject.Description); 84Assert.Equal("TestName", radioButtonAccessibleObject.Name);
System\Windows\Forms\AccessibleObjects\SplitContainer.SplitContainerAccessibleObjectTests.cs (1)
89Assert.Equal(expected, value);
System\Windows\Forms\AccessibleObjects\Splitter.SplitterAccessibleObjectTests.cs (2)
39Assert.Equal("TestDescription", splitterAccessibleObject.Description); 54Assert.Equal("TestName", splitterAccessibleObject.Name);
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (2)
24Assert.Equal("Test Name", ((BSTR)accessibleName).ToStringAndFree()); 63Assert.Equal("Test Description", accessibleObjectDescription);
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (7)
559Assert.Equal(accessibleName, accessibleObject.Name); 574Assert.Equal(accessibleDescription, accessibleObject.Description); 589Assert.Equal(accessibleDefaultActionDescription, accessibleObject.DefaultAction); 609Assert.Equal(accessibleDefaultActionDescription, ((BSTR)actual).ToStringAndFree()); 701Assert.Equal(expectedKeyboardShortcut, accessibleObject.KeyboardShortcut); 721Assert.Equal(expectedKeyboardShortcut, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AccessKeyPropertyId)).ToStringAndFree()); 765Assert.Equal(expected, actual);
System\Windows\Forms\AccessibleObjects\TabPage.TabAccessibleObjectTests.cs (1)
63Assert.Equal(expectedText, accessibleObject.Name);
System\Windows\Forms\AccessibleObjects\TabPage.TabPageAccessibleObjectTests.cs (6)
115Assert.Equal(expectedName, accessibleObject.Name); 130Assert.Equal(accessibleDescription, accessibleObject.Description); 162Assert.Equal(accessibleDefaultActionDescription, accessibleObject.DefaultAction); 457Assert.Equal(expectedKeyboardShortcut, accessibleObject.KeyboardShortcut); 477Assert.Equal(expectedKeyboardShortcut, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AccessKeyPropertyId)).ToStringAndFree()); 494Assert.Equal(expected, actual);
System\Windows\Forms\AccessibleObjects\TextBoxAccessibleObjectTests.cs (1)
131Assert.Equal(expectedHelpText, helpText);
System\Windows\Forms\AccessibleObjects\TextBoxBaseAccessibleObjectTests.cs (2)
62Assert.Equal(text, textBoxBase.Text); 96Assert.Equal(textBoxBase.Text, accessibleObject.Value);
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (2)
34Assert.Equal("Test Name", ((BSTR)accessibleName).ToStringAndFree()); 73Assert.Equal("Test Description", accessibleObjectDescription);
System\Windows\Forms\AccessibleObjects\ToolStripContainer.ToolStripContainerAccessibleObjectTests.cs (1)
34Assert.Equal(expected, value);
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripControlHostAccessibleObjectTests.cs (1)
36Assert.Equal(string.Empty, accessibleObject.DefaultAction);
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (6)
26Assert.Equal("DefaultActionDescription", accessibleObject.DefaultAction); 27Assert.Equal("Description", accessibleObject.Description); 30Assert.Equal("Name", accessibleObject.Name); 85Assert.Equal("Test Accessible Description", accessibleObjectDescription); 99Assert.Equal(string.Empty, ((BSTR)result).ToString()); 107Assert.Equal("Test Name", ((BSTR)accessibleName).ToString());
System\Windows\Forms\AccessibleObjects\ToolStripScrollButton.ToolStripScrollButtonAccessibleObjectTests.cs (4)
150Assert.Equal(expectedUpButtonName, upScrollButtonAccessibleObject.Name); 151Assert.Equal(expectedDefaultAction, upScrollButtonAccessibleObject.DefaultAction); 154Assert.Equal(expectedDownButtonName, downScrollButtonAccessibleObject.Name); 155Assert.Equal(expectedDefaultAction, downScrollButtonAccessibleObject.DefaultAction);
System\Windows\Forms\AccessibleObjects\ToolStripTextBox.ToolStripTextBoxAccessibleObjectTests.cs (2)
22Assert.Equal("Test Name", ((BSTR)accessibleName).ToStringAndFree()); 61Assert.Equal("Test Description", accessibleObjectDescription);
System\Windows\Forms\AccessibleObjects\TrackBar.TrackBarAccessibleObjectTests.cs (9)
37Assert.Equal("50", accessibilityObject.Value); 60Assert.Equal(string.Empty, accessibilityObject.Value); 92Assert.Equal(expectedValueString, accessibilityObject.Value); 98Assert.Equal(expectedValueString, accessibilityObject.Value); 117Assert.Equal("50", accessibilityObject.Value); 135Assert.Equal(string.Empty, accessibilityObject.Value); 317Assert.Equal(defaultAction, trackBar.AccessibilityObject.DefaultAction); 335Assert.Equal(defaultAction, ((BSTR)actual).ToStringAndFree()); 437Assert.Equal(expected, value);
System\Windows\Forms\AccessibleObjects\TreeNode.TreeNodeAccessibleObjectTests.cs (2)
484Assert.Equal("Node2", control.SelectedNode?.Text); 487Assert.Equal("Node4", control.SelectedNode?.Text);
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (3)
28Assert.Equal(accessibilityObject.Name, ((BSTR)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 34Assert.Equal(((BSTR)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree(), ((BSTR)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_AutomationIdPropertyId)).ToStringAndFree()); 115Assert.Equal(treeView.Nodes[0].Text, accessibilityObject.Name);
System\Windows\Forms\AccessibleObjects\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObjectTests.cs (1)
92Assert.Equal(name, actual);
System\Windows\Forms\AccessibleObjects\UpDownBase.UpDownEdit.UpDownEditAccessibleObjectTests.cs (2)
55Assert.Equal(name, accessibleObject.Name); 99Assert.Equal(upDown.AccessibilityObject.KeyboardShortcut, accessibleObject.KeyboardShortcut);
System\Windows\Forms\AccessibleObjects\VScrollBar.ScrollBarThumbAccessibleObjectTests.cs (1)
44Assert.Equal(string.Empty, accessibleObject.DefaultAction);
System\Windows\Forms\AccessibleObjects\VScrollBar.VScrollBarAccessibleObjectTests.cs (2)
49Assert.Equal(accessibleDescription, accessibleObject.Description); 64Assert.Equal(accessibleName, accessibleObject.Name);
System\Windows\Forms\AccessibleObjects\WebBrowser.WebBrowserAccessibleObjectTests.cs (1)
35Assert.Equal(expected, value);
System\Windows\Forms\ApplicationTests.cs (1)
641Assert.Equal(expected.Name, actual.Name);
System\Windows\Forms\AutoCompleteStringCollectionTests.cs (1)
160Assert.Equal(s, collection[0]);
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (18)
26Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 42Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 58Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 74Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 90Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 104Assert.Equal("Misc", property.Category); 115Assert.Equal("Category", property.Category); 222Assert.Equal("Description", property.Description); 504Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 544Assert.Equal("CustomProperty", Assert.IsType<DataSource>(property.GetValue(control)).Value); 572Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 605Assert.Equal("CustomProperty", Assert.IsType<DataSource>(property.GetValue(control)).Value); 636Assert.Equal("CustomProperty", Assert.IsType<DataSource>(property.GetValue(control)).Value); 786Assert.Equal("CustomProperty", control.CustomProperty); 789Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 851Assert.Equal("CustomProperty", control.CustomProperty); 854Assert.Equal("Misc", Assert.IsType<CategoryAttribute>(property.Attributes[typeof(CategoryAttribute)]).Category); 885Assert.Equal("CustomProperty", Assert.IsType<DataSource>(control.DataSourceProperty).Value);
System\Windows\Forms\AxHost.PropertyBagStreamTests.cs (1)
40Assert.Equal(obj.Name, ((NameClass)dispatch.ToObject()).Name);
System\Windows\Forms\AxHostTests.cs (20)
96Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 190Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 888Assert.Equal(expected, control.Text); 893Assert.Equal(expected, control.Text); 911Assert.Equal(expected, control.Text); 919Assert.Equal(expected, control.Text); 1460Assert.Equal(font.Name, result.Name); 1466Assert.Equal(font.Name, result.Name); 1489Assert.Equal(font.Name, result.Name); 1495Assert.Equal(font.Name, result.Name); 1535Assert.Equal(font.Name, result.Name); 1556Assert.Equal(font.Name, result.Name); 2496Assert.Equal(nameof(AxHost.Enter), eventDescriptor.Name); 2501Assert.Equal(nameof(AxHost.Enter), eventDescriptor.Name); 2519Assert.Equal(nameof(AxHost.Enter), eventDescriptor.Name); 2527Assert.Equal(nameof(AxHost.Enter), eventDescriptor.Name); 2540Assert.Equal(nameof(AxHost.Text), propertyDescriptor.Name); 2545Assert.Equal(nameof(AxHost.Text), propertyDescriptor.Name); 2563Assert.Equal(nameof(AxHost.Text), propertyDescriptor.Name); 2571Assert.Equal(nameof(AxHost.Text), propertyDescriptor.Name);
System\Windows\Forms\BindingCompleteEventArgsTests.cs (3)
42Assert.Equal(errorText ?? "", e.ErrorText); 61Assert.Equal(errorText ?? "", e.ErrorText); 80Assert.Equal(errorText ?? "", e.ErrorText);
System\Windows\Forms\BindingMemberInfoTests.cs (3)
30Assert.Equal(expectedPath, info.BindingPath); 31Assert.Equal(expectedField, info.BindingField); 32Assert.Equal(expectedMember, info.BindingMember);
System\Windows\Forms\BindingTests.cs (2)
269Assert.Equal(expected, binding.FormatString); 273Assert.Equal(expected, binding.FormatString);
System\Windows\Forms\ButtonBaseTests.cs (41)
92Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 1150Assert.Equal("FlatStyle", e.AffectedProperty); 1321Assert.Equal("FlatStyle", e.AffectedProperty); 1450Assert.Equal("ImageKey", control.ImageKey); 1563Assert.Equal("Image", e.AffectedProperty); 1738Assert.Equal("Image", e.AffectedProperty); 1898Assert.Equal("ImageAlign", e.AffectedProperty); 2010Assert.Equal("ImageAlign", e.AffectedProperty); 2222Assert.Equal(expected, control.ImageKey); 2228Assert.Equal(expected, control.ImageKey); 2260Assert.Equal(expectedImageKey, control.ImageKey); 2266Assert.Equal(expectedImageKey, control.ImageKey); 2282Assert.Equal(expected, control.ImageKey); 2288Assert.Equal(expected, control.ImageKey); 2313Assert.Equal(expected, control.ImageKey); 2319Assert.Equal(expected, control.ImageKey); 2340Assert.Equal(expected, control.ImageKey); 2349Assert.Equal(expected, control.ImageKey); 3053Assert.Equal(expected, control.Text); 3059Assert.Equal(expected, control.Text); 3088Assert.Equal("Text", e.AffectedProperty); 3097Assert.Equal(expected, control.Text); 3105Assert.Equal(expected, control.Text); 3144Assert.Equal(expected, control.Text); 3152Assert.Equal(expected, control.Text); 3191Assert.Equal("Text", e.AffectedProperty); 3200Assert.Equal(expected, control.Text); 3211Assert.Equal(expected, control.Text); 3240Assert.Equal("text", control.Text); 3245Assert.Equal("text", control.Text); 3256Assert.Equal("text", control.Text); 3329Assert.Equal("TextAlign", e.AffectedProperty); 3453Assert.Equal("TextAlign", e.AffectedProperty); 3562Assert.Equal("TextImageRelation", e.AffectedProperty); 3679Assert.Equal("TextImageRelation", e.AffectedProperty); 3772Assert.Equal("UseCompatibleTextRendering", e.AffectedProperty); 3876Assert.Equal("UseCompatibleTextRendering", e.AffectedProperty); 3982Assert.Equal("Text", e.AffectedProperty); 4106Assert.Equal("Text", e.AffectedProperty); 7201Assert.Equal("Text", e.AffectedProperty); 7311Assert.Equal("Text", e.AffectedProperty);
System\Windows\Forms\ButtonTests.cs (26)
95Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 129Assert.Equal("Button", createParams.ClassName); 153Assert.Equal("Button", createParams.ClassName); 186Assert.Equal("Button", createParams.ClassName); 256Assert.Equal("Button", createParams.ClassName); 309Assert.Equal("AutoSize", e.AffectedProperty); 358Assert.Equal("AutoSize", e.AffectedProperty); 457Assert.Equal("AutoSize", e.AffectedProperty); 530Assert.Equal("AutoSize", e.AffectedProperty); 769Assert.Equal(expected, control.Text); 775Assert.Equal(expected, control.Text); 804Assert.Equal("Text", e.AffectedProperty); 813Assert.Equal(expected, control.Text); 821Assert.Equal(expected, control.Text); 860Assert.Equal(expected, control.Text); 868Assert.Equal(expected, control.Text); 907Assert.Equal("Text", e.AffectedProperty); 916Assert.Equal(expected, control.Text); 927Assert.Equal(expected, control.Text); 975Assert.Equal("text", control.Text); 980Assert.Equal("text", control.Text); 991Assert.Equal("text", control.Text); 2935Assert.Equal("Text", e.AffectedProperty); 3045Assert.Equal("Text", e.AffectedProperty); 3315Assert.Equal("System.Windows.Forms.Button, Text: ", control.ToString()); 3357Assert.Equal("System.Windows.Forms.Button, Text: Text", control.ToString());
System\Windows\Forms\CheckBoxTests.cs (3)
96Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 132Assert.Equal("Button", createParams.ClassName); 629Assert.Equal(expected, actual);
System\Windows\Forms\ColorDialogTests.cs (1)
360Assert.Equal("System.Windows.Forms.Tests.ColorDialogTests+SubColorDialog, Color: Color [Black]", dialog.ToString());
System\Windows\Forms\ColumnHeaderCollectionTests.cs (24)
169Assert.Equal(expectedText, header.Text); 190Assert.Equal(expectedText, header.Text); 212Assert.Equal(expectedText, header.Text); 235Assert.Equal(expectedName, header.Name); 236Assert.Equal(expectedText, header.Text); 257Assert.Equal(expectedName, header.Name); 258Assert.Equal(expectedText, header.Text); 280Assert.Equal(expectedName, header.Name); 281Assert.Equal(expectedText, header.Text); 305Assert.Equal(expectedName, header.Name); 306Assert.Equal(expectedText, header.Text); 309Assert.Equal(expectedImageKey, header.ImageKey); 722Assert.Equal(expectedText, header.Text); 734Assert.Equal(expectedText, header.Text); 747Assert.Equal(expectedText, header.Text); 761Assert.Equal(expectedName, header.Name); 762Assert.Equal(expectedText, header.Text); 774Assert.Equal(expectedName, header.Name); 775Assert.Equal(expectedText, header.Text); 788Assert.Equal(expectedName, header.Name); 789Assert.Equal(expectedText, header.Text); 804Assert.Equal(expectedName, header.Name); 805Assert.Equal(expectedText, header.Text); 808Assert.Equal(expectedImageKey, header.ImageKey);
System\Windows\Forms\ColumnHeaderTests.cs (51)
23Assert.Equal(string.Empty, header.ImageKey); 30Assert.Equal("ColumnHeader", header.Text); 49Assert.Equal(string.Empty, header.ImageKey); 56Assert.Equal("ColumnHeader", header.Text); 73Assert.Equal(expectedImageKey, header.ImageKey); 80Assert.Equal("ColumnHeader", header.Text); 509Assert.Equal(expected, header.ImageKey); 514Assert.Equal(expected, header.ImageKey); 529Assert.Equal(expectedImageKey, header.ImageKey); 534Assert.Equal(expectedImageKey, header.ImageKey); 547Assert.Equal(expected, header.ImageKey); 553Assert.Equal(expected, header.ImageKey); 571Assert.Equal(expected, header.ImageKey); 577Assert.Equal(expected, header.ImageKey); 604Assert.Equal(expected, header.ImageKey); 610Assert.Equal(expected, header.ImageKey); 631Assert.Equal(expected, header.ImageKey); 640Assert.Equal(expected, header.ImageKey); 770Assert.Equal(expected, header.Name); 781Assert.Equal(expected, header.Name); 785Assert.Equal(expected, header.Name); 797Assert.Equal(expected, header.Name); 802Assert.Equal(expected, header.Name); 822Assert.Equal(expected, header.Name); 830Assert.Equal(expected, header.Name); 846Assert.Equal(expected, header.Name); 847Assert.Equal(value, header.Site.Name); 851Assert.Equal(expected, header.Name); 852Assert.Equal(value, header.Site.Name); 874Assert.Equal("name", header.Name); 878Assert.Equal("name", header.Name); 901Assert.Equal("name", header.Name); 905Assert.Equal("name", header.Name); 931Assert.Equal(resultingName, header.Name); 958Assert.Equal(expected, header.Text); 962Assert.Equal(expected, header.Text); 974Assert.Equal(expected, header.Text); 978Assert.Equal(expected, header.Text); 991Assert.Equal(expected, header.Text); 995Assert.Equal(expected, header.Text); 1016Assert.Equal(expected, new string(column.pszText)); 1070Assert.Equal("text", header.Text); 1097Assert.Equal("text", header.Text); 1477Assert.Equal(string.Empty, header.ImageKey); 1484Assert.Equal("text", header.Text); 1516Assert.Equal(string.Empty, header.ImageKey); 1523Assert.Equal("text", header.Text); 1556Assert.Equal(string.Empty, header.ImageKey); 1563Assert.Equal("text", header.Text); 1593Assert.Equal($"ColumnHeader: Text: ColumnHeader", header.ToString()); 1604Assert.Equal($"ColumnHeader: Text: {header.Text}", header.ToString());
System\Windows\Forms\ColumnStyleTests.cs (2)
76Assert.Equal("Style", e.AffectedProperty); 113Assert.Equal("Style", e.AffectedProperty);
System\Windows\Forms\ComboBox.ComboBoxChildEditUiaProviderTests.cs (2)
169Assert.Equal(comboBox.AccessibleName, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_NamePropertyId)).ToStringAndFree()); 170Assert.Equal(comboBox.AccessibleName, ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_LegacyIAccessibleNamePropertyId)).ToStringAndFree());
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (3)
632Assert.Equal(expected, actual); 650Assert.Equal(string.Empty, actual); 1086Assert.Equal("Segoe UI", actual);
System\Windows\Forms\ComboBoxTests.cs (12)
106Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 141Assert.Equal("ComboBox", createParams.ClassName); 1333Assert.Equal(expectedText, control.Text); 1339Assert.Equal(expectedText, control.Text); 1358Assert.Equal(expectedText, control.Text); 1364Assert.Equal(expectedText, control.Text); 1732Assert.Equal("", control.Text); 1742Assert.Equal(expected, control.Text); 1756Assert.Equal(expected, control.Text); 1767Assert.Equal("12-9", control.Text); 2269Assert.Equal(selectedIndex.ToString(), comboBox.Text); 2691Assert.Equal(string.Empty, control.Text);
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (1)
48Assert.Equal("Arial", font.Name);
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (9)
50Assert.Equal("Misc", handleProperty.Category); 52Assert.Equal("Windows.Win32.System.Com.IDispatch+Interface", handleProperty.ComponentType.FullName); 55Assert.Equal("System.Int32", handleProperty.PropertyType.FullName); 68Assert.Equal("Misc", typeProperty.Category); 70Assert.Equal("Windows.Win32.System.Com.IDispatch+Interface", typeProperty.ComponentType.FullName); 72Assert.Equal("System.Int16", typeProperty.PropertyType.FullName); 133Assert.Equal("Misc", urlProperty.Category); 135Assert.Equal("Windows.Win32.System.Com.IDispatch+Interface", urlProperty.ComponentType.FullName); 137Assert.Equal("System.String", urlProperty.PropertyType.FullName);
System\Windows\Forms\ContainerControlTests.cs (3)
101Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 1331Assert.Equal("Hidden", currentState); 1356Assert.Equal("Hidden", currentState);
System\Windows\Forms\Control.ActiveXFontMarshallerTests.cs (2)
27Assert.Equal(font.Name, name.ToString()); 31Assert.Equal(font.Name, outFont.Name);
System\Windows\Forms\ControlBindingsCollectionTests.cs (8)
129Assert.Equal(nameof(Control.Text), binding.PropertyName); 146Assert.Equal(nameof(Control.Text), binding.PropertyName); 163Assert.Equal(nameof(Control.Text), binding.PropertyName); 180Assert.Equal(nameof(Control.Text), binding.PropertyName); 197Assert.Equal(nameof(Control.Text), binding.PropertyName); 202Assert.Equal("formatString", binding.FormatString); 214Assert.Equal(nameof(Control.Text), binding.PropertyName); 219Assert.Equal("formatString", binding.FormatString);
System\Windows\Forms\ControlTests.ControlCollection.cs (21)
43Assert.Equal("Parent", e.AffectedProperty); 118Assert.Equal(affectedProperty, e.AffectedProperty); 196Assert.Equal(affectedProperty, e.AffectedProperty); 232Assert.Equal(affectedProperty, e.AffectedProperty); 490Assert.Equal(affectedProperty, e.AffectedProperty); 1217Assert.Equal(affectedProperty, e.AffectedProperty); 1300Assert.Equal("Parent", e.AffectedProperty); 1929Assert.Equal("Parent", e.AffectedProperty); 1993Assert.Equal("Parent", e.AffectedProperty); 2056Assert.Equal("Parent", e.AffectedProperty); 2132Assert.Equal("Parent", e.AffectedProperty); 2800Assert.Equal("Parent", e.AffectedProperty); 2862Assert.Equal("Parent", e.AffectedProperty); 2956Assert.Equal("Parent", e.AffectedProperty); 3053Assert.Equal("ChildIndex", e.AffectedProperty); 3121Assert.Equal("ChildIndex", e.AffectedProperty); 3174Assert.Equal("ChildIndex", e.AffectedProperty); 3253Assert.Equal("ChildIndex", e.AffectedProperty); 3347Assert.Equal("ChildIndex", e.AffectedProperty); 3441Assert.Equal(affectedProperty, e.AffectedProperty); 3530Assert.Equal("Parent", e.AffectedProperty);
System\Windows\Forms\ControlTests.cs (7)
79Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 168Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 180Assert.Equal(expectedText, control.Text); 264Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 276Assert.Equal(expectedText, control.Text); 360Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 456Assert.Equal("Microsoft\u00AE .NET", control.ProductName);
System\Windows\Forms\ControlTests.Handlers.cs (9)
2256Assert.Equal(expectedText, control.Text); 2264Assert.Equal(expectedText, control.Text); 2404Assert.Equal(expectedText, control.Text); 2412Assert.Equal(expectedText, control.Text); 2537Assert.Equal(expectedText, control.Text); 2545Assert.Equal(expectedText, control.Text); 4752Assert.Equal(longString, control.Text); 4850Assert.Equal("Bounds", e.AffectedProperty); 4895Assert.Equal("Bounds", e.AffectedProperty);
System\Windows\Forms\ControlTests.Methods.cs (67)
148Assert.Equal("ChildIndex", e.AffectedProperty); 190Assert.Equal("ChildIndex", e.AffectedProperty); 245Assert.Equal("ChildIndex", e.AffectedProperty); 312Assert.Equal("ChildIndex", e.AffectedProperty); 483Assert.Equal(expectedText, control.Text); 530Assert.Equal(expectedText, control.Text); 535Assert.Equal(expectedText, control.Text); 542Assert.Equal(expectedText, control.Text); 670Assert.Equal(expectedText, control.Text); 4876Assert.Equal("PreferredSize", e.AffectedProperty); 4976Assert.Equal(longString, control.Text); 5022Assert.Equal(affectedProperty, e.AffectedProperty); 5052Assert.Equal(affectedProperty, e.AffectedProperty); 5082Assert.Equal(affectedProperty, e.AffectedProperty); 5133Assert.Equal(affectedProperty, e.AffectedProperty); 5141Assert.Equal("PreferredSize", e.AffectedProperty); 5186Assert.Equal(affectedProperty, e.AffectedProperty); 5212Assert.Equal(affectedProperty, e.AffectedProperty); 5250Assert.Equal(longString, control.Text); 7034Assert.Equal("ChildIndex", e.AffectedProperty); 7076Assert.Equal("ChildIndex", e.AffectedProperty); 7131Assert.Equal("ChildIndex", e.AffectedProperty); 7198Assert.Equal("ChildIndex", e.AffectedProperty); 7381Assert.Equal("Bounds", e.AffectedProperty); 7492Assert.Equal("Bounds", e.AffectedProperty); 7590Assert.Equal("Bounds", e.AffectedProperty); 7693Assert.Equal("Bounds", e.AffectedProperty); 7734Assert.Equal("Bounds", e.AffectedProperty); 7824Assert.Equal("Bounds", e.AffectedProperty); 7951Assert.Equal("Bounds", e.AffectedProperty); 7992Assert.Equal("Bounds", e.AffectedProperty); 8168Assert.Equal("Bounds", e.AffectedProperty); 8279Assert.Equal("Bounds", e.AffectedProperty); 8377Assert.Equal("Bounds", e.AffectedProperty); 8550Assert.Equal("Bounds", e.AffectedProperty); 8591Assert.Equal("Bounds", e.AffectedProperty); 8681Assert.Equal("Bounds", e.AffectedProperty); 8808Assert.Equal("Bounds", e.AffectedProperty); 8849Assert.Equal("Bounds", e.AffectedProperty); 8982Assert.Equal("Bounds", e.AffectedProperty); 9124Assert.Equal("Bounds", e.AffectedProperty); 9253Assert.Equal("Bounds", e.AffectedProperty); 9371Assert.Equal("Bounds", e.AffectedProperty); 9412Assert.Equal("Bounds", e.AffectedProperty); 9545Assert.Equal("Bounds", e.AffectedProperty); 9684Assert.Equal("Bounds", e.AffectedProperty); 9725Assert.Equal("Bounds", e.AffectedProperty); 9810Assert.Equal("Bounds", e.AffectedProperty); 9844Assert.Equal("Bounds", e.AffectedProperty); 10317Assert.Equal("System.Windows.Forms.Control", control.ToString()); 10511Assert.Equal("Bounds", e.AffectedProperty); 10603Assert.Equal("Bounds", e.AffectedProperty); 10687Assert.Equal("Bounds", e.AffectedProperty); 10951Assert.Equal("Bounds", e.AffectedProperty); 11062Assert.Equal("Bounds", e.AffectedProperty); 11160Assert.Equal("Bounds", e.AffectedProperty); 11250Assert.Equal("Bounds", e.AffectedProperty); 11291Assert.Equal("Bounds", e.AffectedProperty); 11385Assert.Equal("Bounds", e.AffectedProperty); 11489Assert.Equal("Bounds", e.AffectedProperty); 11530Assert.Equal("Bounds", e.AffectedProperty); 11646Assert.Equal("Bounds", e.AffectedProperty); 11736Assert.Equal("Bounds", e.AffectedProperty); 11777Assert.Equal("Bounds", e.AffectedProperty); 11883Assert.Equal("Bounds", e.AffectedProperty); 11987Assert.Equal("Bounds", e.AffectedProperty); 12028Assert.Equal("Bounds", e.AffectedProperty);
System\Windows\Forms\ControlTests.Properties.cs (106)
111Assert.Equal(value, control.AccessibleDefaultActionDescription); 116Assert.Equal(value, control.AccessibleDefaultActionDescription); 128Assert.Equal(value, control.AccessibleDescription); 133Assert.Equal(value, control.AccessibleDescription); 145Assert.Equal(value, control.AccessibleName); 150Assert.Equal(value, control.AccessibleName); 422Assert.Equal("Anchor", e.AffectedProperty); 471Assert.Equal("Anchor", e.AffectedProperty); 569Assert.Equal("Anchor", e.AffectedProperty); 692Assert.Equal("Anchor", e.AffectedProperty); 701Assert.Equal("Anchor", e.AffectedProperty); 958Assert.Equal("AutoSize", e.AffectedProperty); 1020Assert.Equal("AutoSize", e.AffectedProperty); 1132Assert.Equal("AutoSize", e.AffectedProperty); 2443Assert.Equal("Bounds", e.AffectedProperty); 2532Assert.Equal("Bounds", e.AffectedProperty); 2617Assert.Equal("Bounds", e.AffectedProperty); 2707Assert.Equal("Bounds", e.AffectedProperty); 2748Assert.Equal("Bounds", e.AffectedProperty); 2815Assert.Equal("Bounds", e.AffectedProperty); 2919Assert.Equal("Bounds", e.AffectedProperty); 2960Assert.Equal("Bounds", e.AffectedProperty); 3332Assert.Equal("Bounds", e.AffectedProperty); 3376Assert.Equal("Bounds", e.AffectedProperty); 4195Assert.Equal("Dock", e.AffectedProperty); 4286Assert.Equal("Dock", e.AffectedProperty); 5693Assert.Equal("Bounds", e.AffectedProperty); 5803Assert.Equal("Bounds", e.AffectedProperty); 5891Assert.Equal("Bounds", e.AffectedProperty); 5984Assert.Equal("Bounds", e.AffectedProperty); 6025Assert.Equal("Bounds", e.AffectedProperty); 6104Assert.Equal("Bounds", e.AffectedProperty); 6220Assert.Equal("Bounds", e.AffectedProperty); 6261Assert.Equal("Bounds", e.AffectedProperty); 6774Assert.Equal("Bounds", e.AffectedProperty); 6983Assert.Equal("Bounds", e.AffectedProperty); 7253Assert.Equal("Bounds", e.AffectedProperty); 7466Assert.Equal("Bounds", e.AffectedProperty); 7763Assert.Equal("Padding", e.AffectedProperty); 8006Assert.Equal("Bounds", e.AffectedProperty); 8063Assert.Equal("Bounds", e.AffectedProperty); 8112Assert.Equal("MaximumSize", e.AffectedProperty); 8168Assert.Equal("MaximumSize", e.AffectedProperty); 8321Assert.Equal("MaximumSize", e.AffectedProperty); 8389Assert.Equal("MaximumSize", e.AffectedProperty); 8544Assert.Equal("Bounds", e.AffectedProperty); 8591Assert.Equal("Bounds", e.AffectedProperty); 8644Assert.Equal("Bounds", e.AffectedProperty); 8675Assert.Equal("Bounds", e.AffectedProperty); 8707Assert.Equal("Bounds", e.AffectedProperty); 8754Assert.Equal("Bounds", e.AffectedProperty); 8762Assert.Equal("MinimumSize", e.AffectedProperty); 8816Assert.Equal("Bounds", e.AffectedProperty); 8824Assert.Equal("MinimumSize", e.AffectedProperty); 8876Assert.Equal("Bounds", e.AffectedProperty); 8936Assert.Equal("Bounds", e.AffectedProperty); 9002Assert.Equal("Bounds", e.AffectedProperty); 9062Assert.Equal("Bounds", e.AffectedProperty); 9070Assert.Equal("MinimumSize", e.AffectedProperty); 9151Assert.Equal("Bounds", e.AffectedProperty); 9159Assert.Equal("MinimumSize", e.AffectedProperty); 9304Assert.Equal(expected, control.Name); 9308Assert.Equal(expected, control.Name); 9320Assert.Equal(expected, control.Name); 9325Assert.Equal(expected, control.Name); 9339Assert.Equal(expected, control.Name); 9344Assert.Equal(expected, control.Name); 9373Assert.Equal(expected, control.Name); 9378Assert.Equal(expected, control.Name); 9419Assert.Equal("Padding", e.AffectedProperty); 9449Assert.Equal("Padding", e.AffectedProperty); 9457Assert.Equal("Padding", e.AffectedProperty); 9504Assert.Equal("Padding", e.AffectedProperty); 9548Assert.Equal("Padding", e.AffectedProperty); 9556Assert.Equal("Padding", e.AffectedProperty); 11077Assert.Equal("Bounds", e.AffectedProperty); 11188Assert.Equal("Bounds", e.AffectedProperty); 11283Assert.Equal("Bounds", e.AffectedProperty); 11383Assert.Equal("Bounds", e.AffectedProperty); 11424Assert.Equal("Bounds", e.AffectedProperty); 11508Assert.Equal("Bounds", e.AffectedProperty); 11629Assert.Equal("Bounds", e.AffectedProperty); 11670Assert.Equal("Bounds", e.AffectedProperty); 11967Assert.Equal(expected, control.Text); 11972Assert.Equal(expected, control.Text); 11990Assert.Equal(expected, control.Text); 11998Assert.Equal(expected, control.Text); 12020Assert.Equal("text", control.Text); 12025Assert.Equal("text", control.Text); 12036Assert.Equal("text", control.Text); 12059Assert.Equal("text", control.Text); 12086Assert.Equal("text", control.Text); 12208Assert.Equal("Bounds", e.AffectedProperty); 12415Assert.Equal("Bounds", e.AffectedProperty); 13112Assert.Equal("Bounds", e.AffectedProperty); 13222Assert.Equal("Bounds", e.AffectedProperty); 13310Assert.Equal("Bounds", e.AffectedProperty); 13403Assert.Equal("Bounds", e.AffectedProperty); 13444Assert.Equal("Bounds", e.AffectedProperty); 13523Assert.Equal("Bounds", e.AffectedProperty); 13639Assert.Equal("Bounds", e.AffectedProperty); 13680Assert.Equal("Bounds", e.AffectedProperty); 13779Assert.Equal(value ?? string.Empty, control.WindowText); 13783Assert.Equal(value ?? string.Empty, control.WindowText); 13794Assert.Equal(value ?? string.Empty, control.WindowText); 13798Assert.Equal(value ?? string.Empty, control.WindowText);
System\Windows\Forms\CreateParamsTests.cs (3)
19Assert.Equal(value, createParams.ClassName); 30Assert.Equal(value, createParams.Caption); 148Assert.Equal("CreateParams {'className', 'caption', 0xa, 0xb, {12, 13, 14, 15}}", createParams.ToString());
System\Windows\Forms\CursorTests.cs (2)
494Assert.Equal("[Cursor: AppStarting]", cursor.ToString()); 501Assert.Equal("[Cursor: System.Windows.Forms.Cursor]", cursor.ToString());
System\Windows\Forms\DataFormatsTests.ClipboardTests.cs (1)
26Assert.Equal(expectedName, result.Name);
System\Windows\Forms\DataFormatsTests.cs (5)
40Assert.Equal(expected, value); 69Assert.Equal(expectedName, result.Name); 93Assert.Equal(expectedName, result.Name); 154Assert.Equal(expectedName, result.Name); 165Assert.Equal(name, format.Name);
System\Windows\Forms\DataGridViewCellErrorTextNeededEventArgsTests.cs (1)
24Assert.Equal(value, e.ErrorText);
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (1)
34Assert.Equal(errorText, e.ErrorText);
System\Windows\Forms\DataGridViewCellStyleTests.cs (9)
65Assert.Equal("format", style.Format); 325Assert.Equal(expected, style.Format); 329Assert.Equal(expected, style.Format); 341Assert.Equal(expected, style.Format); 644Assert.Equal("format", style.Format); 686Assert.Equal("format", style.Format); 734Assert.Equal("format", style.Format); 801Assert.Equal("format", style.Format); 1150Assert.Equal(expected, style.ToString());
System\Windows\Forms\DataGridViewCellTests.cs (84)
661Assert.Equal("Value", (string)cell.EditedFormattedValue); 795Assert.Equal("errorText1", e.ErrorText); 800Assert.Equal("errorText2", cell.ErrorText); 805Assert.Equal("errorText1", cell.ErrorText); 825Assert.Equal("errorText1", cell.ErrorText); 830Assert.Equal("errorText1", cell.ErrorText); 856Assert.Equal("errorText1", e.ErrorText); 861Assert.Equal("errorText2", cell.ErrorText); 866Assert.Equal("errorText1", cell.ErrorText); 890Assert.Equal("errorText1", cell.ErrorText); 895Assert.Equal("errorText1", cell.ErrorText); 907Assert.Equal(expected, cell.ErrorText); 911Assert.Equal(expected, cell.ErrorText); 924Assert.Equal(expected, cell.ErrorText); 928Assert.Equal(expected, cell.ErrorText); 940Assert.Equal(expected, cell.ErrorText); 944Assert.Equal(expected, cell.ErrorText); 959Assert.Equal(expected, cell.ErrorText); 963Assert.Equal(expected, cell.ErrorText); 975Assert.Equal(expected, cell.ErrorText); 979Assert.Equal(expected, cell.ErrorText); 994Assert.Equal(expected, cell.ErrorText); 998Assert.Equal(expected, cell.ErrorText); 1017Assert.Equal(expected, cell.ErrorText); 1023Assert.Equal(expected, cell.ErrorText); 1045Assert.Equal(expected, cell.ErrorText); 1051Assert.Equal(expected, cell.ErrorText); 1072Assert.Equal(expected, cell.ErrorText); 1078Assert.Equal(expected, cell.ErrorText); 1100Assert.Equal(expected, cell.ErrorText); 1106Assert.Equal(expected, cell.ErrorText); 1136Assert.Equal(expected, cell.ErrorText); 1145Assert.Equal(expected, cell.ErrorText); 1180Assert.Equal(expected, cell.ErrorText); 1189Assert.Equal(expected, cell.ErrorText); 1221Assert.Equal("errorText", cell.ErrorText); 1226Assert.Equal("errorText", cell.ErrorText); 1236Assert.Equal("other", cell.ErrorText); 1242Assert.Equal("errorText", cell.ErrorText); 1309Assert.Equal("Value", (string)cell.FormattedValue); 2582Assert.Equal(expected, cell.ToolTipText); 2586Assert.Equal(expected, cell.ToolTipText); 2598Assert.Equal(expected, cell.ToolTipText); 2602Assert.Equal(expected, cell.ToolTipText); 2614Assert.Equal(expected, cell.ToolTipText); 2618Assert.Equal(expected, cell.ToolTipText); 2633Assert.Equal(expected, cell.ToolTipText); 2637Assert.Equal(expected, cell.ToolTipText); 2649Assert.Equal(expected, cell.ToolTipText); 2653Assert.Equal(expected, cell.ToolTipText); 2668Assert.Equal(expected, cell.ToolTipText); 2672Assert.Equal(expected, cell.ToolTipText); 2689Assert.Equal(expected, cell.ToolTipText); 2694Assert.Equal(expected, cell.ToolTipText); 2713Assert.Equal(expected, cell.ToolTipText); 2718Assert.Equal(expected, cell.ToolTipText); 2736Assert.Equal(expected, cell.ToolTipText); 2741Assert.Equal(expected, cell.ToolTipText); 2760Assert.Equal(expected, cell.ToolTipText); 2765Assert.Equal(expected, cell.ToolTipText); 3343Assert.Equal("errorText", cell.ErrorText); 3357Assert.Equal("toolTipText", cell.ToolTipText); 3764Assert.Equal("Value", (string)cell.GetEditedFormattedValue(0, context)); 3850Assert.Equal(expected, cell.GetErrorText(rowIndex)); 3871Assert.Equal(expected, cell.GetErrorText(rowIndex)); 3892Assert.Equal(expected, cell.GetErrorText(rowIndex)); 3919Assert.Equal(expected, cell.GetErrorText(rowIndex)); 3948Assert.Equal(expected, cell.GetErrorText(rowIndex)); 3978Assert.Equal("errorText1", e.ErrorText); 3983Assert.Equal(expectedErrorText, cell.GetErrorText(rowIndex)); 3988Assert.Equal("errorText1", cell.GetErrorText(rowIndex)); 4017Assert.Equal("errorText1", e.ErrorText); 4022Assert.Equal(expectedErrorText, cell.GetErrorText(rowIndex)); 4027Assert.Equal("errorText1", cell.GetErrorText(rowIndex)); 4060Assert.Equal("errorText1", e.ErrorText); 4065Assert.Equal(expectedErrorText, cell.GetErrorText(rowIndex)); 4070Assert.Equal("errorText1", cell.GetErrorText(rowIndex)); 4103Assert.Equal("errorText1", e.ErrorText); 4108Assert.Equal(expectedErrorText, cell.GetErrorText(rowIndex)); 4113Assert.Equal("errorText1", cell.GetErrorText(rowIndex)); 6388Assert.Equal("DataGridViewCell { ColumnIndex=-1, RowIndex=-1 }", cell.ToString()); 6397Assert.Equal("DataGridViewCell { ColumnIndex=-1, RowIndex=-1 }", cell.ToString()); 6406Assert.Equal("DataGridViewColumnHeaderCell { ColumnIndex=-1 }", cell.ToString()); 6420Assert.Equal("DataGridViewCell { ColumnIndex=0, RowIndex=0 }", cell.ToString());
System\Windows\Forms\DataGridViewColumnTests.cs (9)
666Assert.Equal(expected, column.DataPropertyName); 670Assert.Equal(expected, column.DataPropertyName); 686Assert.Equal(expected, column.DataPropertyName); 691Assert.Equal(expected, column.DataPropertyName); 716Assert.Equal("text", column.DataPropertyName); 721Assert.Equal("text", column.DataPropertyName); 732Assert.Equal("text", column.DataPropertyName); 1789Assert.Equal("DataGridViewColumn { Name=, Index=-1 }", column.ToString()); 1799Assert.Equal("DataGridViewColumn { Name=name, Index=-1 }", column.ToString());
System\Windows\Forms\DataGridViewHeaderCellTests.cs (8)
2048Assert.Equal("errorText", cell.ErrorText); 2062Assert.Equal("toolTipText", cell.ToolTipText); 2134Assert.Equal("errorText", cell.ErrorText); 2148Assert.Equal("toolTipText", cell.ToolTipText); 4630Assert.Equal("DataGridViewHeaderCell { ColumnIndex=-1, RowIndex=-1 }", cell.ToString()); 4639Assert.Equal("DataGridViewHeaderCell { ColumnIndex=-1, RowIndex=-1 }", cell.ToString()); 4648Assert.Equal("DataGridViewColumnHeaderCell { ColumnIndex=-1 }", cell.ToString()); 4662Assert.Equal("DataGridViewHeaderCell { ColumnIndex=0, RowIndex=0 }", cell.ToString());
System\Windows\Forms\DataGridViewRowErrorTextNeededEventArgsTests.cs (1)
24Assert.Equal(value, e.ErrorText);
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (1)
31Assert.Equal(errorText, e.ErrorText);
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (1)
30Assert.Equal(errorText, e.ErrorText);
System\Windows\Forms\DataGridViewRowTests.cs (22)
919Assert.Equal("errorText1", e.ErrorText); 954Assert.Equal("errorText1", e.ErrorText); 958Assert.Equal("errorText2", row.ErrorText); 963Assert.Equal("errorText1", row.ErrorText); 987Assert.Equal(expected, row.ErrorText); 991Assert.Equal(expected, row.ErrorText); 1004Assert.Equal(expected, row.ErrorText); 1008Assert.Equal(expected, row.ErrorText); 1023Assert.Equal(expected, row.ErrorText); 1028Assert.Equal(expected, row.ErrorText); 1045Assert.Equal(expected, row.ErrorText); 1050Assert.Equal(expected, row.ErrorText); 1075Assert.Equal("errorText", row.ErrorText); 1080Assert.Equal("errorText", row.ErrorText); 1090Assert.Equal("other", row.ErrorText); 1096Assert.Equal("errorText", row.ErrorText); 3948Assert.Equal("errorText", row.ErrorText); 3991Assert.Equal("errorText", row.ErrorText); 4040Assert.Equal("errorText", row.ErrorText); 4395Assert.Equal("ErrorText", row.GetErrorText(rowIndex)); 4473Assert.Equal("ErrorText2", row.GetErrorText(0)); 4478Assert.Equal("ErrorText1", row.GetErrorText(0));
System\Windows\Forms\DataGridViewTests.cs (4)
128Assert.Equal("ColumnHeadersHeight", e.AffectedProperty); 275Assert.Equal("ColumnHeadersHeight", e.AffectedProperty); 1045Assert.Equal("RowHeadersWidth", e.AffectedProperty); 1199Assert.Equal("RowHeadersWidth", e.AffectedProperty);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (26)
97Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 139Assert.Equal("Edit", createParams.ClassName); 210Assert.Equal(expected, control.Text); 218Assert.Equal(expected, control.Text); 240Assert.Equal(expected, control.Text); 249Assert.Equal(expected, control.Text); 265Assert.Equal("text", control.Text); 274Assert.Equal("text", control.Text); 342Assert.Equal(expected, control.Text); 350Assert.Equal(expected, control.Text); 372Assert.Equal(expected, control.Text); 381Assert.Equal(expected, control.Text); 398Assert.Equal("text", control.Text); 407Assert.Equal("text", control.Text); 431Assert.Equal(expected, control.Text); 442Assert.Equal(expected, control.Text); 465Assert.Equal("text", control.Text); 470Assert.Equal("text", control.Text); 481Assert.Equal("text", control.Text); 508Assert.Equal("text", control.Text); 517Assert.Equal("text", control.Text); 536Assert.Equal("text", control.Text); 1094Assert.Equal("text", Assert.IsType<string>(control.GetEditingControlFormattedValue(context))); 1459Assert.Equal("text", control.SelectedText); 1466Assert.Equal("text", control.SelectedText); 1506Assert.Equal("text", control.SelectedText);
System\Windows\Forms\DateTimePickerTests.cs (10)
97Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 115Assert.Equal(string.Empty, control.Text); 132Assert.Equal("SysDateTimePick32", createParams.ClassName); 921Assert.Equal(dt.ToLongDateString(), dateTimePicker.Text); 934Assert.Equal(dt.ToShortDateString(), dateTimePicker.Text); 947Assert.Equal(dt.ToLongTimeString(), dateTimePicker.Text); 961Assert.Equal(dt.ToLongDateString(), dateTimePicker.Text); 975Assert.Equal(dt.ToShortDateString(), dateTimePicker.Text); 989Assert.Equal(dt.ToLongTimeString(), dateTimePicker.Text); 1003Assert.Equal(dt.ToShortTimeString(), dateTimePicker.Text);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
132Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 151Assert.Equal("Properties", control.Text); 174Assert.Equal("Properties", createParams.Caption);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (15)
103Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 384Assert.Equal(expected, control.Text); 385Assert.Equal(expected, control.Title); 390Assert.Equal(expected, control.Text); 391Assert.Equal(expected, control.Title); 409Assert.Equal(expected, control.Text); 410Assert.Equal(expected, control.Title); 418Assert.Equal(expected, control.Text); 419Assert.Equal(expected, control.Title); 441Assert.Equal("text", control.Text); 442Assert.Equal("text", control.Title); 447Assert.Equal("text", control.Text); 448Assert.Equal("text", control.Title); 460Assert.Equal("text", control.Text); 461Assert.Equal("text", control.Title);
System\Windows\Forms\Design\EventsTabTests.cs (2)
20Assert.Equal("Events", tab.HelpKeyword); 21Assert.Equal("Events", tab.TabName);
System\Windows\Forms\Design\PropertyTabTests.cs (2)
20Assert.Equal("TabName", tab.HelpKeyword); 131Assert.Equal("Value", tab.GetDefaultProperty(new ClassWithDefaultProperty()).Name);
System\Windows\Forms\DockPaddingEdgesConverterTests.cs (5)
17Assert.Equal(nameof(ScrollableControl.DockPaddingEdges.All), properties[0].Name); 18Assert.Equal(nameof(ScrollableControl.DockPaddingEdges.Left), properties[1].Name); 19Assert.Equal(nameof(ScrollableControl.DockPaddingEdges.Top), properties[2].Name); 20Assert.Equal(nameof(ScrollableControl.DockPaddingEdges.Right), properties[3].Name); 21Assert.Equal(nameof(ScrollableControl.DockPaddingEdges.Bottom), properties[4].Name);
System\Windows\Forms\DockPaddingEdgesTests.cs (2)
365Assert.Equal("{Left=1,Top=2,Right=3,Bottom=4}", padding.ToString()); 377Assert.Equal("{Left=1,Top=2,Right=3,Bottom=4}", padding.ToString());
System\Windows\Forms\DragDropHelperTests.cs (6)
190Assert.Equal(string.Empty, szMessage); 191Assert.Equal(string.Empty, szInsert); 273Assert.Equal(e.Message, szMessage); 274Assert.Equal(e.MessageReplacementToken, szInsert); 300Assert.Equal(message, szMessage); 301Assert.Equal(messageReplacementToken, szInsert);
System\Windows\Forms\DragEventArgsTests.cs (4)
47Assert.Equal(message, e.Message); 48Assert.Equal(messageReplacementToken, e.MessageReplacementToken); 84Assert.Equal(value, e.Message); 96Assert.Equal(value, e.MessageReplacementToken);
System\Windows\Forms\DrawToolTipEventArgsTests.cs (1)
29Assert.Equal(toolTipText, e.ToolTipText);
System\Windows\Forms\ErrorProviderTests.cs (19)
229Assert.Equal(expected, provider.DataMember); 233Assert.Equal(expected, provider.DataMember); 246Assert.Equal(expected, provider.DataMember); 250Assert.Equal(expected, provider.DataMember); 272Assert.Equal(expected, provider.DataMember); 276Assert.Equal(expected, provider.DataMember); 348Assert.Equal("NoSuchValue", provider.DataMember); 363Assert.Equal("NoSuchValue", provider.DataMember); 488Assert.Equal("NoSuchValue", provider.DataMember); 842Assert.Equal("NoSuchValue", provider.DataMember); 847Assert.Equal("NoSuchValue", provider.DataMember); 873Assert.Equal("error", provider.GetError(control)); 896Assert.Equal("error", provider.GetError(control)); 926Assert.Equal("error", provider.GetError(control)); 930Assert.Equal(expectedError, provider.GetError(control)); 934Assert.Equal(expectedError, provider.GetError(control)); 1048Assert.Equal(expected, provider.GetError(control)); 1052Assert.Equal(expected, provider.GetError(control)); 1148Assert.Equal(expected, provider.GetError(control));
System\Windows\Forms\FileDialogTests.cs (11)
234Assert.Equal(expected, dialog.DefaultExt); 239Assert.Equal(expected, dialog.DefaultExt); 276Assert.Equal(value ?? string.Empty, dialog.FileName); 292Assert.Equal(value ?? string.Empty, dialog.FileName); 317Assert.Equal(value ?? string.Empty, dialog.Filter); 322Assert.Equal(value ?? string.Empty, dialog.Filter); 360Assert.Equal(value ?? string.Empty, dialog.InitialDirectory); 365Assert.Equal(value ?? string.Empty, dialog.InitialDirectory); 514Assert.Equal(value ?? string.Empty, dialog.Title); 519Assert.Equal(value ?? string.Empty, dialog.Title); 788Assert.Equal(expected, dialog.ToString());
System\Windows\Forms\FlowLayoutPanelTests.cs (4)
95Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 154Assert.Equal("FlowDirection", e.AffectedProperty); 189Assert.Equal("WrapContents", e.AffectedProperty); 369Assert.Equal("FlowBreak", eventArgs.AffectedProperty);
System\Windows\Forms\FlowLayoutSettingsTests.cs (3)
26Assert.Equal("FlowDirection", e.AffectedProperty); 70Assert.Equal("WrapContents", e.AffectedProperty); 188Assert.Equal("FlowBreak", eventArgs.AffectedProperty);
System\Windows\Forms\FolderBrowserDialogTests.cs (8)
78Assert.Equal(value ?? string.Empty, dialog.Description); 82Assert.Equal(value ?? string.Empty, dialog.Description); 147Assert.Equal(value ?? string.Empty, dialog.InitialDirectory); 151Assert.Equal(value ?? string.Empty, dialog.InitialDirectory); 164Assert.Equal(value ?? string.Empty, dialog.SelectedPath); 169Assert.Equal(dialog.SelectedPath, dialog.SelectedPaths[0]); 179Assert.Equal(value ?? string.Empty, dialog.SelectedPath); 183Assert.Equal(dialog.SelectedPath, dialog.SelectedPaths[0]);
System\Windows\Forms\FontDialogTests.cs (1)
749Assert.Equal($"System.Windows.Forms.Tests.FontDialogTests+SubFontDialog, Font: {Control.DefaultFont}", dialog.ToString());
System\Windows\Forms\FormTests.cs (1)
134Assert.Equal("Microsoft\u00AE .NET", control.ProductName);
System\Windows\Forms\GroupBoxTests.cs (21)
82Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 140Assert.Equal(expectedClassName, createParams.ClassName); 279Assert.Equal("AutoSize", e.AffectedProperty); 328Assert.Equal("AutoSize", e.AffectedProperty); 427Assert.Equal("AutoSize", e.AffectedProperty); 500Assert.Equal("AutoSize", e.AffectedProperty); 1062Assert.Equal(expected, control.Text); 1067Assert.Equal(expected, control.Text); 1080Assert.Equal(expected, control.Text); 1085Assert.Equal(expected, control.Text); 1103Assert.Equal(expected, control.Text); 1111Assert.Equal(expected, control.Text); 1135Assert.Equal(expected, control.Text); 1143Assert.Equal(expected, control.Text); 1165Assert.Equal("text", control.Text); 1170Assert.Equal("text", control.Text); 1181Assert.Equal("text", control.Text); 1231Assert.Equal("UseCompatibleTextRendering", e.AffectedProperty); 1335Assert.Equal("UseCompatibleTextRendering", e.AffectedProperty); 2059Assert.Equal("System.Windows.Forms.GroupBox, Text: ", control.ToString()); 2069Assert.Equal("System.Windows.Forms.GroupBox, Text: CustomText", control.ToString());
System\Windows\Forms\HelpProviderTests.cs (21)
33Assert.Equal(value, provider.HelpNamespace); 37Assert.Equal(value, provider.HelpNamespace); 48Assert.Equal(value, provider.HelpNamespace); 53Assert.Equal(value, fileName); 200Assert.Equal(expectedFileName, fileName); 207Assert.Equal(expectedFileName, fileName); 228Assert.Equal("HelpNamespace", fileName); 235Assert.Equal("HelpNamespace", fileName); 267Assert.Equal(expectedFileName, fileName); 273Assert.Equal(expectedFileName, fileName); 363Assert.Equal(string.IsNullOrEmpty(helpString) ? null : helpString, control.AccessibilityObject.Help); 369Assert.Equal(string.IsNullOrEmpty(helpString) ? null : helpString, control.AccessibilityObject.Help); 383Assert.Equal(helpString, control.AccessibilityObject.Help); 389Assert.Equal(helpString, control.AccessibilityObject.Help); 403Assert.Equal(string.IsNullOrEmpty(helpString) ? null : helpString, control.AccessibilityObject.Help); 409Assert.Equal(string.IsNullOrEmpty(helpString) ? null : helpString, control.AccessibilityObject.Help); 463Assert.Equal("HelpNamespace", fileName); 464Assert.Equal("HelpString", control.AccessibilityObject.Help); 475Assert.Equal("HelpNamespace", fileName); 476Assert.Equal("HelpString", control.AccessibilityObject.Help); 510Assert.Equal(expected, provider.ToString());
System\Windows\Forms\HScrollBarTests.cs (2)
94Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 126Assert.Equal("ScrollBar", createParams.ClassName);
System\Windows\Forms\HtmlDocumentTests.cs (71)
122Assert.Equal(expectedNative, (string)color.ToObject()); 129Assert.Equal(expectedNative, (string)color2.ToObject()); 147Assert.Equal("HTML", collection[0].TagName); 148Assert.Equal("HEAD", collection[1].TagName); 149Assert.Equal("TITLE", collection[2].TagName); 150Assert.Equal("BODY", collection[3].TagName); 167Assert.Equal("HTML", collection[0].TagName); 168Assert.Equal("HEAD", collection[1].TagName); 169Assert.Equal("TITLE", collection[2].TagName); 170Assert.Equal("BODY", collection[3].TagName); 186Assert.Equal("InnerText", element.InnerText); 187Assert.Equal("BODY", element.TagName); 204Assert.Equal("BODY", document.ActiveElement.TagName); 345Assert.Equal(expectedNative, (string)color.ToObject()); 352Assert.Equal(expectedNative, (string)color2.ToObject()); 369Assert.Equal("InnerText", element.InnerText); 370Assert.Equal("BODY", element.TagName); 387Assert.Equal("BODY", element.TagName); 426Assert.Equal(document.Cookie, document.Cookie); 452Assert.Equal(expected, document.Cookie); 456Assert.Equal(expected, cookie.ToString()); 460Assert.Equal(expected, document.Cookie); 463Assert.Equal(expected, cookie2.ToString()); 598Assert.Equal("utf-8", document.Encoding); 619Assert.Equal("utf-8", document.Encoding); 642Assert.Equal(expected, document.Encoding); 645Assert.Equal(expected, charset.ToStringAndFree()); 649Assert.Equal(expected, document.Encoding); 652Assert.Equal(expected, charset2.ToStringAndFree()); 818Assert.Equal(expectedNative, (string)color.ToObject()); 825Assert.Equal(expectedNative, (string)color2.ToObject()); 843Assert.Equal("FORM", collection[0].TagName); 844Assert.Equal("form1", collection[0].GetAttribute("id")); 845Assert.Equal("FORM", collection[1].TagName); 846Assert.Equal("form2", collection[1].GetAttribute("id")); 879Assert.Equal("IMG", collection[0].TagName); 880Assert.Equal("img1", collection[0].GetAttribute("id")); 881Assert.Equal("IMG", collection[1].TagName); 882Assert.Equal("img2", collection[1].GetAttribute("id")); 1006Assert.Equal(expectedNative, (string)color.ToObject()); 1013Assert.Equal(expectedNative, (string)color2.ToObject()); 1031Assert.Equal("A", collection[0].TagName); 1032Assert.Equal("link1", collection[0].GetAttribute("id")); 1033Assert.Equal("A", collection[1].TagName); 1034Assert.Equal("link2", collection[1].GetAttribute("id")); 1144Assert.Equal(expectedNative1, dir.ToString()); 1151Assert.Equal(expectedNative1, dir2.ToString()); 1158Assert.Equal(expectedNative2, dir3.ToString()); 1173Assert.Equal("Title", document.Title); 1208Assert.Equal(expected, document.Title); 1228Assert.Equal(expected, document.Title); 1232Assert.Equal(expected, title.ToString()); 1236Assert.Equal(expected, document.Title); 1239Assert.Equal(expected, title2.ToString()); 1369Assert.Equal(expectedNative, (string)color.ToObject()); 1376Assert.Equal(expectedNative, (string)color2.ToObject()); 1394Assert.Equal("InnerText", window.Document.Body.InnerText); 1549Assert.Equal(expectedTagName, element.TagName); 1719Assert.Equal("InnerText1", document.GetElementById("para1").InnerText); 1720Assert.Equal("InnerText1", document.GetElementById("PARA1").InnerText); 1751Assert.Equal("BODY", document.GetElementFromPoint(Point.Empty).TagName); 1752Assert.Equal("BODY", document.GetElementFromPoint(new Point(int.MinValue, int.MinValue)).TagName); 1753Assert.Equal("BODY", document.GetElementFromPoint(new Point(int.MaxValue, int.MaxValue)).TagName); 1771Assert.Equal("FORM", collection[0].TagName); 1772Assert.Equal("form1", collection[0].GetAttribute("id")); 1773Assert.Equal("FORM", collection[1].TagName); 1774Assert.Equal("form2", collection[1].GetAttribute("id")); 1777Assert.Equal("HTML", ((HtmlElement)Assert.Single(document.GetElementsByTagName("html"))).TagName); 1912Assert.Equal(expectedInnerHtml, document.Body?.InnerHtml); 1929Assert.Equal(expectedInnerHtml, document.Body?.InnerHtml); 1947Assert.Equal("about:blank", newDocument.Url.OriginalString);
System\Windows\Forms\HtmlElementTests.cs (181)
30Assert.Equal("H1", collection[0].TagName); 31Assert.Equal("STRONG", collection[1].TagName); 32Assert.Equal("H2", collection[2].TagName); 68Assert.Equal(document.Body.InnerHtml, result.Body.InnerHtml); 132Assert.Equal("H1", collection[0].TagName); 133Assert.Equal("H2", collection[1].TagName); 300Assert.Equal("H1", result.TagName); 330Assert.Equal("id", element.Id); 354Assert.Equal(expected, element.Id); 378Assert.Equal(expected, element.Id); 381Assert.Equal(expected, id.ToString()); 385Assert.Equal(expected, element.Id); 388Assert.Equal(expected, id2.ToString()); 419Assert.Equal("<P>InnerText</P>", element.InnerHtml); 444Assert.Equal(expected, element.InnerHtml); 469Assert.Equal(expected, element.InnerHtml); 472Assert.Equal(expected, innerHtml.ToString()); 476Assert.Equal(expected, element.InnerHtml); 479Assert.Equal(expected, innerHtml.ToString()); 540Assert.Equal($"InnerText{Environment.NewLine}MoreText", element.InnerText); 565Assert.Equal(expected, element.InnerText); 590Assert.Equal(expected, element.InnerText); 593Assert.Equal(expected, innerText.ToString()); 597Assert.Equal(expected, element.InnerText); 600Assert.Equal(expected, innerText2.ToString()); 661Assert.Equal("name", element.Name); 684Assert.Equal(expected, element.Name); 710Assert.Equal(expected, element.Name); 717Assert.Equal(expected, element.Name); 754Assert.Equal("H2", result.TagName); 771Assert.Equal("BODY", result.TagName); 790Assert.Equal("BODY", result.TagName); 821Assert.Equal($"{Environment.NewLine}<DIV id=id></DIV>", element.OuterHtml); 836Assert.Equal($"{Environment.NewLine}<DIV id=id><P>OuterText</P></DIV>", element.OuterHtml); 866Assert.Equal(expected, element.OuterHtml); 896Assert.Equal(expected, element.OuterHtml); 899Assert.Equal(expected, outerHTML.ToString()); 903Assert.Equal(expected, element.OuterHtml); 906Assert.Equal(expected, outerHTML2.ToString()); 952Assert.Equal($"OuterText{Environment.NewLine}MoreText", element.OuterText); 977Assert.Equal(expected, element.OuterText); 1002Assert.Equal(expected, element.OuterText); 1005Assert.Equal(expected, outerText.ToString()); 1009Assert.Equal(expected, element.OuterText); 1012Assert.Equal(expected, outerText2.ToString()); 1045Assert.Equal("BODY", result.TagName); 1048Assert.Equal("HTML", resultParent.TagName); 1067Assert.Equal("BODY", result.TagName); 1263Assert.Equal(expected, element.Style); 1290Assert.Equal(expected, element.Style); 1313Assert.Equal(expected, element.Style); 1314Assert.Equal(expected, GetStyleCssText()); 1318Assert.Equal(expected, element.Style); 1319Assert.Equal(expected, GetStyleCssText()); 1416Assert.Equal("DIV", element.TagName); 1437Assert.Equal("H1", element.All[0].TagName); 1441Assert.Equal("H1", element.All[0].TagName); 1442Assert.Equal("H2", element.All[1].TagName); 1446Assert.Equal("H1", element.All[0].TagName); 1447Assert.Equal("H2", element.All[1].TagName); 1448Assert.Equal("H3", element.All[2].TagName); 1469Assert.Equal("P", element.All[0].TagName); 1470Assert.Equal("STRONG", element.All[1].TagName); 1471Assert.Equal("H1", element.All[2].TagName); 1475Assert.Equal("P", element.All[0].TagName); 1476Assert.Equal("STRONG", element.All[1].TagName); 1477Assert.Equal("H1", element.All[2].TagName); 1478Assert.Equal("H2", element.All[3].TagName); 1482Assert.Equal("P", element.All[0].TagName); 1483Assert.Equal("STRONG", element.All[1].TagName); 1484Assert.Equal("H1", element.All[2].TagName); 1485Assert.Equal("H2", element.All[3].TagName); 1486Assert.Equal("H3", element.All[4].TagName); 1877Assert.Equal("id", element.GetAttribute("id")); 1878Assert.Equal("value", element.GetAttribute("customAttribute")); 1879Assert.Equal("value", element.GetAttribute("CUSTOMATTRIBUTE")); 1897Assert.Equal("id", element.GetAttribute("id")); 1898Assert.Equal("value", element.GetAttribute("customAttribute")); 1899Assert.Equal("value", element.GetAttribute("CUSTOMATTRIBUTE")); 1936Assert.Equal("FORM", collection[0].TagName); 1937Assert.Equal("form1", collection[0].GetAttribute("id")); 1938Assert.Equal("FORM", collection[1].TagName); 1939Assert.Equal("form2", collection[1].GetAttribute("id")); 2002Assert.Equal("H1", element.Parent.Children[0].TagName); 2003Assert.Equal("DIV", element.Parent.Children[1].TagName); 2008Assert.Equal("H1", element.Parent.Children[0].TagName); 2009Assert.Equal("H2", element.Parent.Children[1].TagName); 2010Assert.Equal("DIV", element.Parent.Children[2].TagName); 2015Assert.Equal("H1", element.Parent.Children[0].TagName); 2016Assert.Equal("H2", element.Parent.Children[1].TagName); 2017Assert.Equal("H3", element.Parent.Children[2].TagName); 2018Assert.Equal("DIV", element.Parent.Children[3].TagName); 2039Assert.Equal("P", element.All[0].TagName); 2040Assert.Equal("STRONG", element.All[1].TagName); 2042Assert.Equal("H1", element.Parent.Children[0].TagName); 2043Assert.Equal("DIV", element.Parent.Children[1].TagName); 2047Assert.Equal("P", element.All[0].TagName); 2048Assert.Equal("STRONG", element.All[1].TagName); 2050Assert.Equal("H1", element.Parent.Children[0].TagName); 2051Assert.Equal("H2", element.Parent.Children[1].TagName); 2052Assert.Equal("DIV", element.Parent.Children[2].TagName); 2056Assert.Equal("P", element.All[0].TagName); 2057Assert.Equal("STRONG", element.All[1].TagName); 2059Assert.Equal("H1", element.Parent.Children[0].TagName); 2060Assert.Equal("H2", element.Parent.Children[1].TagName); 2061Assert.Equal("H3", element.Parent.Children[2].TagName); 2062Assert.Equal("DIV", element.Parent.Children[3].TagName); 2083Assert.Equal("H1", element.All[0].TagName); 2085Assert.Equal("DIV", element.Parent.Children[0].TagName); 2089Assert.Equal("H1", element.All[0].TagName); 2090Assert.Equal("H2", element.All[1].TagName); 2092Assert.Equal("DIV", element.Parent.Children[0].TagName); 2096Assert.Equal("H1", element.All[0].TagName); 2097Assert.Equal("H2", element.All[1].TagName); 2098Assert.Equal("H3", element.All[2].TagName); 2100Assert.Equal("DIV", element.Parent.Children[0].TagName); 2121Assert.Equal("P", element.All[0].TagName); 2122Assert.Equal("STRONG", element.All[1].TagName); 2123Assert.Equal("H1", element.All[2].TagName); 2125Assert.Equal("DIV", element.Parent.Children[0].TagName); 2129Assert.Equal("P", element.All[0].TagName); 2130Assert.Equal("STRONG", element.All[1].TagName); 2131Assert.Equal("H1", element.All[2].TagName); 2132Assert.Equal("H2", element.All[3].TagName); 2134Assert.Equal("DIV", element.Parent.Children[0].TagName); 2138Assert.Equal("P", element.All[0].TagName); 2139Assert.Equal("STRONG", element.All[1].TagName); 2140Assert.Equal("H1", element.All[2].TagName); 2141Assert.Equal("H2", element.All[3].TagName); 2142Assert.Equal("H3", element.All[4].TagName); 2144Assert.Equal("DIV", element.Parent.Children[0].TagName); 2165Assert.Equal("H1", element.All[0].TagName); 2169Assert.Equal("H2", element.All[0].TagName); 2170Assert.Equal("H1", element.All[1].TagName); 2172Assert.Equal("DIV", element.Parent.Children[0].TagName); 2176Assert.Equal("H3", element.All[0].TagName); 2177Assert.Equal("H2", element.All[1].TagName); 2178Assert.Equal("H1", element.All[2].TagName); 2180Assert.Equal("DIV", element.Parent.Children[0].TagName); 2201Assert.Equal("H1", element.All[0].TagName); 2202Assert.Equal("P", element.All[1].TagName); 2203Assert.Equal("STRONG", element.All[2].TagName); 2205Assert.Equal("DIV", element.Parent.Children[0].TagName); 2209Assert.Equal("H2", element.All[0].TagName); 2210Assert.Equal("H1", element.All[1].TagName); 2211Assert.Equal("P", element.All[2].TagName); 2212Assert.Equal("STRONG", element.All[3].TagName); 2214Assert.Equal("DIV", element.Parent.Children[0].TagName); 2218Assert.Equal("H3", element.All[0].TagName); 2219Assert.Equal("H2", element.All[1].TagName); 2220Assert.Equal("H1", element.All[2].TagName); 2221Assert.Equal("P", element.All[3].TagName); 2222Assert.Equal("STRONG", element.All[4].TagName); 2224Assert.Equal("DIV", element.Parent.Children[0].TagName); 2245Assert.Equal("DIV", element.Parent.Children[0].TagName); 2246Assert.Equal("H1", element.Parent.Children[1].TagName); 2250Assert.Equal("DIV", element.Parent.Children[0].TagName); 2251Assert.Equal("H2", element.Parent.Children[1].TagName); 2252Assert.Equal("H1", element.Parent.Children[2].TagName); 2256Assert.Equal("DIV", element.Parent.Children[0].TagName); 2257Assert.Equal("H3", element.Parent.Children[1].TagName); 2258Assert.Equal("H2", element.Parent.Children[2].TagName); 2259Assert.Equal("H1", element.Parent.Children[3].TagName); 2280Assert.Equal("P", element.All[0].TagName); 2281Assert.Equal("STRONG", element.All[1].TagName); 2283Assert.Equal("DIV", element.Parent.Children[0].TagName); 2284Assert.Equal("H1", element.Parent.Children[1].TagName); 2288Assert.Equal("P", element.All[0].TagName); 2289Assert.Equal("STRONG", element.All[1].TagName); 2291Assert.Equal("DIV", element.Parent.Children[0].TagName); 2292Assert.Equal("H2", element.Parent.Children[1].TagName); 2293Assert.Equal("H1", element.Parent.Children[2].TagName); 2297Assert.Equal("P", element.All[0].TagName); 2298Assert.Equal("STRONG", element.All[1].TagName); 2300Assert.Equal("DIV", element.Parent.Children[0].TagName); 2301Assert.Equal("H3", element.Parent.Children[1].TagName); 2302Assert.Equal("H2", element.Parent.Children[2].TagName); 2303Assert.Equal("H1", element.Parent.Children[3].TagName); 2449Assert.Equal(value, element.GetAttribute("customAttribute")); 2453Assert.Equal(value, element.GetAttribute("customAttribute")); 2457Assert.Equal("newValue", element.GetAttribute("customAttribute"));
System\Windows\Forms\HtmlToClrEventProxyTest.cs (5)
24Assert.Equal("OnHtmlEvent", onHtmlEvent.ToString()); 30Assert.Equal("EventName", eventName.ToString()); 36Assert.Equal("get_EventName", getEventName.ToString()); 83Assert.Equal(eventName, (string)result.ToObject()); 90Assert.Equal(eventName, (string)result.ToObject());
System\Windows\Forms\InputLanguageTests.cs (3)
187Assert.Equal(languageTag, language.Culture.Name); 188Assert.Equal(layoutId, language.LayoutId); 189Assert.Equal(layoutName, language.LayoutName);
System\Windows\Forms\KeysConverterTests.cs (2)
69Assert.Equal(expectedResult, result); 82Assert.Equal(expectedLocalizedKeyName, result);
System\Windows\Forms\LabelEditEventArgsTests.cs (1)
29Assert.Equal(label, e.Label);
System\Windows\Forms\LabelTests.cs (9)
87Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 123Assert.Equal("Static", createParams.ClassName); 189Assert.Equal(string.Empty, control.ImageKey); 195Assert.Equal(string.Empty, control.ImageKey); 205Assert.Equal(key, control.ImageKey); 211Assert.Equal(key, control.ImageKey); 659Assert.Equal("key1", label.ImageKey); 663Assert.Equal("key2", label.ImageKey); 667Assert.Equal("nonexistent", label.ImageKey);
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (16)
58Assert.Equal("Columns", e.AffectedProperty); 95Assert.Equal("GrowStyle", e.AffectedProperty); 132Assert.Equal("Rows", e.AffectedProperty); 513Assert.Equal("TableIndex", eventArgs.AffectedProperty); 586Assert.Equal("TableIndex", eventArgs.AffectedProperty); 732Assert.Equal("TableIndex", eventArgs.AffectedProperty); 967Assert.Equal("ColumnSpan", eventArgs.AffectedProperty); 1208Assert.Equal("TableIndex", eventArgs.AffectedProperty); 1443Assert.Equal("RowSpan", eventArgs.AffectedProperty); 1637Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", info.GetString("SerializedString")); 1650Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", info.GetString("SerializedString")); 1682Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles=""Percent,1"" /><Rows Styles=""Percent,2"" /></TableLayoutSettings>", info.GetString("SerializedString")); 1689Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls><Control Name=""name"" Row=""4"" RowSpan=""2"" Column=""3"" ColumnSpan=""1"" /><Control Name="""" Row=""-1"" RowSpan=""1"" Column=""-1"" ColumnSpan=""1"" /></Controls><Columns Styles=""Percent,1"" /><Rows Styles=""Percent,2"" /></TableLayoutSettings>", info.GetString("SerializedString")); 1718Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls><Control Name=""name"" Row=""4"" RowSpan=""2"" Column=""3"" ColumnSpan=""1"" /><Control Name="""" Row=""1"" RowSpan=""1"" Column=""1"" ColumnSpan=""1"" /></Controls><Columns Styles=""Percent,1"" /><Rows Styles=""Percent,2"" /></TableLayoutSettings>", info.GetString("SerializedString")); 1734Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", info.GetString("SerializedString")); 1748Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", info.GetString("SerializedString"));
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (6)
167Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", result); 190Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles=""AutoSize,1,Absolute,2"" /><Rows Styles=""AutoSize,1,Absolute,2"" /></TableLayoutSettings>", result); 208Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls><Control Name="""" Row=""4"" RowSpan=""2"" Column=""3"" ColumnSpan=""1"" /></Controls><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", result); 217Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", result); 231Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls><Control Name=""name"" Row=""4"" RowSpan=""2"" Column=""3"" ColumnSpan=""1"" /></Controls><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", result); 253Assert.Equal(@"<?xml version=""1.0"" encoding=""utf-16""?><TableLayoutSettings><Controls /><Columns Styles="""" /><Rows Styles="""" /></TableLayoutSettings>", result);
System\Windows\Forms\LayoutEventArgsTests.cs (2)
25Assert.Equal(affectedProperty, e.AffectedProperty); 42Assert.Equal(affectedProperty, e.AffectedProperty);
System\Windows\Forms\LinkAreaConverterTests.cs (2)
206Assert.Equal(nameof(LinkArea.Start), properties[0].Name); 207Assert.Equal(nameof(LinkArea.Length), properties[1].Name);
System\Windows\Forms\LinkAreaTests.cs (1)
92Assert.Equal("{Start=1, Length=2}", area.ToString());
System\Windows\Forms\LinkClickedEventArgsTests.cs (1)
16Assert.Equal(linkText, e.LinkText);
System\Windows\Forms\LinkConverterTests.cs (2)
141Assert.Equal(expectedLink.Description, actualLink.Description); 145Assert.Equal(expectedLink.Name, actualLink.Name);
System\Windows\Forms\LinkTests.cs (2)
136Assert.Equal(expected, link.Name); 140Assert.Equal(expected, link.Name);
System\Windows\Forms\ListBindingHelperTests.cs (1)
497Assert.Equal(expected, ListBindingHelper.GetListName(list, listAccessors));
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (360)
521Assert.Equal("4", new string(textBuffer)); 523Assert.Equal("1", new string(textBuffer)); 525Assert.Equal("3", new string(textBuffer)); 538Assert.Equal("4", new string(textBuffer)); 540Assert.Equal("2", new string(textBuffer)); 542Assert.Equal("3", new string(textBuffer)); 555Assert.Equal("4", new string(textBuffer)); 557Assert.Equal("2", new string(textBuffer)); 559Assert.Equal("5", new string(textBuffer)); 572Assert.Equal("4", new string(textBuffer)); 574Assert.Equal("2", new string(textBuffer)); 576Assert.Equal("5", new string(textBuffer)); 610Assert.Equal("4", new string(textBuffer)); 612Assert.Equal("2", new string(textBuffer)); 614Assert.Equal("3", new string(textBuffer)); 627Assert.Equal("4", new string(textBuffer)); 629Assert.Equal("1", new string(textBuffer)); 631Assert.Equal("3", new string(textBuffer)); 644Assert.Equal("4", new string(textBuffer)); 646Assert.Equal("1", new string(textBuffer)); 648Assert.Equal("5", new string(textBuffer)); 661Assert.Equal("4", new string(textBuffer)); 663Assert.Equal("1", new string(textBuffer)); 665Assert.Equal("5", new string(textBuffer)); 1491Assert.Equal("2", new string(textBuffer)); 1504Assert.Equal("2", new string(textBuffer)); 1506Assert.Equal("1", new string(textBuffer)); 1519Assert.Equal("2", new string(textBuffer)); 1521Assert.Equal("1", new string(textBuffer)); 1523Assert.Equal("1", new string(textBuffer)); 1536Assert.Equal("2", new string(textBuffer)); 1538Assert.Equal("1", new string(textBuffer)); 1540Assert.Equal("1", new string(textBuffer)); 1542Assert.Equal("3", new string(textBuffer)); 1570Assert.Equal("2", new string(textBuffer)); 1583Assert.Equal("2", new string(textBuffer)); 1585Assert.Equal("1", new string(textBuffer)); 1598Assert.Equal("2", new string(textBuffer)); 1600Assert.Equal("1", new string(textBuffer)); 1602Assert.Equal("1", new string(textBuffer)); 1615Assert.Equal("2", new string(textBuffer)); 1617Assert.Equal("1", new string(textBuffer)); 1619Assert.Equal("1", new string(textBuffer)); 1621Assert.Equal("3", new string(textBuffer)); 1652Assert.Equal("2", new string(textBuffer)); 1665Assert.Equal("1", new string(textBuffer)); 1667Assert.Equal("2", new string(textBuffer)); 1680Assert.Equal("1", new string(textBuffer)); 1682Assert.Equal("1", new string(textBuffer)); 1684Assert.Equal("2", new string(textBuffer)); 1697Assert.Equal("1", new string(textBuffer)); 1699Assert.Equal("1", new string(textBuffer)); 1701Assert.Equal("2", new string(textBuffer)); 1703Assert.Equal("3", new string(textBuffer)); 1734Assert.Equal("2", new string(textBuffer)); 1747Assert.Equal("1", new string(textBuffer)); 1749Assert.Equal("2", new string(textBuffer)); 1762Assert.Equal("1", new string(textBuffer)); 1764Assert.Equal("1", new string(textBuffer)); 1766Assert.Equal("2", new string(textBuffer)); 1779Assert.Equal("1", new string(textBuffer)); 1781Assert.Equal("1", new string(textBuffer)); 1783Assert.Equal("2", new string(textBuffer)); 1785Assert.Equal("3", new string(textBuffer)); 2170Assert.Equal("2", new string(textBuffer)); 2172Assert.Equal("1", new string(textBuffer)); 2174Assert.Equal("1", new string(textBuffer)); 2176Assert.Equal("3", new string(textBuffer)); 2341Assert.Equal("2", new string(textBuffer)); 2343Assert.Equal("1", new string(textBuffer)); 2345Assert.Equal("1", new string(textBuffer)); 2347Assert.Equal("3", new string(textBuffer)); 2360Assert.Equal("2", new string(textBuffer)); 2362Assert.Equal("1", new string(textBuffer)); 2364Assert.Equal("1", new string(textBuffer)); 2366Assert.Equal("3", new string(textBuffer)); 2393Assert.Equal("2", new string(textBuffer)); 2395Assert.Equal("1", new string(textBuffer)); 2397Assert.Equal("1", new string(textBuffer)); 2399Assert.Equal("3", new string(textBuffer)); 2412Assert.Equal("2", new string(textBuffer)); 2414Assert.Equal("1", new string(textBuffer)); 2416Assert.Equal("1", new string(textBuffer)); 2418Assert.Equal("3", new string(textBuffer)); 2448Assert.Equal("1", new string(textBuffer)); 2450Assert.Equal("1", new string(textBuffer)); 2452Assert.Equal("2", new string(textBuffer)); 2454Assert.Equal("3", new string(textBuffer)); 2467Assert.Equal("1", new string(textBuffer)); 2469Assert.Equal("1", new string(textBuffer)); 2471Assert.Equal("2", new string(textBuffer)); 2473Assert.Equal("3", new string(textBuffer)); 2503Assert.Equal("1", new string(textBuffer)); 2505Assert.Equal("1", new string(textBuffer)); 2507Assert.Equal("2", new string(textBuffer)); 2509Assert.Equal("3", new string(textBuffer)); 2522Assert.Equal("1", new string(textBuffer)); 2524Assert.Equal("1", new string(textBuffer)); 2526Assert.Equal("2", new string(textBuffer)); 2528Assert.Equal("3", new string(textBuffer)); 2860Assert.Equal("2", new string(textBuffer)); 2862Assert.Equal("1", new string(textBuffer)); 2864Assert.Equal("1", new string(textBuffer)); 2866Assert.Equal("3", new string(textBuffer)); 3018Assert.Equal("2", new string(textBuffer)); 3020Assert.Equal("1", new string(textBuffer)); 3022Assert.Equal("1", new string(textBuffer)); 3024Assert.Equal("3", new string(textBuffer)); 3039Assert.Equal("2", new string(textBuffer)); 3041Assert.Equal("1", new string(textBuffer)); 3043Assert.Equal("1", new string(textBuffer)); 3045Assert.Equal("3", new string(textBuffer)); 3075Assert.Equal("2", new string(textBuffer)); 3077Assert.Equal("1", new string(textBuffer)); 3079Assert.Equal("1", new string(textBuffer)); 3081Assert.Equal("3", new string(textBuffer)); 3096Assert.Equal("2", new string(textBuffer)); 3098Assert.Equal("1", new string(textBuffer)); 3100Assert.Equal("1", new string(textBuffer)); 3102Assert.Equal("3", new string(textBuffer)); 3135Assert.Equal("1", new string(textBuffer)); 3137Assert.Equal("1", new string(textBuffer)); 3139Assert.Equal("2", new string(textBuffer)); 3141Assert.Equal("3", new string(textBuffer)); 3156Assert.Equal("1", new string(textBuffer)); 3158Assert.Equal("1", new string(textBuffer)); 3160Assert.Equal("2", new string(textBuffer)); 3162Assert.Equal("3", new string(textBuffer)); 3195Assert.Equal("1", new string(textBuffer)); 3197Assert.Equal("1", new string(textBuffer)); 3199Assert.Equal("2", new string(textBuffer)); 3201Assert.Equal("3", new string(textBuffer)); 3216Assert.Equal("1", new string(textBuffer)); 3218Assert.Equal("1", new string(textBuffer)); 3220Assert.Equal("2", new string(textBuffer)); 3222Assert.Equal("3", new string(textBuffer)); 3600Assert.Equal("2", new string(textBuffer)); 3602Assert.Equal("1", new string(textBuffer)); 3604Assert.Equal("1", new string(textBuffer)); 3606Assert.Equal("3", new string(textBuffer)); 4314Assert.Equal("1", new string(textBuffer)); 4327Assert.Equal("2", new string(textBuffer)); 4329Assert.Equal("1", new string(textBuffer)); 4342Assert.Equal("2", new string(textBuffer)); 4344Assert.Equal("2", new string(textBuffer)); 4346Assert.Equal("1", new string(textBuffer)); 4359Assert.Equal("2", new string(textBuffer)); 4361Assert.Equal("2", new string(textBuffer)); 4363Assert.Equal("1", new string(textBuffer)); 4365Assert.Equal("3", new string(textBuffer)); 4393Assert.Equal("1", new string(textBuffer)); 4406Assert.Equal("2", new string(textBuffer)); 4408Assert.Equal("1", new string(textBuffer)); 4421Assert.Equal("2", new string(textBuffer)); 4423Assert.Equal("2", new string(textBuffer)); 4425Assert.Equal("1", new string(textBuffer)); 4438Assert.Equal("2", new string(textBuffer)); 4440Assert.Equal("2", new string(textBuffer)); 4442Assert.Equal("1", new string(textBuffer)); 4444Assert.Equal("3", new string(textBuffer)); 4475Assert.Equal("1", new string(textBuffer)); 4488Assert.Equal("1", new string(textBuffer)); 4490Assert.Equal("2", new string(textBuffer)); 4503Assert.Equal("1", new string(textBuffer)); 4505Assert.Equal("2", new string(textBuffer)); 4507Assert.Equal("2", new string(textBuffer)); 4520Assert.Equal("1", new string(textBuffer)); 4522Assert.Equal("2", new string(textBuffer)); 4524Assert.Equal("2", new string(textBuffer)); 4526Assert.Equal("3", new string(textBuffer)); 4557Assert.Equal("1", new string(textBuffer)); 4570Assert.Equal("1", new string(textBuffer)); 4572Assert.Equal("2", new string(textBuffer)); 4585Assert.Equal("1", new string(textBuffer)); 4587Assert.Equal("2", new string(textBuffer)); 4589Assert.Equal("2", new string(textBuffer)); 4602Assert.Equal("1", new string(textBuffer)); 4604Assert.Equal("2", new string(textBuffer)); 4606Assert.Equal("2", new string(textBuffer)); 4608Assert.Equal("3", new string(textBuffer)); 4983Assert.Equal("2", new string(textBuffer)); 4985Assert.Equal("1", new string(textBuffer)); 4987Assert.Equal("1", new string(textBuffer)); 4989Assert.Equal("3", new string(textBuffer)); 5261Assert.Equal("2", new string(textBuffer)); 5263Assert.Equal("3", new string(textBuffer)); 5276Assert.Equal("2", new string(textBuffer)); 5278Assert.Equal("3", new string(textBuffer)); 5291Assert.Equal("2", new string(textBuffer)); 5336Assert.Equal("2", new string(textBuffer)); 5338Assert.Equal("3", new string(textBuffer)); 5352Assert.Equal("2", new string(textBuffer)); 5354Assert.Equal("3", new string(textBuffer)); 5368Assert.Equal("2", new string(textBuffer)); 5413Assert.Equal("1", new string(textBuffer)); 5415Assert.Equal("3", new string(textBuffer)); 5428Assert.Equal("1", new string(textBuffer)); 5430Assert.Equal("3", new string(textBuffer)); 5443Assert.Equal("1", new string(textBuffer)); 5491Assert.Equal("1", new string(textBuffer)); 5493Assert.Equal("3", new string(textBuffer)); 5507Assert.Equal("1", new string(textBuffer)); 5509Assert.Equal("3", new string(textBuffer)); 5523Assert.Equal("1", new string(textBuffer)); 6178Assert.Equal("2", new string(textBuffer)); 6180Assert.Equal("3", new string(textBuffer)); 6193Assert.Equal("2", new string(textBuffer)); 6238Assert.Equal("2", new string(textBuffer)); 6240Assert.Equal("3", new string(textBuffer)); 6254Assert.Equal("2", new string(textBuffer)); 6299Assert.Equal("1", new string(textBuffer)); 6301Assert.Equal("3", new string(textBuffer)); 6314Assert.Equal("1", new string(textBuffer)); 6362Assert.Equal("1", new string(textBuffer)); 6364Assert.Equal("3", new string(textBuffer)); 6378Assert.Equal("1", new string(textBuffer)); 7324Assert.Equal("4", new string(textBuffer)); 7326Assert.Equal("1", new string(textBuffer)); 7328Assert.Equal("3", new string(textBuffer)); 7341Assert.Equal("4", new string(textBuffer)); 7343Assert.Equal("2", new string(textBuffer)); 7345Assert.Equal("3", new string(textBuffer)); 7358Assert.Equal("4", new string(textBuffer)); 7360Assert.Equal("2", new string(textBuffer)); 7362Assert.Equal("5", new string(textBuffer)); 7375Assert.Equal("4", new string(textBuffer)); 7377Assert.Equal("2", new string(textBuffer)); 7379Assert.Equal("5", new string(textBuffer)); 7415Assert.Equal("4", new string(textBuffer)); 7417Assert.Equal("2", new string(textBuffer)); 7419Assert.Equal("3", new string(textBuffer)); 7432Assert.Equal("4", new string(textBuffer)); 7434Assert.Equal("1", new string(textBuffer)); 7436Assert.Equal("3", new string(textBuffer)); 7449Assert.Equal("4", new string(textBuffer)); 7451Assert.Equal("1", new string(textBuffer)); 7453Assert.Equal("5", new string(textBuffer)); 7466Assert.Equal("4", new string(textBuffer)); 7468Assert.Equal("1", new string(textBuffer)); 7470Assert.Equal("5", new string(textBuffer)); 8296Assert.Equal("2", new string(textBuffer)); 8309Assert.Equal("2", new string(textBuffer)); 8311Assert.Equal("1", new string(textBuffer)); 8324Assert.Equal("2", new string(textBuffer)); 8326Assert.Equal("1", new string(textBuffer)); 8328Assert.Equal("1", new string(textBuffer)); 8341Assert.Equal("2", new string(textBuffer)); 8343Assert.Equal("1", new string(textBuffer)); 8345Assert.Equal("1", new string(textBuffer)); 8347Assert.Equal("3", new string(textBuffer)); 8375Assert.Equal("2", new string(textBuffer)); 8388Assert.Equal("2", new string(textBuffer)); 8390Assert.Equal("1", new string(textBuffer)); 8403Assert.Equal("2", new string(textBuffer)); 8405Assert.Equal("1", new string(textBuffer)); 8407Assert.Equal("1", new string(textBuffer)); 8420Assert.Equal("2", new string(textBuffer)); 8422Assert.Equal("1", new string(textBuffer)); 8424Assert.Equal("1", new string(textBuffer)); 8426Assert.Equal("3", new string(textBuffer)); 8457Assert.Equal("2", new string(textBuffer)); 8470Assert.Equal("1", new string(textBuffer)); 8472Assert.Equal("2", new string(textBuffer)); 8485Assert.Equal("1", new string(textBuffer)); 8487Assert.Equal("1", new string(textBuffer)); 8489Assert.Equal("2", new string(textBuffer)); 8502Assert.Equal("1", new string(textBuffer)); 8504Assert.Equal("1", new string(textBuffer)); 8506Assert.Equal("2", new string(textBuffer)); 8508Assert.Equal("3", new string(textBuffer)); 8539Assert.Equal("2", new string(textBuffer)); 8552Assert.Equal("1", new string(textBuffer)); 8554Assert.Equal("2", new string(textBuffer)); 8567Assert.Equal("1", new string(textBuffer)); 8569Assert.Equal("1", new string(textBuffer)); 8571Assert.Equal("2", new string(textBuffer)); 8584Assert.Equal("1", new string(textBuffer)); 8586Assert.Equal("1", new string(textBuffer)); 8588Assert.Equal("2", new string(textBuffer)); 8590Assert.Equal("3", new string(textBuffer)); 8975Assert.Equal("2", new string(textBuffer)); 8977Assert.Equal("1", new string(textBuffer)); 8979Assert.Equal("1", new string(textBuffer)); 8981Assert.Equal("3", new string(textBuffer)); 9636Assert.Equal("1", new string(textBuffer)); 9649Assert.Equal("2", new string(textBuffer)); 9651Assert.Equal("1", new string(textBuffer)); 9664Assert.Equal("2", new string(textBuffer)); 9666Assert.Equal("2", new string(textBuffer)); 9668Assert.Equal("1", new string(textBuffer)); 9681Assert.Equal("2", new string(textBuffer)); 9683Assert.Equal("2", new string(textBuffer)); 9685Assert.Equal("1", new string(textBuffer)); 9687Assert.Equal("3", new string(textBuffer)); 9715Assert.Equal("1", new string(textBuffer)); 9728Assert.Equal("2", new string(textBuffer)); 9730Assert.Equal("1", new string(textBuffer)); 9743Assert.Equal("2", new string(textBuffer)); 9745Assert.Equal("2", new string(textBuffer)); 9747Assert.Equal("1", new string(textBuffer)); 9760Assert.Equal("2", new string(textBuffer)); 9762Assert.Equal("2", new string(textBuffer)); 9764Assert.Equal("1", new string(textBuffer)); 9766Assert.Equal("3", new string(textBuffer)); 9797Assert.Equal("1", new string(textBuffer)); 9810Assert.Equal("1", new string(textBuffer)); 9812Assert.Equal("2", new string(textBuffer)); 9825Assert.Equal("1", new string(textBuffer)); 9827Assert.Equal("2", new string(textBuffer)); 9829Assert.Equal("2", new string(textBuffer)); 9842Assert.Equal("1", new string(textBuffer)); 9844Assert.Equal("2", new string(textBuffer)); 9846Assert.Equal("2", new string(textBuffer)); 9848Assert.Equal("3", new string(textBuffer)); 9879Assert.Equal("1", new string(textBuffer)); 9892Assert.Equal("1", new string(textBuffer)); 9894Assert.Equal("2", new string(textBuffer)); 9907Assert.Equal("1", new string(textBuffer)); 9909Assert.Equal("2", new string(textBuffer)); 9911Assert.Equal("2", new string(textBuffer)); 9924Assert.Equal("1", new string(textBuffer)); 9926Assert.Equal("2", new string(textBuffer)); 9928Assert.Equal("2", new string(textBuffer)); 9930Assert.Equal("3", new string(textBuffer)); 10305Assert.Equal("2", new string(textBuffer)); 10307Assert.Equal("1", new string(textBuffer)); 10309Assert.Equal("1", new string(textBuffer)); 10311Assert.Equal("3", new string(textBuffer)); 10583Assert.Equal("2", new string(textBuffer)); 10585Assert.Equal("3", new string(textBuffer)); 10598Assert.Equal("2", new string(textBuffer)); 10600Assert.Equal("3", new string(textBuffer)); 10613Assert.Equal("2", new string(textBuffer)); 10658Assert.Equal("2", new string(textBuffer)); 10660Assert.Equal("3", new string(textBuffer)); 10674Assert.Equal("2", new string(textBuffer)); 10676Assert.Equal("3", new string(textBuffer)); 10690Assert.Equal("2", new string(textBuffer)); 10735Assert.Equal("1", new string(textBuffer)); 10737Assert.Equal("3", new string(textBuffer)); 10750Assert.Equal("1", new string(textBuffer)); 10752Assert.Equal("3", new string(textBuffer)); 10765Assert.Equal("1", new string(textBuffer)); 10813Assert.Equal("1", new string(textBuffer)); 10815Assert.Equal("3", new string(textBuffer)); 10829Assert.Equal("1", new string(textBuffer)); 10831Assert.Equal("3", new string(textBuffer)); 10845Assert.Equal("1", new string(textBuffer)); 11500Assert.Equal("2", new string(textBuffer)); 11502Assert.Equal("3", new string(textBuffer)); 11515Assert.Equal("2", new string(textBuffer)); 11560Assert.Equal("2", new string(textBuffer)); 11562Assert.Equal("3", new string(textBuffer)); 11576Assert.Equal("2", new string(textBuffer)); 11621Assert.Equal("1", new string(textBuffer)); 11623Assert.Equal("3", new string(textBuffer)); 11636Assert.Equal("1", new string(textBuffer)); 11684Assert.Equal("1", new string(textBuffer)); 11686Assert.Equal("3", new string(textBuffer)); 11700Assert.Equal("1", new string(textBuffer));
System\Windows\Forms\ListBoxTests.cs (24)
99Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 144Assert.Equal("ListBox", createParams.ClassName); 170Assert.Equal("ListBox", createParams.ClassName); 196Assert.Equal("ListBox", createParams.ClassName); 222Assert.Equal("ListBox", createParams.ClassName); 249Assert.Equal("ListBox", createParams.ClassName); 278Assert.Equal("ListBox", createParams.ClassName); 306Assert.Equal("ListBox", createParams.ClassName); 333Assert.Equal("ListBox", createParams.ClassName); 942Assert.Equal("DrawMode", e.AffectedProperty); 4121Assert.Equal(expected, control.Text); 4127Assert.Equal(expected, control.Text); 4169Assert.Equal(expected, control.Text); 4175Assert.Equal(expected, control.Text); 4221Assert.Equal(expected, control.Text); 4227Assert.Equal(expected, control.Text); 4246Assert.Equal(expected, control.Text); 4255Assert.Equal(expected, control.Text); 4278Assert.Equal("text", control.Text); 4283Assert.Equal("text", control.Text); 4294Assert.Equal("text", control.Text); 6081Assert.Equal("System.Windows.Forms.ListBox", control.ToString()); 6089Assert.Equal("System.Windows.Forms.ListBox, Items.Count: 0", control.ToString()); 6106Assert.Equal(expected, control.ToString());
System\Windows\Forms\ListControlTests.cs (95)
88Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 228Assert.Equal("Value", control.DisplayMember); 236Assert.Equal("Value", control.DisplayMember); 285Assert.Equal("Value", control.DisplayMember); 292Assert.Equal("Value", control.DisplayMember); 615Assert.Equal("Capacity", control.DisplayMember); 622Assert.Equal("Capacity", control.DisplayMember); 640Assert.Equal(value is null ? string.Empty : "Capacity", control.DisplayMember); 647Assert.Equal(value is null ? string.Empty : "Capacity", control.DisplayMember); 662Assert.Equal("Count", control.DisplayMember); 681Assert.Equal("Count", control.DisplayMember); 700Assert.Equal("Count", control.DisplayMember); 720Assert.Equal("Count", control.DisplayMember); 726Assert.Equal("Count", control.DisplayMember); 745Assert.Equal("Count", control.DisplayMember); 750Assert.Equal("Count", control.DisplayMember); 764Assert.Equal("Count", control.DisplayMember); 769Assert.Equal("Count", control.DisplayMember); 783Assert.Equal("Count", control.DisplayMember); 788Assert.Equal("Count", control.DisplayMember); 802Assert.Equal("Count", control.DisplayMember); 807Assert.Equal("Count", control.DisplayMember); 821Assert.Equal("Count", control.DisplayMember); 826Assert.Equal("Count", control.DisplayMember); 842Assert.Equal("Count", control.DisplayMember); 849Assert.Equal("Count", control.DisplayMember); 939Assert.Equal("Value", control.DisplayMember); 945Assert.Equal("Value", control.DisplayMember); 962Assert.Equal(value is null ? "NoSuchDisplayMember" : string.Empty, control.DisplayMember); 975Assert.Equal(value is null ? "NoSuchDisplayMember" : string.Empty, control.DisplayMember); 1077Assert.Equal(expected, control.DisplayMember); 1084Assert.Equal(expected, control.DisplayMember); 1099Assert.Equal(expected, control.DisplayMember); 1106Assert.Equal(expected, control.DisplayMember); 1123Assert.Equal(value, control.DisplayMember); 1130Assert.Equal(value, control.DisplayMember); 1147Assert.Equal(expected, control.DisplayMember); 1154Assert.Equal(expected, control.DisplayMember); 1202Assert.Equal(expected, control.DisplayMember); 1209Assert.Equal(expected, control.DisplayMember); 1281Assert.Equal("Value1", control.DisplayMember); 1287Assert.Equal("Value1", control.DisplayMember); 1293Assert.Equal("Value2", control.DisplayMember); 1313Assert.Equal("Value1", control.DisplayMember); 1331Assert.Equal("Value1", control.DisplayMember); 1470Assert.Equal(expected, control.FormatString); 1475Assert.Equal(expected, control.FormatString); 1489Assert.Equal(expected, control.FormatString); 1494Assert.Equal(expected, control.FormatString); 1507Assert.Equal("Value1", control.FormatString); 1512Assert.Equal("Value1", control.FormatString); 1517Assert.Equal("Value2", control.FormatString); 1546Assert.Equal("Value1", control.FormatString); 1551Assert.Equal("Value1", control.FormatString); 1556Assert.Equal("Value2", control.FormatString); 1572Assert.Equal("Value1", control.FormatString); 1689Assert.Equal(expected, control.DisplayMember); 1690Assert.Equal(expected, control.ValueMember); 1697Assert.Equal(expected, control.DisplayMember); 1698Assert.Equal(expected, control.ValueMember); 1714Assert.Equal("DisplayMember", control.DisplayMember); 1715Assert.Equal(expected, control.ValueMember); 1722Assert.Equal("DisplayMember", control.DisplayMember); 1723Assert.Equal(expected, control.ValueMember); 1740Assert.Equal(expected, control.DisplayMember); 1741Assert.Equal(expected, control.ValueMember); 1748Assert.Equal(expected, control.DisplayMember); 1749Assert.Equal(expected, control.ValueMember); 1771Assert.Equal(expected, control.DisplayMember); 1772Assert.Equal(expected, control.ValueMember); 1779Assert.Equal(expected, control.DisplayMember); 1780Assert.Equal(expected, control.ValueMember); 1797Assert.Equal("NoSuchValue", control.DisplayMember); 1819Assert.Equal("OtherValue", control.DisplayMember); 1820Assert.Equal(expected, control.ValueMember); 1827Assert.Equal("OtherValue", control.DisplayMember); 1828Assert.Equal(expected, control.ValueMember); 1846Assert.Equal("Value", control.DisplayMember); 1874Assert.Equal("Value1", control.ValueMember); 1880Assert.Equal("Value1", control.ValueMember); 1886Assert.Equal("Value2", control.ValueMember); 1906Assert.Equal("Value1", control.ValueMember); 2380Assert.Equal(expected, control.GetItemText(item)); 2383Assert.Equal(expected, control.GetItemText(item)); 2424Assert.Equal("3", control.GetItemText(item)); 2461Assert.Equal("3", control.GetItemText(item)); 2466Assert.Equal("3", control.GetItemText(item)); 2481Assert.Equal("custom", control.GetItemText(item)); 2484Assert.Equal("custom", control.GetItemText(item)); 2498Assert.Equal("10", control.GetItemText(item)); 2501Assert.Equal("10", control.GetItemText(item)); 2514Assert.Equal("10", control.GetItemText(item)); 2517Assert.Equal("10", control.GetItemText(item)); 2531Assert.Equal("NonCriticalThrowingTypeConverterDataClassToString", control.GetItemText(item)); 2534Assert.Equal("NonCriticalThrowingTypeConverterDataClassToString", control.GetItemText(item));
System\Windows\Forms\ListViewGroupCollectionTests.cs (2)
510Assert.Equal(key, group.Name); 511Assert.Equal(expectedHeaderText, group.Header);
System\Windows\Forms\ListViewGroupTests.cs (60)
20Assert.Equal("ListViewGroup", group.Header); 41Assert.Equal(expectedHeader, group.Header); 71Assert.Equal(expectedHeader, group.Header); 99Assert.Equal(expectedHeader, group.Header); 105Assert.Equal(key, group.Name); 267Assert.Equal(expected, group.TitleImageKey); 281Assert.Equal(expected, group.TitleImageKey); 285Assert.Equal(expected, group.TitleImageKey); 298Assert.Equal(expected, group.TitleImageKey); 303Assert.Equal(expected, group.TitleImageKey); 327Assert.Equal(expected, group.TitleImageKey); 335Assert.Equal(expected, group.TitleImageKey); 395Assert.Equal("key", group.TitleImageKey); 413Assert.Equal(expected, group.Subtitle); 417Assert.Equal(expected, group.Subtitle); 430Assert.Equal(expected, group.Subtitle); 435Assert.Equal(expected, group.Subtitle); 459Assert.Equal(expected, group.Subtitle); 467Assert.Equal(expected, group.Subtitle); 516Assert.Equal(expected, new string(lvgroup.pszSubtitle)); 535Assert.Equal(expected, group.Footer); 539Assert.Equal(expected, group.Footer); 552Assert.Equal(expected, group.Footer); 557Assert.Equal(expected, group.Footer); 581Assert.Equal(expected, group.Footer); 589Assert.Equal(expected, group.Footer); 627Assert.Equal(expected, new string(lvgroup.pszFooter)); 658Assert.Equal(expectedFooter, group.Footer); 663Assert.Equal(expectedFooter, group.Footer); 680Assert.Equal(expectedFooter, group.Footer); 686Assert.Equal(expectedFooter, group.Footer); 711Assert.Equal(expectedFooter, group.Footer); 720Assert.Equal(expectedFooter, group.Footer); 795Assert.Equal(expected, group.Header); 799Assert.Equal(expected, group.Header); 812Assert.Equal(expected, group.Header); 817Assert.Equal(expected, group.Header); 841Assert.Equal(expected, group.Header); 849Assert.Equal(expected, group.Header); 887Assert.Equal(expected, new string(lvgroup.pszHeader)); 908Assert.Equal(expectedHeader, group.Header); 913Assert.Equal(expectedHeader, group.Header); 930Assert.Equal(expectedHeader, group.Header); 936Assert.Equal(expectedHeader, group.Header); 961Assert.Equal(expectedHeader, group.Header); 970Assert.Equal(expectedHeader, group.Header); 1197Assert.Equal(expected, group.TaskLink); 1201Assert.Equal(expected, group.TaskLink); 1214Assert.Equal(expected, group.TaskLink); 1219Assert.Equal(expected, group.TaskLink); 1243Assert.Equal(expected, group.TaskLink); 1251Assert.Equal(expected, group.TaskLink); 1291Assert.Equal(expected, new string(lvgroup.pszTask)); 1345Assert.Equal(group.Header, result.Header); 1348Assert.Equal(group.Name, result.Name); 1357Assert.Equal(expected, group.ToString()); 1369Assert.Equal("ListViewGroup", info.GetString("Header")); 1387Assert.Equal("ListViewGroup", info.GetString("Header")); 1405Assert.Equal("ListViewGroup", info.GetString("Header")); 1410Assert.Equal("text", ((ListViewItem)info.GetValue("Item0", typeof(ListViewItem))).Text);
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (1)
93Assert.Equal(toolTipText, ((IKeyboardToolTip)listViewItem).GetCaptionForTool(toolTip));
System\Windows\Forms\ListViewItemTests.cs (20)
24Assert.Equal(string.Empty, item.ImageKey); 251Assert.Equal(string.Empty, item.ImageKey); 477Assert.Equal(string.Empty, item.ImageKey); 553Assert.Equal(expectedImageKey, item.ImageKey); 565Assert.Equal(expectedText, item.Text); 591Assert.Equal(string.Empty, item.ImageKey); 603Assert.Equal(expectedText, item.Text); 628Assert.Equal(string.Empty, item.ImageKey); 666Assert.Equal(expectedImageKey, item.ImageKey); 676Assert.Equal(expectedText, subItem.Text); 679Assert.Equal(expectedText, item.Text); 704Assert.Equal(string.Empty, item.ImageKey); 714Assert.Equal(expectedText, subItem.Text); 717Assert.Equal(expectedText, item.Text); 741Assert.Equal(string.Empty, item.ImageKey); 792Assert.Equal(expectedText, item.Text); 820Assert.Equal(expectedText, subItem.Text); 823Assert.Equal(expectedText, item.Text); 1065Assert.Equal(expected[i].Name, actual[i].Name); 1066Assert.Equal(expected[i].Text, actual[i].Text);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (5)
252Assert.Equal(expectedText, subItem.Text); 382Assert.Equal("text1", collection[0].Text); 383Assert.Equal("text2", collection[1].Text); 403Assert.Equal("text1", collection[0].Text); 407Assert.Equal("text2", collection[1].Text);
System\Windows\Forms\ListViewSubItemTests.cs (12)
50Assert.Equal(expectedText, subItem.Text); 76Assert.Equal(expectedText, subItem.Text); 463Assert.Equal(expected, subItem.Name); 467Assert.Equal(expected, subItem.Name); 478Assert.Equal(expected, subItem.Name); 482Assert.Equal(expected, subItem.Name); 509Assert.Equal(expected, subItem.Text); 513Assert.Equal(expected, subItem.Text); 524Assert.Equal(expected, subItem.Text); 528Assert.Equal(expected, subItem.Text); 596Assert.Equal(subItem.Text, result.Text); 604Assert.Equal($"ListViewSubItem: {{{text}}}", subItem.ToString());
System\Windows\Forms\ListViewTests.cs (9)
117Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 162Assert.Equal("SysListView32", createParams.ClassName); 1943Assert.Equal("ListViewGroup", new string(lvgroup1.pszHeader)); 1958Assert.Equal(expectedHeaderText, new string(lvgroup2.pszHeader)); 1959Assert.Equal(expectedFooterText, new string(lvgroup2.pszFooter)); 4841Assert.Equal("Test caption", wrapper.Text); 4843Assert.Equal(string.Empty, new string(wrapper.Info.lpszText)); 5130Assert.Equal(text, actual); 5235Assert.Equal(expectedColumnName, accessibleObject.AnnouncedColumn);
System\Windows\Forms\MdiClientTests.cs (9)
69Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 502Assert.Equal("Bounds", e.AffectedProperty); 597Assert.Equal("Bounds", e.AffectedProperty); 710Assert.Equal("Bounds", e.AffectedProperty); 751Assert.Equal("Bounds", e.AffectedProperty); 862Assert.Equal("Bounds", e.AffectedProperty); 903Assert.Equal("Bounds", e.AffectedProperty); 1024Assert.Equal("Bounds", e.AffectedProperty); 1065Assert.Equal("Bounds", e.AffectedProperty);
System\Windows\Forms\MdiControlStripTests.cs (12)
226Assert.Equal("System", systemItem.Name); 227Assert.Equal("Test1", test1Item.Name); 228Assert.Equal("Test2", test2Item.Name); 229Assert.Equal("Minimize", minimizeItem.Name); 230Assert.Equal("Restore", restoreItem.Name); 231Assert.Equal("Close", closeItem.Name); 272Assert.Equal("Close", closeItem.Name); 273Assert.Equal("Restore", restoreItem.Name); 274Assert.Equal("Minimize", minimizeItem.Name); 275Assert.Equal("Test2", test2Item.Name); 276Assert.Equal("Test1", test1Item.Name); 277Assert.Equal("System", systemItem.Name);
System\Windows\Forms\MenuStripTests.cs (4)
120Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 248Assert.Equal("GripStyle", e.AffectedProperty); 282Assert.Equal("GripStyle", e.AffectedProperty); 451Assert.Equal(text, item.Text);
System\Windows\Forms\MessageTests.cs (1)
506Assert.Equal($"msg=0x{msg:x}{expected} hwnd=0x1 wparam=0x2 lparam=0x3{additionalMsg} result=0x4", message.ToString());
System\Windows\Forms\MonthCalendarTests.cs (11)
106Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 151Assert.Equal("SysMonthCal32", createParams.ClassName); 1734Assert.Equal("RightToLeftLayout", e.AffectedProperty); 1781Assert.Equal("RightToLeftLayout", e.AffectedProperty); 2639Assert.Equal(expected, control.Text); 2644Assert.Equal(expected, control.Text); 2662Assert.Equal(expected, control.Text); 2670Assert.Equal(expected, control.Text); 2692Assert.Equal("text", control.Text); 2697Assert.Equal("text", control.Text); 2708Assert.Equal("text", control.Text);
System\Windows\Forms\NativeWindowTests.cs (1)
153Assert.Equal(expectedCaption, cp.Caption);
System\Windows\Forms\NodeLabelEditEventArgsTests.cs (1)
38Assert.Equal(label, e.Label);
System\Windows\Forms\NotifyIconTests.cs (20)
82Assert.Equal(value, notifyIcon.BalloonTipText); 86Assert.Equal(value, notifyIcon.BalloonTipText); 99Assert.Equal(value, notifyIcon.BalloonTipText); 103Assert.Equal(value, notifyIcon.BalloonTipText); 114Assert.Equal(value, notifyIcon.BalloonTipTitle); 118Assert.Equal(value, notifyIcon.BalloonTipTitle); 131Assert.Equal(value, notifyIcon.BalloonTipTitle); 135Assert.Equal(value, notifyIcon.BalloonTipTitle); 353Assert.Equal(expected, notifyIcon.Text); 357Assert.Equal(expected, notifyIcon.Text); 372Assert.Equal(expected, notifyIcon.Text); 376Assert.Equal(expected, notifyIcon.Text); 417Assert.Equal(expected, notifyIcon.Text); 422Assert.Equal(expected, notifyIcon.Text); 445Assert.Equal(expected, notifyIcon.Text); 449Assert.Equal(expected, notifyIcon.Text); 787Assert.Equal("BalloonTipText", notifyIcon.BalloonTipText); 788Assert.Equal("BalloonTipTitle", notifyIcon.BalloonTipTitle); 800Assert.Equal("BalloonTipText", notifyIcon.BalloonTipText); 801Assert.Equal("BalloonTipTitle", notifyIcon.BalloonTipTitle);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (2)
86Assert.Equal(SystemFonts.MenuFont.Name, bag.Font.Name); 125Assert.Equal(SystemFonts.MenuFont.Name, bag.Font.Name);
System\Windows\Forms\PaddingConverterTests.cs (5)
405Assert.Equal(nameof(Padding.All), properties[0].Name); 406Assert.Equal(nameof(Padding.Left), properties[1].Name); 407Assert.Equal(nameof(Padding.Top), properties[2].Name); 408Assert.Equal(nameof(Padding.Right), properties[3].Name); 409Assert.Equal(nameof(Padding.Bottom), properties[4].Name);
System\Windows\Forms\PaddingTests.cs (2)
409Assert.Equal("{Left=1,Top=2,Right=3,Bottom=4}", padding.ToString()); 416Assert.Equal("{Left=1,Top=1,Right=1,Bottom=1}", padding.ToString());
System\Windows\Forms\PanelTests.cs (16)
95Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 267Assert.Equal("AutoSize", e.AffectedProperty); 316Assert.Equal("AutoSize", e.AffectedProperty); 415Assert.Equal("AutoSize", e.AffectedProperty); 488Assert.Equal("AutoSize", e.AffectedProperty); 756Assert.Equal(expected, control.Text); 761Assert.Equal(expected, control.Text); 779Assert.Equal(expected, control.Text); 787Assert.Equal(expected, control.Text); 809Assert.Equal("text", control.Text); 814Assert.Equal("text", control.Text); 825Assert.Equal("text", control.Text); 977Assert.Equal("Bounds", e.AffectedProperty); 1022Assert.Equal("Bounds", e.AffectedProperty); 1104Assert.Equal("Bounds", e.AffectedProperty); 1139Assert.Equal("System.Windows.Forms.Panel, BorderStyle: System.Windows.Forms.BorderStyle.Fixed3D", panel.ToString());
System\Windows\Forms\PictureBoxTests.cs (54)
90Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 635Assert.Equal(value, pictureBox.ImageLocation); 640Assert.Equal(value, pictureBox.ImageLocation); 656Assert.Equal(value, pictureBox.ImageLocation); 661Assert.Equal(value, pictureBox.ImageLocation); 673Assert.Equal(value, pictureBox.ImageLocation); 678Assert.Equal(value, pictureBox.ImageLocation); 695Assert.Equal("Location", pictureBox.ImageLocation); 700Assert.Equal("Location", pictureBox.ImageLocation); 726Assert.Equal(PathImageLocation, pictureBox.ImageLocation); 731Assert.Equal(PathImageLocation, pictureBox.ImageLocation); 775Assert.Equal(value, pictureBox.ImageLocation); 780Assert.Equal(value, pictureBox.ImageLocation); 795Assert.Equal(value, pictureBox.ImageLocation); 800Assert.Equal(value, pictureBox.ImageLocation); 835Assert.Equal(value, pictureBox.ImageLocation); 840Assert.Equal(value, pictureBox.ImageLocation); 865Assert.Equal("Invalid", pictureBox.ImageLocation); 869Assert.Equal(value, pictureBox.ImageLocation); 892Assert.Equal(value, pictureBox.ImageLocation); 897Assert.Equal(value, pictureBox.ImageLocation); 1559Assert.Equal(expected, control.Text); 1564Assert.Equal(expected, control.Text); 1582Assert.Equal(expected, control.Text); 1590Assert.Equal(expected, control.Text); 1612Assert.Equal("text", control.Text); 1617Assert.Equal("text", control.Text); 1628Assert.Equal("text", control.Text); 1804Assert.Equal(imageLocation, pictureBox.ImageLocation); 1809Assert.Equal(imageLocation, pictureBox.ImageLocation); 1813Assert.Equal(imageLocation, pictureBox.ImageLocation); 1827Assert.Equal(imageLocation, pictureBox.ImageLocation); 1831Assert.Equal(imageLocation, pictureBox.ImageLocation); 1836Assert.Equal(imageLocation, pictureBox.ImageLocation); 1840Assert.Equal(imageLocation, pictureBox.ImageLocation); 1912Assert.Equal(value, pictureBox.ImageLocation); 1917Assert.Equal(value, pictureBox.ImageLocation); 1933Assert.Equal(value, pictureBox.ImageLocation); 1938Assert.Equal(value, pictureBox.ImageLocation); 1952Assert.Equal("Location", pictureBox.ImageLocation); 1958Assert.Equal("Location", pictureBox.ImageLocation); 1976Assert.Equal(PathImageLocation, pictureBox.ImageLocation); 2050Assert.Equal(value, pictureBox.ImageLocation); 2055Assert.Equal(value, pictureBox.ImageLocation); 2080Assert.Equal("Invalid", pictureBox.ImageLocation); 2084Assert.Equal(value, pictureBox.ImageLocation); 2103Assert.Equal(PathImageLocation, pictureBox.ImageLocation); 2108Assert.Equal(PathImageLocation, pictureBox.ImageLocation); 2518Assert.Equal(PathImageLocation, pictureBox.ImageLocation); 2523Assert.Equal(PathImageLocation, pictureBox.ImageLocation); 2650Assert.Equal("Bounds", e.AffectedProperty); 2695Assert.Equal("Bounds", e.AffectedProperty); 2751Assert.Equal("Bounds", e.AffectedProperty); 2835Assert.Equal("System.Windows.Forms.PictureBox, SizeMode: Normal", control.ToString());
System\Windows\Forms\ProgressBarTests.cs (13)
112Assert.Equal("msctls_progress32", createParams.ClassName); 151Assert.Equal("msctls_progress32", createParams.ClassName); 180Assert.Equal("msctls_progress32", createParams.ClassName); 1199Assert.Equal("RightToLeftLayout", e.AffectedProperty); 1246Assert.Equal("RightToLeftLayout", e.AffectedProperty); 1613Assert.Equal(expected, control.Text); 1618Assert.Equal(expected, control.Text); 1636Assert.Equal(expected, control.Text); 1644Assert.Equal(expected, control.Text); 1666Assert.Equal("text", control.Text); 1671Assert.Equal("text", control.Text); 1682Assert.Equal("text", control.Text); 2579Assert.Equal("System.Windows.Forms.ProgressBar, Minimum: 0, Maximum: 100, Value: 0", control.ToString());
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (1)
75Assert.Equal(gridEntry.PropertyName, selectedGridEntry.PropertyName);
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (5)
32Assert.Equal(gridEntry.PropertyName, selectedGridEntry.PropertyName); 42Assert.Equal("GridViewTextBoxAccessibleObject", editFieldAccessibleObject.GetType().Name); 67Assert.Equal("GridViewTextBoxAccessibleObject", editFieldAccessibleObject.GetType().Name); 77Assert.Equal("DropDownHolderAccessibleObject", dropDownHolderAccessibleObject.GetType().Name); 163Assert.Equal("WinForm", ((BSTR)accessibleObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_FrameworkIdPropertyId)).ToStringAndFree());
System\Windows\Forms\PropertyGridInternal\PropertiesTabTests.cs (3)
19Assert.Equal("vs.properties", tab.HelpKeyword); 35Assert.Equal("Name", tab.GetDefaultProperty(new ClassWithNameProperty()).Name); 42Assert.Equal("Value", tab.GetDefaultProperty(new ClassWithDefaultProperty()).Name);
System\Windows\Forms\PropertyGridInternal\PropertyGridView.DropDownHolderTests.cs (1)
37Assert.Equal("DropDownHolderAccessibleObject", accessibleObject.GetType().Name);
System\Windows\Forms\PropertyGridInternal\PropertyGridView.GridViewListBoxTests.cs (1)
29Assert.Equal("GridViewListBoxAccessibleObject", gridViewListBoxAccessibleObjectType.Name);
System\Windows\Forms\PropertyGridTests.cs (13)
130Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 205Assert.Equal("AutoScroll", e.AffectedProperty); 248Assert.Equal("AutoScroll", e.AffectedProperty); 3008Assert.Equal(expected, control.Text); 3013Assert.Equal(expected, control.Text); 3031Assert.Equal(expected, control.Text); 3039Assert.Equal(expected, control.Text); 3063Assert.Equal("text", control.Text); 3068Assert.Equal("text", control.Text); 3079Assert.Equal("text", control.Text); 3932Assert.Equal("System.Object", selectedItem.Label); 3947Assert.Equal( 3975Assert.Equal("123", myClass.ParentGridEntry.NestedGridEntry);
System\Windows\Forms\PropertyManagerTests.cs (1)
39Assert.Equal("System.Windows.Forms.Tests.PropertyManagerTests+DataSource.", manager.GetListName());
System\Windows\Forms\QueryAccessibilityHelpEventArgsTests.cs (6)
25Assert.Equal(helpNamespace, e.HelpNamespace); 26Assert.Equal(helpString, e.HelpString); 27Assert.Equal(helpKeyword, e.HelpKeyword); 45Assert.Equal(value, e.HelpNamespace); 56Assert.Equal(value, e.HelpString); 67Assert.Equal(value, e.HelpKeyword);
System\Windows\Forms\RadioButtonTests.cs (6)
95Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 129Assert.Equal("Button", createParams.ClassName); 153Assert.Equal("Button", createParams.ClassName); 519Assert.Equal(defaultActionDescription, instance.DefaultAction); 1512Assert.Equal("System.Windows.Forms.RadioButton, Checked: False", control.ToString()); 1522Assert.Equal("System.Windows.Forms.RadioButton, Checked: False", control.ToString());
System\Windows\Forms\RichTextBoxTests.cs (99)
104Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 146Assert.Equal("RICHEDIT50W", createParams.ClassName); 172Assert.Equal("RICHEDIT50W", createParams.ClassName); 226Assert.Equal("RICHEDIT50W", createParams.ClassName); 1976Assert.Equal("Text", control.Text); 2028Assert.Equal("Text", control.Text); 2198Assert.Equal("Bounds", e.AffectedProperty); 2359Assert.Equal(expected, control.RedoActionName); 2619Assert.Equal(rtf1, rtf2); 2638Assert.Equal(rtf1, rtf2); 2668Assert.Equal(rtf1, rtf2); 2713Assert.Equal("Hello World", control.Text); 2736Assert.Equal(plainText, control.Text); 2757Assert.Equal("Hello World", control.Text); 2788Assert.Equal("text", control.Text); 2793Assert.Equal("text", control.Text); 2804Assert.Equal("text", control.Text); 2831Assert.Equal("text", control.Text); 2840Assert.Equal("text", control.Text); 2859Assert.Equal("text", control.Text); 2885Assert.Equal(expected, control.Rtf); 2890Assert.Equal(expected, control.Rtf); 2975Assert.Equal("ScrollBars", e.AffectedProperty); 3038Assert.Equal("Bounds", e.AffectedProperty); 3103Assert.Equal("Bounds", e.AffectedProperty); 3165Assert.Equal(rtf1, rtf2); 3190Assert.Equal(rtf1, rtf2); 3211Assert.Equal(rtf1, rtf2); 3241Assert.Equal(rtf1, rtf2); 3420Assert.Equal(text1, text2); 3445Assert.Equal(text1, text2); 3466Assert.Equal(text1, text2); 3495Assert.Equal(text1, text2); 4755Assert.Equal(expectedFontName, font.OriginalFontName); 4829Assert.Equal(value?.Name, result1.Name); 4838Assert.Equal(value?.Name, result2.Name); 4862Assert.Equal(value?.Name, result1.Name); 4874Assert.Equal(value?.Name, result2.Name); 5451Assert.Equal(expectedSelectedText, control.SelectedText); 5458Assert.Equal(expectedSelectedText, control.SelectedText); 5479Assert.Equal(expectedSelectedText, control.SelectedText); 5485Assert.Equal(expectedSelectedText, control.SelectedText); 5514Assert.Equal(expectedSelectedText, control.SelectedText); 5524Assert.Equal(expectedSelectedText, control.SelectedText); 6068Assert.Equal(expectedSelectedText, control.SelectedText); 6074Assert.Equal(expectedSelectedText, control.SelectedText); 6898Assert.Equal(expectedText, control.Text); 6902Assert.Equal(oldWayExpectedText, textOldWay); 6906Assert.Equal(oldControlExpectedText, riched20.Text); 6945Assert.Equal(expected, control.Text); 6959Assert.Equal(expected, riched20.Text); 6984Assert.Equal(expected, textOldWay); 7002Assert.Equal("Hello World", control.Text); 7036Assert.Equal(expected, control.Text); 7044Assert.Equal(expected, control.Text); 7060Assert.Equal(expected, control.Text); 7073Assert.Equal(expected, control.Text); 7113Assert.Equal("Text", e.AffectedProperty); 7122Assert.Equal(expected, control.Text); 7131Assert.Equal(expected, control.Text); 7177Assert.Equal(expected, control.Text); 7188Assert.Equal(expected, control.Text); 7209Assert.Equal(expected, control.Text); 7220Assert.Equal(expected, control.Text); 7249Assert.Equal(expected, control.Text); 7263Assert.Equal(expected, control.Text); 7293Assert.Equal(expected, control.Text); 7309Assert.Equal(expected, control.Text); 7348Assert.Equal("Text", e.AffectedProperty); 7357Assert.Equal(expected, control.Text); 7369Assert.Equal(expected, control.Text); 7404Assert.Equal(expected, control.Text); 7417Assert.Equal(expected, control.Text); 7469Assert.Equal(expected, control.Text); 7483Assert.Equal(expected, control.Text); 7511Assert.Equal("text", control.Text); 7516Assert.Equal("text", control.Text); 7527Assert.Equal("text", control.Text); 7554Assert.Equal("text", control.Text); 7563Assert.Equal("text", control.Text); 7582Assert.Equal("text", control.Text); 7596Assert.Equal(expected, control.Text); 7601Assert.Equal(expected, control.Text); 7664Assert.Equal(expected, control.UndoActionName); 8570Assert.Equal("Hello World", control.Text); 8612Assert.Equal("Hello World", control.Text); 8632Assert.Equal("Hello World", control.Text); 8657Assert.Equal("Hello World", control.Text); 8699Assert.Equal("Hello World", control.Text); 8719Assert.Equal("Hello World", control.Text); 8734Assert.Equal("Hello World", control.Text); 8751Assert.Equal("Hello World", control.Text); 9393Assert.Equal("Hello World", Encoding.ASCII.GetString(stream.ToArray())); 9462Assert.Equal("Hello World", Encoding.Unicode.GetString(stream.ToArray())); 9604Assert.Equal("Hello World", Encoding.ASCII.GetString(stream.ToArray())); 10139Assert.Equal("text", control.Text); 10313Assert.Equal("text", control.Text); 10584Assert.Equal(riched20.Text, richTextBox.Text); 10590Assert.Equal("is ###NOT### hidden", richTextBox.SelectedText);
System\Windows\Forms\RowStyleTests.cs (2)
76Assert.Equal("Style", e.AffectedProperty); 113Assert.Equal("Style", e.AffectedProperty);
System\Windows\Forms\ScreenTests.cs (2)
210Assert.Equal($"Screen[Bounds={screen.Bounds} WorkingArea={screen.WorkingArea} Primary=True DeviceName={screen.DeviceName}", screen.ToString()); 219Assert.Equal(screen.DeviceName, screen.DeviceName.Trim('\0'));
System\Windows\Forms\ScrollableControlTests.cs (6)
94Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 249Assert.Equal("AutoScroll", e.AffectedProperty); 292Assert.Equal("AutoScroll", e.AffectedProperty); 798Assert.Equal("Padding", e.AffectedProperty); 1899Assert.Equal("RightToLeft", e.AffectedProperty); 1944Assert.Equal("RightToLeft", e.AffectedProperty);
System\Windows\Forms\ScrollBarTests.cs (11)
83Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 114Assert.Equal("ScrollBar", createParams.ClassName); 1482Assert.Equal(expected, control.Text); 1487Assert.Equal(expected, control.Text); 1505Assert.Equal(expected, control.Text); 1513Assert.Equal(expected, control.Text); 1535Assert.Equal("text", control.Text); 1540Assert.Equal("text", control.Text); 1551Assert.Equal("text", control.Text); 1753Assert.Equal(expectedMessage, ex.Message); 2667Assert.Equal("System.Windows.Forms.Tests.ScrollBarTests+SubScrollBar, Minimum: 0, Maximum: 100, Value: 0", control.ToString());
System\Windows\Forms\SearchForVirtualItemEventArgsTests.cs (1)
27Assert.Equal(text, e.Text);
System\Windows\Forms\SplitterPanelTests.cs (12)
85Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 675Assert.Equal("Bounds", e.AffectedProperty); 701Assert.Equal(expected, control.Name); 706Assert.Equal(expected, control.Name); 793Assert.Equal("Bounds", e.AffectedProperty); 1034Assert.Equal(expected, control.Text); 1039Assert.Equal(expected, control.Text); 1057Assert.Equal(expected, control.Text); 1065Assert.Equal(expected, control.Text); 1087Assert.Equal("text", control.Text); 1092Assert.Equal("text", control.Text); 1103Assert.Equal("text", control.Text);
System\Windows\Forms\SplitterTests.cs (8)
83Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 544Assert.Equal("Dock", e.AffectedProperty); 613Assert.Equal("Dock", e.AffectedProperty); 1559Assert.Equal(expected, control.Text); 1564Assert.Equal(expected, control.Text); 1582Assert.Equal(expected, control.Text); 1590Assert.Equal(expected, control.Text); 2300Assert.Equal("System.Windows.Forms.Splitter, MinExtra: 25, MinSize: 25", control.ToString());
System\Windows\Forms\StatusStripTests.cs (4)
119Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 330Assert.Equal("GripStyle", e.AffectedProperty); 413Assert.Equal("Padding", e.AffectedProperty); 886Assert.Equal(text, button.Text);
System\Windows\Forms\SystemInformationTests.cs (6)
109Assert.Equal(name, name.Trim('\0')); 110Assert.Equal(name, SystemInformation.ComputerName); 727Assert.Equal(Environment.UserDomainName, domainName); 728Assert.Equal(domainName, SystemInformation.UserDomainName); 742Assert.Equal(name, name.Trim('\0')); 743Assert.Equal(name, SystemInformation.UserName);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (78)
78Assert.Equal("Parent", events[0].AffectedProperty); 80Assert.Equal("Visible", events[1].AffectedProperty); 101Assert.Equal("Parent", events[0].AffectedProperty); 103Assert.Equal("Visible", events[1].AffectedProperty); 105Assert.Equal("Parent", events[2].AffectedProperty); 107Assert.Equal("Visible", events[3].AffectedProperty); 128Assert.Equal("Parent", events[0].AffectedProperty); 130Assert.Equal("Visible", events[1].AffectedProperty); 132Assert.Equal("Parent", events[2].AffectedProperty); 134Assert.Equal("Visible", events[3].AffectedProperty); 136Assert.Equal("ChildIndex", events[4].AffectedProperty); 208Assert.Equal("Parent", events[0].AffectedProperty); 210Assert.Equal("Visible", events[1].AffectedProperty); 212Assert.Equal("Bounds", events[2].AffectedProperty); 214Assert.Equal("Bounds", events[3].AffectedProperty); 216Assert.Equal("Visible", events[4].AffectedProperty); 240Assert.Equal("Parent", events[0].AffectedProperty); 242Assert.Equal("Visible", events[1].AffectedProperty); 244Assert.Equal("Bounds", events[2].AffectedProperty); 246Assert.Equal("Bounds", events[3].AffectedProperty); 248Assert.Equal("Visible", events[4].AffectedProperty); 250Assert.Equal("Parent", events[5].AffectedProperty); 252Assert.Equal("Visible", events[6].AffectedProperty); 254Assert.Equal("Bounds", events[7].AffectedProperty); 256Assert.Equal("Bounds", events[8].AffectedProperty); 281Assert.Equal("Parent", events[0].AffectedProperty); 283Assert.Equal("Visible", events[1].AffectedProperty); 285Assert.Equal("Bounds", events[2].AffectedProperty); 287Assert.Equal("Bounds", events[3].AffectedProperty); 289Assert.Equal("Visible", events[4].AffectedProperty); 291Assert.Equal("Parent", events[5].AffectedProperty); 293Assert.Equal("Visible", events[6].AffectedProperty); 295Assert.Equal("Bounds", events[7].AffectedProperty); 297Assert.Equal("Bounds", events[8].AffectedProperty); 299Assert.Equal("ChildIndex", events[9].AffectedProperty); 301Assert.Equal("Visible", events[10].AffectedProperty); 303Assert.Equal("Visible", events[11].AffectedProperty); 305Assert.Equal("Visible", events[12].AffectedProperty); 375Assert.Equal("Parent", events[0].AffectedProperty); 377Assert.Equal("Visible", events[1].AffectedProperty); 401Assert.Equal("Parent", events[0].AffectedProperty); 403Assert.Equal("Visible", events[1].AffectedProperty); 405Assert.Equal("Parent", events[2].AffectedProperty); 407Assert.Equal("Visible", events[3].AffectedProperty); 434Assert.Equal("Parent", events[0].AffectedProperty); 436Assert.Equal("Visible", events[1].AffectedProperty); 438Assert.Equal("Parent", events[2].AffectedProperty); 440Assert.Equal("Visible", events[3].AffectedProperty); 442Assert.Equal("ChildIndex", events[4].AffectedProperty); 523Assert.Equal("Parent", events[0].AffectedProperty); 525Assert.Equal("Visible", events[1].AffectedProperty); 527Assert.Equal("Bounds", events[2].AffectedProperty); 529Assert.Equal("Bounds", events[3].AffectedProperty); 531Assert.Equal("Visible", events[4].AffectedProperty); 558Assert.Equal("Parent", events[0].AffectedProperty); 560Assert.Equal("Visible", events[1].AffectedProperty); 562Assert.Equal("Bounds", events[2].AffectedProperty); 564Assert.Equal("Bounds", events[3].AffectedProperty); 566Assert.Equal("Visible", events[4].AffectedProperty); 568Assert.Equal("Parent", events[5].AffectedProperty); 570Assert.Equal("Visible", events[6].AffectedProperty); 572Assert.Equal("Bounds", events[7].AffectedProperty); 574Assert.Equal("Bounds", events[8].AffectedProperty); 605Assert.Equal("Parent", events[0].AffectedProperty); 607Assert.Equal("Visible", events[1].AffectedProperty); 609Assert.Equal("Bounds", events[2].AffectedProperty); 611Assert.Equal("Bounds", events[3].AffectedProperty); 613Assert.Equal("Visible", events[4].AffectedProperty); 615Assert.Equal("Parent", events[5].AffectedProperty); 617Assert.Equal("Visible", events[6].AffectedProperty); 619Assert.Equal("Bounds", events[7].AffectedProperty); 621Assert.Equal("Bounds", events[8].AffectedProperty); 623Assert.Equal("ChildIndex", events[9].AffectedProperty); 625Assert.Equal("Visible", events[10].AffectedProperty); 627Assert.Equal("Visible", events[11].AffectedProperty); 629Assert.Equal("Visible", events[12].AffectedProperty); 790Assert.Equal(expectedText, new string(item.pszText)); 858Assert.Equal(expectedText, new string(item.pszText));
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (201)
64Assert.Equal("Parent", events[0].AffectedProperty); 66Assert.Equal("Visible", events[1].AffectedProperty); 88Assert.Equal("Parent", events[0].AffectedProperty); 90Assert.Equal("Visible", events[1].AffectedProperty); 92Assert.Equal("Parent", events[2].AffectedProperty); 94Assert.Equal("Visible", events[3].AffectedProperty); 116Assert.Equal("Parent", events[0].AffectedProperty); 118Assert.Equal("Visible", events[1].AffectedProperty); 120Assert.Equal("Parent", events[2].AffectedProperty); 122Assert.Equal("Visible", events[3].AffectedProperty); 124Assert.Equal("ChildIndex", events[4].AffectedProperty); 197Assert.Equal("Parent", events[0].AffectedProperty); 199Assert.Equal("Visible", events[1].AffectedProperty); 201Assert.Equal("Bounds", events[2].AffectedProperty); 203Assert.Equal("Bounds", events[3].AffectedProperty); 205Assert.Equal("Visible", events[4].AffectedProperty); 230Assert.Equal("Parent", events[0].AffectedProperty); 232Assert.Equal("Visible", events[1].AffectedProperty); 234Assert.Equal("Bounds", events[2].AffectedProperty); 236Assert.Equal("Bounds", events[3].AffectedProperty); 238Assert.Equal("Visible", events[4].AffectedProperty); 240Assert.Equal("Parent", events[5].AffectedProperty); 242Assert.Equal("Visible", events[6].AffectedProperty); 244Assert.Equal("Bounds", events[7].AffectedProperty); 246Assert.Equal("Bounds", events[8].AffectedProperty); 272Assert.Equal("Parent", events[0].AffectedProperty); 274Assert.Equal("Visible", events[1].AffectedProperty); 276Assert.Equal("Bounds", events[2].AffectedProperty); 278Assert.Equal("Bounds", events[3].AffectedProperty); 280Assert.Equal("Visible", events[4].AffectedProperty); 282Assert.Equal("Parent", events[5].AffectedProperty); 284Assert.Equal("Visible", events[6].AffectedProperty); 286Assert.Equal("Bounds", events[7].AffectedProperty); 288Assert.Equal("Bounds", events[8].AffectedProperty); 290Assert.Equal("ChildIndex", events[9].AffectedProperty); 292Assert.Equal("Visible", events[10].AffectedProperty); 294Assert.Equal("Visible", events[11].AffectedProperty); 296Assert.Equal("Visible", events[12].AffectedProperty); 367Assert.Equal("Parent", events[0].AffectedProperty); 369Assert.Equal("Visible", events[1].AffectedProperty); 394Assert.Equal("Parent", events[0].AffectedProperty); 396Assert.Equal("Visible", events[1].AffectedProperty); 398Assert.Equal("Parent", events[2].AffectedProperty); 400Assert.Equal("Visible", events[3].AffectedProperty); 428Assert.Equal("Parent", events[0].AffectedProperty); 430Assert.Equal("Visible", events[1].AffectedProperty); 432Assert.Equal("Parent", events[2].AffectedProperty); 434Assert.Equal("Visible", events[3].AffectedProperty); 436Assert.Equal("ChildIndex", events[4].AffectedProperty); 518Assert.Equal("Parent", events[0].AffectedProperty); 520Assert.Equal("Visible", events[1].AffectedProperty); 522Assert.Equal("Bounds", events[2].AffectedProperty); 524Assert.Equal("Bounds", events[3].AffectedProperty); 526Assert.Equal("Visible", events[4].AffectedProperty); 554Assert.Equal("Parent", events[0].AffectedProperty); 556Assert.Equal("Visible", events[1].AffectedProperty); 558Assert.Equal("Bounds", events[2].AffectedProperty); 560Assert.Equal("Bounds", events[3].AffectedProperty); 562Assert.Equal("Visible", events[4].AffectedProperty); 564Assert.Equal("Parent", events[5].AffectedProperty); 566Assert.Equal("Visible", events[6].AffectedProperty); 568Assert.Equal("Bounds", events[7].AffectedProperty); 570Assert.Equal("Bounds", events[8].AffectedProperty); 602Assert.Equal("Parent", events[0].AffectedProperty); 604Assert.Equal("Visible", events[1].AffectedProperty); 606Assert.Equal("Bounds", events[2].AffectedProperty); 608Assert.Equal("Bounds", events[3].AffectedProperty); 610Assert.Equal("Visible", events[4].AffectedProperty); 612Assert.Equal("Parent", events[5].AffectedProperty); 614Assert.Equal("Visible", events[6].AffectedProperty); 616Assert.Equal("Bounds", events[7].AffectedProperty); 618Assert.Equal("Bounds", events[8].AffectedProperty); 620Assert.Equal("ChildIndex", events[9].AffectedProperty); 622Assert.Equal("Visible", events[10].AffectedProperty); 624Assert.Equal("Visible", events[11].AffectedProperty); 626Assert.Equal("Visible", events[12].AffectedProperty); 796Assert.Equal(expectedText, new string(item.pszText)); 866Assert.Equal(expectedText, new string(item.pszText)); 898Assert.Equal(expectedText, page.Text); 918Assert.Equal(expectedName, page.Name); 919Assert.Equal(expectedText, page.Text); 939Assert.Equal(expectedName, page.Name); 940Assert.Equal(expectedText, page.Text); 960Assert.Equal(expectedName, page.Name); 961Assert.Equal(expectedText, page.Text); 963Assert.Equal(expectedImageKey, page.ImageKey); 1011Assert.Equal("Parent", events[0].AffectedProperty); 1013Assert.Equal("Visible", events[1].AffectedProperty); 1034Assert.Equal("Parent", events[0].AffectedProperty); 1036Assert.Equal("Visible", events[1].AffectedProperty); 1038Assert.Equal("Parent", events[2].AffectedProperty); 1040Assert.Equal("Visible", events[3].AffectedProperty); 1061Assert.Equal("Parent", events[0].AffectedProperty); 1063Assert.Equal("Visible", events[1].AffectedProperty); 1065Assert.Equal("Parent", events[2].AffectedProperty); 1067Assert.Equal("Visible", events[3].AffectedProperty); 1069Assert.Equal("ChildIndex", events[4].AffectedProperty); 1350Assert.Equal("Parent", e.AffectedProperty); 1473Assert.Equal("Parent", e.AffectedProperty); 2006Assert.Equal("Parent", events[0].AffectedProperty); 2008Assert.Equal("Visible", events[1].AffectedProperty); 2030Assert.Equal("Parent", events[0].AffectedProperty); 2032Assert.Equal("Visible", events[1].AffectedProperty); 2034Assert.Equal("Parent", events[2].AffectedProperty); 2036Assert.Equal("Visible", events[3].AffectedProperty); 2038Assert.Equal("ChildIndex", events[4].AffectedProperty); 2060Assert.Equal("Parent", events[0].AffectedProperty); 2062Assert.Equal("Visible", events[1].AffectedProperty); 2064Assert.Equal("Parent", events[2].AffectedProperty); 2066Assert.Equal("Visible", events[3].AffectedProperty); 2068Assert.Equal("ChildIndex", events[4].AffectedProperty); 2070Assert.Equal("ChildIndex", events[5].AffectedProperty); 2072Assert.Equal("ChildIndex", events[6].AffectedProperty); 2134Assert.Equal("Parent", events[0].AffectedProperty); 2136Assert.Equal("Visible", events[1].AffectedProperty); 2138Assert.Equal("Bounds", events[2].AffectedProperty); 2140Assert.Equal("Bounds", events[3].AffectedProperty); 2142Assert.Equal("Visible", events[4].AffectedProperty); 2167Assert.Equal("Parent", events[0].AffectedProperty); 2169Assert.Equal("Visible", events[1].AffectedProperty); 2171Assert.Equal("Bounds", events[2].AffectedProperty); 2173Assert.Equal("Bounds", events[3].AffectedProperty); 2175Assert.Equal("Visible", events[4].AffectedProperty); 2177Assert.Equal("Parent", events[5].AffectedProperty); 2179Assert.Equal("Visible", events[6].AffectedProperty); 2181Assert.Equal("Bounds", events[7].AffectedProperty); 2183Assert.Equal("Bounds", events[8].AffectedProperty); 2185Assert.Equal("ChildIndex", events[9].AffectedProperty); 2211Assert.Equal("Parent", events[0].AffectedProperty); 2213Assert.Equal("Visible", events[1].AffectedProperty); 2215Assert.Equal("Bounds", events[2].AffectedProperty); 2217Assert.Equal("Bounds", events[3].AffectedProperty); 2219Assert.Equal("Visible", events[4].AffectedProperty); 2221Assert.Equal("Parent", events[5].AffectedProperty); 2223Assert.Equal("Visible", events[6].AffectedProperty); 2225Assert.Equal("Bounds", events[7].AffectedProperty); 2227Assert.Equal("Bounds", events[8].AffectedProperty); 2229Assert.Equal("ChildIndex", events[9].AffectedProperty); 2231Assert.Equal("ChildIndex", events[10].AffectedProperty); 2233Assert.Equal("Visible", events[11].AffectedProperty); 2235Assert.Equal("Visible", events[12].AffectedProperty); 2237Assert.Equal("Visible", events[13].AffectedProperty); 2239Assert.Equal("ChildIndex", events[14].AffectedProperty); 2310Assert.Equal("Parent", events[0].AffectedProperty); 2312Assert.Equal("Visible", events[1].AffectedProperty); 2337Assert.Equal("Parent", events[0].AffectedProperty); 2339Assert.Equal("Visible", events[1].AffectedProperty); 2341Assert.Equal("Parent", events[2].AffectedProperty); 2343Assert.Equal("Visible", events[3].AffectedProperty); 2345Assert.Equal("ChildIndex", events[4].AffectedProperty); 2373Assert.Equal("Parent", events[0].AffectedProperty); 2375Assert.Equal("Visible", events[1].AffectedProperty); 2377Assert.Equal("Parent", events[2].AffectedProperty); 2379Assert.Equal("Visible", events[3].AffectedProperty); 2381Assert.Equal("ChildIndex", events[4].AffectedProperty); 2383Assert.Equal("ChildIndex", events[5].AffectedProperty); 2385Assert.Equal("ChildIndex", events[6].AffectedProperty); 2467Assert.Equal("Parent", events[0].AffectedProperty); 2469Assert.Equal("Visible", events[1].AffectedProperty); 2471Assert.Equal("Bounds", events[2].AffectedProperty); 2473Assert.Equal("Bounds", events[3].AffectedProperty); 2475Assert.Equal("Visible", events[4].AffectedProperty); 2503Assert.Equal("Parent", events[0].AffectedProperty); 2505Assert.Equal("Visible", events[1].AffectedProperty); 2507Assert.Equal("Bounds", events[2].AffectedProperty); 2509Assert.Equal("Bounds", events[3].AffectedProperty); 2511Assert.Equal("Visible", events[4].AffectedProperty); 2513Assert.Equal("Parent", events[5].AffectedProperty); 2515Assert.Equal("Visible", events[6].AffectedProperty); 2517Assert.Equal("Bounds", events[7].AffectedProperty); 2519Assert.Equal("Bounds", events[8].AffectedProperty); 2521Assert.Equal("ChildIndex", events[9].AffectedProperty); 2553Assert.Equal("Parent", events[0].AffectedProperty); 2555Assert.Equal("Visible", events[1].AffectedProperty); 2557Assert.Equal("Bounds", events[2].AffectedProperty); 2559Assert.Equal("Bounds", events[3].AffectedProperty); 2561Assert.Equal("Visible", events[4].AffectedProperty); 2563Assert.Equal("Parent", events[5].AffectedProperty); 2565Assert.Equal("Visible", events[6].AffectedProperty); 2567Assert.Equal("Bounds", events[7].AffectedProperty); 2569Assert.Equal("Bounds", events[8].AffectedProperty); 2571Assert.Equal("ChildIndex", events[9].AffectedProperty); 2573Assert.Equal("ChildIndex", events[10].AffectedProperty); 2575Assert.Equal("Visible", events[11].AffectedProperty); 2577Assert.Equal("Visible", events[12].AffectedProperty); 2579Assert.Equal("Visible", events[13].AffectedProperty); 2581Assert.Equal("ChildIndex", events[14].AffectedProperty); 2712Assert.Equal(expectedText, page.Text); 2731Assert.Equal(expectedName, page.Name); 2732Assert.Equal(expectedText, page.Text); 2751Assert.Equal(expectedName, page.Name); 2752Assert.Equal(expectedText, page.Text); 2771Assert.Equal(expectedName, page.Name); 2772Assert.Equal(expectedText, page.Text); 2774Assert.Equal(expectedImageKey, page.ImageKey); 2822Assert.Equal(expectedText, new string(item.pszText)); 2890Assert.Equal(expectedText, new string(item.pszText)); 3577Assert.Equal(expectedText, new string(item.pszText)); 3649Assert.Equal(expectedText, new string(item.pszText)); 4828Assert.Equal("Parent", e.AffectedProperty); 4922Assert.Equal("Parent", e.AffectedProperty);
System\Windows\Forms\TabControlTests.cs (27)
87Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 123Assert.Equal("SysTabControl32", createParams.ClassName); 148Assert.Equal("SysTabControl32", createParams.ClassName); 172Assert.Equal("SysTabControl32", createParams.ClassName); 209Assert.Equal("SysTabControl32", createParams.ClassName); 235Assert.Equal("SysTabControl32", createParams.ClassName); 259Assert.Equal("SysTabControl32", createParams.ClassName); 294Assert.Equal("SysTabControl32", createParams.ClassName); 319Assert.Equal("SysTabControl32", createParams.ClassName); 348Assert.Equal("SysTabControl32", createParams.ClassName); 1078Assert.Equal(expectedText, new string(item.pszText)); 1843Assert.Equal("RightToLeftLayout", e.AffectedProperty); 1890Assert.Equal("RightToLeftLayout", e.AffectedProperty); 2916Assert.Equal(expected, control.Text); 2921Assert.Equal(expected, control.Text); 2939Assert.Equal(expected, control.Text); 2947Assert.Equal(expected, control.Text); 2970Assert.Equal("text", control.Text); 2975Assert.Equal("text", control.Text); 2986Assert.Equal("text", control.Text); 3973Assert.Equal("text", control.GetToolTipText(item)); 4953Assert.Equal(expectedText, new string(item.pszText)); 5013Assert.Equal("Parent", e.AffectedProperty); 5128Assert.Equal("Parent", e.AffectedProperty); 5672Assert.Equal("System.Windows.Forms.TabControl, TabPages.Count: 0", control.ToString()); 5683Assert.Equal("System.Windows.Forms.TabControl, TabPages.Count: 2, TabPages[0]: TabPage: {text1}", control.ToString()); 5703Assert.Equal(text, actual);
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (3)
95Assert.Equal("1,2", position.ToString()); 318Assert.Equal(nameof(TableLayoutPanelCellPosition.Column), properties[0].Name); 319Assert.Equal(nameof(TableLayoutPanelCellPosition.Row), properties[1].Name);
System\Windows\Forms\TableLayoutPanelTests.cs (15)
103Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 231Assert.Equal("CellBorderStyle", e.AffectedProperty); 267Assert.Equal("CellBorderStyle", e.AffectedProperty); 310Assert.Equal("Columns", e.AffectedProperty); 385Assert.Equal("GrowStyle", e.AffectedProperty); 421Assert.Equal("LayoutSettings", e.AffectedProperty); 457Assert.Equal("LayoutSettings", e.AffectedProperty); 508Assert.Equal("LayoutSettings", e.AffectedProperty); 555Assert.Equal("LayoutSettings", e.AffectedProperty); 602Assert.Equal("Rows", e.AffectedProperty); 1606Assert.Equal("TableIndex", eventArgs.AffectedProperty); 1712Assert.Equal("TableIndex", eventArgs.AffectedProperty); 1821Assert.Equal("ColumnSpan", eventArgs.AffectedProperty); 1939Assert.Equal("TableIndex", eventArgs.AffectedProperty); 2048Assert.Equal("RowSpan", eventArgs.AffectedProperty);
System\Windows\Forms\TableLayoutStyleTests.cs (2)
51Assert.Equal("Style", e.AffectedProperty); 90Assert.Equal("Style", e.AffectedProperty);
System\Windows\Forms\TabPageTests.cs (71)
100Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 209Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 221Assert.Equal(expectedText, control.Text); 1407Assert.Equal("Text", new string(item.pszText)); 1474Assert.Equal("Text", new string(item.pszText)); 1502Assert.Equal(value, control.ImageKey); 1509Assert.Equal(value, control.ImageKey); 1524Assert.Equal(value, control.ImageKey); 1532Assert.Equal(value, control.ImageKey); 1561Assert.Equal(value, control.ImageKey); 1569Assert.Equal(value, control.ImageKey); 1586Assert.Equal(value, control.ImageKey); 1592Assert.Equal(value, control.ImageKey); 1610Assert.Equal(value, control.ImageKey); 1620Assert.Equal(value, control.ImageKey); 1653Assert.Equal(value, control.ImageKey); 1667Assert.Equal(value, control.ImageKey); 1717Assert.Equal(value, control.ImageKey); 1731Assert.Equal(value, control.ImageKey); 1782Assert.Equal("Text", new string(item.pszText)); 1846Assert.Equal("Text", new string(item.pszText)); 1979Assert.Equal("Bounds", e.AffectedProperty); 2204Assert.Equal("Bounds", e.AffectedProperty); 2455Assert.Equal("Bounds", e.AffectedProperty); 2788Assert.Equal(expected, control.Text); 2793Assert.Equal(expected, control.Text); 2807Assert.Equal(expected, control.Text); 2814Assert.Equal(expected, control.Text); 2843Assert.Equal(expected, control.Text); 2850Assert.Equal(expected, control.Text); 2870Assert.Equal(expected, control.Text); 2878Assert.Equal(expected, control.Text); 2909Assert.Equal(expected, control.Text); 2922Assert.Equal(expected, control.Text); 2971Assert.Equal(expected, control.Text); 2984Assert.Equal(expected, control.Text); 3038Assert.Equal(expectedText, new string(item.pszText)); 3105Assert.Equal(expectedText, new string(item.pszText)); 3132Assert.Equal("text", control.Text); 3137Assert.Equal("text", control.Text); 3148Assert.Equal("text", control.Text); 3160Assert.Equal(expected, control.ToolTipText); 3165Assert.Equal(expected, control.ToolTipText); 3179Assert.Equal(expected, control.ToolTipText); 3186Assert.Equal(expected, control.ToolTipText); 3215Assert.Equal(expected, control.ToolTipText); 3222Assert.Equal(expected, control.ToolTipText); 3242Assert.Equal(expected, control.ToolTipText); 3250Assert.Equal(expected, control.ToolTipText); 3283Assert.Equal(expected, control.ToolTipText); 3296Assert.Equal(expected, control.ToolTipText); 3347Assert.Equal(expected, control.ToolTipText); 3360Assert.Equal(expected, control.ToolTipText); 3411Assert.Equal("Text", new string(item.pszText)); 3475Assert.Equal("Text", new string(item.pszText)); 4310Assert.Equal("Bounds", e.AffectedProperty); 4428Assert.Equal("Bounds", e.AffectedProperty); 4469Assert.Equal("Bounds", e.AffectedProperty); 4602Assert.Equal("Bounds", e.AffectedProperty); 4761Assert.Equal("Bounds", e.AffectedProperty); 4802Assert.Equal("Bounds", e.AffectedProperty); 4883Assert.Equal("TabPage: {}", control.ToString()); 4890Assert.Equal("TabPage: {text}", control.ToString()); 4897Assert.Equal("TabPage: {}", control.ToString()); 4910Assert.Equal(text, actual); 4927Assert.Equal(text, actual); 5006Assert.Equal(text, actual); 5065Assert.Equal(text, actualText); 5079Assert.Equal(expectedText, actualText); 5097Assert.Equal(text, actualText); 5146Assert.Equal(text, actualText);
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (1)
37Assert.Equal(affectedProperty, e.AffectedProperty);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (3)
528Assert.Equal(expected, actual); 543Assert.Equal(expected, actual); 927Assert.Equal("Segoe UI", actual);
System\Windows\Forms\TimerTests.cs (1)
454Assert.Equal("System.Windows.Forms.Timer, Interval: 100", timer.ToString());
System\Windows\Forms\ToolStripButtonTests.cs (11)
166Assert.Equal(text, item.Text); 170Assert.Equal(text, item.ToolTipText); 343Assert.Equal(text, item.Text); 347Assert.Equal(text, item.ToolTipText); 431Assert.Equal(text, item.Text); 435Assert.Equal(text, item.ToolTipText); 515Assert.Equal(expectedName, item.Name); 529Assert.Equal(text, item.Text); 533Assert.Equal(text, item.ToolTipText); 1315Assert.Equal("Text", e.Text); 1406Assert.Equal("Text", e.Text);
System\Windows\Forms\ToolStripContentPanelTests.cs (6)
97Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 154Assert.Equal("AutoScroll", e.AffectedProperty); 197Assert.Equal("AutoScroll", e.AffectedProperty); 1074Assert.Equal("Bounds", e.AffectedProperty); 1100Assert.Equal(expected, control.Name); 1105Assert.Equal(expected, control.Name);
System\Windows\Forms\ToolStripControlHostTests.cs (31)
114Assert.Equal(c.Text, item.Text); 142Assert.Equal(value, item.AccessibleDefaultActionDescription); 143Assert.Equal(value, c.AccessibleDefaultActionDescription); 148Assert.Equal(value, item.AccessibleDefaultActionDescription); 149Assert.Equal(value, c.AccessibleDefaultActionDescription); 172Assert.Equal(value, item.AccessibleDescription); 173Assert.Equal(value, c.AccessibleDescription); 178Assert.Equal(value, item.AccessibleDescription); 179Assert.Equal(value, c.AccessibleDescription); 202Assert.Equal(value, item.AccessibleName); 203Assert.Equal(value, c.AccessibleName); 208Assert.Equal(value, item.AccessibleName); 209Assert.Equal(value, c.AccessibleName); 668Assert.Equal("Text", c.Text); 669Assert.Equal("Text", item.Text); 1300Assert.Equal(expected, item.ImageKey); 1307Assert.Equal(expected, item.ImageKey); 1793Assert.Equal(name, c.Site.Name); 1803Assert.Equal(name, c.Site.Name); 1900Assert.Equal(expected, item.Site.Name); 1901Assert.Equal(expected, c.Site.Name); 1907Assert.Equal(expected, item.Site.Name); 1908Assert.Equal(expected, c.Site.Name); 2254Assert.Equal(expected, item.Text); 2255Assert.Equal(expected, c.Text); 2260Assert.Equal(expected, item.Text); 2261Assert.Equal(expected, c.Text); 2281Assert.Equal("value", item.Text); 2286Assert.Equal("value", item.Text); 2297Assert.Equal("value", item.Text); 3837Assert.Equal("FileName", fileName);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
174Assert.Equal(text, item.Text); 259Assert.Equal(expectedName, item.Name); 273Assert.Equal(text, item.Text); 381Assert.Equal(text, item.Text);
System\Windows\Forms\ToolStripDropDownTests.cs (16)
128Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 601Assert.Equal("Anchor", e.AffectedProperty); 674Assert.Equal("AutoSize", e.AffectedProperty); 712Assert.Equal("AutoSize", e.AffectedProperty); 1783Assert.Equal("GripStyle", e.AffectedProperty); 2387Assert.Equal("RightToLeft", e.AffectedProperty); 2674Assert.Equal(expected, control.Text); 2679Assert.Equal(expected, control.Text); 2697Assert.Equal(expected, control.Text); 2705Assert.Equal(expected, control.Text); 2727Assert.Equal("text", control.Text); 2732Assert.Equal("text", control.Text); 2743Assert.Equal("text", control.Text); 2760Assert.Equal("TextDirection", e.AffectedProperty); 2796Assert.Equal("TextDirection", e.AffectedProperty); 2963Assert.Equal(text, button.Text);
System\Windows\Forms\ToolStripItemCollectionTests.cs (3)
119Assert.Equal("a", contextMenuStrip.Items[0].Text); 120Assert.Equal("b", contextMenuStrip.Items[1].Text); 121Assert.Equal("c", contextMenuStrip.Items[2].Text);
System\Windows\Forms\ToolStripItemTests.cs (121)
169Assert.Equal(text, item.Text); 250Assert.Equal(expectedName, item.Name); 264Assert.Equal(text, item.Text); 316Assert.Equal(value, item.AccessibleDefaultActionDescription); 320Assert.Equal(value, item.AccessibleDefaultActionDescription); 331Assert.Equal(value, item.AccessibleDescription); 335Assert.Equal(value, item.AccessibleDescription); 346Assert.Equal(value, item.AccessibleName); 350Assert.Equal(value, item.AccessibleName); 902Assert.Equal("AutoSize", e.AffectedProperty); 955Assert.Equal("AutoSize", e.AffectedProperty); 2143Assert.Equal("DisplayStyle", e.AffectedProperty); 2191Assert.Equal("DisplayStyle", e.AffectedProperty); 3017Assert.Equal("Font", e.AffectedProperty); 3064Assert.Equal("Font", e.AffectedProperty); 3578Assert.Equal("Bounds", e.AffectedProperty); 3631Assert.Equal("Bounds", e.AffectedProperty); 3911Assert.Equal("Image", e.AffectedProperty); 3963Assert.Equal("Image", e.AffectedProperty); 4207Assert.Equal("ImageAlign", e.AffectedProperty); 4261Assert.Equal("ImageAlign", e.AffectedProperty); 4465Assert.Equal("ImageIndex", e.AffectedProperty); 4514Assert.Equal("ImageIndex", e.AffectedProperty); 4566Assert.Equal("ImageIndex", e.AffectedProperty); 4899Assert.Equal(expected, item.ImageKey); 4905Assert.Equal(expected, item.ImageKey); 4920Assert.Equal(expected, item.ImageKey); 4926Assert.Equal(expected, item.ImageKey); 4940Assert.Equal(expected, item.ImageKey); 4946Assert.Equal(expected, item.ImageKey); 4965Assert.Equal("ImageKey", e.AffectedProperty); 4974Assert.Equal(expected, item.ImageKey); 4981Assert.Equal(expected, item.ImageKey); 5016Assert.Equal("ImageKey", e.AffectedProperty); 5025Assert.Equal(expected, item.ImageKey); 5033Assert.Equal(expected, item.ImageKey); 5066Assert.Equal("ImageKey", e.AffectedProperty); 5075Assert.Equal(expected, item.ImageKey); 5085Assert.Equal(expected, item.ImageKey); 5115Assert.Equal(expected, item.ImageKey); 5122Assert.Equal(expected, item.ImageKey); 5155Assert.Equal(expected, item.ImageKey); 5162Assert.Equal(expected, item.ImageKey); 5196Assert.Equal(expected, item.ImageKey); 5206Assert.Equal(expected, item.ImageKey); 5239Assert.Equal("text", item.ImageKey); 5243Assert.Equal("text", item.ImageKey); 5270Assert.Equal("text", item.ImageKey); 5274Assert.Equal("text", item.ImageKey); 5296Assert.Equal("Image", item.ImageKey); 5300Assert.Equal("NoSuchImage", item.ImageKey); 5331Assert.Equal("text", item.ImageKey); 5335Assert.Equal("text", item.ImageKey); 5362Assert.Equal("text", item.ImageKey); 5366Assert.Equal("text", item.ImageKey); 5388Assert.Equal("Image", item.ImageKey); 5392Assert.Equal("NoSuchImage", item.ImageKey); 5434Assert.Equal("ImageScaling", e.AffectedProperty); 5481Assert.Equal("ImageScaling", e.AffectedProperty); 5926Assert.Equal("Margin", e.AffectedProperty); 5972Assert.Equal("Margin", e.AffectedProperty); 6017Assert.Equal("Margin", e.AffectedProperty); 6063Assert.Equal("Margin", e.AffectedProperty); 6179Assert.Equal(expected, item.Name); 6183Assert.Equal(expected, item.Name); 6195Assert.Equal(value, item.Name); 6199Assert.Equal(value, item.Name); 6222Assert.Equal("name", item.Name); 6258Assert.Equal("Overflow", e.AffectedProperty); 6310Assert.Equal("Overflow", e.AffectedProperty); 6755Assert.Equal("Padding", e.AffectedProperty); 6801Assert.Equal("Padding", e.AffectedProperty); 7192Assert.Equal("RightToLeft", e.AffectedProperty); 7241Assert.Equal("RightToLeft", e.AffectedProperty); 7545Assert.Equal("RightToLeftAutoMirrorImage", e.AffectedProperty); 7962Assert.Equal("Bounds", e.AffectedProperty); 8012Assert.Equal("Bounds", e.AffectedProperty); 8070Assert.Equal(value, item.Text); 8074Assert.Equal(value, item.Text); 8093Assert.Equal("Text", e.AffectedProperty); 8102Assert.Equal(value, item.Text); 8108Assert.Equal(value, item.Text); 8142Assert.Equal("Text", e.AffectedProperty); 8151Assert.Equal(value, item.Text); 8160Assert.Equal(value, item.Text); 8189Assert.Equal(value, item.Text); 8195Assert.Equal(value, item.Text); 8229Assert.Equal(value, item.Text); 8238Assert.Equal(value, item.Text); 8266Assert.Equal("value", item.Text); 8271Assert.Equal("value", item.Text); 8282Assert.Equal("value", item.Text); 8323Assert.Equal("TextAlign", e.AffectedProperty); 8377Assert.Equal("TextAlign", e.AffectedProperty); 8598Assert.Equal("TextDirection", e.AffectedProperty); 8647Assert.Equal("TextDirection", e.AffectedProperty); 8850Assert.Equal("TextImageRelation", e.AffectedProperty); 8900Assert.Equal("TextImageRelation", e.AffectedProperty); 9052Assert.Equal(expected, item.ToolTipText); 9063Assert.Equal(value, item.ToolTipText); 9067Assert.Equal(value, item.ToolTipText); 9089Assert.Equal("text", item.ToolTipText); 9116Assert.Equal("text", item.ToolTipText); 9745Assert.Equal("Bounds", e.AffectedProperty); 9798Assert.Equal("Bounds", e.AffectedProperty); 10875Assert.Equal("Bounds", e.AffectedProperty); 10913Assert.Equal("Bounds", e.AffectedProperty); 11391Assert.Equal("Font", e.AffectedProperty); 11436Assert.Equal("Font", e.AffectedProperty); 12301Assert.Equal("Font", e.AffectedProperty); 12355Assert.Equal("Font", e.AffectedProperty); 12768Assert.Equal("RightToLeft", e.AffectedProperty); 12825Assert.Equal("RightToLeft", e.AffectedProperty); 13004Assert.Equal("Text", e.AffectedProperty); 13061Assert.Equal("Text", e.AffectedProperty); 13343Assert.Equal("Items", e.AffectedProperty); 14728Assert.Equal("Bounds", e.AffectedProperty); 14789Assert.Equal("Bounds", e.AffectedProperty); 15278Assert.Equal("System.Windows.Forms.Tests.ToolStripItemTests+SubToolStripItem", item.ToString()); 15291Assert.Equal(expected, item.ToString()); 15298Assert.Equal("System.Windows.Forms.Tests.ToolStripItemTests+NullTextToolStripItem", item.ToString());
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (2)
27Assert.Equal(text, e.Text); 53Assert.Equal(text, e.Text);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
159Assert.Equal(expectedShortcutText, item.GetShortcutText());
System\Windows\Forms\ToolStripPanelTests.cs (1)
97Assert.Equal("Microsoft\u00AE .NET", control.ProductName);
System\Windows\Forms\ToolStripSeparatorTests.cs (11)
499Assert.Equal(expected, item.ImageKey); 505Assert.Equal(expected, item.ImageKey); 580Assert.Equal(value, item.Text); 584Assert.Equal(value, item.Text); 602Assert.Equal("value", item.Text); 607Assert.Equal("value", item.Text); 618Assert.Equal("value", item.Text); 713Assert.Equal(value, item.ToolTipText); 717Assert.Equal(value, item.ToolTipText); 1531Assert.Equal("Bounds", e.AffectedProperty); 1585Assert.Equal("Bounds", e.AffectedProperty);
System\Windows\Forms\ToolStripTests.cs (18)
136Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 291Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 780Assert.Equal("Anchor", e.AffectedProperty); 926Assert.Equal("Bounds", e.AffectedProperty); 982Assert.Equal("AutoSize", e.AffectedProperty); 2770Assert.Equal("GripStyle", e.AffectedProperty); 2801Assert.Equal("GripStyle", e.AffectedProperty); 2837Assert.Equal("GripStyle", e.AffectedProperty); 3455Assert.Equal("RightToLeft", e.AffectedProperty); 3827Assert.Equal("TextDirection", e.AffectedProperty); 3863Assert.Equal("TextDirection", e.AffectedProperty); 3902Assert.Equal("TextDirection", e.AffectedProperty); 3945Assert.Equal("TextDirection", e.AffectedProperty); 3989Assert.Equal("TextDirection", e.AffectedProperty); 4054Assert.Equal("TextDirection", e.AffectedProperty); 4281Assert.Equal(text, button.Text); 6317Assert.Equal("RightToLeft", e.AffectedProperty); 6362Assert.Equal("RightToLeft", e.AffectedProperty);
System\Windows\Forms\ToolTipBufferTests.cs (7)
27Assert.Equal("text", Marshal.PtrToStringUni(memory2)); 53Assert.Equal("text", Marshal.PtrToStringUni(buffer.Buffer)); 59Assert.Equal(longer, Marshal.PtrToStringUni(memory2)); 73Assert.Equal("text", Marshal.PtrToStringUni(buffer.Buffer)); 79Assert.Equal(expected, Marshal.PtrToStringUni(memory2)); 90Assert.Equal("text", Marshal.PtrToStringUni(buffer.Buffer)); 96Assert.Equal(sameLength, Marshal.PtrToStringUni(memory2));
System\Windows\Forms\ToolTipTests.cs (8)
86Assert.Equal("tooltips_class32", createParams.ClassName); 573Assert.Equal(expected, toolTip.ToolTipTitle); 577Assert.Equal(expected, toolTip.ToolTipTitle); 676Assert.Equal(expected, toolTip.GetToolTip(control)); 680Assert.Equal(expected, toolTip.GetToolTip(control)); 697Assert.Equal(expected, toolTip.GetToolTip(control)); 701Assert.Equal(expected, toolTip.GetToolTip(control)); 783Assert.Equal("System.Windows.Forms.ToolTip InitialDelay: 500, ShowAlways: False", toolTip.ToString());
System\Windows\Forms\TreeNode.IKeyboardToolTipTests.cs (1)
89Assert.Equal(toolTipText, ((IKeyboardToolTip)treeNode).GetCaptionForTool(toolTip));
System\Windows\Forms\TreeNodeCollectionTests.cs (2)
28Assert.Equal(expectedText, treeNode.FullPath); 52Assert.Equal(expectedText, treeNode.Text);
System\Windows\Forms\TreeNodeTests.cs (65)
87Assert.Equal(expectedText, node.Text); 135Assert.Equal(expectedText, node.Text); 178Assert.Equal(expectedText, node.Text); 226Assert.Equal(expectedText, node.Text); 1328Assert.Equal(expected, node.ImageKey); 1333Assert.Equal(expected, node.ImageKey); 1348Assert.Equal(expectedImageKey, node.ImageKey); 1353Assert.Equal(expectedImageKey, node.ImageKey); 1366Assert.Equal(expected, node.ImageKey); 1372Assert.Equal(expected, node.ImageKey); 1390Assert.Equal(expected, node.ImageKey); 1396Assert.Equal(expected, node.ImageKey); 1423Assert.Equal(expected, node.ImageKey); 1429Assert.Equal(expected, node.ImageKey); 1450Assert.Equal(expected, node.ImageKey); 1459Assert.Equal(expected, node.ImageKey); 1564Assert.Equal(expected, node.ImageKey); 1569Assert.Equal(expected, node.ImageKey); 1583Assert.Equal("Key", node.ImageKey); 2108Assert.Equal(expected, node.Name); 2112Assert.Equal(expected, node.Name); 3312Assert.Equal(expected, node.SelectedImageKey); 3317Assert.Equal(expected, node.SelectedImageKey); 3332Assert.Equal(expectedSelectedImageKey, node.SelectedImageKey); 3337Assert.Equal(expectedSelectedImageKey, node.SelectedImageKey); 3350Assert.Equal(expected, node.SelectedImageKey); 3356Assert.Equal(expected, node.SelectedImageKey); 3374Assert.Equal(expected, node.SelectedImageKey); 3380Assert.Equal(expected, node.SelectedImageKey); 3407Assert.Equal(expected, node.SelectedImageKey); 3413Assert.Equal(expected, node.SelectedImageKey); 3434Assert.Equal(expected, node.SelectedImageKey); 3443Assert.Equal(expected, node.SelectedImageKey); 3548Assert.Equal(expected, node.SelectedImageKey); 3553Assert.Equal(expected, node.SelectedImageKey); 3567Assert.Equal("Key", node.SelectedImageKey); 4008Assert.Equal(expected, node.StateImageKey); 4013Assert.Equal(expected, node.StateImageKey); 4019Assert.Equal(expected, node.StateImageKey); 4025Assert.Equal(expected, node.StateImageKey); 4040Assert.Equal(expectedStateImageKey, node.StateImageKey); 4045Assert.Equal(expectedStateImageKey, node.StateImageKey); 4051Assert.Equal(expectedStateImageKey, node.StateImageKey); 4057Assert.Equal(expectedStateImageKey, node.StateImageKey); 4083Assert.Equal(expected, node.StateImageKey); 4089Assert.Equal(expected, node.StateImageKey); 4096Assert.Equal(expected, node.StateImageKey); 4114Assert.Equal(expected, node.StateImageKey); 4120Assert.Equal(expected, node.StateImageKey); 4156Assert.Equal(expected, node.StateImageKey); 4162Assert.Equal(expected, node.StateImageKey); 4186Assert.Equal(expected, node.StateImageKey); 4195Assert.Equal(expected, node.StateImageKey); 4320Assert.Equal(expected, node.StateImageKey); 4325Assert.Equal(expected, node.StateImageKey); 4339Assert.Equal("Key", node.StateImageKey); 4365Assert.Equal(expected, node.Text); 4369Assert.Equal(expected, node.Text); 4394Assert.Equal(expected, node.Text); 4399Assert.Equal(expected, node.Text); 4422Assert.Equal(expected, node.Text); 4430Assert.Equal(expected, node.Text); 4461Assert.Equal(expected, new string((char*)item.pszText)); 4478Assert.Equal(expected, node.Text); 4483Assert.Equal(expected, node.Text);
System\Windows\Forms\TreeViewTests.cs (72)
74Assert.Equal(string.Empty, control.ImageKey); 95Assert.Equal("\\", control.PathSeparator); 96Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 106Assert.Equal(string.Empty, control.SelectedImageKey); 139Assert.Equal("SysTreeView32", createParams.ClassName); 167Assert.Equal("SysTreeView32", createParams.ClassName); 197Assert.Equal("SysTreeView32", createParams.ClassName); 223Assert.Equal("SysTreeView32", createParams.ClassName); 249Assert.Equal("SysTreeView32", createParams.ClassName); 275Assert.Equal("SysTreeView32", createParams.ClassName); 301Assert.Equal("SysTreeView32", createParams.ClassName); 327Assert.Equal("SysTreeView32", createParams.ClassName); 353Assert.Equal("SysTreeView32", createParams.ClassName); 379Assert.Equal("SysTreeView32", createParams.ClassName); 405Assert.Equal("SysTreeView32", createParams.ClassName); 431Assert.Equal("SysTreeView32", createParams.ClassName); 464Assert.Equal("SysTreeView32", createParams.ClassName); 497Assert.Equal("SysTreeView32", createParams.ClassName); 543Assert.Equal("SysTreeView32", createParams.ClassName); 589Assert.Equal("SysTreeView32", createParams.ClassName); 617Assert.Equal("SysTreeView32", createParams.ClassName); 650Assert.Equal("SysTreeView32", createParams.ClassName); 683Assert.Equal("SysTreeView32", createParams.ClassName); 2228Assert.Equal(expected, treeView.ImageKey); 2233Assert.Equal(expected, treeView.ImageKey); 2247Assert.Equal(expected, treeView.ImageKey); 2252Assert.Equal(expected, treeView.ImageKey); 2276Assert.Equal(expected, treeView.ImageKey); 2281Assert.Equal(expected, treeView.ImageKey); 2296Assert.Equal(expected, treeView.ImageKey); 2301Assert.Equal(expected, treeView.ImageKey); 2317Assert.Equal(expected, treeView.ImageKey); 2322Assert.Equal(expected, treeView.ImageKey); 2344Assert.Equal(expected, treeView.ImageKey); 2349Assert.Equal(expected, treeView.ImageKey); 2362Assert.Equal(expected, treeView.ImageKey); 2367Assert.Equal(expected, treeView.ImageKey); 2383Assert.Equal(expected, treeView.ImageKey); 2388Assert.Equal(expected, treeView.ImageKey); 2406Assert.Equal(expected, treeView.ImageKey); 2411Assert.Equal(expected, treeView.ImageKey); 3085Assert.Equal("RightToLeftLayout", e.AffectedProperty); 3132Assert.Equal("RightToLeftLayout", e.AffectedProperty); 3588Assert.Equal(expected, treeView.SelectedImageKey); 3593Assert.Equal(expected, treeView.SelectedImageKey); 3607Assert.Equal(expected, treeView.SelectedImageKey); 3612Assert.Equal(expected, treeView.SelectedImageKey); 3626Assert.Equal(expected, treeView.SelectedImageKey); 3631Assert.Equal(expected, treeView.SelectedImageKey); 3646Assert.Equal(expected, treeView.SelectedImageKey); 3651Assert.Equal(expected, treeView.SelectedImageKey); 3667Assert.Equal(expected, treeView.SelectedImageKey); 3672Assert.Equal(expected, treeView.SelectedImageKey); 3694Assert.Equal(expected, treeView.SelectedImageKey); 3699Assert.Equal(expected, treeView.SelectedImageKey); 3712Assert.Equal(expected, treeView.SelectedImageKey); 3717Assert.Equal(expected, treeView.SelectedImageKey); 3733Assert.Equal(expected, treeView.SelectedImageKey); 3738Assert.Equal(expected, treeView.SelectedImageKey); 3756Assert.Equal(expected, treeView.SelectedImageKey); 3761Assert.Equal(expected, treeView.SelectedImageKey); 4621Assert.Equal(expected, control.Text); 4626Assert.Equal(expected, control.Text); 4644Assert.Equal(expected, control.Text); 4652Assert.Equal(expected, control.Text); 4674Assert.Equal("text", control.Text); 4679Assert.Equal("text", control.Text); 4684Assert.Equal("otherText", control.Text); 4700Assert.Equal("text", control.Text); 6629Assert.Equal("Test caption", wrapper.Text); 6631Assert.Equal(string.Empty, new string(wrapper.Info.lpszText)); 6825Assert.Equal(text, actual);
System\Windows\Forms\TypeValidationEventArgsTests.cs (1)
19Assert.Equal(message, e.Message);
System\Windows\Forms\UpDownBaseTests.cs (11)
109Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 1108Assert.Equal("Bounds", e.AffectedProperty); 1152Assert.Equal("Bounds", e.AffectedProperty); 1267Assert.Equal(expected, control.Text); 1276Assert.Equal(expected, control.Text); 1314Assert.Equal(expected, control.Text); 1326Assert.Equal(expected, control.Text); 1353Assert.Equal("text", control.Text); 1358Assert.Equal("text", control.Text); 1369Assert.Equal("text", control.Text); 2717Assert.Equal("Bounds", e.AffectedProperty);
System\Windows\Forms\UserControlTests.cs (19)
101Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 247Assert.Equal("AutoSize", e.AffectedProperty); 289Assert.Equal("AutoSize", e.AffectedProperty); 324Assert.Equal("AutoSize", e.AffectedProperty); 381Assert.Equal("AutoSize", e.AffectedProperty); 431Assert.Equal("AutoSize", e.AffectedProperty); 530Assert.Equal("AutoSize", e.AffectedProperty); 603Assert.Equal("AutoSize", e.AffectedProperty); 799Assert.Equal(expected, control.Text); 804Assert.Equal(expected, control.Text); 822Assert.Equal(expected, control.Text); 830Assert.Equal(expected, control.Text); 853Assert.Equal("text", control.Text); 858Assert.Equal("text", control.Text); 869Assert.Equal("text", control.Text); 1071Assert.Equal("Bounds", e.AffectedProperty); 1111Assert.Equal("Bounds", e.AffectedProperty); 1156Assert.Equal("Bounds", e.AffectedProperty); 1210Assert.Equal("Bounds", e.AffectedProperty);
System\Windows\Forms\VisualStyles\VisualStyleInformationTests.cs (9)
16Assert.Equal(author, VisualStyleInformation.Author); 25Assert.Equal(scheme, VisualStyleInformation.ColorScheme); 47Assert.Equal(company, VisualStyleInformation.Company); 64Assert.Equal(copyright, VisualStyleInformation.Copyright); 73Assert.Equal(description, VisualStyleInformation.Description); 82Assert.Equal(displayName, VisualStyleInformation.DisplayName); 114Assert.Equal(size, VisualStyleInformation.Size); 151Assert.Equal(url, VisualStyleInformation.Url); 160Assert.Equal(version, VisualStyleInformation.Version);
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (4)
29Assert.Equal(element.ClassName, renderer.Class); 63Assert.Equal(element.ClassName, renderer.Class); 517Assert.Equal(element.ClassName, renderer.Class); 538Assert.Equal(element.ClassName, renderer.Class);
System\Windows\Forms\VScrollBarTests.cs (2)
93Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 125Assert.Equal("ScrollBar", createParams.ClassName);
System\Windows\Forms\WebBrowserNavigatingEventArgsTests.cs (1)
18Assert.Equal(targetFrameName, e.TargetFrameName);
System\Windows\Forms\WebBrowserTests.cs (26)
78Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 470Assert.Equal(expectedTitle, document.Title); 537Assert.Equal(Html, Encoding.UTF8.GetString(documentStream.ToArray())); 580Assert.Equal(Html, control.DocumentText); 581Assert.Equal("about:blank", control.Url.OriginalString); 586Assert.Equal(Html, control.DocumentText); 587Assert.Equal("about:blank", control.Url.OriginalString); 654Assert.Equal(documentText, control.DocumentText); 741Assert.Equal("about:blank", e.Url.OriginalString); 750Assert.Equal("about:blank", e.Url.OriginalString); 764Assert.Equal("about:blank", e.Url.OriginalString); 789Assert.Equal("about:blank", control.Url.OriginalString); 803Assert.Equal("about:blank", control.Url.OriginalString); 816Assert.Equal(Html, control.DocumentText); 817Assert.Equal("about:blank", control.Url.OriginalString); 822Assert.Equal(Html, control.DocumentText); 823Assert.Equal("about:blank", control.Url.OriginalString); 892Assert.Equal(expected, control.DocumentTitle); 1872Assert.Equal("Done", control.StatusText); 2080Assert.Equal("about:blank", control.Url.OriginalString); 3296Assert.Equal("about:blank", control.Url.OriginalString); 3414Assert.Equal("about:blank", control.Url.OriginalString); 4046Assert.Equal("about:blank", control.Url.OriginalString); 4058Assert.Equal("about:blank", control.Url.OriginalString); 4195Assert.Equal("about:blank", control.Url.OriginalString); 4207Assert.Equal("about:blank", control.Url.OriginalString);
TestAccessorTests.cs (1)
57Assert.Equal("42", list[0]);
TextBoxBaseTests.cs (80)
24Assert.Equal("Edit", createParams.ClassName); 50Assert.Equal("Edit", createParams.ClassName); 76Assert.Equal("Edit", createParams.ClassName); 102Assert.Equal("Edit", createParams.ClassName); 131Assert.Equal("Edit", createParams.ClassName); 590Assert.Equal("BorderStyle", e.AffectedProperty); 1643Assert.Equal(expectedText, control.Text); 1649Assert.Equal(expectedText, control.Text); 1710Assert.Equal("Text", control.Text); 1762Assert.Equal("Text", control.Text); 2595Assert.Equal(expected, control.Text); 2649Assert.Equal(expected, control.Text); 2671Assert.Equal(expected, control.Text); 2693Assert.Equal(expected, control.Text); 2722Assert.Equal(expected, control.Text); 2816Assert.Equal(expectedSelectedText, control.SelectedText); 2823Assert.Equal(expectedSelectedText, control.SelectedText); 2844Assert.Equal(expectedSelectedText, control.SelectedText); 2850Assert.Equal(expectedSelectedText, control.SelectedText); 2879Assert.Equal(expectedSelectedText, control.SelectedText); 2889Assert.Equal(expectedSelectedText, control.SelectedText); 3020Assert.Equal(expectedSelectedText, control.SelectedText); 3026Assert.Equal(expectedSelectedText, control.SelectedText); 3220Assert.Equal(expected, control.Text); 3231Assert.Equal(expected, control.Text); 3274Assert.Equal(expected, control.Text); 3278Assert.Equal(expectedSelectedText, control.SelectedText); 3285Assert.Equal(expected, control.Text); 3289Assert.Equal(expectedSelectedText, control.SelectedText); 3304Assert.Equal(expected, control.Text); 3315Assert.Equal(expected, control.Text); 3339Assert.Equal(expected, control.Text); 3352Assert.Equal(expected, control.Text); 3383Assert.Equal(expected, control.Text); 3396Assert.Equal(expected, control.Text); 3448Assert.Equal(expected, control.Text); 3462Assert.Equal(expected, control.Text); 3490Assert.Equal("text", control.Text); 3495Assert.Equal("text", control.Text); 3506Assert.Equal("text", control.Text); 3533Assert.Equal("text", control.Text); 3542Assert.Equal("text", control.Text); 3561Assert.Equal("text", control.Text); 3575Assert.Equal(expected, control.Text); 3580Assert.Equal(expected, control.Text); 3592Assert.Equal(expected, control.Text); 3597Assert.Equal(expected, control.Text); 3737Assert.Equal("WordWrap", e.AffectedProperty); 3864Assert.Equal(expected, control.Text); 3882Assert.Equal("abc" + text, control.Text); 3902Assert.Equal("abc" + text, control.Text); 3905Assert.Equal(expectedSelectedText, control.SelectedText); 3923Assert.Equal("abc" + text, control.Text); 3926Assert.Equal(expectedSelectedText, control.SelectedText); 3945Assert.Equal("abc" + text, control.Text); 3948Assert.Equal(expectedSelectedText, control.SelectedText); 3968Assert.Equal(expected, control.Text); 3997Assert.Equal("abc" + text, control.Text); 4178Assert.Equal("text", control.Text); 4203Assert.Equal("text", control.Text); 5957Assert.Equal("text", control.Text); 5972Assert.Equal(expected, control.Text); 5992Assert.Equal(expected, control.Text); 6007Assert.Equal("12-9", control.Text); 6234Assert.Equal(expectedSelectedText, control.SelectedText); 6241Assert.Equal(expectedSelectedText, control.SelectedText); 6264Assert.Equal(expectedSelectedText, control.SelectedText); 6274Assert.Equal(expectedSelectedText, control.SelectedText); 6345Assert.Equal("text", control.SelectedText); 6352Assert.Equal("text", control.SelectedText); 6406Assert.Equal("text", control.SelectedText); 6416Assert.Equal("text", control.SelectedText); 6501Assert.Equal("Bounds", e.AffectedProperty); 6635Assert.Equal("Bounds", e.AffectedProperty); 6751Assert.Equal("Bounds", e.AffectedProperty); 6831Assert.Equal("System.Windows.Forms.Tests.TextBoxBaseTests+SubTextBox, Text: ", control.ToString()); 6841Assert.Equal("System.Windows.Forms.Tests.TextBoxBaseTests+SubTextBox, Text: Text", control.ToString()); 6851Assert.Equal("System.Windows.Forms.Tests.TextBoxBaseTests+SubTextBox, Text: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...", control.ToString()); 6875Assert.Equal("abc", control.Text); 6921Assert.Equal("abc", control.Text);
TextBoxTests.cs (4)
91Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 132Assert.Equal("Edit", createParams.ClassName); 347Assert.Equal(string.Empty, tb.PlaceholderText); 400Assert.Equal(string.Empty, tb.PlaceholderText);
TrackBarTests.cs (16)
85Assert.Equal("Microsoft\u00AE .NET", control.ProductName); 119Assert.Equal("msctls_trackbar32", createParams.ClassName); 147Assert.Equal("msctls_trackbar32", createParams.ClassName); 173Assert.Equal("msctls_trackbar32", createParams.ClassName); 204Assert.Equal("msctls_trackbar32", createParams.ClassName); 1565Assert.Equal("RightToLeftLayout", e.AffectedProperty); 1612Assert.Equal("RightToLeftLayout", e.AffectedProperty); 1779Assert.Equal(expected, control.Text); 1784Assert.Equal(expected, control.Text); 1802Assert.Equal(expected, control.Text); 1810Assert.Equal(expected, control.Text); 1832Assert.Equal("text", control.Text); 1837Assert.Equal("text", control.Text); 1848Assert.Equal("text", control.Text); 2961Assert.Equal("Bounds", e.AffectedProperty); 3112Assert.Equal("System.Windows.Forms.TrackBar, Minimum: 0, Maximum: 10, Value: 0", control.ToString());
WebBrowserBaseTests.cs (2)
40Assert.Equal("Bounds", e.AffectedProperty); 149Assert.Equal("Bounds", e.AffectedProperty);
System.Windows.Forms.UI.IntegrationTests (21)
DragDropTests.cs (14)
120Assert.Equal(button?.Name, ((Button)data).Name); 121Assert.Equal(button?.Text, ((Button)data).Text); 227Assert.Equal(dragAcceptRtfContent, dragDropForm.RichTextBoxDropTarget?.Rtf); 228Assert.Equal(dragAcceptRtfTextContent, dragDropForm.RichTextBoxDropTarget?.Text); 334Assert.Equal(listViewItem?.Name, ((ListViewItem)data).Name); 335Assert.Equal(listViewItem?.Text, ((ListViewItem)data).Text); 365Assert.Equal(message, e.Message); 366Assert.Equal(messageReplacementToken, e.MessageReplacementToken); 372Assert.Equal(message, e.Message); 373Assert.Equal(messageReplacementToken, e.MessageReplacementToken); 444Assert.Equal(dragAcceptRtfContent, form.RichTextBoxDropTarget?.Rtf); 445Assert.Equal(dragAcceptRtfTextContent, form.RichTextBoxDropTarget?.Text); 487Assert.Equal(dragAcceptRtfContent, form.RichTextBoxDropTarget?.Rtf); 488Assert.Equal(dragAcceptRtfTextContent, form.RichTextBoxDropTarget?.Text);
OpenFileDialogTests.cs (1)
45Assert.Equal(tempFile.Path, dialog.FileName);
RichTextBoxTests.cs (6)
56Assert.Equal(result.LinkText, richTextBox.Text.Substring(result.LinkStart, result.LinkLength)); 73Assert.Equal("Click link #2", displayText); 116Assert.Equal(result.LinkText, richTextBox.Text.Substring(result.LinkStart, result.LinkLength)); 131Assert.Equal("#link2#", hiddenText); 177Assert.Equal(result.LinkText, richTextBox.Text.Substring(result.LinkStart, result.LinkLength)); 192Assert.Equal("#link2#", hiddenText);
System.Xaml.Tests (33)
System\Windows\Markup\ConstructorArgumentAttributeTests.cs (1)
18Assert.Equal(argumentName, attribute.ArgumentName);
System\Windows\Markup\ContentPropertyAttributeTests.cs (1)
26Assert.Equal(name, attribute.Name);
System\Windows\Markup\DateTimeValueSerializerTests.cs (1)
43Assert.Equal(date.ToString(format, CultureInfo.InvariantCulture), serializer.ConvertToString(date, null));
System\Windows\Markup\DependsOnAttributeTests.cs (1)
18Assert.Equal(name, attribute.Name);
System\Windows\Markup\DictionaryKeyPropertyAttributeTests.cs (1)
19Assert.Equal(name, attribute.Name);
System\Windows\Markup\NameScopePropertyAttributeTests.cs (2)
18Assert.Equal(name, attribute.Name); 29Assert.Equal(name, attribute.Name);
System\Windows\Markup\ReferenceTests.cs (1)
28Assert.Equal(name, reference.Name);
System\Windows\Markup\RootNamespaceAttributeTests.cs (1)
18Assert.Equal(nameSpace, attribute.Namespace);
System\Windows\Markup\RuntimeNamePropertyAttributeTests.cs (1)
18Assert.Equal(name, attribute.Name);
System\Windows\Markup\StaticExtensionTests.cs (3)
29Assert.Equal(member, extension.Member); 161Assert.Equal(member, qualifiedTypeName); 175Assert.Equal(value, extension.Member);
System\Windows\Markup\TypeExtensionTests.cs (4)
31Assert.Equal(typeName, extension.TypeName); 72Assert.Equal("Type", qualifiedTypeName); 118Assert.Equal("typeName", qualifiedTypeName); 136Assert.Equal(value, extension.TypeName);
System\Windows\Markup\UidPropertyAttributeTests.cs (1)
18Assert.Equal(name, attribute.Name);
System\Windows\Markup\ValueSerializerTests.cs (1)
165Assert.Equal("1", serializer.ConvertToString(1, null));
System\Windows\Markup\XamlDeferLoadAttributeTests.cs (4)
19Assert.Equal(loaderType.AssemblyQualifiedName, attribute.LoaderTypeName); 21Assert.Equal(contentType.AssemblyQualifiedName, attribute.ContentTypeName); 43Assert.Equal(loaderType, attribute.LoaderTypeName); 45Assert.Equal(contentType, attribute.ContentTypeName);
System\Windows\Markup\XamlSetMarkupExtensionAttributeTests.cs (1)
18Assert.Equal(xamlSetMarkupExtensionHandler, attribute.XamlSetMarkupExtensionHandler);
System\Windows\Markup\XamlSetTypeConverterAttributeTests.cs (1)
18Assert.Equal(xamlSetTypeConverterHandler, attribute.XamlSetTypeConverterHandler);
System\Windows\Markup\XDataTests.cs (1)
27Assert.Equal(value, data.Text);
System\Windows\Markup\XmlLangPropertyAttributeTests.cs (1)
18Assert.Equal(name, attribute.Name);
System\Windows\Markup\XmlnsCompatibleWithAttributeTests.cs (2)
17Assert.Equal(oldNamespace, attribute.OldNamespace); 18Assert.Equal(newNamespace, attribute.NewNamespace);
System\Windows\Markup\XmlnsDefinitionAttributeTests.cs (2)
17Assert.Equal(xmlNamespace, attribute.XmlNamespace); 18Assert.Equal(clrNamespace, attribute.ClrNamespace);
System\Windows\Markup\XmlnsPrefixAttributeTests.cs (2)
17Assert.Equal(xmlNamespace, attribute.XmlNamespace); 18Assert.Equal(prefix, attribute.Prefix);
Templates.Blazor.Tests (4)
BlazorTemplateTest.cs (2)
121Assert.Equal("Home", (await page.TitleAsync()).Trim()); 174Assert.Equal(appName.Trim(), (await page.TitleAsync()).Trim());
BlazorWebTemplateTest.cs (1)
93Assert.Equal(expectedEncoding, response.Content.Headers.ContentEncoding.Single());
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
148Assert.Equal("stylesheet", styleSheet.Relation);
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
148Assert.Equal("stylesheet", styleSheet.Relation);
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
148Assert.Equal("stylesheet", styleSheet.Relation);
Templates.Mvc.Tests (2)
BlazorTemplateTest.cs (1)
112Assert.Equal("/Account/Login?ReturnUrl=%2Fauth", response.RequestMessage.RequestUri.PathAndQuery);
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
148Assert.Equal("stylesheet", styleSheet.Relation);
Templates.Tests (1)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
148Assert.Equal("stylesheet", styleSheet.Relation);
VBCSCompiler.UnitTests (52)
AnalyzerConsistencyCheckerTests.cs (1)
152Assert.Equal(mvidAlpha1.Path, mvidAlpha2.Path);
BuildClientTests.cs (11)
229Assert.Equal("pipe", _sessionKey); 234Assert.Equal("1:2", _sessionKey); 239Assert.Equal("1:2", _sessionKey); 250Assert.Equal(CodeAnalysisResources.SharedArgumentMissing, _errorMessage); 276Assert.Equal("100", _keepAlive); 286Assert.Equal(CodeAnalysisResources.MissingKeepAlive, _errorMessage); 289Assert.Equal(CodeAnalysisResources.MissingKeepAlive, _errorMessage); 292Assert.Equal(CodeAnalysisResources.KeepAliveIsTooSmall, _errorMessage); 295Assert.Equal(CodeAnalysisResources.KeepAliveWithoutShared, _errorMessage); 314Assert.Equal("100", _keepAlive); 320Assert.Equal("100", _keepAlive);
CompilerServerTests.cs (34)
265Assert.Equal(expectedOutput.Trim(), result.Output.Trim()); 332Assert.Equal("hello.cs(1,1): error CS1056: Unexpected character '?'", result.Output.Trim()); 352Assert.Equal("test.cs(1,1): error CS1056: Unexpected character '♕'".Trim(), 375Assert.Equal(@"test.vb(1) : error BC30037: Character is not valid. 398Assert.Equal(@"test.vb(1) : error BC30037: Character is not valid. 755Assert.Equal("", result.Output); 771Assert.Equal("", result.Output); 790Assert.Equal("", result.Output); 812Assert.Equal("", result.Output); 828Assert.Equal("", result.Output); 870Assert.Equal("", result.Output); 885Assert.Equal("", result.Output); 905Assert.Equal("", result.Output); 926Assert.Equal("", result.Output); 1066Assert.Equal("", result.Output); 1083Assert.Equal("", result.Output); 1117Assert.Equal("", result.Output); 1135Assert.Equal("", result.Output); 1157Assert.Equal("test.cs(1,1): error CS1056: Unexpected character '?'".Trim(), 1180Assert.Equal(@"SRC.VB(1) : error BC30037: Character is not valid. 1206Assert.Equal("test.cs(1,1): error CS1056: Unexpected character '♕'".Trim(), 1229Assert.Equal(@"SRC.VB(1) : error BC30037: Character is not valid. 1268Assert.Equal("", result.Output); 1291Assert.Equal("", result.Output); 1314Assert.Equal("test.cs(1,1): error CS1056: Unexpected character '♕'", 1338Assert.Equal(@"src.vb(1) : error BC30037: Character is not valid. 1355Assert.Equal("Missing argument for '/keepalive' option.", result.Output.Trim()); 1365Assert.Equal("Argument to '/keepalive' option is not a 32-bit integer.", result.Output.Trim()); 1375Assert.Equal("Arguments to '/keepalive' option below -1 are invalid.", result.Output.Trim()); 1385Assert.Equal("Argument to '/keepalive' option is not a 32-bit integer.", result.Output.Trim()); 1415Assert.Equal("", result.Output.Trim()); 1439Assert.Equal("", result.Output.Trim()); 1449Assert.Equal("", result.Output.Trim()); 1471Assert.Equal("", result.Output.Trim());
TouchedFileLoggingTests.cs (4)
83Assert.Equal(string.Empty, outWriter.ToString().Trim()); 134Assert.Equal(string.Empty, outWriter.ToString().Trim()); 187Assert.Equal(string.Join("\r\n", expected), 191Assert.Equal(string.Join("\r\n", expected),
VBCSCompilerServerTests.cs (2)
430Assert.Equal("test", _pipeName); 446Assert.Equal("test", _pipeName);