1115 references to Equal
IIS.FunctionalTests (1)
Http2TrailersResetTests.cs (1)
154Assert.Equal(new[] { "TrailerValue0", "TrailerValue1" }, response.TrailingHeaders.GetValues("TrailerName"));
InMemory.FunctionalTests (1)
Http3\Http3StreamTests.cs (1)
745Assert.Equal(data, receivedData);
Microsoft.AspNetCore.Authentication.Test (4)
AuthenticationMiddlewareTests.cs (1)
181Assert.Equal(new[] { "https://localhost:5001" }, options.TokenValidationParameters.ValidAudiences);
JwtBearerTests_Handler.cs (3)
982Assert.Equal(["dotnet-user-jwts-2"], jwtBearerOptions.TokenValidationParameters.ValidIssuers); 984Assert.Equal(["http://localhost:5001"], jwtBearerOptions.TokenValidationParameters.ValidAudiences); 1022Assert.Equal(["http://localhost:5000", "https://localhost:5001"], jwtBearerOptions.TokenValidationParameters.ValidAudiences);
Microsoft.AspNetCore.Components.Authorization.Tests (1)
AuthorizeViewTest.cs (1)
448Assert.Collection(call.requirements, req => Assert.Equal(
Microsoft.AspNetCore.Components.Forms.Tests (15)
EditContextDataAnnotationsExtensionsTest.cs (6)
45Assert.Equal(new string[] 52Assert.Equal(new string[] { "RequiredString:required" }, 57Assert.Equal(new string[] { "IntFrom1To100:range" }, 122Assert.Equal(new[] { "RequiredString:required" }, editContext.GetValidationMessages()); 129Assert.Equal(new string[] 139Assert.Equal(new[] { "IntFrom1To100:range" }, editContext.GetValidationMessages());
EditContextTest.cs (5)
140Assert.Equal(new[] 152Assert.Equal(new[] { "Store 2 message 1", }, editContext.GetValidationMessages(field)); 170Assert.Equal(new[] 180Assert.Equal(new[] { "Store 2 field 1 message 1", }, editContext.GetValidationMessages()); 233Assert.Equal(new[] { "Some message" }, editContext.GetValidationMessages());
ValidationMessageStoreTest.cs (4)
36Assert.Equal(new[] { "Field 1 message 1", "Field 1 message 2" }, messages[field1]); 37Assert.Equal(new[] { "Field 2 message 1" }, messages[field2]); 53Assert.Equal(entries, messages[field1]); 72Assert.Equal(new[] { "Field 2 message 1" }, messages[field2]);
Microsoft.AspNetCore.Components.Server.Tests (1)
Circuits\RemoteRendererTest.cs (1)
185Assert.Equal(new long[] { 2, 3, 4 }, renderIds);
Microsoft.AspNetCore.Components.Tests (24)
PersistentState\ComponentStatePersistenceManagerTest.cs (1)
210Assert.Equal(new[] { 2, 1, 3, 4 }, sequence);
RendererTest.cs (6)
2247Assert.Equal(new[] { 1, 2 }, childComponentIds); 3321Assert.Equal(new[] { 0 }, onAfterRenderCallCountLog); 3327Assert.Equal(new[] { 0, 1 }, onAfterRenderCallCountLog); 3572Assert.Equal(new[] { exception }, renderer.HandledExceptions); 3605Assert.Equal(new[] { exception }, renderer.HandledExceptions); 3638Assert.Equal(new[] { exception }, renderer.HandledExceptions);
Rendering\ArrayBuilderSegmentTest.cs (4)
26Assert.Equal(new[] { 2, 3 }, segment); 39Assert.Equal(new[] { 1, 2, 3, 4, 5 }, segment); 49Assert.Equal(new[] { 1, 2, 3, 4, 5 }, segment); 50Assert.Equal(new[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, builder.ToSegment(0, builder.Count));
Rendering\ArrayBuilderTest.cs (10)
43Assert.Equal(new[] { value1, value2, value3 }, builder.Buffer.Take(3)); 61Assert.Equal(Enumerable.Repeat(5, capacity), builder.Buffer.Take(capacity)); 76Assert.Equal(new[] { 8, 8 }, builder.Buffer.Take(2)); 91Assert.Equal(array, builder.Buffer.Take(array.Length)); 107Assert.Equal(new[] { 118, 8, 8 }, builder.Buffer.Take(3)); 126Assert.Equal(array, builder.Buffer.Take(array.Length)); 143Assert.Equal(new[] { 7, 2, 9 }, builder.Buffer.Take(3)); 160Assert.Equal(new[] { 7, 2, 3, 9 }, builder.Buffer.Take(4)); 175Assert.Equal(new[] { 1, 2, 3 }, builder.Buffer.Take(3)); 192Assert.Equal(new[] { 1, 2, }, builder.Buffer.Take(2));
RenderTreeDiffBuilderTest.cs (3)
822Assert.Equal(new[] { 0 }, batchBuilder.ComponentDisposalQueue); 936Assert.Equal( 1834Assert.Equal(new[] { 0, 1 }, batchBuilder.ComponentDisposalQueue);
Microsoft.AspNetCore.Components.Web.Tests (2)
Forms\InputBaseTest.cs (2)
326Assert.Equal(new[] { "Bad date value" }, rootComponent.EditContext.GetValidationMessages(fieldIdentifier)); 355Assert.Equal(new[] { "Bad date value" }, rootComponent.EditContext.GetValidationMessages(fieldIdentifier));
Microsoft.AspNetCore.Cors.Test (10)
CorsMiddlewareTests.cs (10)
205Assert.Equal(new[] { "Header1" }, kvp.Value); 210Assert.Equal(new[] { "PUT" }, kvp.Value); 215Assert.Equal(new[] { OriginUrl }, kvp.Value); 271Assert.Equal(new[] { "true" }, kvp.Value); 276Assert.Equal(new[] { "X-Test1,X-Test2" }, kvp.Value); 281Assert.Equal(new[] { "PUT" }, kvp.Value); 286Assert.Equal(new[] { OriginUrl }, kvp.Value); 492Assert.Equal(new[] { "Header1" }, kvp.Value); 497Assert.Equal(new[] { "PUT" }, kvp.Value); 502Assert.Equal(new[] { OriginUrl }, kvp.Value);
Microsoft.AspNetCore.DataProtection.Tests (15)
KeyManagement\KeyEscrowServiceProviderExtensionsTests.cs (2)
51Assert.Equal(new[] { "39974d8e-3e53-4d78-b7e9-4ff64a2a5d7b: theElement" }, output); 84Assert.Equal(new[] { "[sink1] 39974d8e-3e53-4d78-b7e9-4ff64a2a5d7b: theElement", "[sink2] 39974d8e-3e53-4d78-b7e9-4ff64a2a5d7b: theElement" }, output);
KeyManagement\KeyRingProviderTests.cs (11)
52Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 95Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "ResolveDefaultKeyPolicy" }, callSequence); 145Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 186Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 234Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 268Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 318Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy", "CreateNewKey", "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 356Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 394Assert.Equal(new[] { "GetCacheExpirationToken", "GetAllKeys", "ResolveDefaultKeyPolicy" }, callSequence); 569Assert.Equal(expectedCallSequence, actualCallSequence); 802Assert.Equal(current.Item2, allKeys);
Repositories\FileSystemXmlRepositoryTests.cs (1)
137Assert.Equal(new[] { "element1", "element2", "element3" }, orderedNames);
Repositories\RegistryXmlRepositoryTests.cs (1)
124Assert.Equal(new[] { "element1", "element2", "element3" }, orderedNames);
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (1)
HealthCheckMiddlewareTests.cs (1)
434Assert.Equal(new string[] { "Thu, 01 Jan 1970 00:00:00 GMT" }, response.Content.Headers.GetValues(HeaderNames.Expires));
Microsoft.AspNetCore.Diagnostics.Tests (12)
ExceptionDetailsProviderTest.cs (12)
72Assert.Equal(GetCodeLines(4, 9), stackFrame.PreContextCode); 73Assert.Equal(GetCodeLines(10, 10), stackFrame.ContextCode); 74Assert.Equal(GetCodeLines(11, 16), stackFrame.PostContextCode); 96Assert.Equal(GetCodeLines(4, 9), stackFrame.PreContextCode); 97Assert.Equal(GetCodeLines(10, 10), stackFrame.ContextCode); 98Assert.Equal(GetCodeLines(11, 16), stackFrame.PostContextCode); 122Assert.Equal(GetCodeLines(4, 9), stackFrame.PreContextCode); 123Assert.Equal(GetCodeLines(10, 10), stackFrame.ContextCode); 124Assert.Equal(GetCodeLines(11, 16), stackFrame.PostContextCode); 267Assert.Equal(errorData.ExpectedPreErrorCode, stackFrame.PreContextCode); 268Assert.Equal(errorData.ExpectedErrorCode, stackFrame.ContextCode); 269Assert.Equal(errorData.ExpectedPostErrorCode, stackFrame.PostContextCode);
Microsoft.AspNetCore.HeaderPropagation.Tests (17)
HeaderPropagationIntegrationTest.cs (4)
118Assert.Equal(new[] { "test" }, handler.Headers.GetValues("out")); 145Assert.Equal(new[] { "value" }, handler.Headers.GetValues("first")); 147Assert.Equal(new[] { "other" }, handler.Headers.GetValues("second")); 191Assert.Equal(new[] { "test" }, handler.Headers.GetValues("different"));
HeaderPropagationMessageHandlerTest.cs (13)
50Assert.Equal(new[] { "test" }, Handler.Headers.GetValues("out")); 65Assert.Equal(new[] { "one", "two" }, Handler.Headers.GetValues("out")); 79Assert.Equal(new[] { "text/plain; charset=utf-8" }, Handler.Content.Headers.GetValues("Content-Type")); 93Assert.Equal(new[] { "test" }, Handler.Content.Headers.GetValues("Content-Language")); 107Assert.Equal(new[] { "one", "two" }, Handler.Content.Headers.GetValues("Content-Language")); 122Assert.Equal(new[] { "test" }, Handler.Headers.GetValues("out")); 166Assert.Equal(new[] { "test" }, Handler.Headers.GetValues("inout")); 167Assert.Equal(new[] { "test2" }, Handler.Headers.GetValues("another")); 205Assert.Equal(expectedValues, Handler.Headers.GetValues("inout")); 221Assert.Equal(new[] { "value" }, Handler.Headers.GetValues("name")); 237Assert.Equal(new[] { "value" }, Handler.Headers.GetValues("name")); 239Assert.Equal(new[] { "value" }, Handler.Headers.GetValues("name")); 256Assert.Equal(new[] { "value" }, Handler.Headers.GetValues("name"));
Microsoft.AspNetCore.Http.Connections.Tests (1)
NegotiateProtocolTests.cs (1)
45Assert.Equal(availableTransports, responseTransports);
Microsoft.AspNetCore.Http.Results.Tests (13)
ResultsTests.cs (7)
386Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes); 398Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes); 448Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes); 1292Assert.Equal(extensions, result.ProblemDetails.Extensions); 1316Assert.Equal(extensions, result.ProblemDetails.Extensions); 1446Assert.Equal(errors, ((HttpValidationProblemDetails)result.ProblemDetails).Errors); 1454Assert.Equal(extensions, result.ProblemDetails.Extensions);
TypedResultsTests.cs (6)
434Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes); 446Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes); 458Assert.Equal(authenticationSchemes ?? new ReadOnlyCollection<string>(new List<string>()), result.AuthenticationSchemes); 1108Assert.Equal(extensions, result.ProblemDetails.Extensions); 1228Assert.Equal(errors, result.ProblemDetails.Errors); 1236Assert.Equal(extensions, result.ProblemDetails.Extensions);
Microsoft.AspNetCore.Http.Tests (3)
HeaderDictionaryTests.cs (3)
30Assert.Equal<string>(new[] { "Header1" }, headers.Keys); 52Assert.Equal(expectedResult, result); 80Assert.Equal<string>(new[] { "Header1" }, headers.Keys);
Microsoft.AspNetCore.Localization.Tests (2)
RequestLocalizationOptionsTest.cs (2)
96Assert.Equal(supportedCultures, options.SupportedCultures.Select(c => c.Name)); 110Assert.Equal(supportedUICultures, options.SupportedUICultures.Select(c => c.Name));
Microsoft.AspNetCore.Mvc.Abstractions.Test (3)
ModelBinding\ModelStateDictionaryTest.cs (1)
1505Assert.Equal(expected, keys);
ModelBinding\ValueProviderResultTest.cs (2)
93Assert.Equal<string>(new string[] { "Hi There", }, result); 103Assert.Equal<string>(new string[] { "Hi", "There" }, result);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (28)
ApiResponseTypeProviderTest.cs (3)
790Assert.Equal(new[] { "text/xml" }, GetSortedMediaTypes(responseType)); 797Assert.Equal(new[] { "application/problem+json" }, GetSortedMediaTypes(responseType)); 803Assert.Equal(new[] { "application/problem+json" }, GetSortedMediaTypes(responseType));
DefaultApiDescriptionProviderTest.cs (17)
738Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 752Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 759Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 855Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 862Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 911Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 925Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 932Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 981Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 995Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1002Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1051Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1058Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1065Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1072Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1179Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1199Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
EndpointMetadataApiDescriptionProviderTest.cs (8)
200Assert.Equal(["application/json", "application/custom"], inferredResponseType.ApiResponseFormats.Select(f => f.MediaType)); 1045Assert.Equal(new[] { "application/json" }, GetSortedMediaTypes(responseType)); 1051Assert.Equal(new[] { "application/problem+json" }, GetSortedMediaTypes(responseType)); 1057Assert.Equal(new[] { "application/problem+json" }, GetSortedMediaTypes(responseType)); 1063Assert.Equal(new[] { "application/problem+json" }, GetSortedMediaTypes(responseType)); 1095Assert.Equal(new[] { "application/json" }, GetSortedMediaTypes(responseType)); 1101Assert.Equal(new[] { "application/json" }, GetSortedMediaTypes(responseType)); 1195Assert.Equal(new[] { "application/json" }, GetSortedMediaTypes(responseType));
Microsoft.AspNetCore.Mvc.Core.Test (72)
ApplicationModels\ActionModelTest.cs (1)
101Assert.Equal<object>((IEnumerable<object>)value1, (IEnumerable<object>)value2);
ApplicationModels\AttributeRouteModelTests.cs (1)
33Assert.Equal<object>((IEnumerable<object>)value1, (IEnumerable<object>)value2);
ApplicationModels\ControllerActionDescriptorProviderTests.cs (5)
33Assert.Equal(new[] { "GetPerson", "ShowPeople", }, actionNames); 95Assert.Equal(new string[] { "POST" }, constraint.HttpMethods); 112Assert.Equal(new string[] { "PUT", "PATCH" }, constraint.HttpMethods); 489Assert.Equal(new[] { "POST" }, methodConstraint.HttpMethods); 514Assert.Equal(new[] { "PUT" }, methodConstraint.HttpMethods);
ApplicationModels\ControllerModelTest.cs (1)
103Assert.Equal<object>((IEnumerable<object>)value1, (IEnumerable<object>)value2);
ApplicationModels\DefaultApplicationModelProviderTest.cs (11)
930Assert.Equal( 1067Assert.Equal<string>(new string[] { "GET" }, methodConstraint.HttpMethods); 1089Assert.Equal(new[] { "GET", "POST" }, methodConstraint.HttpMethods.OrderBy(key => key, StringComparer.Ordinal)); 1093Assert.Equal(new[] { "GET", "POST" }, methodConstraint.HttpMethods.OrderBy(key => key, StringComparer.Ordinal)); 1112Assert.Equal<string>(new string[] { "GET" }, methodConstraint.HttpMethods); 1116Assert.Equal<string>(new string[] { "GET" }, methodConstraint.HttpMethods); 1120Assert.Equal<string>(new string[] { "POST" }, methodConstraint.HttpMethods); 1139Assert.Equal(new string[] { "GET" }, methodConstraint.HttpMethods); 1143Assert.Equal(new string[] { "GET" }, methodConstraint.HttpMethods); 1163Assert.Equal<string>(new string[] { "POST" }, methodConstraint.HttpMethods); 1167Assert.Equal<string>(new string[] { "GET" }, methodConstraint.HttpMethods);
ApplicationModels\ParameterModelTest.cs (1)
44Assert.Equal<object>((IEnumerable<object>)value1, (IEnumerable<object>)value2);
ApplicationModels\PropertyModelTest.cs (1)
40Assert.Equal<object>((IEnumerable<object>)value1, (IEnumerable<object>)value2);
ApplicationParts\AssemblyPartTest.cs (1)
32Assert.Equal(assembly.DefinedTypes, types);
Authorization\AuthorizeFilterTest.cs (2)
532Assert.Equal(new[] { "Claim1", "Claim2" }, effectivePolicy.Requirements.Cast<ClaimsAuthorizationRequirement>().Select(c => c.ClaimType)); 568Assert.Equal(new[] { "Claim1", "Claim2" }, effectivePolicy.Requirements.Cast<ClaimsAuthorizationRequirement>().Select(c => c.ClaimType));
ControllerBaseTest.cs (32)
443Assert.Equal(expected, resultTemporary.RouteValues); 467Assert.Equal(expected, resultTemporary.RouteValues); 491Assert.Equal(expected, resultPermanent.RouteValues); 515Assert.Equal(expected, resultPermanent.RouteValues); 535Assert.Equal(expected, resultTemporary.RouteValues); 555Assert.Equal(expected, resultTemporary.RouteValues); 578Assert.Equal(expectedRouteValues, result.RouteValues); 603Assert.Equal(expectedRouteValues, result.RouteValues); 625Assert.Equal(expected, resultPermanent.RouteValues); 645Assert.Equal(expected, resultPermanent.RouteValues); 668Assert.Equal(expectedRouteValues, result.RouteValues); 697Assert.Equal(expectedRouteValues, result.RouteValues); 718Assert.Equal(expected, resultTemporary.RouteValues); 737Assert.Equal(expected, resultTemporary.RouteValues); 759Assert.Equal(expectedRouteValues, result.RouteValues); 782Assert.Equal(expectedRouteValues, result.RouteValues); 802Assert.Equal(expected, resultPermanent.RouteValues); 821Assert.Equal(expected, resultPermanent.RouteValues); 843Assert.Equal(expectedRouteValues, result.RouteValues); 866Assert.Equal(expectedRouteValues, result.RouteValues); 956Assert.Equal(expected, resultTemporary.RouteValues); 977Assert.Equal(expected, resultTemporary.RouteValues); 998Assert.Equal(expected, resultPermanent.RouteValues); 1243Assert.Equal(expected, resultPermanent.RouteValues); 1264Assert.Equal(expected, resultPermanent.RouteValues); 1285Assert.Equal(expected, resultPermanent.RouteValues); 1423Assert.Equal(expected, result.RouteValues); 1458Assert.Equal(expected, result.RouteValues); 1480Assert.Equal(expected, result.RouteValues); 1617Assert.Equal(expected, result.RouteValues); 1637Assert.Equal(expected, result.RouteValues); 1659Assert.Equal(expected, result.RouteValues);
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (3)
42Assert.Equal(new[] { "application/problem+json", "application/problem+xml" }, badRequest.ContentTypes.OrderBy(c => c)); 64Assert.Equal(new[] { "application/problem+json", "application/problem+xml" }, badRequest.ContentTypes.OrderBy(c => c)); 88Assert.Equal(new[] { "application/problem+json", "application/problem+xml" }, objectResult.ContentTypes.OrderBy(c => c));
Formatters\JsonInputFormatterTestBase.cs (1)
304Assert.Equal(new int[] { 0, 23, 300 }, (IEnumerable<int>)result.Model);
Infrastructure\ProblemDetalsClientErrorFactoryTest.cs (4)
31Assert.Equal(new[] { "application/problem+json", "application/problem+xml" }, objectResult.ContentTypes); 58Assert.Equal(new[] { "application/problem+json", "application/problem+xml" }, objectResult.ContentTypes); 88Assert.Equal(new[] { "application/problem+json", "application/problem+xml" }, objectResult.ContentTypes); 114Assert.Equal(new[] { "application/problem+json", "application/problem+xml" }, objectResult.ContentTypes);
ModelBinding\Binders\CollectionModelBinderTest.cs (2)
37Assert.Equal(new[] { "foo", "bar", "baz" }, strategy.ElementKeys); 226Assert.Equal(new[] { 420, 42, 100, 420, 200 }, boundCollection.Model);
ModelBinding\Binders\FormFileModelBinderTest.cs (1)
270Assert.Equal(formFiles, bindingContext.Result.Model as IEnumerable<IFormFile>);
ModelBinding\Binders\HeaderModelBinderTests.cs (2)
85Assert.Equal(headerValue.Split(','), bindingContext.Result.Model as IEnumerable<string>); 214Assert.Equal(headerValue.Split(','), bindingContext.Result.Model as IEnumerable<string>);
ModelBinding\EnumerableValueProviderTest.cs (1)
100Assert.Equal(expected, result.OrderBy(kvp => kvp.Key));
ModelBinding\Validation\DefaultObjectValidatorTests.cs (1)
1483Assert.Equal<string>(keys.OrderBy(k => k).ToList(), modelState.Keys.OrderBy(k => k).ToList());
Routing\HttpMethodProviderAttributesTests.cs (1)
15Assert.Equal(expectedHttpMethods, httpMethodProvider.HttpMethods);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
ModelMetadataProviderTest.cs (1)
43Assert.Equal<string>(expected, matched);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (1)
DelegatingEnumerableTest.cs (1)
16Assert.Equal(numbers, delegatingEnumerable);
Microsoft.AspNetCore.Mvc.FunctionalTests (29)
ApiBehaviorTest.cs (2)
332Assert.Equal(expected, json.Properties().OrderBy(p => p.Name).Select(p => p.Name)); 348Assert.Equal(expected, json.Properties().OrderBy(p => p.Name).Select(p => p.Name));
ApiExplorerTest.cs (20)
542Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 564Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 586Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 798Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 804Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 833Assert.Equal(new[] { "text/plain" }, GetSortedMediaTypes(responseType)); 839Assert.Equal(new[] { "application/json" }, GetSortedMediaTypes(responseType)); 939Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1256Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1289Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1295Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1320Assert.Equal(expectedMediaTypes, actualMediaTypes); 1351Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1386Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1421Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1456Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1462Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1496Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1502Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType)); 1533Assert.Equal(expectedMediaTypes, GetSortedMediaTypes(responseType));
CorsTestsBase.cs (2)
137Assert.Equal(new[] { "GET,POST,HEAD" }, h.Value); 142Assert.Equal(new[] { "*" }, h.Value);
FiltersTest.cs (1)
125Assert.Equal(new[] { "True" }, response.Headers.GetValues("X-ServiceActionFilter"));
FormFileUploadTest.cs (2)
81Assert.Equal(new[] { "camera_spec1.txt", "camera_spec2.txt" }, product.Specs["camera"]); 83Assert.Equal(new[] { "battery_spec1.txt", "battery_spec2.txt" }, product.Specs["battery"]);
RazorPagesWithBasePathTest.cs (2)
749Assert.Equal(new[] { "PageModelFilterValue" }, response.Headers.GetValues("PageModelFilterKey")); 750Assert.Equal(new[] { "PageFilterValue" }, response.Headers.GetValues("PageFilterKey"));
Microsoft.AspNetCore.Mvc.IntegrationTests (7)
CollectionModelBinderIntegrationTest.cs (1)
960Assert.Equal(expectedCollection, model);
HeaderModelBinderIntegrationTest.cs (2)
352Assert.Equal(new double[] { 10.51, 45.44 }, product.Manufacturer.EnumerableOfDoubleProperty); 353Assert.Equal(new CarType[] { CarType.Sedan, CarType.Coupe }, product.Manufacturer.ListOfEnum);
ValidationIntegrationTests.cs (2)
2048Assert.Equal(new[] { 1, 2 }, model); 2100Assert.Equal(new[] { 1, 2 }, model);
ValidationWithRecordIntegrationTests.cs (2)
1839Assert.Equal(new[] { 1, 2 }, model); 1891Assert.Equal(new[] { 1, 2 }, model);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
BsonTempDataSerializerTest.cs (1)
250Assert.Equal(value, roundTripValue);
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (1)
304Assert.Equal(new int[] { 0, 23, 300 }, (IEnumerable<int>)result.Model);
src\Mvc\Mvc.ViewFeatures\test\Infrastructure\TempDataSerializerTestBase.cs (1)
300Assert.Equal(value, roundTripValue);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (4)
CSharpCompilerTest.cs (3)
83Assert.Equal(new[] { expectedConfiguration }, parseOptions.PreprocessorSymbolNames); 126Assert.Equal(new[] { "DEBUG" }, parseOptions.PreprocessorSymbolNames); 252Assert.Equal(new[] { "MyDefine", "RELEASE" }, parseOptions.PreprocessorSymbolNames);
RazorReferenceManagerTest.cs (1)
33Assert.Equal(expected, references);
Microsoft.AspNetCore.Mvc.Razor.Test (30)
ApplicationParts\RazorCompiledItemFeatureProviderTest.cs (4)
31Assert.Equal(new[] { item1, item2 }, feature.ViewDescriptors.Select(d => d.Item)); 60Assert.Equal(new[] { item1, item2 }, feature.ViewDescriptors.Select(d => d.Item)); 84Assert.Equal(new[] { item1, item2 }, feature.ViewDescriptors.Select(d => d.Item)); 129Assert.Equal(new[] { item1, item2 }, feature.ViewDescriptors.Select(d => d.Item));
LanguageViewLocationExpanderTest.cs (3)
150Assert.Equal(expectedViewLocations, expandedViewLocations); 174Assert.Equal(viewLocations, expandedViewLocations); 203Assert.Equal(viewLocations, expandedViewLocations);
RazorFileHierarchyTest.cs (3)
19Assert.Equal(expected, actual); 38Assert.Equal(expected, actual); 59Assert.Equal(expected, actual);
RazorViewEngineTest.cs (19)
266Assert.Equal(new[] 288Assert.Equal(new[] { 688Assert.Equal(expectedSeeds, seeds); 700Assert.Equal(expander1Result, seeds); 756Assert.Equal(expectedSeeds, seeds); 768Assert.Equal(expander1Result, seeds); 983Assert.Equal(expandedLocations, result.SearchedLocations); 991Assert.Equal(expandedLocations, result.SearchedLocations); 1042Assert.Equal(expandedLocations, result.SearchedLocations); 1172Assert.Equal(expectedSeeds, seeds); 1231Assert.Equal(expectedSeeds, seeds); 1274Assert.Equal(expected, result.SearchedLocations); 1344Assert.Equal(expected, result.SearchedLocations); 1380Assert.Equal(expected, result.SearchedLocations); 1409Assert.Equal(expected, result.SearchedLocations); 1749Assert.Equal(expected, actual); 1774Assert.Equal(expected, actual); 1799Assert.Equal(expected, actual); 1826Assert.Equal(expected, actual);
RazorViewTest.cs (1)
202Assert.Equal(new[] { "_ViewStart", pagePath, LayoutPath }, paths);
Microsoft.AspNetCore.Mvc.RazorPages.Test (58)
ApplicationModels\CompiledPageActionDescriptorBuilderTest.cs (3)
91Assert.Equal(pageApplicationModel.Filters, actual.FilterDescriptors.Select(f => f.Filter)); 92Assert.Equal(pageApplicationModel.HandlerMethods.Select(p => p.MethodInfo), actual.HandlerMethods.Select(p => p.MethodInfo)); 93Assert.Equal(pageApplicationModel.HandlerProperties.Select(p => p.PropertyName), actual.BoundProperties.Select(p => p.Name));
Infrastructure\PageViewLocationExpanderTest.cs (3)
42Assert.Equal(locations, actual); 64Assert.Equal(locations, actual); 83Assert.Equal(locations, actual);
PageModelTest.cs (26)
434Assert.Equal(expected, resultTemporary.RouteValues); 458Assert.Equal(expected, resultTemporary.RouteValues); 482Assert.Equal(expected, resultPermanent.RouteValues); 506Assert.Equal(expected, resultPermanent.RouteValues); 526Assert.Equal(expected, resultTemporary.RouteValues); 546Assert.Equal(expected, resultTemporary.RouteValues); 569Assert.Equal(expectedRouteValues, result.RouteValues); 594Assert.Equal(expectedRouteValues, result.RouteValues); 616Assert.Equal(expected, resultPermanent.RouteValues); 636Assert.Equal(expected, resultPermanent.RouteValues); 659Assert.Equal(expectedRouteValues, result.RouteValues); 688Assert.Equal(expectedRouteValues, result.RouteValues); 709Assert.Equal(expected, resultTemporary.RouteValues); 728Assert.Equal(expected, resultTemporary.RouteValues); 750Assert.Equal(expectedRouteValues, result.RouteValues); 773Assert.Equal(expectedRouteValues, result.RouteValues); 793Assert.Equal(expected, resultPermanent.RouteValues); 812Assert.Equal(expected, resultPermanent.RouteValues); 834Assert.Equal(expectedRouteValues, result.RouteValues); 857Assert.Equal(expectedRouteValues, result.RouteValues); 1263Assert.Equal(expected, resultPermanent.RouteValues); 1284Assert.Equal(expected, resultPermanent.RouteValues); 1305Assert.Equal(expected, resultTemporary.RouteValues); 1326Assert.Equal(expected, resultTemporary.RouteValues); 1347Assert.Equal(expected, resultPermanent.RouteValues); 1368Assert.Equal(expected, resultPermanent.RouteValues);
PageTest.cs (26)
454Assert.Equal(expected, resultTemporary.RouteValues); 478Assert.Equal(expected, resultTemporary.RouteValues); 502Assert.Equal(expected, resultPermanent.RouteValues); 526Assert.Equal(expected, resultPermanent.RouteValues); 546Assert.Equal(expected, resultTemporary.RouteValues); 566Assert.Equal(expected, resultTemporary.RouteValues); 589Assert.Equal(expectedRouteValues, result.RouteValues); 614Assert.Equal(expectedRouteValues, result.RouteValues); 636Assert.Equal(expected, resultPermanent.RouteValues); 656Assert.Equal(expected, resultPermanent.RouteValues); 679Assert.Equal(expectedRouteValues, result.RouteValues); 708Assert.Equal(expectedRouteValues, result.RouteValues); 729Assert.Equal(expected, resultTemporary.RouteValues); 748Assert.Equal(expected, resultTemporary.RouteValues); 770Assert.Equal(expectedRouteValues, result.RouteValues); 793Assert.Equal(expectedRouteValues, result.RouteValues); 813Assert.Equal(expected, resultPermanent.RouteValues); 832Assert.Equal(expected, resultPermanent.RouteValues); 854Assert.Equal(expectedRouteValues, result.RouteValues); 877Assert.Equal(expectedRouteValues, result.RouteValues); 967Assert.Equal(expected, resultTemporary.RouteValues); 988Assert.Equal(expected, resultTemporary.RouteValues); 1009Assert.Equal(expected, resultPermanent.RouteValues); 1030Assert.Equal(expected, resultPermanent.RouteValues); 1337Assert.Equal(expected, resultPermanent.RouteValues); 1358Assert.Equal(expected, resultPermanent.RouteValues);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (14)
FormActionTagHelperTest.cs (4)
224Assert.Equal<KeyValuePair<string, object>>(expectedRouteValues, param.Values as RouteValueDictionary); 283Assert.Equal<KeyValuePair<string, object>>(expectedRouteValues, param.Values as RouteValueDictionary); 356.Callback<UrlActionContext>(param => Assert.Equal(expectedRouteValues, param.Values as RouteValueDictionary)) 410.Callback<UrlRouteContext>(param => Assert.Equal(expectedRouteValues, param.Values as RouteValueDictionary))
SelectTagHelperTest.cs (10)
349Assert.Equal(savedDisabled, items.Select(item => item.Disabled)); 350Assert.Equal(savedGroup, items.Select(item => item.Group)); 351Assert.Equal(savedSelected, items.Select(item => item.Selected)); 352Assert.Equal(savedText, items.Select(item => item.Text)); 353Assert.Equal(savedValue, items.Select(item => item.Value)); 529Assert.Equal(savedDisabled, items.Select(item => item.Disabled)); 530Assert.Equal(savedGroup, items.Select(item => item.Group)); 531Assert.Equal(savedSelected, items.Select(item => item.Selected)); 532Assert.Equal(savedText, items.Select(item => item.Text)); 533Assert.Equal(savedValue, items.Select(item => item.Value));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (93)
Buffers\PagedCharBufferTest.cs (20)
59Assert.Equal(new[] { 'a', 'b', 'c', 't' }, page.Take(4)); 78Assert.Equal(stringToAppend.ToCharArray(), page.Take(PagedCharBuffer.PageSize - 1)); 128Assert.Equal(stringToAppend.ToCharArray(), page.Take(2 * PagedCharBuffer.PageSize - 1)); 145Assert.Equal(new[] { 'a', 'b', 'c' }, page.Take(buffer.Length)); 164page => Assert.Equal(expected, page), 165page => Assert.Equal(expected, page), 196page => Assert.Equal(expected1, page), 197page => Assert.Equal(expected2, page.Take(PagedCharBuffer.PageSize + 1))); 226page => Assert.Equal(expected, page), 255page => Assert.Equal(expected, page), 274Assert.Equal(new[] { 'a', 'b', 'c', 'd', 'e', 'f' }, page.Take(buffer.Length)); 290Assert.Equal(new[] { 'b', 'c', 'd' }, page.Take(buffer.Length)); 309page => Assert.Equal(expected, page), 310page => Assert.Equal(expected, page), 346page => Assert.Equal(expected1, page), 347page => Assert.Equal(expected2, page.Take(PagedCharBuffer.PageSize + 1))); 376page => Assert.Equal(expected, page), 405page => Assert.Equal(expected, page), 423Assert.Equal(new[] { 'A', 'b', 'c', 'd', 'e' }, page.Take(buffer.Length)); 478Assert.Equal(new[] { 'e', 'f', 'g', 'h' }, buffer.Pages[0].Take(buffer.Length));
Buffers\ViewBufferTest.cs (4)
77Assert.Equal(expected, buffer[0].Buffer.Select(v => v.Value)); 98page => Assert.Equal(expected, page.Buffer.Select(v => v.Value)), 130page => Assert.Equal(expected0, page.Buffer.Select(v => v.Value)), 131page => Assert.Equal(expected1, page.Buffer.Select(v => v.Value)),
Buffers\ViewBufferTextWriterTest.cs (5)
75Assert.Equal(expected, GetValues(buffer)); 101Assert.Equal(expected, GetValues(buffer)); 118Assert.Equal<object>(new[] { newLine, newLine }, actual); 134Assert.Equal<object>(new[] { string.Empty }, actual); 157Assert.Equal<object>(new[] { input1, input2, newLine, input3, input4, newLine }, actual);
DefaultHtmlGeneratorTest.cs (9)
601Assert.Equal<string>(expected, result); 631Assert.Equal<string>(expected, result); 678Assert.Equal<string>(expected, result); 704Assert.Equal<string>(expected, result); 727Assert.Equal<string>(expected, result); 785Assert.Equal<string>(expected, result); 811Assert.Equal<string>(expected, result); 840Assert.Equal<string>(expected, result); 952Assert.Equal<string>(expected, result);
Infrastructure\TempDataSerializerTestBase.cs (1)
300Assert.Equal(value, roundTripValue);
PartialViewResultExecutorTest.cs (4)
132Assert.Equal(expectedLocations, result.SearchedLocations); 167Assert.Equal(expectedLocations, result.SearchedLocations); 202Assert.Equal(expectedLocations, result.SearchedLocations); 276Assert.Equal(new string[] { "location/myview" }, listener.ViewNotFound.SearchedLocations);
Rendering\HtmlHelperSelectTest.cs (40)
338Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled)); 339Assert.Equal(savedGroup, selectList.Select(item => item.Group)); 340Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 341Assert.Equal(savedText, selectList.Select(item => item.Text)); 342Assert.Equal(savedValue, selectList.Select(item => item.Value)); 362Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 402Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 611Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 635Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 659Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 684Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 712Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 735Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 759Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled)); 760Assert.Equal(savedGroup, selectList.Select(item => item.Group)); 761Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 762Assert.Equal(savedText, selectList.Select(item => item.Text)); 763Assert.Equal(savedValue, selectList.Select(item => item.Value)); 784Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 805Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1011Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1032Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1056Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1077Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1105Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled)); 1106Assert.Equal(savedGroup, selectList.Select(item => item.Group)); 1107Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1108Assert.Equal(savedText, selectList.Select(item => item.Text)); 1109Assert.Equal(savedValue, selectList.Select(item => item.Value)); 1133Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1153Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1173Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1198Assert.Equal(savedDisabled, selectList.Select(item => item.Disabled)); 1199Assert.Equal(savedGroup, selectList.Select(item => item.Group)); 1200Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1201Assert.Equal(savedText, selectList.Select(item => item.Text)); 1202Assert.Equal(savedValue, selectList.Select(item => item.Value)); 1224Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1245Assert.Equal(savedSelected, selectList.Select(item => item.Selected)); 1267Assert.Equal(savedSelected, selectList.Select(item => item.Selected));
ViewEngines\CompositeViewEngineTest.cs (6)
67Assert.Equal(new[] { "controller/test-view" }, result.SearchedLocations); 156Assert.Equal(new[] { "1", "2", "3", "4", "5" }, result.SearchedLocations); 199Assert.Equal(new[] { expectedViewName }, result.SearchedLocations); 297Assert.Equal(new[] { "1", "2", "3", "4", "5" }, result.SearchedLocations); 334Assert.Equal(new[] { "Shared/partial-view" }, result.SearchedLocations); 423Assert.Equal(new[] { "1", "2", "3", "4", "5" }, result.SearchedLocations);
ViewResultExecutorTest.cs (4)
130Assert.Equal(expectedLocations, result.SearchedLocations); 164Assert.Equal(expectedLocations, result.SearchedLocations); 198Assert.Equal(expectedLocations, result.SearchedLocations); 271Assert.Equal(new string[] { "location/myview" }, listener.ViewNotFound.SearchedLocations);
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheTests.cs (1)
1056Assert.Equal(initialResponse.Headers.GetValues(header.Key), subsequentResponse.Headers.GetValues(header.Key));
Microsoft.AspNetCore.Razor.Runtime.Test (1)
Runtime\TagHelpers\TagHelperRunnerTest.cs (1)
108Assert.Equal(expectedTagHelperOrders, processOrder);
Microsoft.AspNetCore.Razor.Test (1)
TagHelpers\ReadOnlyTagHelperAttributeListTest.cs (1)
655Assert.Equal(expectedAttributes, attributes.PublicAttributes);
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingTests.cs (1)
960Assert.Equal(initialResponse.Headers.GetValues(header.Key), subsequentResponse.Headers.GetValues(header.Key));
Microsoft.AspNetCore.Routing.Tests (9)
Matching\DfaMatcherBuilderTest.cs (8)
2764Assert.Equal(new[] { endpoint1, endpoint2, }, test2_true.Matches); 2769Assert.Equal(new[] { endpoint3, }, test2_false.Matches); 2808Assert.Equal(new[] { endpoint1, }, test1_0.Matches); 2813Assert.Equal(new[] { endpoint2, endpoint3, }, test1_1.Matches); 2853Assert.Equal(new[] { endpoint1, }, test1_0.Matches); 2858Assert.Equal(new[] { endpoint2, endpoint3, }, test1_1.Matches); 2892Assert.Equal(new[] { endpoint1, endpoint2, endpoint3, }, a.Matches); 2937Assert.Equal(endpoints, endpoints.OrderBy(e => e, comparer));
PathTokenizerTest.cs (1)
113Assert.Equal<StringSegment>(expectedSegments, tokenizer);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (23)
Listener\RequestHeaderTests.cs (16)
72Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host")); 74Assert.Equal(new[] { "close" }, requestHeaders.GetValues("Connection")); 77Assert.Equal(new[] { "custom1", "and custom测试2", "custom3" }, requestHeaders.GetValues("Custom-Header")); 79Assert.Equal(new[] { "spacervalue", "spacervalue" }, requestHeaders.GetValues("Spacer-Header")); 99Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host")); 101Assert.Equal(new[] { "close" }, requestHeaders.GetValues("Connection")); 104Assert.Equal(new[] { "�" }, requestHeaders.GetValues("Custom-Header")); 106Assert.Equal(new[] { "spacervalue" }, requestHeaders.GetValues("Spacer-Header")); 127Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host")); 129Assert.Equal(new[] { "close" }, requestHeaders.GetValues("Connection")); 132Assert.Equal(new[] { "£" }, requestHeaders.GetValues("Custom-Header")); 134Assert.Equal(new[] { "spacervalue" }, requestHeaders.GetValues("Spacer-Header")); 168Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host")); 170Assert.Equal(new[] { "close" }, requestHeaders.GetValues("Connection")); 193Assert.Equal(new[] { new Uri(address).Authority }, requestHeaders.GetValues("Host")); 195Assert.Equal(new[] { "close" }, requestHeaders.GetValues("Connection"));
ResponseHeaderTests.cs (4)
152Assert.Equal(new string[] { "close" }, response.Headers.GetValues("Connection")); 178Assert.Equal(new string[] { "close" }, response.Headers.GetValues("Connection")); 207Assert.Equal(new string[] { "close" }, response.Headers.GetValues("Connection")); 297Assert.Equal(headers.GetValues(headerName), expectedValue);
ResponseTrailersTests.cs (3)
283Assert.Equal(new[] { "TrailerValue0", "TrailerValue1" }, response.TrailingHeaders.GetValues("TrailerName")); 311Assert.Equal(values, response.TrailingHeaders.GetValues("ThisIsALongerHeaderNameThatStillWorksForReals")); 336Assert.Equal(headers.GetValues(headerName), expectedValue);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (9)
DiagnosticMemoryPoolTests.cs (2)
200Assert.Equal(new Exception[] { exception }, aggregateException.InnerExceptions); 226Assert.Equal(inner, exception.InnerExceptions);
HttpParserTests.cs (2)
869Assert.Equal(expectedHeaderNames, parsedHeaders.Select(t => t.Key)); 870Assert.Equal(expectedHeaderValues, parsedHeaders.Select(t => t.Value));
HttpRequestHeadersTests.cs (4)
183Assert.Equal( 201Assert.Equal( 221Assert.Equal<string>( 225Assert.Equal<StringValues>(
src\Shared\test\Shared.Tests\runtime\Http2\HuffmanDecodingTests.cs (1)
77Assert.Equal(input, decoded.Take(decodedByteCount));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
QuicConnectionContextTests.cs (1)
273Assert.Equal(TestData, data);
Microsoft.AspNetCore.Shared.Tests (4)
CommandLineApplicationTests.cs (2)
131Assert.Equal(new[] { "one", "two", "three", "four", "five" }, argument.Values); 155Assert.Equal(new[] { "three", "four", "five" }, third.Values);
runtime\Http2\HuffmanDecodingTests.cs (1)
77Assert.Equal(input, decoded.Take(decodedByteCount));
StackTraceHelperTest.cs (1)
182Assert.Equal(expectedCallStack, methodNames);
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Internal\Protocol\MemoryBufferWriterTests.cs (2)
92Assert.Equal(input, data.Take(16)); 113Assert.Equal(input, data.Take(16));
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (2)
DefaultHubMessageSerializerTests.cs (2)
36Assert.Equal(testData.Encoded, allBytes); 51Assert.Equal(new List<byte>() { 0x0D,
Microsoft.Build.BuildCheck.UnitTests (3)
EditorConfig_Tests.cs (3)
876Assert.Equal(new[] { Create("my_prop", "my_val") }, properties); 913Assert.Equal(new[] { Create("my_prop", "my_other_val") }, properties); 925Assert.Equal(new[] { Create("my_prop", "my_other_val") }, properties);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (2)
TestUtilities\TaskTestUtil.cs (2)
26Assert.Equal(expected, task.GenerateCommandLineArgsTaskItems(rsp).Select(x => x.ItemSpec)); 39Assert.Equal(expected, compilerTask.CommandLineArgs!.Select(x => x.ItemSpec));
Microsoft.Build.Tasks.UnitTests (2)
XmlPeek_Tests.cs (2)
357Assert.Equal(["abcdefg", "a$(d)fg", "a$(d.f)"], p.Result.Select(x => x.ItemSpec)); 358Assert.Equal(["abcdefg", "a%24%28d%29fg", "a%24%28d.f%29"], p.Result.Cast<TaskItem>().Select(x => x.ToString()));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
42Assert.Equal(
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (14)
CommandLineTests.cs (14)
1920Assert.Equal<string>(expected, parsed); 1926Assert.Equal<string>(expected, parsed); 1932Assert.Equal<string>(expected, parsed); 1940Assert.Equal(new[] { "def1", "def2" }, parsed); 2692Assert.Equal(expectedAliases, result.Properties.Aliases); 11410Assert.Equal( 11415Assert.Equal( 11420Assert.Equal( 11425Assert.Equal( 11430Assert.Equal( 11492Assert.Equal( 12333Assert.Equal(new[] { "NS1", "NS2" }, previewNamespaces[0]); 12334Assert.Equal(new[] { "NS3", "NS4" }, previewNamespaces[1]); 12353Assert.Equal(new[] { "NS3", "NS4" }, previewNamespaces[0]);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests.cs (1)
1172Assert.Equal(
Formatting\CodeCleanupTests.cs (1)
632Assert.Equal(supportedDiagnostics, supportedDiagnostics.Distinct());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (61)
CodeGen\CodeGenAsyncMainTests.cs (1)
722Assert.Equal(new[] { "MemberReference:Void System.Diagnostics.DebuggerStepThroughAttribute..ctor()" }, getMethodAttributes(main));
CodeGen\CodeGenCapturing.cs (2)
152Assert.Equal(new[] 159Assert.Equal(new[]
CodeGen\CodeGenLocalFunctionTests.cs (13)
5237Assert.Equal( 5286Assert.Equal( 5327Assert.Equal( 5540Assert.Equal(new[] { "CompilerGeneratedAttribute", "ConditionalAttribute" }, GetAttributeNames(attrs1)); 5636Assert.Equal(new[] { "CompilerGeneratedAttribute", "Attr" }, GetAttributeNames(attrs1)); 5637Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.GetReturnTypeAttributes())); 5638Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.TypeParameters.Single().GetAttributes())); 5639Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.Parameters.Single().GetAttributes())); 5647Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(attrs1)); 5752Assert.Equal(new[] { "DllImportAttribute" }, GetAttributeNames(localFunction.GetAttributes())); 5761Assert.Equal( 5827Assert.Equal(new[] { "DllImportAttribute" }, GetAttributeNames(localFunction.GetAttributes())); 5836Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(attrs1));
CodeGen\CodeGenTupleTest.cs (42)
499Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames); 513Assert.Equal(new[] { "x", "y" }, typeArg.TupleElementNames); 525Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames); 537Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames); 702Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames); 718Assert.Equal(new[] { "key", "val" }, typeArg.TupleElementNames); 5861Assert.Equal(new[] { "System.Int32" }, ElementTypeNames(tupleWithoutNames)); 5881Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames)); 5918Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tuple)); 5958Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames)); 5976Assert.Equal(new[] { "Alice", "Bob" }, GetTupleElementNames(tupleWithNames)); 5977Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithNames)); 5995Assert.Equal(new[] { null, "Item2", "Charlie" }, GetTupleElementNames(tupleWithSomeNames)); 5996Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32" }, ElementTypeNames(tupleWithSomeNames)); 6013Assert.Equal(new[] { "Item2", "Item1" }, GetTupleElementNames(tupleWithNames)); 6014Assert.Equal(new[] { "System.Int32", "System.Int32" }, ElementTypeNames(tupleWithNames)); 6039Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" }, 6065Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" }, 6089Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8" }, GetTupleElementNames(tuple8WithNames)); 6091Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" }, 6116Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" }, 6139Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9" }, GetTupleElementNames(tuple9WithNames)); 6141Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" }, 6171Assert.Equal(new[] { "Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7", "Item8", "Item9" }, GetTupleElementNames(tuple9WithNames)); 6173Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.Int32", "System.Int32" }, 6276Assert.Equal(new[] { "123", " ", null }, GetTupleElementNames(tuple2)); 6280Assert.Equal(new[] { "return", "class" }, GetTupleElementNames(tuple3)); 6372Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames)); 6397Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tuple)); 6420Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithoutNames)); 6435Assert.Equal(new[] { "Alice", "Bob" }, GetTupleElementNames(tupleWithNames)); 6436Assert.Equal(new[] { "System.Int32", "System.String" }, ElementTypeNames(tupleWithNames)); 6450Assert.Equal(new[] { "Item2", "Item1" }, GetTupleElementNames(tupleWithNames)); 6451Assert.Equal(new[] { "System.Int32", "System.Int32" }, ElementTypeNames(tupleWithNames)); 6471Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" }, 6489Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8" }, GetTupleElementNames(tuple8WithNames)); 6491Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String" }, 6512Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" }, 6531Assert.Equal(new[] { "Alice1", "Alice2", "Alice3", "Alice4", "Alice5", "Alice6", "Alice7", "Alice8", "Alice9" }, GetTupleElementNames(tuple9WithNames)); 6533Assert.Equal(new[] { "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32", "System.String", "System.Int32" }, 6564Assert.Equal(new[] { "123", " " }, GetTupleElementNames(tuple2)); 6568Assert.Equal(new[] { "return", "class" }, GetTupleElementNames(tuple3));
Emit\DeterministicTests.cs (3)
338Assert.Equal(sortedFullNames, getNamesOfForwardedTypes(assembly)); 348Assert.Equal(sortedFullNames, metadataFullNames); 358Assert.Equal(sortedFullNames, getNamesOfForwardedTypes(retargeting));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\NumericIntPtrTests.cs (1)
71Assert.Equal(expected, actualConversionKinds);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (38)
Attributes\AttributeTests.cs (14)
620Assert.Equal(new[] { 2, 0, 1 }, attributeData.ConstructorArgumentsSourceIndices); 655Assert.Equal(new object[] { 1, 2, 3 }, attributeData.ConstructorArguments.Single().Values.Select(arg => arg.Value)); 1123Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices); 1187Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices); 1226Assert.Equal(new[] { 0, 1 }, attributeData.ConstructorArgumentsSourceIndices); 1265Assert.Equal(new[] { 0, 1 }, attributeData.ConstructorArgumentsSourceIndices); 1303Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices); 1343Assert.Equal(new[] { 1, 0 }, attributeData.ConstructorArgumentsSourceIndices); 11017Assert.Equal(new[] { "Attr<System.Int32>" }, GetAttributeStrings(attrs)); 11152Assert.Equal(new[] { "Attr<System.String>(Prop = \"a\")" }, GetAttributeStrings(attrs)); 11246Assert.Equal(new[] { "Attr<System.String>(\"a\")" }, GetAttributeStrings(attrs)); 11297Assert.Equal(new[] 11310Assert.Equal(new[] 11369Assert.Equal(new[] { "Attr<Attr<System.String>>" }, GetAttributeStrings(attrs));
Attributes\AttributeTests_Synthesized.cs (1)
652Assert.Equal(new[] { "Attr" }, GetAttributeNames(typeParam.GetAttributes()));
Attributes\AttributeTests_WellKnownAttributes.cs (1)
5753Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(method.GetAttributes()));
Attributes\InternalsVisibleToAndStrongNameTests.cs (6)
1460Assert.Equal(TestResources.General.snMaxSizePublicKey, comp.Assembly.Identity.PublicKey); 1461Assert.Equal<byte>(pubKeyTokenBytes, comp.Assembly.Identity.PublicKeyToken); 1478Assert.Equal(TestResources.General.snMaxSizePublicKey, comp2.Assembly.Identity.PublicKey); 1479Assert.Equal<byte>(pubKeyTokenBytes, comp2.Assembly.Identity.PublicKeyToken); 1488Assert.Equal(TestResources.General.snMaxSizePublicKey, comp3.Assembly.Identity.PublicKey); 1489Assert.Equal<byte>(pubKeyTokenBytes, comp3.Assembly.Identity.PublicKeyToken);
Semantics\ExtensionTests.cs (16)
1781Assert.Equal(["M"], symbol.MemberNames); 1782Assert.Equal(["", "M"], symbol.ContainingType.MemberNames); 1882Assert.Equal(["M"], symbol.MemberNames); 2037Assert.Equal(["Property"], symbol.MemberNames); 2071Assert.Equal(["Property"], symbol.MemberNames); 2203Assert.Equal(["Property"], symbol.MemberNames); 2230Assert.Equal(["Property"], symbol.MemberNames); 2265Assert.Equal(["this[]"], symbol.MemberNames); 2428Assert.Equal([".ctor"], symbol.MemberNames); 2456Assert.Equal(["Finalize"], symbol.MemberNames); 2490Assert.Equal(["field"], symbol.MemberNames); 2516Assert.Equal(["i"], symbol.MemberNames); 42424Assert.Equal(["(T, T)", "(t, T t)", "(U, U)", "(u, U u)"], PrintXmlNameSymbols(tree, model)); 42923Assert.Equal(["(o, System.Object o)", "(o, System.Object o)", "(o, null)"], PrintXmlNameSymbols(tree, model)); 43010Assert.Equal(["(T, T)", "(T, T)", "(T, T)", "(T, T)", "(T, T)"], PrintXmlNameSymbols(tree, model)); 43035Assert.Equal(["(T, null)", "(T, T)"], PrintXmlNameSymbols(tree, model));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
src\Analyzers\CSharp\Tests\SimplifyInterpolation\SimplifyInterpolationTests.cs (1)
42Assert.Equal(
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (55)
Semantics\LambdaDiscardParametersTests.cs (4)
389Assert.Equal(new[] { "AAttribute" }, getParameterAttributes(lambdas[0].Parameters[0])); 390Assert.Equal(new string[0], getParameterAttributes(lambdas[0].Parameters[1])); 391Assert.Equal(new string[0], getParameterAttributes(lambdas[1].Parameters[0])); 392Assert.Equal(new[] { "AAttribute" }, getParameterAttributes(lambdas[1].Parameters[1]));
Semantics\LocalFunctionTests.cs (1)
507Assert.Equal(new[] { "A" }, GetAttributeNames(attributes));
Semantics\MultiDimensionalArrayTests.cs (24)
1118Assert.Equal(new[] { 5 }, array.Sizes); 1119Assert.Equal(new[] { 0 }, array.LowerBounds); 1125Assert.Equal(new[] { 5 }, array.Sizes); 1126Assert.Equal(new[] { 0 }, array.LowerBounds); 1132Assert.Equal(new[] { 5, 5 }, array.Sizes); 1139Assert.Equal(new[] { 5 }, array.Sizes); 1140Assert.Equal(new[] { 0, 2 }, array.LowerBounds); 1146Assert.Equal(new[] { 5, 7 }, array.Sizes); 1147Assert.Equal(new[] { 0, 2 }, array.LowerBounds); 1153Assert.Equal(new[] { 5 }, array.Sizes); 1154Assert.Equal(new[] { 1 }, array.LowerBounds); 1160Assert.Equal(new[] { 5 }, array.Sizes); 1161Assert.Equal(new[] { 1 }, array.LowerBounds); 1167Assert.Equal(new[] { 5, 5 }, array.Sizes); 1168Assert.Equal(new[] { 1, 0 }, array.LowerBounds); 1174Assert.Equal(new[] { 5 }, array.Sizes); 1175Assert.Equal(new[] { 1, 2 }, array.LowerBounds); 1181Assert.Equal(new[] { 5, 7 }, array.Sizes); 1182Assert.Equal(new[] { 1, 2 }, array.LowerBounds); 1189Assert.Equal(new[] { 1 }, array.LowerBounds); 1196Assert.Equal(new[] { 1 }, array.LowerBounds); 1203Assert.Equal(new[] { 1, 2 }, array.LowerBounds); 1209Assert.Equal(new[] { 5 }, array.Sizes); 1210Assert.Equal(new[] { 1 }, array.LowerBounds);
Semantics\NativeIntegerTests.cs (1)
63Assert.Equal(expected, actualConversionKinds);
Semantics\TopLevelStatementsTests.cs (5)
6164Assert.Equal(new[] { "DllImportAttribute" }, GetAttributeNames(localFunction.GetAttributes())); 6180Assert.Equal(new[] { "CompilerGeneratedAttribute" }, programAttributes); 6190Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(localFn1.GetAttributes().As<CSharpAttributeData>())); 9072Assert.Equal(new[] { "CompilerGeneratedAttribute" }, GetAttributeNames(program.GetAttributes().As<CSharpAttributeData>())); 9518Assert.Equal(new[] { "CompilerGeneratedAttribute", "DebuggerBrowsableAttribute" }, fieldAttributes);
SourceGeneration\GeneratorDriverTests.cs (3)
839Assert.Equal<AdditionalText>(texts, passedIn); 2376Assert.Equal(new (object, IncrementalStepRunReason)[] 2397Assert.Equal(new (object, IncrementalStepRunReason)[]
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (1)
1294Assert.Equal(expectedGeneratedSources, driver.GetRunResult().Results.Single().GeneratedSources.Select(s => (s.HintName, s.SourceText.ToString())));
SourceGeneration\StateTableTests.cs (5)
94Assert.Equal(new[] { 2, 3 }, yieldItems(cachedEntries.Items)); 406Assert.Equal(ImmutableArray.Create(1, 2, 3), (IEnumerable<int>)output.Value); 469Assert.Equal(ImmutableArray.Create(1, 2, 3), (IEnumerable<int>)output.Value); 516Assert.Equal(ImmutableArray.Create(1, 2), (IEnumerable<int>)output.Value); 583Assert.Equal(ImmutableArray.Create(1, 2, 4), (IEnumerable<int>)output.Value);
SourceGeneration\SyntaxAwareGeneratorTests.cs (11)
697Assert.Equal(new[] { "C", "D" }, classDeclarations); 754Assert.Equal(new[] { "C", "D" }, classDeclarations); 965Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, syntaxFilterVisited); 987Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, syntaxFilterVisited); 1326Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, fieldsCalledFor); 1588Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, syntaxCalledFor); 1645Assert.Equal(new[] { "fieldA", "fieldB", "fieldC", "fieldA", "fieldB", "fieldC" }, syntaxCalledFor); 1646Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, noCompareCalledFor); 1647Assert.Equal(new[] { "fieldA", "fieldB", "fieldC" }, compareCalledFor); 1657Assert.Equal(new[] { "fieldD", "fieldE", "fieldF", "fieldD", "fieldE", "fieldF" }, syntaxCalledFor); 1658Assert.Equal(new[] { "fieldD", "fieldE", "fieldF" }, noCompareCalledFor);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (19)
SymbolDisplay\ObjectDisplayTests.cs (11)
135Assert.Equal(QuoteAndEscapingCombinations('a'), new[] 141Assert.Equal(QuoteAndEscapingCombinations('\t'), new[] 148Assert.Equal(QuoteAndEscapingCombinations('\u26f4'), new[] 155Assert.Equal(QuoteAndEscapingCombinations('\u007f'), new[] 162Assert.Equal(QuoteAndEscapingCombinations('\''), new[] 253Assert.Equal(QuoteAndEscapingCombinations(""), new[] { "", "", "\"\"", "\"\"" }); 254Assert.Equal(QuoteAndEscapingCombinations("a"), new[] { "a", "a", "\"a\"", "\"a\"" }); 255Assert.Equal(QuoteAndEscapingCombinations("\t"), new[] { "\t", "\\t", "\"\t\"", "\"\\t\"" }); 256Assert.Equal(QuoteAndEscapingCombinations("\u26F4"), new[] { "\u26F4", "\u26F4", "\"\u26F4\"", "\"\u26F4\"" }); // Miscellaneous symbol 257Assert.Equal(QuoteAndEscapingCombinations("\u007f"), new[] { "\u007f", "\\u007f", "\"\u007f\"", "\"\\u007f\"" }); // Control character 258Assert.Equal(QuoteAndEscapingCombinations("\""), new[] { "\"", "\"", "\"\\\"\"", "\"\\\"\"" }); // Quote
Symbols\ExtendedPartialMethodsTests.cs (3)
2317Assert.Equal(expectedAttributeNames, GetAttributeNames(definitionPart.GetReturnTypeAttributes())); 2322Assert.Equal(expectedAttributeNames, GetAttributeNames(implementationPart.GetReturnTypeAttributes())); 2330Assert.Equal(expectedAttributeNames, GetAttributeNames(method.GetReturnTypeAttributes()));
Symbols\Metadata\PE\TypeForwarders.cs (3)
1502Assert.Equal(topLevelTypes.OrderBy(s => s), GetNamesOfForwardedTypes(assembly)); 1621Assert.Equal(new[] { "CF1" }, GetNamesOfForwardedTypes(modCompilation.Assembly)); 1630Assert.Equal(new[] { "CF1" }, GetNamesOfForwardedTypes(appCompilation.Assembly));
Symbols\Source\DeclaringSyntaxNodeTests.cs (1)
738Assert.Equal(new[] { source0, source1, source2, source3 }, comp0.SyntaxTrees);
Symbols\Source\FileModifierTests.cs (1)
4577Assert.Equal((IEnumerable<byte>)originalFileIdentifier.FilePathChecksumOpt, (IEnumerable<byte>)retargetedFileIdentifier.FilePathChecksumOpt);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
IncrementalParsing\IncrementalParsingTests.cs (1)
3536Assert.Equal(
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeFixes\CodeFixServiceTests.cs (1)
1101Assert.Equal(analyzer.SupportedDiagnostics.Select(d => d.Id), lowPriorityAnalyzerData.SupportedDiagnosticIds);
Utilities\PatternMatcherTests.cs (1)
496Assert.Equal(expectedSpans, actualSpans);
Workspaces\ClassificationTypeNamesTests.cs (1)
46=> Assert.Equal(ClassificationTypeNames.AllTypeNames.Distinct(), ClassificationTypeNames.AllTypeNames);
Microsoft.CodeAnalysis.Test.Utilities (1)
Assert\AssertEx.cs (1)
1039Assert.Equal<T>(expected, actual);
Microsoft.CodeAnalysis.UnitTests (47)
AnalyzerAssemblyLoaderTests.cs (2)
1778Assert.Equal([name], resolver1.CalledFor.Select(x => x.Name)); 1799Assert.Equal([Path.GetFileNameWithoutExtension(TestFixture.Delta1)], resolver.CalledFor.Select(x => x.Name));
Collections\Extensions\ImmutableArrayExtensionsTests.cs (3)
267Assert.Equal(empty, empty.Concat(empty)); 268Assert.Equal(a, a.Concat(empty)); 269Assert.Equal(a, empty.Concat(a));
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (2)
246Assert.Equal<KeyValuePair<int, GenericParameterHelper>>(list, ToListNonGeneric<KeyValuePair<int, GenericParameterHelper>>(map)); 303Assert.Equal(array.Skip(1), nonGeneric.Cast<T>().ToArray());
Collections\ImmutableListTestBase.cs (7)
88Assert.Equal(enumerable, array); 92Assert.Equal(enumerable, array); 96Assert.Equal(enumerable, array); 100Assert.Equal(enumerable.Take(array.Length), array); 108Assert.Equal(enumerable, array); 521Assert.Equal(new[] { 1 }, enumerable.ToList()); // exercises the enumerator 524Assert.Equal(new[] { 1 }, enumerableNonGeneric.Cast<int>().ToList()); // exercises the enumerator
Collections\ImmutableSegmentedListTest.cs (8)
339Assert.Equal(new[] { 1, 3 }, modified2); 529Assert.Equal<int>(new[] { 4, 5, 8 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4)); 530Assert.Equal<int>(new[] { 3, 6, 8 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 5, 6)); 531Assert.Equal<int>(new[] { 3, 5, 9 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 8, 9)); 537Assert.Equal<int>(new[] { 4, 3, 5 }, System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4)); 538Assert.Equal<int>(new[] { 4, 4, 5 }, System.Collections.Immutable.ImmutableList.Replace(System.Collections.Immutable.ImmutableList.Replace((System.Collections.Immutable.IImmutableList<int>)list, 3, 4), 3, 4)); 651Assert.Equal(new[] { 2 }, System.Collections.Immutable.ImmutableList.RemoveRange((System.Collections.Immutable.IImmutableList<int>)list, new[] { 1, 3, 5 })); 661Assert.Equal(new[] { 1, 3 }, System.Collections.Immutable.ImmutableList.RemoveRange((System.Collections.Immutable.IImmutableList<int>)ImmutableSegmentedList.Create(1, 2, 3), new[] { 2 }));
Collections\ImmutableSetTest.cs (2)
272Assert.Equal<T>(expectedValues, set.ToList()); 453Assert.Equal<T>(values, list);
Collections\ImmutablesTestBase.cs (1)
163Assert.Equal<T>(expectedResults, manualArray);
CommonCommandLineParserTests.cs (13)
1158Assert.Equal( 1164Assert.Equal( 1168Assert.Equal( 1172Assert.Equal( 1176Assert.Equal( 1187Assert.Equal( 1191Assert.Equal( 1195Assert.Equal( 1201Assert.Equal( 1205Assert.Equal( 1210Assert.Equal( 1215Assert.Equal( 1219Assert.Equal(
Symbols\DocumentationCommentIdTests.cs (4)
47Assert.Equal(new[] { symbol }, foundSymbols); 73Assert.Equal(new[] { symbol }, foundSymbols); 97Assert.Equal(new[] { symbol }, foundSymbols); 121Assert.Equal(new[] { symbol }, foundSymbols);
Text\LargeTextTests.cs (1)
338Assert.Equal<byte>(expectedSourceText.GetChecksum(), actualSourceText.GetChecksum());
Text\SourceTextTests.cs (4)
185Assert.Equal<byte>(expectedChecksum, actualChecksum); 186Assert.Equal<byte>(expectedContentHash, actualContentHash); 358Assert.Equal<byte>(expectedSourceText.GetChecksum(), actualSourceText.GetChecksum()); 375Assert.Equal<byte>(expectedSourceText.GetChecksum(), actualSourceText.GetChecksum());
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
Options\NamingStylePreferencesTests.cs (1)
209Assert.Equal(expectedDuplicates, duplicates);
SolutionTests\SolutionTests.cs (1)
1657Assert.Equal(expectedChecksum, document.GetTextSynchronously(default).GetChecksum());
SymbolKeyTests.cs (1)
334Assert.Equal(["N", "A", "A.B", "A.B.C", "A.N"],
Microsoft.Data.Analysis.Tests (4)
DataFrame.IOTests.cs (3)
698Assert.Equal(columnName, new[] { "vendor_id", "rate_code", "passenger_count", "trip_time_in_secs", "Column4", "Column5", "Column6", "Column7" }); 713Assert.Equal(columnName, new[] { "vendor_id", "rate_code", "passenger_count", "trip_time_in_secs", "Column0", "Column1", "Column2", "Column3" }); 1379Assert.Equal(_cells[i], df.Rows[i]);
DataFrameTests.cs (1)
611Assert.Equal(dfColumns, clampedColumns);
Microsoft.DotNet.XUnitAssert.Tests (10)
AsyncCollectionAssertsTests.cs (2)
64 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices); 116 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices);
CollectionAssertsTests.cs (7)
62 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices); 114 Assert.Equal(new[] { 0, 1, 2, 3, 4, 5 }, indices); 703 Assert.Equal(expected, actual); 712 var ex = Record.Exception(() => Assert.Equal(expected, actual)); 729 var ex = Record.Exception(() => Assert.Equal(expected, actual)); 957 Assert.Equal(expected, actual); 1023 var ex = Record.Exception(() => Assert.Equal(expected, actual));
EqualityAssertsTests.cs (1)
1310 Assert.Equal(expected, actual);
Microsoft.Extensions.AI.Abstractions.Tests (5)
Embeddings\GeneratedEmbeddingsTests.cs (1)
66Assert.Equal(embeddings, generatedEmbeddings);
Functions\AIFunctionArgumentsTests.cs (4)
83Assert.Equal(["key1", "key2"], args.Keys); 84Assert.Equal(["value1", "value2"], args.Values); 89Assert.Equal(new[] { "key1", "key2" }, args.Keys); 90Assert.Equal(new[] { "value1", "value2" }, args.Values);
Microsoft.Extensions.AI.Evaluation.NLP.Tests (4)
SimpleTokenizerTests.cs (4)
45Assert.Equal(expected, result); 54Assert.Equal(expected, result); 63Assert.Equal(expected, result); 72Assert.Equal(expected, result);
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
630Assert.Equal(firstResponse.Messages.Select(m => m.Text), secondResponse.Messages.Select(m => m.Text));
Microsoft.Extensions.AI.OpenAI.Tests (9)
OpenAIChatClientTests.cs (9)
180Assert.Equal(new Dictionary<string, long> 792Assert.Equal(new Dictionary<string, long> 889Assert.Equal(new Dictionary<string, long> 987Assert.Equal(new Dictionary<string, long> 1099Assert.Equal(new Dictionary<string, long> 1183Assert.Equal(new Dictionary<string, long> 1299Assert.Equal(new Dictionary<string, long> 1440Assert.Equal(new Dictionary<string, long> 1555Assert.Equal(new Dictionary<string, long>
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (15)
DefaultHealthCheckServiceTest.cs (5)
92Assert.Equal(actual.Value.Tags, degradedCheckTags); 105Assert.Equal(actual.Value.Tags, healthyCheckTags); 114Assert.Equal(actual.Value.Tags, unhealthyCheckTags); 146Assert.Equal(actual.Value.Tags, exceptionTags); 155Assert.Equal(actual.Value.Tags, operationExceptionTags);
DependencyInjection\HealthChecksBuilderTest.cs (8)
38Assert.Equal<string>(new[] { "tag", }, registration.Tags); 58Assert.Equal<string>(new[] { "tag", }, registration.Tags); 81Assert.Equal<string>(new[] { "tag", }, registration.Tags); 103Assert.Equal<string>(new[] { "tag", }, registration.Tags); 129Assert.Equal<string>(new[] { "tag", }, registration.Tags); 152Assert.Equal<string>(new[] { "tag", }, registration.Tags); 175Assert.Equal<string>(new[] { "tag", }, registration.Tags); 198Assert.Equal<string>(new[] { "tag", }, registration.Tags);
HealthCheckPublisherHostedServiceTest.cs (2)
211Assert.Equal(new[] { "one", "two", }, report.Entries.Keys.OrderBy(k => k)); 435Assert.Equal(new[] { "one", "two", }, report.Entries.Keys.OrderBy(k => k));
Microsoft.Extensions.Telemetry.Tests (4)
Logging\ExtendedLoggerFactoryTests.cs (3)
449Assert.Equal(loggerProvider.LogText, 507Assert.Equal(loggerProvider.LogText, 516Assert.Equal(loggerProvider2.LogText,
Logging\ExtendedLoggerTests.cs (1)
666Assert.Equal(new[] { "provider1.Test-Hello" }, store);
Microsoft.Extensions.TimeProvider.Testing.Tests (1)
TimerTests.cs (1)
310Assert.Equal(new[]
Microsoft.Gen.Metrics.Generated.Tests (30)
MetricTests.cs (22)
71Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 154Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 175Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2"), ("s3", "val3"), ("s4", "val4") }, tags); 178Assert.Equal(new (string, object?)[] { ("s1", "val3"), ("s2", "val4"), ("s3", "val5"), ("s4", "val6") }, tags); 199Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2"), ("s3", "val3"), ("s4", "val4") }, tags); 202Assert.Equal(new (string, object?)[] { ("s1", "val3"), ("s2", "val4"), ("s3", "val5"), ("s4", "val6") }, tags); 253Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 259Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 266Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value))); 278Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 284Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 291Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val4") }, measurement.Tags.Select(x => (x.Key, x.Value))); 329Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value))); 342Assert.Equal(new (string, object?)[] { ("Dim1", "val1"), ("Dim_2", "val2"), ("Dim_3", "val3") }, measurement.Tags.Select(x => (x.Key, x.Value))); 363Assert.Equal( 407Assert.Equal( 430Assert.Equal( 453Assert.Equal( 506Assert.Equal( 550Assert.Equal( 573Assert.Equal( 595Assert.Equal(
MetricTests.Ext.cs (8)
55Assert.Equal(new (string, object?)[] { ("s1", "val1"), ("s2", "val2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 135Assert.Equal(new (string, object?)[] { ("s1", "val_1"), ("s2", "val_2") }, measurement.Tags.Select(x => (x.Key, x.Value))); 170Assert.Equal( 192Assert.Equal( 214Assert.Equal( 263Assert.Equal( 285Assert.Equal( 307Assert.Equal(
Microsoft.JSInterop.Tests (1)
JSInProcessRuntimeTest.cs (1)
84Assert.Equal(new[] { obj2, obj1 }, syncResult.Select(r => r.Value));
Microsoft.ML.Core.Tests (1)
UnitTests\ScoreSchemaTest.cs (1)
77Assert.Equal(keyNames.DenseValues(), actualKeyNames.DenseValues());
Microsoft.ML.TensorFlow.Tests (4)
TensorflowTests.cs (4)
597Assert.Equal(new[] { 5, 5, 1, 32 }, type.Dimensions); 612Assert.Equal(new[] { 28, 28, 32 }, type.Dimensions); 627Assert.Equal(new[] { 10 }, type.Dimensions); 646Assert.Equal(new[] { 2, 2 }, type.Dimensions);
Microsoft.ML.Tests (79)
Transformers\CategoricalHashTests.cs (20)
143Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 146Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" }); 149Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 152Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" }); 156Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 159Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "1:2", "0:5", "1:4", "1:6", "0:3", "0:1" }); 162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "-1", "1" }); 169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 174Assert.Equal(slots.Items().Select(x => x.Value.ToString()).Distinct(), new string[14] { "[0].", "[0].0:A", "[0].0:E", "[0].0:D", "[0].1:A", "[0].1:E", "[0].1:D", "[1].", "[1].0:A", "[1].0:E", "[1].0:D", "[1].1:A", "[1].1:E", "[1].1:D" }); 177Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "65535", "65536", "131071" }); 181Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 184Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "E", "D" }); 187Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "65535" }); 191Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 194Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "0:A", "1:B" }); 197Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 200Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" }); 203Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 208Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized });
Transformers\CategoricalTests.cs (26)
221Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 224Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" }); 227Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 230Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" }); 234Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 237Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "3", "5" }); 240Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 243Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" }); 247Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 250Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[12] { "[0].1", "[0].2", "[0].3", "[0].4", "[0].5", "[0].6", "[1].1", "[1].2", "[1].3", "[1].4", "[1].5", "[1].6" }); 253Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[4] { "0", "5", "6", "11" }); 257Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 260Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "1", "-1" }); 263Assert.Equal(slotRanges.Items().Select(x => x.Value.ToString()), new string[2] { "0", "1" }); 267Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 270Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" }); 273Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 276Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" }); 279Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 282Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" }); 285Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 288Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" }); 292Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 295Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" }); 298Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 301Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "Bit2", "Bit1", "Bit0" });
Transformers\ConvertTests.cs (4)
352Assert.Equal(result.Schema["ConvA"].Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 356Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "1", "2" }); 359Assert.Equal(result.Schema["ConvB"].Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.KeyValues }); 362Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" });
Transformers\CustomMappingTests.cs (2)
243Assert.Equal(new[] { 0, 3, 5, 6 }, counter); 244Assert.Equal(new[] { 1, 0, 4, 1 }, values);
Transformers\HashTests.cs (5)
89Assert.Equal(keys.Items().Select(x => x.Value.ToString()), new string[2] { "2.5", "3.5" }); 94Assert.Equal(keys.Items().Select(x => x.Value.ToString()), new string[2] { "2.5", "3.5" }); 99Assert.Equal(keys.Items().Select(x => x.Value.ToString()), new string[2] { "0:3.5", "1:2.5" }); 404Assert.Equal(aHashed, dHashed); 405Assert.Equal(aHashed, dHashedCombined);
Transformers\KeyToBinaryVectorEstimatorTest.cs (4)
117Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 120Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[6] { "[0].Bit2", "[0].Bit1", "[0].Bit0", "[1].Bit2", "[1].Bit1", "[1].Bit0" }); 123Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 126Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "Bit1", "Bit0" });
Transformers\KeyToVectorEstimatorTests.cs (18)
136Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 139Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "A", "B" }); 142Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 145Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[1] { "C" }); 148Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 0 }); 152Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 155Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[4] { "[0].3", "[0].5", "[1].3", "[1].5" }); 158Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 1, 2, 3 }); 162Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.IsNormalized }); 165Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "6", "1" }); 169Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[2] { AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 172Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[4] { 0, 5, 6, 11 }); 176Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.IsNormalized }); 180Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[1] { AnnotationUtils.Kinds.SlotNames }); 183Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[3] { "A", "D", "E" }); 186Assert.Equal(column.Annotations.Schema.Select(x => x.Name), new string[3] { AnnotationUtils.Kinds.SlotNames, AnnotationUtils.Kinds.CategoricalSlotRanges, AnnotationUtils.Kinds.IsNormalized }); 189Assert.Equal(slots.Items().Select(x => x.Value.ToString()), new string[2] { "D", "E" }); 192Assert.Equal(slotRanges.Items().Select(x => x.Value), new int[2] { 0, 1 });
Microsoft.ML.Tokenizers.Tests (90)
BpeTests.cs (3)
482Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text, expectedIds.Length - 2, out normalizedText, out length)); 486Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 2, out normalizedText, out length)); 820Assert.Equal(ids.Take(i), subIds);
CodeGenTests.cs (44)
401Assert.Equal(ids.Take(ids.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, ids.Length - 1, out normalizedText, out length)); 406Assert.Equal(ids.Take(ids.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), ids.Length - 1, out normalizedText, out length)); 410Assert.Equal(expectedIds.Take(expectedIds.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, expectedIds.Length - 1, addPrefixSpace: false, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 413Assert.Equal(expectedIds.Take(expectedIds.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 1, addPrefixSpace: false, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 417Assert.Equal(expectedIdsWithSpace.Take(expectedIdsWithSpace.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text, expectedIdsWithSpace.Length - 1, addPrefixSpace: true, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 420Assert.Equal(expectedIdsWithSpace.Take(expectedIdsWithSpace.Length - expectedTokensToExclude), codeGenTokenizer.EncodeToIds(text.AsSpan(), expectedIdsWithSpace.Length - 1, addPrefixSpace: true, addBeginningOfSentence: false, addEndOfSentence: false, out normalizedText, out length)); 556Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 557Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 561Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 562Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 566Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 567Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 571Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 572Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 580Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 581Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 585Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 586Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 689Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 690Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 694Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 695Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 699Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 700Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 704Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 705Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 713Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 714Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 718Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 719Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 824Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 825Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 830Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 831Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 836Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 837Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 842Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 843Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 854Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 855Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 860Assert.Equal(idList, encoding.Select(t => t.Id).ToArray()); 861Assert.Equal(tokensList, encoding.Select(t => t.Value).ToArray()); 1000Assert.Equal(encodingIds.Take(expectedTokenCount), ids); 1005Assert.Equal(encodingIds.Take(expectedTokenCount), ids);
EnglishRobertaTests.cs (2)
201Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text, expectedIds.Length - 2, out normalizedText, out length)); 205Assert.Equal(expectedIds.Take(expectedIds.Length - 2), tokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 2, out normalizedText, out length));
LlamaTests.cs (11)
267Assert.Equal(ids.Skip(1), bpeTokens.Select(token => token.Id)); 268Assert.Equal(tokens.Skip(1), bpeTokens.Select(token => token.Value)); 273Assert.Equal(ids.Skip(1), encodedIds); 277Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id)); 278Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Skip(1).Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value)); 283Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Skip(1).Concat(new[] { bpe.EndOfSentenceId }), encodedIds); 287Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), bpeTokens.Select(token => token.Id)); 288Assert.Equal(isEmptyInput ? Array.Empty<string>() : tokens.Concat(new[] { bpe.EndOfSentenceToken }), bpeTokens.Select(token => token.Value)); 293Assert.Equal(isEmptyInput ? Array.Empty<int>() : ids.Concat(new[] { bpe.EndOfSentenceId }), encodedIds); 596Assert.Equal(expectedIds1.Take(expectedIds1.Length - 6), sentencePieceBpe.EncodeToIds( 611Assert.Equal(expectedIds1.Take(expectedIds1.Length - 6), sentencePieceBpe.EncodeToIds(
TiktokenTests.cs (8)
154Assert.Equal(new List<Range> { new Range(0, 5), new Range(5, 11) }, offsets); 208Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 6), (23, 10) }, offsets); 251Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 10), (27, 6) }, offsets); 281Assert.Equal(new List<(int, int)> { (0, 12), (12, 5), (17, 2), (18, 1), (19, 6), (25, 10) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray()); 316Assert.Equal(new List<(int, int)> { (0, 13), (13, 5), (18, 2), (20, 6), (26, 15) }, result.Select(token => (token.Offset.Start.Value, token.Offset.End.Value - token.Offset.Start.Value)).ToArray()); 607Assert.Equal(expectedIds.Take(expectedIds.Length - 4), tokenizer.EncodeToIds(text, expectedIds.Length - 4, out normalizedText, out length)); 611Assert.Equal(expectedIds.Take(expectedIds.Length - 4), tokenizer.EncodeToIds(text.AsSpan(), expectedIds.Length - 4, out normalizedText, out length)); 705Assert.Equal(expectedTokens, result.Select(r => r.Value));
TokenizerTests.cs (3)
144Assert.Equal(fullIdsList.Take(partialIdsList.Count), partialIdsList); 166Assert.Equal(prefixIds, fullIdsList.Take(prefixIds.Count)); 189Assert.Equal(suffixIds, fullIdsList.Skip(fullIdsList.Count - suffixIds.Count));
UnigramTests.cs (19)
319Assert.Equal(ids, extracted.Ids); 320Assert.Equal(tokens, extracted.Tokens); 321Assert.Equal(offsets, extracted.Offsets); 363Assert.Equal(expectedIds, extracted.Ids); 371Assert.Equal(expectedTokens, extracted.Tokens); 393Assert.Equal(ids, ints); 401Assert.Equal(ids, ints); 410Assert.Equal(ids, ints); 419Assert.Equal(ids, ints); 424Assert.Equal(ids.Take(i), result); 428Assert.Equal(ids.Take(i), result); 441Assert.Equal(ids.Take(i - 1), ints); // Exclude the counted BoS token 457Assert.Equal(ids.Take(i - 1), ints); // Exclude the counted BoS token 476Assert.Equal(expectedIds.Take(i), result); 480Assert.Equal(expectedIds.Take(i), result); 501Assert.Equal(ids, ids1.Concat(ids2).ToList()); 507Assert.Equal(ids, ids1.Concat(ids2).ToList()); 513Assert.Equal(ids, ids1.Concat(ids2).ToList()); 519Assert.Equal(ids, ids1.Concat(ids2).ToList());
Microsoft.Net.Http.Headers.Tests (1)
MediaTypeHeaderValueTest.cs (1)
917Assert.Equal(expected, result);
System.Xaml.Tests (17)
System\Windows\Markup\StaticExtensionTests.cs (1)
217Assert.Equal(new Type[] { typeof(string) }, Assert.IsAssignableFrom<ConstructorInfo>(descriptor.MemberInfo).GetParameters().Select(p => p.ParameterType));
System\Windows\Markup\TypeExtensionTests.cs (1)
178Assert.Equal(new Type[] { typeof(Type) }, Assert.IsAssignableFrom<ConstructorInfo>(descriptor.MemberInfo).GetParameters().Select(p => p.ParameterType));
System\Xaml\Replacements\DateTimeOffsetConverter2Tests.cs (1)
91Assert.Equal(new Type[] { typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(TimeSpan) }, parameters.Select(p => p.ParameterType));
System\Xaml\Replacements\TypeUriConverterTests.cs (1)
152Assert.Equal(new Type[] { typeof(string), typeof(UriKind) }, parameters.Select(p => p.ParameterType));
System\Xaml\Schema\XamlTypeInvokerTests.cs (2)
55Assert.Equal(new string?[] { "a", null }, instance.List); 65Assert.Equal(new string?[] { "a", null }, instance);
System\Xaml\Schema\XamlTypeNameTests.cs (1)
49Assert.Equal(typeArguments ?? Array.Empty<XamlTypeName>(), typeName.TypeArguments);
System\Xaml\XamlDirectiveTests.cs (1)
31Assert.Equal(xamlNamespaces, directive.GetXamlNamespaces());
System\Xaml\XamlLanguageTests.cs (7)
264Assert.Equal(new XamlType[] { XamlLanguage.Array, XamlLanguage.Member, XamlLanguage.Null, XamlLanguage.Property, XamlLanguage.Reference, XamlLanguage.Static, XamlLanguage.Type, XamlLanguage.String, XamlLanguage.Double, XamlLanguage.Int16, XamlLanguage.Int32, XamlLanguage.Int64, XamlLanguage.Boolean, XamlLanguage.XData, XamlLanguage.Object, XamlLanguage.Char, XamlLanguage.Single, XamlLanguage.Byte, XamlLanguage.Decimal, XamlLanguage.Uri, XamlLanguage.TimeSpan }, types); 275Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 379Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 418Assert.Equal(new Type[] { typeof(MemberDefinition) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 431Assert.Equal(new Type[] { typeof(Attribute) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 457Assert.Equal(new Type[] { typeof(object) }, directive.Type.TypeArguments.Select(t => t.UnderlyingType)); 584Assert.Equal(new XamlDirective[] { XamlLanguage.Arguments, XamlLanguage.AsyncRecords, XamlLanguage.Class, XamlLanguage.Code, XamlLanguage.ClassModifier, XamlLanguage.ConnectionId, XamlLanguage.FactoryMethod, XamlLanguage.FieldModifier, XamlLanguage.Key, XamlLanguage.Initialization, XamlLanguage.Items, XamlLanguage.Members, XamlLanguage.ClassAttributes, XamlLanguage.Name, XamlLanguage.PositionalParameters, XamlLanguage.Shared, XamlLanguage.Subclass, XamlLanguage. SynchronousMode, XamlLanguage.TypeArguments, XamlLanguage.Uid, XamlLanguage.UnknownContent, XamlLanguage.Base, XamlLanguage.Lang, XamlLanguage.Space }, directives);
System\Xaml\XamlSchemaContextTests.cs (2)
64Assert.Equal(referenceAssemblies, context.ReferenceAssemblies); 92Assert.Equal(referenceAssemblies, context.ReferenceAssemblies);
VBCSCompiler.UnitTests (10)
BuildClientTests.cs (10)
219Assert.Equal(new[] { "test.cs" }, _parsedArgs); 230Assert.Equal(new[] { "test.cs" }, _parsedArgs); 235Assert.Equal(new[] { "test.cs" }, _parsedArgs); 240Assert.Equal(new[] { "test.cs" }, _parsedArgs); 260Assert.Equal(new[] { optionPrefix + "sharedstart", "test.cs" }, _parsedArgs); 271Assert.Equal(new[] { "test.cs" }, _parsedArgs); 277Assert.Equal(new[] { "test.cs" }, _parsedArgs); 305Assert.Equal(new[] { optionPrefix + "keepalivestart", "test.cs" }, _parsedArgs); 315Assert.Equal(new[] { "test.cs" }, _parsedArgs); 321Assert.Equal(new[] { "test.cs" }, _parsedArgs);
WindowsBase.Tests (55)
System\ComponentModel\GroupDescriptionTests.cs (14)
152Assert.Equal(new[] { "SortDescriptions", "CustomSort" }, properties); 158Assert.Equal(new[] { "SortDescriptions", "CustomSort", "CustomSort" }, properties); 165Assert.Equal(new[] { "SortDescriptions", "CustomSort", "CustomSort" }, properties); 188Assert.Equal(new[] { "SortDescriptions", "CustomSort" }, properties); 194Assert.Equal(new[] { "SortDescriptions", "CustomSort", "CustomSort" }, properties); 201Assert.Equal(new[] { "SortDescriptions", "CustomSort", "CustomSort" }, properties); 368Assert.Equal(new[] { description1 }, description.SortDescriptions.Cast<SortDescription>()); 407Assert.Equal(new[] { description1 }, description.SortDescriptions.Cast<SortDescription>()); 420Assert.Equal(new[] { description2 }, description.SortDescriptions.Cast<SortDescription>()); 446Assert.Equal(new[] { description1 }, description.SortDescriptions.Cast<SortDescription>()); 449Assert.Equal(new[] { "CustomSort", "SortDescriptions" }, properties); 456Assert.Equal(new[] { "CustomSort", "SortDescriptions", "SortDescriptions" }, properties); 461Assert.Equal(new[] { description2 }, description.SortDescriptions.Cast<SortDescription>()); 464Assert.Equal(new[] { "CustomSort", "SortDescriptions", "SortDescriptions" }, properties);
System\ComponentModel\SortDescriptionCollectionTests.cs (14)
92Assert.Equal(new[] { description1 }, events[0].OldItems!.Cast<SortDescription>()); 96Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>()); 177Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 191Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 256Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 270Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>()); 345Assert.Equal(new[] { description1 }, events[0].NewItems!.Cast<SortDescription>()); 359Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>()); 584Assert.Equal(new[] { description2 }, events[0].OldItems!.Cast<SortDescription>()); 596Assert.Equal(new[] { description3 }, events[1].OldItems!.Cast<SortDescription>()); 670Assert.Equal(new[] { description2 }, events[0].OldItems!.Cast<SortDescription>()); 682Assert.Equal(new[] { description3 }, events[1].OldItems!.Cast<SortDescription>()); 748Assert.Equal(new[] { description1 }, events[0].OldItems!.Cast<SortDescription>()); 752Assert.Equal(new[] { description2 }, events[1].NewItems!.Cast<SortDescription>());
System\IO\Packaging\PackageDigitalSignatureManagerTests.cs (2)
281Assert.Equal(new Uri[] { new Uri("/package/services/digital-signature/origin.psdsor", UriKind.Relative), new Uri("/package/services/digital-signature/_rels/origin.psdsor.rels", UriKind.Relative) }, parts); 288Assert.Equal(new Uri[] { new Uri("/package/services/digital-signature/origin.psdsor", UriKind.Relative), new Uri("/package/services/digital-signature/_rels/origin.psdsor.rels", UriKind.Relative), new Uri("/package/services/digital-signature/origin.psdsor", UriKind.Relative), new Uri("/package/services/digital-signature/_rels/origin.psdsor.rels", UriKind.Relative) }, parts);
System\Windows\Data\DataSourceProviderTests.cs (5)
1674Assert.Equal(new[] { "Data", "Error" }, propertyNames); 1680Assert.Equal(new[] { "Data", "Error", "Data" }, propertyNames); 1687Assert.Equal(new[] { "Data", "Error", "Data", "Data", "Error" }, propertyNames); 1693Assert.Equal(new[] { "Data", "Error", "Data", "Data", "Error", "Data", "Error" }, propertyNames); 1701Assert.Equal(new[] { "Data", "Error", "Data", "Data", "Error", "Data", "Error" }, propertyNames);
System\Windows\PropertyMetadataTests.cs (6)
398Assert.Equal(new[] { "Event3", "Event4" }, events); 416Assert.Equal(new[] { "Event1", "Event2" }, events); 436Assert.Equal(new[] { "Event3", "Event4", "Event1", "Event2" }, events); 454Assert.Equal(new[] { "Event3", "Event4" }, events); 472Assert.Equal(new[] { "Event1", "Event2" }, events); 492Assert.Equal(new[] { "Event1", "Event2" }, events);
System\Windows\WeakEventManagerTests.cs (14)
180Assert.Equal(new string[] { "listener1", "listener2" }, events); 218Assert.Equal(new string[] { "handler1", "handler2" }, events); 279Assert.Equal(new string[] { "handler1", "listener1", "handler2", "listener2" }, events); 319Assert.Equal(new string[] { "listener2" }, events); 322Assert.Equal(new string[] { "listener2", "listener1" }, events); 469Assert.Equal(new string[] { "listener1", "listener2" }, events); 504Assert.Equal(new string[] { "handler1", "handler2" }, events); 563Assert.Equal(new string[] { "handler1", "listener1", "handler2", "listener2" }, events); 4338Assert.Equal(new string[] { "listener1", "listener2" }, events); 4371Assert.Equal(new string[] { "handler1", "handler2" }, events); 4428Assert.Equal(new string[] { "handler1", "listener1", "handler2", "listener2" }, events); 5834Assert.Equal(new string[] { "listener1", "listener2" }, events); 5878Assert.Equal(new string[] { "handler1", "handler2", "handler3" }, events); 5946Assert.Equal(new string[] { "handler1", "listener1", "handler2", "listener2", "handler3" }, events);