2539 references to First
Aspire.Components.Common.Tests (2)
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (3)
Aspire.Hosting (1)
Aspire.Hosting.AWS (1)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.Functions (1)
Aspire.Hosting.Azure.Tests (2)
Aspire.Hosting.Redis.Tests (2)
Aspire.Hosting.Tests (4)
Aspire.Hosting.Valkey.Tests (1)
Aspire.Playground.Tests (1)
BasicWebSite (1)
blazor-devserver (1)
CodeGenerator (1)
Contract.Data.IntegrationTests (1)
CSharpSyntaxGenerator (3)
CustomAuthorizationFailureResponse (1)
dotnet-dev-certs (2)
dotnet-openapi (2)
dotnet-svcutil-lib (5)
dotnet-svcutil-lib.Tests (1)
http2cat (1)
IdeBenchmarks (3)
IdeCoreBenchmarks (2)
IIS.FunctionalTests (8)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IISExpress.FunctionalTests (5)
installer.tasks (1)
Interop.FunctionalTests (2)
Microsoft.AspNetCore.Analyzers.Test (25)
Microsoft.AspNetCore.App.Analyzers.Test (5)
Microsoft.AspNetCore.Authentication.Core (1)
Microsoft.AspNetCore.Authentication.Core.Test (6)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Authentication.Test (74)
CertificateTests.cs (20)
482Assert.Equal(Certificates.SelfSignedValidWithNoEku.Issuer, actual.First().Value);
486Assert.Equal(Certificates.SelfSignedValidWithNoEku.Thumbprint, actual.First().Value);
495Assert.Equal(Certificates.SelfSignedValidWithNoEku.SubjectName.Name, actual.First().Value);
505Assert.Equal(Certificates.SelfSignedValidWithNoEku.SerialNumber, actual.First().Value);
515Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.DnsName, false), actual.First().Value);
525Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.EmailName, false), actual.First().Value);
535Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.SimpleName, false), actual.First().Value);
545Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.UpnName, false), actual.First().Value);
555Assert.Equal(Certificates.SelfSignedValidWithNoEku.GetNameInfo(X509NameType.UrlName, false), actual.First().Value);
611Assert.Equal(Expected, name.First().Value);
614Assert.Equal("1", count.First().Value);
630Assert.Equal(Expected, name.First().Value);
634Assert.Equal(expected, count.First().Value);
681Assert.Equal(Expected, actual.First().Value);
738Assert.Equal(Expected, name.First().Value);
741Assert.Equal("1", count.First().Value);
757Assert.Equal(Expected, name.First().Value);
761Assert.Equal(expected, count.First().Value);
779Assert.Equal(Expected, name.First().Value);
784Assert.Equal(laterExpected, count.First().Value);
GoogleTests.cs (16)
402Assert.Equal("/error?FailureMessage=AccessDenied", transaction.Response.Headers.GetValues("Location").First());
438Assert.Equal("https://example.com/custom-denied-page?rurl=http%3A%2F%2Fwww.google.com%2F", transaction.Response.Headers.GetValues("Location").First());
481Assert.StartsWith("/error?FailureMessage=", transaction.Response.Headers.GetValues("Location").First());
520Assert.Equal("/error?FailureMessage=itfailed" + UrlEncoder.Default.Encode(";Description=whyitfailed;Uri=https://example.com/fail"), transaction.Response.Headers.GetValues("Location").First());
559Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
630transaction.Response.Headers.GetValues("Location").First());
682transaction.Response.Headers.GetValues("Location").First());
722Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
762Assert.Equal("/", transaction.Response.Headers.GetValues("Location").First());
810Assert.Equal("/foo", transaction.Response.Headers.GetValues("Location").First());
854transaction.Response.Headers.GetValues("Location").First());
883Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
927Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
971Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
1008Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
1082Assert.Equal("/challenge", transaction.Response.Headers.GetValues("Location").First());
Microsoft.AspNetCore.Authorization.Test (5)
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.Endpoints.Tests (9)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Components.Tests (7)
Microsoft.AspNetCore.DataProtection.Tests (4)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
Microsoft.AspNetCore.Diagnostics.Tests (14)
ExceptionHandlerTest.cs (13)
190Assert.Equal("no-cache", values.First());
193Assert.Equal("-1", values.First());
246Assert.Equal("no-cache", values.First());
249Assert.Equal("-1", values.First());
299Assert.Equal("max-age=3600", values.First());
302Assert.Equal("max-age=3600", values.First());
305Assert.Equal(expiresTime, values.First());
308Assert.Equal("abcdef", values.First());
373Assert.Equal("no-cache", values.First());
441Assert.Equal("max-age=3600", values.First());
444Assert.Equal("max-age=3600", values.First());
447Assert.Equal(expiresTime, values.First());
450Assert.Equal("abcdef", values.First());
Microsoft.AspNetCore.Grpc.Swagger (2)
Microsoft.AspNetCore.Hosting.Tests (4)
Microsoft.AspNetCore.Http.Connections.Tests (3)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results.Tests (4)
Microsoft.AspNetCore.HttpsPolicy.Tests (6)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Identity.Specification.Tests (1)
Microsoft.AspNetCore.Identity.Test (4)
Microsoft.AspNetCore.JsonPatch.Tests (3)
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Core.Test (3)
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.IntegrationTests (9)
Microsoft.AspNetCore.Mvc.Localization.Test (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (5)
Microsoft.AspNetCore.Mvc.Razor.Test (3)
Microsoft.AspNetCore.Mvc.RazorPages.Test (8)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (14)
Microsoft.AspNetCore.OpenApi.Tests (18)
Services\OpenApiSchemaService\OpenApiSchemaService.PolymorphicSchemas.cs (14)
41Assert.Equal("triangle", ((OpenApiString)triangleSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
43Assert.Equal("square", ((OpenApiString)squareSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
80Assert.Equal(0, ((OpenApiInteger)citySchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
84Assert.Equal(1, ((OpenApiInteger)timeSeriesSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
88Assert.Equal(2, ((OpenApiInteger)newsSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
123Assert.Equal("student", ((OpenApiString)citySchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
127Assert.Equal("teacher", ((OpenApiString)timeSeriesSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
159Assert.Equal("paint", ((OpenApiString)paintSchema.Properties["$type"].Enum.First()).Value);
163Assert.Equal("fabric", ((OpenApiString)fabricSchema.Properties["$type"].Enum.First()).Value);
211Assert.Equal("dog", ((OpenApiString)dogSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
215Assert.Equal("cat", ((OpenApiString)catSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
219Assert.Equal("pet", ((OpenApiString)petSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
292Assert.Equal("manager", ((OpenApiString)managerSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
294Assert.Equal("employee", ((OpenApiString)employeeSchema.Properties[schema.Discriminator.PropertyName].Enum.First()).Value);
Microsoft.AspNetCore.Owin.Tests (2)
Microsoft.AspNetCore.RateLimiting.Tests (1)
Microsoft.AspNetCore.RequestDecompression.Tests (2)
Microsoft.AspNetCore.ResponseCompression (1)
Microsoft.AspNetCore.ResponseCompression.Tests (22)
ResponseCompressionMiddlewareTest.cs (22)
110AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
111AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type.");
112AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, "No matching response compression provider found.");
194AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
196AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, $"Response compression is not enabled for the Content-Type '{expected}'.");
282AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
283AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, $"Response compression is not enabled for the Content-Type '{contentType}'.");
359AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
360AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type.");
361AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, "No matching response compression provider found.");
384AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
385AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type.");
386AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, "No matching response compression provider found.");
396AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
397AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, "Response compression is not enabled for the Content-Type 'text/custom'.");
410AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
411AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, "Response compression disabled due to the Content-Range header.");
428AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
429AssertLog(logMessages.Skip(1).First(), LogLevel.Debug, "Response compression disabled due to the Content-Encoding header.");
1339AssertLog(logMessages.First(), LogLevel.Trace, "This request accepts compression.");
1340AssertLog(logMessages.Skip(1).First(), LogLevel.Trace, "Response compression is available for this Content-Type.");
1341AssertLog(logMessages.Skip(2).First(), LogLevel.Debug, $"The response will be compressed with '{provider}'.");
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
Microsoft.AspNetCore.Routing.Tests (8)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (19)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
Microsoft.AspNetCore.Session.Tests (10)
Microsoft.AspNetCore.Shared.Tests (15)
SecurityHelperTests.cs (11)
45Assert.Equal("Test3", user.Identities.Skip(0).First().Name);
46Assert.Equal("Test2", user.Identities.Skip(1).First().Name);
47Assert.Equal("Test1", user.Identities.Skip(2).First().Name);
75Assert.Equal(newEmptyIdentity, user.Identities.Skip(0).First());
76Assert.Equal(identityTwo, user.Identities.Skip(1).First());
77Assert.Equal(identityNoAuthTypeWithClaim, user.Identities.Skip(2).First());
78Assert.Equal(identityEmptyWithAuthType, user.Identities.Skip(3).First());
87Assert.Equal("Test3", user.Identities.Skip(0).First().Name);
88Assert.Equal(identityTwo, user.Identities.Skip(1).First());
89Assert.Equal(identityNoAuthTypeWithClaim, user.Identities.Skip(2).First());
90Assert.Equal(identityEmptyWithAuthType, user.Identities.Skip(3).First());
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (5)
Microsoft.AspNetCore.SignalR.Tests (5)
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
Microsoft.AspNetCore.TestHost.Tests (8)
Microsoft.AspNetCore.Testing.Tests (1)
Microsoft.AspNetCore.WebSockets.Tests (1)
Microsoft.Build (10)
Microsoft.Build.Engine.OM.UnitTests (156)
Definition\Project_Tests.cs (23)
612object.ReferenceEquals(imports.First().ImportingElement, xml.Imports.ElementAt(0)).ShouldBeTrue();
616object.ReferenceEquals(imports.First().ImportedProject, ProjectRootElement.Open(importPath)).ShouldBeTrue();
653project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(
685project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
686projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj\i386\foo.dll"));
690project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
691projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), @"obj/i386/foo.dll"));
721project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
722projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
757project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
758projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar);
796project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory /* remove c:\ */, "obj", "i386"));
797projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory /* remove c:\ */, "obj", "i386"));
1447var importFile = projectFiles.CreatedFiles.First();
1463project.Imports.First().ImportedProject.ShouldBeSameAs(import);
1504project.GetItems("I").First().EvaluatedInclude.ShouldBe(i);
1505project.GetItems("I").First().GetMetadataValue("M").ShouldBe(m);
1512var importFile = projectFiles.CreatedFiles.First();
1548project.Imports.First().ImportedProject.ShouldBeSameAs(import);
1549newProject.Imports.First().ImportedProject.ShouldBeSameAs(import);
1590project.GetItems("I").First().EvaluatedInclude.ShouldBe(i);
1591project.GetItems("I").First().GetMetadataValue("M").ShouldBe(m);
1600var projectFile = projectFiles.CreatedFiles.First();
Definition\ProjectItem_Tests.cs (85)
1199project.GetItems("i").First().SetMetadataValue("m", "m2");
1201ProjectItem item1 = project.GetItems("i").First();
1202ProjectItem item2 = project.GetItems("j").First();
1242ProjectItem item1 = project.GetItems("i").First();
1245ProjectItem item2 = project.GetItems("j").First();
1293ProjectItem item1 = project.GetItems("i").First();
1295ProjectItem item2 = project.GetItems("j").First();
1363Assert.Equal("l0", project.GetItems("i").First().GetMetadataValue("l"));
1364Assert.Equal("m1", project.GetItems("i").First().GetMetadataValue("m"));
1365Assert.Equal("n1", project.GetItems("i").First().GetMetadataValue("n"));
1366Assert.Equal("", project.GetItems("i").First().GetMetadataValue("o"));
1367Assert.Equal("", project.GetItems("i").First().GetMetadataValue("p"));
1369Assert.Equal("l0", project.GetItems("j").First().GetMetadataValue("l"));
1370Assert.Equal("m1", project.GetItems("j").First().GetMetadataValue("m"));
1371Assert.Equal("n1", project.GetItems("j").First().GetMetadataValue("n"));
1372Assert.Equal("o2", project.GetItems("j").First().GetMetadataValue("o"));
1373Assert.Equal("p2", project.GetItems("j").First().GetMetadataValue("p"));
1375Assert.Equal("l0", project.GetItems("k").First().GetMetadataValue("l"));
1376Assert.Equal("m1", project.GetItems("k").First().GetMetadataValue("m"));
1377Assert.Equal("n1", project.GetItems("k").First().GetMetadataValue("n"));
1378Assert.Equal("o2", project.GetItems("k").First().GetMetadataValue("o"));
1379Assert.Equal("p4", project.GetItems("k").First().GetMetadataValue("p"));
1381Assert.Equal("l0", project.GetItems("l").First().GetMetadataValue("l"));
1382Assert.Equal("m1", project.GetItems("l").First().GetMetadataValue("m"));
1383Assert.Equal("n1", project.GetItems("l").First().GetMetadataValue("n"));
1384Assert.Equal("o2", project.GetItems("l").First().GetMetadataValue("o"));
1385Assert.Equal("p4", project.GetItems("l").First().GetMetadataValue("p"));
1393Assert.Equal("l0", project.GetItems("m").First().GetMetadataValue("l"));
1394Assert.Equal("m1", project.GetItems("m").First().GetMetadataValue("m"));
1395Assert.Equal("n1", project.GetItems("m").First().GetMetadataValue("n"));
1396Assert.Equal("o4", project.GetItems("m").First().GetMetadataValue("o"));
1397Assert.Equal("p4", project.GetItems("m").First().GetMetadataValue("p"));
1406Assert.True(Object.ReferenceEquals(project.GetItems("i").First().GetMetadata("l").Xml, project.GetItems("m").First().GetMetadata("l").Xml));
1407Assert.True(Object.ReferenceEquals(project.GetItems("i").First().GetMetadata("m").Xml, project.GetItems("m").First().GetMetadata("m").Xml));
1408Assert.True(Object.ReferenceEquals(project.GetItems("i").First().GetMetadata("n").Xml, project.GetItems("m").First().GetMetadata("n").Xml));
1409Assert.True(Object.ReferenceEquals(project.GetItems("j").First().GetMetadata("o").Xml, project.GetItems("k").First().GetMetadata("o").Xml));
1410Assert.True(Object.ReferenceEquals(project.GetItems("k").First().GetMetadata("p").Xml, project.GetItems("m").First().GetMetadata("p").Xml));
1411Assert.True(!Object.ReferenceEquals(project.GetItems("j").First().GetMetadata("p").Xml, project.GetItems("m").First().GetMetadata("p").Xml));
1461Assert.Equal("l0", project.GetItems("i").First().GetMetadataValue("l"));
1462Assert.Equal("m1", project.GetItems("i").First().GetMetadataValue("m"));
1463Assert.Equal("n1", project.GetItems("i").First().GetMetadataValue("n"));
1464Assert.Equal("", project.GetItems("i").First().GetMetadataValue("o"));
1465Assert.Equal("", project.GetItems("i").First().GetMetadataValue("p"));
1467Assert.Equal("l0", project.GetItems("j").First().GetMetadataValue("l"));
1468Assert.Equal("m1", project.GetItems("j").First().GetMetadataValue("m"));
1469Assert.Equal("n1", project.GetItems("j").First().GetMetadataValue("n"));
1470Assert.Equal("o2", project.GetItems("j").First().GetMetadataValue("o"));
1471Assert.Equal("p2", project.GetItems("j").First().GetMetadataValue("p"));
1473Assert.Equal("l0", project.GetItems("k").First().GetMetadataValue("l"));
1474Assert.Equal("m1", project.GetItems("k").First().GetMetadataValue("m"));
1475Assert.Equal("n1", project.GetItems("k").First().GetMetadataValue("n"));
1476Assert.Equal("o2", project.GetItems("k").First().GetMetadataValue("o"));
1477Assert.Equal("p4", project.GetItems("k").First().GetMetadataValue("p"));
1479Assert.Equal("l0", project.GetItems("l").First().GetMetadataValue("l"));
1480Assert.Equal("m1", project.GetItems("l").First().GetMetadataValue("m"));
1481Assert.Equal("n1", project.GetItems("l").First().GetMetadataValue("n"));
1482Assert.Equal("o2", project.GetItems("l").First().GetMetadataValue("o"));
1483Assert.Equal("p4", project.GetItems("l").First().GetMetadataValue("p"));
1491Assert.Equal("l0", project.GetItems("m").First().GetMetadataValue("l"));
1492Assert.Equal("m1", project.GetItems("m").First().GetMetadataValue("m"));
1493Assert.Equal("n1", project.GetItems("m").First().GetMetadataValue("n"));
1494Assert.Equal("o4", project.GetItems("m").First().GetMetadataValue("o"));
1495Assert.Equal("p4", project.GetItems("m").First().GetMetadataValue("p"));
1504Assert.True(Object.ReferenceEquals(project.GetItems("i").First().GetMetadata("l").Xml, project.GetItems("m").First().GetMetadata("l").Xml));
1505Assert.True(Object.ReferenceEquals(project.GetItems("i").First().GetMetadata("m").Xml, project.GetItems("m").First().GetMetadata("m").Xml));
1506Assert.True(Object.ReferenceEquals(project.GetItems("i").First().GetMetadata("n").Xml, project.GetItems("m").First().GetMetadata("n").Xml));
1507Assert.True(Object.ReferenceEquals(project.GetItems("j").First().GetMetadata("o").Xml, project.GetItems("k").First().GetMetadata("o").Xml));
1508Assert.True(Object.ReferenceEquals(project.GetItems("k").First().GetMetadata("p").Xml, project.GetItems("m").First().GetMetadata("p").Xml));
1509Assert.True(!Object.ReferenceEquals(project.GetItems("j").First().GetMetadata("p").Xml, project.GetItems("m").First().GetMetadata("p").Xml));
2224items.First().SetMetadataValue("M2", "V2", true);
2245var metadataElements = items.First().Xml.Metadata;
2284items.First().SetMetadataValue("M1", "V2", true);
2301var metadataElements = items.First().Xml.Metadata;
Microsoft.Build.Engine.UnitTests (331)
BackEnd\IntrinsicTask_Tests.cs (78)
252Assert.Equal("a1", i1Group.First().EvaluatedInclude);
253Assert.Equal("b1", i2Group.First().EvaluatedInclude);
447Assert.Equal("m1", group.First().GetMetadataValue("m1"));
471Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
472Assert.Equal("m2", group.First().GetMetadataValue("m2"));
473Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
498Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
499Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
500Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
524Assert.Equal("m1", group.First().GetMetadataValue("m1"));
525Assert.Equal("m2", group.First().GetMetadataValue("m2"));
526Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
553Assert.Equal("m1", group.First().GetMetadataValue("m1"));
554Assert.Equal("m2", group.First().GetMetadataValue("m2"));
555Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
577Assert.Equal("m1", group.First().GetMetadataValue("m1"));
601Assert.Equal("m1", group.First().GetMetadataValue("m1"));
602Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
603Assert.Equal("m3", group.First().GetMetadataValue("m3"));
627Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
628Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
629Assert.Equal("m3", group.First().GetMetadataValue("m3"));
656Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
657Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
658Assert.Equal("m3", group.First().GetMetadataValue("m3"));
726Assert.Equal("a1", i1Group.First().EvaluatedInclude);
727Assert.Equal("m1", i1Group.First().GetMetadataValue("m"));
752Assert.Equal("v0", i1Group.First().EvaluatedInclude);
824Assert.Equal("a.cpp", i1Group.First().EvaluatedInclude);
825Assert.Equal("a.obj", i2Group.First().EvaluatedInclude);
847Assert.Equal("a.cpp", i2Group.First().EvaluatedInclude);
848Assert.Equal("a.obj", i2Group.First().GetMetadataValue("m"));
869Assert.Equal("a1", i1Group.First().EvaluatedInclude);
870Assert.Equal("b2", i2Group.First().EvaluatedInclude);
895Assert.Equal("a1", i1Group.First().EvaluatedInclude);
896Assert.Equal("b1", i2Group.First().EvaluatedInclude);
1004Assert.Equal("v0", i1Group.First().EvaluatedInclude);
1005Assert.Equal("a2", i2Group.First().EvaluatedInclude);
1032Assert.Equal("a1", i1Group.First().EvaluatedInclude);
1034Assert.Equal("m1", i2Group.First().EvaluatedInclude);
1037Assert.Equal("m1", i1Group.First().GetMetadataValue("m"));
1066Assert.Equal("a1", i2Group.First().EvaluatedInclude);
1069Assert.Equal("n1", i2Group.First().GetMetadataValue("n"));
1123Assert.Equal("b1", i1Group.First().EvaluatedInclude);
1126Assert.Equal("m1", i1Group.First().GetMetadataValue("m"));
1130Assert.Equal("m1", i2Group.First().EvaluatedInclude);
1472<i Include='" + oldFiles.First() + "'><output>" + newFiles.First() + @"</output></i>
1491logger.AssertLogContains(new string[] { "start:[]", "end:[" + newFiles.ElementAt(1) + "]", "final:[" + oldFiles.First() + ";" + newFiles.ElementAt(1) + "]" });
1514<i Include='" + oldFiles.First() + "'><output>" + newFiles.First() + @"</output></i>
1552string oldInput = oldFiles.First();
1555string newOutput = newFiles.First();
2150Assert.Equal("a1", i0Group.First().EvaluatedInclude);
2231Assert.Equal("x", i1Group.First().EvaluatedInclude);
2274Assert.Equal("A_PCH", linkGroup.First().EvaluatedInclude);
2416Assert.Equal("m1", p.ItemsToBuildWith["i0"].First().GetMetadataValue("m"));
2454Assert.Equal("a1", p.ItemsToBuildWith["i0"].First().EvaluatedInclude);
2545Assert.Equal("other", lookup.GetItems("i1").First().EvaluatedInclude);
2856ProjectItemInstance item = lookup.GetItems("i1").First();
2914ProjectItemInstance item = lookup.GetItems("i1").First();
2965ProjectItemInstance item1 = lookup.GetItems("i1").First();
2995ProjectItemInstance item1 = lookup.GetItems("i1").First();
3044ProjectItemInstance item1 = lookup.GetItems("i1").First();
3075ProjectItemInstance item1 = lookup.GetItems("i1").First();
3205ProjectItemInstance item = p.ItemsToBuildWith["i0"].First();
3209item = p.ItemsToBuildWith["i0"].First();
3253Assert.Equal("m0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("m"));
3254Assert.Equal("n0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("n"));
3255Assert.Equal("m1", p.ItemsToBuildWith["i1"].First().GetMetadataValue("m"));
3256Assert.Equal("n1", p.ItemsToBuildWith["i1"].First().GetMetadataValue("n"));
3261Assert.Equal("m0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("m"));
3262Assert.Equal("n0", p.ItemsToBuildWith["i0"].First().GetMetadataValue("n"));
3546Assert.Equal("gen.obj", instance.GetItems("CppCompile").First().GetMetadataValue("ObjectFile"));
3562<i Include='" + files.First() + "'><output>" + files.ElementAt(1) + @"</output></i>
3582logger.AssertLogContains(new string[] { "final:[" + files.First() + "]" });
3955ProjectTargetInstanceChild targetChild = projectInstance.Targets["t"].Children.First();
3990var targetChild = projectInstance.Targets["t"].Children.First();
BackEnd\Lookup_Tests.cs (94)
38Assert.Equal("a2", lookup.GetItems("i1").First().EvaluatedInclude);
39Assert.Equal("a(2", lookup.GetItems("i2").First().EvaluatedInclude);
58Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude);
59Assert.Equal("a;1", lookup.GetItems("i2").First().EvaluatedInclude);
88Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude);
92Assert.Equal("a1", table1["i1"].First().EvaluatedInclude);
99Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude);
103Assert.Equal("a1", table1["i1"].First().EvaluatedInclude);
111Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude);
116Assert.Equal("a1", table1["i1"].First().EvaluatedInclude);
123Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude);
128Assert.Equal("a1", table1["i1"].First().EvaluatedInclude);
135Assert.Equal("a1", lookup.GetItems("i1").First().EvaluatedInclude);
140Assert.Equal("a1", table1["i1"].First().EvaluatedInclude);
272Assert.Equal("a2", lookup.GetItems("i1").First().EvaluatedInclude);
287Assert.Equal("a1", table1["i1"].First().EvaluatedInclude);
423Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
424Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
438Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
439Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
442Assert.Equal("m3", group.First().GetMetadataValue("m3"));
450Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
451Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
454Assert.Equal("m3", group.First().GetMetadataValue("m3"));
488Assert.Equal("m1", group.First().GetMetadataValue("m1"));
489Assert.Equal("m2", group.First().GetMetadataValue("m2"));
490Assert.Equal("m3", group.First().GetMetadataValue("m3"));
503Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
504Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
505Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
513Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
514Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
515Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
548Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
549Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
552Assert.Equal("m3", group.First().GetMetadataValue("m3"));
566Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
567Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
568Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
571Assert.Equal("m4", group.First().GetMetadataValue("m4"));
579Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
580Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
581Assert.Equal(String.Empty, group.First().GetMetadataValue("m3"));
584Assert.Equal("m4", group.First().GetMetadataValue("m4"));
619Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
620Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
623Assert.Equal("m3", group.First().GetMetadataValue("m3"));
637Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
638Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
641Assert.Equal("m3", group.First().GetMetadataValue("m3"));
649Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
650Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
653Assert.Equal("m3", group.First().GetMetadataValue("m3"));
686Assert.Equal("m1", group.First().GetMetadataValue("m1"));
689Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
697Assert.Equal("m1", group.First().GetMetadataValue("m1"));
700Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
708Assert.Equal("m1", group.First().GetMetadataValue("m1"));
711Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
740Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
741Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
749Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
750Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
758Assert.Equal(String.Empty, group.First().GetMetadataValue("m1"));
759Assert.Equal(String.Empty, group.First().GetMetadataValue("m2"));
788Assert.Equal("m2", group.First().GetMetadataValue("m"));
798Assert.Equal("m2", group.First().GetMetadataValue("m"));
809Assert.Equal("m2", group.First().GetMetadataValue("m"));
851Assert.Equal("m3", group.First().GetMetadataValue("m"));
852Assert.Equal("n2", group.First().GetMetadataValue("n"));
853Assert.Equal("o3", group.First().GetMetadataValue("o"));
888Assert.Equal("m2", group.First().GetMetadataValue("m"));
913Assert.Equal("m1", group.First().GetMetadataValue("m"));
914Assert.Equal("n1", group.First().GetMetadataValue("n"));
915Assert.Equal("o1", group.First().GetMetadataValue("o"));
928Assert.Equal("m2", foundGroup.First().GetMetadataValue("m"));
929Assert.Equal("n2", foundGroup.First().GetMetadataValue("n"));
930Assert.Equal("o1", foundGroup.First().GetMetadataValue("o"));
940Assert.Equal("m2", foundGroup.First().GetMetadataValue("m"));
941Assert.Equal("n3", foundGroup.First().GetMetadataValue("n"));
942Assert.Equal("o1", foundGroup.First().GetMetadataValue("o"));
954Assert.Equal("m2", foundGroup.First().GetMetadataValue("m"));
955Assert.Equal("n3", foundGroup.First().GetMetadataValue("n"));
956Assert.Equal("o1", foundGroup.First().GetMetadataValue("o"));
989Assert.Equal("m2", group.First().GetMetadataValue("m"));
999Assert.Equal("m2", group.First().GetMetadataValue("m"));
1046ProjectItemInstance item1b = group2.First();
1058Assert.Equal("m3", group4.First().GetMetadataValue("m"));
1066Assert.Equal("m3", group5.First().GetMetadataValue("m"));
1097ProjectItemInstance item1b = group2.First();
1109Assert.Equal("m3", group4.First().GetMetadataValue("m"));
1117Assert.Equal("m3", group5.First().GetMetadataValue("m"));
1150ProjectItemInstance item1b = group2.First();
1187ProjectItemInstance item1b = group2.First();
Definition\ItemDefinitionGroup_Tests.cs (11)
1462Assert.Equal("m1", p.GetItems("j").First().GetMetadataValue("m"));
1520Assert.Equal("im1", p.GetItems("i").First().GetMetadataValue("m"));
1521Assert.Equal("in1", p.GetItems("i").First().GetMetadataValue("n"));
1522Assert.Equal("io2", p.GetItems("i").First().GetMetadataValue("o"));
1523Assert.Equal("ip1", p.GetItems("i").First().GetMetadataValue("p"));
1524Assert.Equal("", p.GetItems("i").First().GetMetadataValue("q"));
1526Assert.Equal("jm3", p.GetItems("j").First().GetMetadataValue("m"));
1527Assert.Equal("jn3", p.GetItems("j").First().GetMetadataValue("n"));
1528Assert.Equal("", p.GetItems("j").First().GetMetadataValue("o"));
1529Assert.Equal("", p.GetItems("j").First().GetMetadataValue("p"));
1530Assert.Equal("jq3", p.GetItems("j").First().GetMetadataValue("q"));
EscapingInProjects_Tests.cs (12)
368Assert.Equal("*.weirdo", newItems.First().UnevaluatedInclude);
369Assert.Equal("foo%3Bbar.weirdo", newItems.First().EvaluatedInclude);
370Assert.Equal("foo%253Bbar.weirdo", Project.GetEvaluatedItemIncludeEscaped(newItems.First()));
478Assert.Equal("MyWildCard", newItems.First().ItemType); // "Newly added item should have correct ItemType"
479Assert.Equal("*.weirdo", newItems.First().UnevaluatedInclude); // "Newly added item should have correct UnevaluatedInclude"
480Assert.Equal("foo%253bbar.weirdo", Project.GetEvaluatedItemIncludeEscaped(newItems.First())); // "Newly added item should have correct EvaluatedIncludeEscaped"
481Assert.Equal("foo%3bbar.weirdo", newItems.First().EvaluatedInclude); // "Newly added item should have correct EvaluatedInclude"
520Assert.Equal("MyWildCard", newItems.First().ItemType); // "Newly added item should have correct ItemType"
521Assert.Equal("*.AAA%253bBBB", newItems.First().UnevaluatedInclude); // "Newly added item should have correct UnevaluatedInclude"
522Assert.Equal("foo.AAA%253bBBB", Project.GetEvaluatedItemIncludeEscaped(newItems.First())); // "Newly added item should have correct EvaluatedIncludeEscaped"
523Assert.Equal("foo.AAA%3bBBB", newItems.First().EvaluatedInclude); // "Newly added item should have correct EvaluatedInclude"
654Assert.Equal(projectAbsolutePath, items.First().GetMetadataValue("FullPath"));
Graph\ProjectGraph_Tests.cs (47)
67projectGraph.ProjectNodes.First().ProjectInstance.FullPath.ShouldBe(entryProject.Path);
118projectGraph.ProjectNodes.First().ProjectInstance.FullPath.ShouldBe(entryProject.Path);
409GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ShouldNotBe(GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First());
410GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.FullPath.ShouldEndWith("4.proj");
411GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.GlobalProperties.ShouldBeSameIgnoringOrder(EmptyGlobalProperties);
412GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First().ProjectInstance.FullPath.ShouldEndWith("4.proj");
413GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First().ProjectInstance.GlobalProperties.Count.ShouldBeGreaterThan(1);
466var node4A = GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First();
467var node4B = GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First();
472node4A.ProjectReferences.First().ShouldBe(node4B.ProjectReferences.First());
503GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ShouldBe(GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First());
538GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ShouldBe(GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.First());
539GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.FullPath.ShouldEndWith("5.proj");
540GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("bar");
543GetFirstNodeWithProjectNumber(graph, 4).ProjectReferences.First().ShouldNotBe(GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First());
544GetFirstNodeWithProjectNumber(graph, 4).ProjectReferences.First().ProjectInstance.FullPath.ShouldEndWith("5.proj");
545GetFirstNodeWithProjectNumber(graph, 4).ProjectReferences.First().ProjectInstance.GlobalProperties["FoO"].ShouldBe("BAR");
585node1.ProjectReferences.First().ShouldBe(node3);
587node2.ProjectReferences.First().ShouldBe(node3);
606var entryPointNode1 = projectGraph.EntryPointNodes.First();
618entryPointNode1.ProjectReferences.First().ShouldNotBe(entryPointNode2.ProjectReferences.First());
619entryPointNode1.ProjectReferences.First().ProjectInstance.FullPath.ShouldBe(entryPointNode2.ProjectReferences.First().ProjectInstance.FullPath);
620entryPointNode1.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86");
621entryPointNode2.ProjectReferences.First().ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64");
645var entryPointNode1 = projectGraph.EntryPointNodes.First();
657entryPointNode1.ProjectReferences.First().ShouldBe(entryPointNode2.ProjectReferences.First());
658entryPointNode1.ProjectReferences.First().ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse();
1618string project1ErrorMessage = project1MockLogger.Errors.First().Message;
1890var outerBuild = graph.GraphRoots.First();
2003AssertOuterBuild(graph.GraphRoots.First(), graph);
2031AssertInnerBuildEvaluation(graph.GraphRoots.First(), false, new Dictionary<string, string>());
2050AssertInnerBuildEvaluation(graph.GraphRoots.First(), true, new Dictionary<string, string>());
2071AssertOuterBuild(graph.GraphRoots.First(), graph);
2098AssertOuterBuild(graph.GraphRoots.First(), graph);
2148two.ProjectReferences.First().ShouldBe(referencedInnerBuild);
2172var rootNode = graph.GraphRoots.First();
2176var innerBuildNode = rootNode.ProjectReferences.First();
2181AssertNonMultitargetingNode(innerBuildNode.ProjectReferences.First(), additionalGlobalProperties);
2351projectGraph.ProjectNodes.First().ProjectInstance.GlobalProperties[PropertyNames.IsGraphBuild].ShouldBe("xyz");
Microsoft.Build.Tasks.Core (2)
Microsoft.Build.Tasks.UnitTests (10)
Microsoft.Build.UnitTests.Shared (1)
Microsoft.Build.Utilities.UnitTests (5)
Microsoft.Cci.Extensions (5)
Microsoft.CodeAnalysis (2)
Microsoft.CodeAnalysis.CodeStyle (4)
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
101.First();
Microsoft.CodeAnalysis.CSharp (10)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
121.First();
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (16)
CommandLineTests.cs (16)
757Assert.Equal((int)ErrorCode.ERR_CantOpenWin32Manifest, errors.First().Code);
758Assert.Equal(2, errors.First().Arguments.Count());
769Assert.Equal((int)ErrorCode.ERR_CantOpenIcon, errors.First().Code);
770Assert.Equal(2, errors.First().Arguments.Count());
780Assert.Equal((int)ErrorCode.ERR_CantOpenWin32Res, errors.First().Code);
781Assert.Equal(2, errors.First().Arguments.Count());
791Assert.Equal((int)ErrorCode.ERR_CantOpenWin32Res, errors.First().Code);
792Assert.Equal(2, errors.First().Arguments.Count());
802Assert.Equal((int)ErrorCode.ERR_CantOpenIcon, errors.First().Code);
803Assert.Equal(2, errors.First().Arguments.Count());
813Assert.Equal((int)ErrorCode.ERR_CantOpenWin32Manifest, errors.First().Code);
814Assert.Equal(2, errors.First().Arguments.Count());
882Assert.Equal((int)ErrorCode.ERR_ErrorBuildingWin32Resources, errors.First().Code);
883Assert.Equal(1, errors.First().Arguments.Count());
10377var syntaxTreeInput = ctx.CompilationProvider.Select((c, _) => c.SyntaxTrees.First());
14651var classOptions = gc.AnalyzerConfigOptions.GetOptions(gc.Compilation.SyntaxTrees.First());
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (66)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (94)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (16)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (105)
Microsoft.CodeAnalysis.CSharp.Features (14)
src\Analyzers\CSharp\CodeFixes\UseUtf8StringLiteral\UseUtf8StringLiteralCodeFixProvider.cs (1)
121.First();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (18)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (235)
SourceGeneration\GeneratorDriverTests.cs (9)
1271c.ReportDiagnostic(d.WithLocation(Location.Create(c.Compilation.SyntaxTrees.First(), l)));
2373compilation = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), CSharpSyntaxTree.ParseText(source, parseOptions));
2432var c2 = compilation.ReplaceSyntaxTree(compilation.SyntaxTrees.First(), CSharpSyntaxTree.ParseText("class E{}", parseOptions));
4306var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4307var generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
4351var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator1"); }); }).AsSourceGenerator();
4352var generator2 = new PipelineCallbackGenerator2((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", "//" + c.SyntaxTrees.First().GetRoot().ToFullString() + " generator2"); }); }).AsSourceGenerator();
4375var generator1 = new PipelineCallbackGenerator((ctx) => { ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen1Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator1"); }); }).AsSourceGenerator();
4376var generator2 = new PipelineCallbackGenerator2((ctx) => { initWasCalled = true; ctx.RegisterSourceOutput(ctx.CompilationProvider, (spc, c) => { spc.AddSource("gen2Source.cs", c.SyntaxTrees.First().GetRoot().ToFullString() + " //generator2"); }); }).AsSourceGenerator();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (159)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (80)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (106)
CodeGeneration\SymbolEditorTests.cs (59)
50var compilation = await solution.Projects.First().GetCompilationAsync();
79var symbol = (await GetSymbolsAsync(solution, "C")).First();
85var actual = await GetActualAsync(editor.GetChangedDocuments().First());
111var symbol = (await GetSymbolsAsync(solution, "C")).First();
122var actual = await GetActualAsync(editor.GetChangedDocuments().First());
148var symbol = (await GetSymbolsAsync(solution, "C")).First();
159var actual = await GetActualAsync(editor.GetChangedDocuments().First());
192var comp = await solution.Projects.First().GetCompilationAsync();
193var symbolA = comp.GlobalNamespace.GetMembers("A").First();
194var symbolB = comp.GlobalNamespace.GetMembers("B").First();
204var actual = await GetActualAsync(editor.GetChangedDocuments().First());
238var comp = await solution.Projects.First().GetCompilationAsync();
239var symbolA = comp.GlobalNamespace.GetMembers("A").First();
240var symbolB = comp.GlobalNamespace.GetMembers("B").First();
280var symbol = (await GetSymbolsAsync(solution, "C")).First();
285var actual = await GetActualAsync(editor.GetChangedDocuments().First());
316var comp = await solution.Projects.First().GetCompilationAsync();
317var symbol = comp.GlobalNamespace.GetMembers("C").First();
355var symbol = (await GetSymbolsAsync(solution, "C")).First();
362var actual = await GetActualAsync(editor.GetChangedDocuments().First());
392var symbol = (await GetSymbolsAsync(solution, "C")).First();
399var actual = await GetActualAsync(editor.GetChangedDocuments().First());
433var symbol = (await GetSymbolsAsync(solution, "C")).First();
445var actual = await GetActualAsync(editor.GetChangedDocuments().First());
479var symbol = (await GetSymbolsAsync(solution, "C")).First();
492var actual = await GetActualAsync(editor.GetChangedDocuments().First());
529var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
536var actual = await GetActualAsync(editor.GetChangedDocuments().First());
556var symbol = (await GetSymbolsAsync(solution, "C")).First();
566var actual = await GetActualAsync(editor.GetChangedDocuments().First());
593var symbol = (await GetSymbolsAsync(solution, "C")).First();
603var actual = await GetActualAsync(editor.GetChangedDocuments().First());
620var symbol = (await GetSymbolsAsync(solution, "C")).First();
626var actual = await GetActualAsync(editor.GetChangedDocuments().First());
650var symbol = (await GetSymbolsAsync(solution, "C")).First();
657var actual = await GetActualAsync(editor.GetChangedDocuments().First());
679var symbol = (await GetSymbolsAsync(solution, "C")).First();
685var actual = await GetActualAsync(editor.GetChangedDocuments().First());
711var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
721var actual = await GetActualAsync(editor.GetChangedDocuments().First());
728actual = await GetActualAsync(editor.GetChangedDocuments().First());
762var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
769var actual = await GetActualAsync(editor.GetChangedDocuments().First());
803var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
810var actual = await GetActualAsync(editor.GetChangedDocuments().First());
836var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
843var actual = await GetActualAsync(editor.GetChangedDocuments().First());
869var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
876var actual = await GetActualAsync(editor.GetChangedDocuments().First());
902var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
909var actual = await GetActualAsync(editor.GetChangedDocuments().First());
943var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
950var actual = await GetActualAsync(editor.GetChangedDocuments().First());
976var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
983var actual = await GetActualAsync(editor.GetChangedDocuments().First());
1001var symbol = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
1008var actual = await GetActualAsync(editor.GetChangedDocuments().First());
1033var typeC = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "C")).First();
1043var typeI = (INamedTypeSymbol)(await GetSymbolsAsync(solution, "I")).First();
Microsoft.CodeAnalysis.EditorFeatures (16)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (25)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (40)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.ExternalAccess.Razor (1)
Microsoft.CodeAnalysis.Features (13)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (14)
Microsoft.CodeAnalysis.Test.Utilities (12)
Microsoft.CodeAnalysis.UnitTests (20)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces (21)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (36)
Microsoft.CodeAnalysis.Workspaces.UnitTests (57)
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
Microsoft.Data.Analysis.Tests (2)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.AsmDiff (2)
Microsoft.DotNet.Build.Tasks.Installers (1)
Microsoft.DotNet.Build.Tasks.Workloads (2)
Microsoft.DotNet.Git.IssueManager (2)
Microsoft.DotNet.Helix.Sdk (2)
Microsoft.DotNet.Helix.Sdk.Tests (9)
Microsoft.DotNet.NuGetRepack.Tasks (1)
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.DotNet.SharedFramework.Sdk (3)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.DotNet.SignTool.Tests (2)
Microsoft.DotNet.SourceBuild.Tasks (2)
Microsoft.DotNet.VersionTools (4)
Microsoft.DotNet.XUnitAssert.Tests (2)
Microsoft.DotNet.XUnitExtensions (3)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
43.First();
Microsoft.Extensions.AI.Ollama.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
43.First();
Microsoft.Extensions.AI.OpenAI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
43.First();
Microsoft.Extensions.AI.Tests (1)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (1)
43.First();
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
Microsoft.Extensions.Caching.Abstractions (1)
Microsoft.Extensions.DependencyModel (1)
Microsoft.Extensions.Diagnostics.Probes.Tests (5)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (3)
Microsoft.Extensions.Diagnostics.Testing (1)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.ML (2)
Microsoft.Extensions.Options.Contextual.Tests (2)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Gen.ComplianceReports.Unit.Tests (2)
Microsoft.Gen.MetricsReports.Unit.Tests (3)
Microsoft.ML.AutoML (17)
Microsoft.ML.AutoML.SourceGenerator (4)
Microsoft.ML.AutoML.Tests (15)
Microsoft.ML.CodeGenerator (3)
Microsoft.ML.CodeGenerator.Tests (1)
Microsoft.ML.Core (3)
Microsoft.ML.Data (37)
Microsoft.ML.Ensemble (2)
Microsoft.ML.EntryPoints (2)
Microsoft.ML.FastTree (17)
Microsoft.ML.GenAI.Phi.Tests (2)
Microsoft.ML.OnnxTransformerTest (5)
Microsoft.ML.Parquet (2)
Microsoft.ML.PerformanceTests (2)
Microsoft.ML.Samples (12)
Microsoft.ML.Samples.GPU (8)
Microsoft.ML.SearchSpace (6)
Microsoft.ML.TensorFlow.Tests (1)
Microsoft.ML.Tests (23)
Microsoft.ML.TimeSeries (2)
Microsoft.ML.Transforms (5)
Microsoft.Net.Http.Headers.Tests (54)
Microsoft.VisualStudio.LanguageServices (7)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (8)
Mvc.Api.Analyzers.Test (3)
Roslyn.VisualStudio.DiagnosticsWindow (1)
Roslyn.VisualStudio.Next.UnitTests (22)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (7)
50var analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer);
58analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer);
81var analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer);
97analyzerResult = await AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer);
119var task = Task.Run(() => AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer: false, source.Token));
158var project = workspace.CurrentSolution.Projects.First();
196var project = workspace.CurrentSolution.Projects.First().AddAnalyzerReference(analyzerReference);
ServerComparison.FunctionalTests (1)
SocialSample (1)
Sockets.BindTests (7)
Sockets.FunctionalTests (4)
System.Collections.Immutable (2)
System.ComponentModel.Composition (1)
System.Linq.Expressions (1)
System.Linq.Parallel (1)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (2)
System.Windows.Forms.Primitives.TestUtilities (1)
System.Windows.Forms.PrivateSourceGenerators.Tests (1)
System.Windows.Forms.Tests (1)
Templates.Blazor.Tests (2)
Templates.Blazor.WebAssembly.Auth.Tests (2)
Templates.Blazor.WebAssembly.Tests (2)
Templates.Mvc.Tests (2)
Templates.Tests (2)
Wasm.Performance.Driver (1)
XmlFormattersWebSite (2)