120 references to GetFirstNodeWithProjectNumber
Microsoft.Build.Engine.UnitTests (120)
Graph\GetCompatiblePlatformGraph_Tests.cs (16)
60GetFirstNodeWithProjectNumber(graph, 1).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 100GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 101GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 142GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 143GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 182GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 183GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 211GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x64"); 239GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 266GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("AnyCPU"); 294GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties["Platform"].ShouldBe("x86"); 324GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GlobalProperties.ContainsKey("Platform").ShouldBeFalse(); 351GetFirstNodeWithProjectNumber(graph, 2).ProjectInstance.GetPropertyValue("Platform").ShouldBe(GetFirstNodeWithProjectNumber(graph, 1).ProjectInstance.GetPropertyValue("Platform")); 447GetFirstNodeWithProjectNumber(graphFromSolution, 2).ProjectInstance.GetPropertyValue("Platform").ShouldBe("AnyCPU", "Project2 should have followed the sln config to AnyCPU"); 448GetFirstNodeWithProjectNumber(graphFromSolution, 3).ProjectInstance.GetPropertyValue("Platform").ShouldBe("x64", "Project3 isn't in the solution so it should have negotiated to x64 to match Project1");
Graph\GraphLoadedFromSolution_tests.cs (1)
625var node1 = GetFirstNodeWithProjectNumber(graph, 1);
Graph\GraphTestingUtilities.cs (1)
236var node = GetFirstNodeWithProjectNumber(graph, kvp.Key);
Graph\ProjectGraph_Tests.cs (102)
233GetFirstNodeWithProjectNumber(graph, 1).ProjectReferences.Count.ShouldBe(2); 234GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.Count.ShouldBe(0); 235GetFirstNodeWithProjectNumber(graph, 3).ProjectReferences.Count.ShouldBe(0); 262ProjectGraphNode node1 = GetFirstNodeWithProjectNumber(graph, 1); 263ProjectGraphNode node2 = GetFirstNodeWithProjectNumber(graph, 2); 264ProjectGraphNode node3 = GetFirstNodeWithProjectNumber(graph, 3); 265ProjectGraphNode node4 = GetFirstNodeWithProjectNumber(graph, 4); 266ProjectGraphNode node5 = GetFirstNodeWithProjectNumber(graph, 5); 267ProjectGraphNode node6 = GetFirstNodeWithProjectNumber(graph, 6); 268ProjectGraphNode node7 = GetFirstNodeWithProjectNumber(graph, 7); 369var root1 = GetFirstNodeWithProjectNumber(graph, 1); 376var root2 = GetFirstNodeWithProjectNumber(graph, 2); 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); 432GetFirstNodeWithProjectNumber(graph, 3).ProjectInstance.GlobalProperties["A"].ShouldBe("B"); 466var node4A = GetFirstNodeWithProjectNumber(graph, 2).ProjectReferences.First(); 467var node4B = GetFirstNodeWithProjectNumber(graph, 3).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"); 581var node1 = GetFirstNodeWithProjectNumber(projectGraph, 1); 582var node2 = GetFirstNodeWithProjectNumber(projectGraph, 2); 583var node3 = GetFirstNodeWithProjectNumber(projectGraph, 3); 676projectGraph.GraphRoots.ShouldNotContain(GetFirstNodeWithProjectNumber(projectGraph, 2)); 929targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 930targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 931targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "B" }); 932targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(new[] { "C", "D" }); // From B => C and B => D 957targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 958targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B", "X", "C" }); 959targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "X", "Y", "Z" }); // Simplified from X, Y, X, Z 988targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 989targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 990targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "B" }); 991targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(new[] { "C" }); 992targetLists[GetFirstNodeWithProjectNumber(projectGraph, 5)].ShouldBe(new[] { "B", "C", "D" }); 993targetLists[GetFirstNodeWithProjectNumber(projectGraph, 6)].ShouldBe(new[] { "C", "D", "E" }); 1010targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1011targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 1028targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "Foo" }); 1029targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBeEmpty(); 1051targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBeEmpty(); 1052targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBeEmpty(); 1074targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1075targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBeEmpty(); 1118targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1119targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(NonOuterBuildTargets); 1159targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1160targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(NonOuterBuildTargets); 1193var root = GetFirstNodeWithProjectNumber(projectGraph, 1); 1270targetLists[GetFirstNodeWithProjectNumber(graph, 2)].ShouldBe(new[] { "T2", "A", "AOuter", "AInner" }); 1370targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "A" }); 1371targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(NonOuterBuildTargets); 1372targetLists[GetFirstNodeWithProjectNumber(projectGraph, 5)].ShouldBe(NonOuterBuildTargets); 1399targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "A" }); 1400targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "B" }); 1422targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "Build" }); 1423targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "A", "Build" }); 1452targetLists[GetFirstNodeWithProjectNumber(projectGraph, 1)].ShouldBe(new[] { "Build" }); 1453targetLists[GetFirstNodeWithProjectNumber(projectGraph, 2)].ShouldBe(new[] { "A", "Build" }); 1454targetLists[GetFirstNodeWithProjectNumber(projectGraph, 3)].ShouldBe(new[] { "A", "X" }); 1455targetLists[GetFirstNodeWithProjectNumber(projectGraph, 4)].ShouldBe(new[] { "A", "Y" }); 1456targetLists[GetFirstNodeWithProjectNumber(projectGraph, 5)].ShouldBe(new[] { "A", "Build" }); 1457targetLists[GetFirstNodeWithProjectNumber(projectGraph, 6)].ShouldBe(new[] { "B", "Build" }); 1458targetLists[GetFirstNodeWithProjectNumber(projectGraph, 7)].ShouldBe(new[] { "C", "Z", "W" }); 1509targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 1)].ShouldBe(expected: new[] { "Build" }); 1510targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 2)].ShouldBe(expected: new[] { "Build" }); 1511targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 3)].ShouldBe(expected: new[] { "Build" }); 1512targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 4)].ShouldBe(expected: new[] { "Build" }); 1513targetLists[key: GetFirstNodeWithProjectNumber(graph: projectGraph, projectNum: 5)].ShouldBe(expected: new[] { "T51", "T2", "T53", "T54", "T3", "D51", "D52", "T4" }); 1553targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 1)].ShouldBe(expected: new[] { "Build" }); 1554targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 2)].ShouldBe(expected: new[] { "NonskippableTarget1", "NonskippableTarget2", "SkippableExistingTarget" }); 1603targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 1)].ShouldBe(expected: new[] { "Build" }); 1604targetLists[key: GetFirstNodeWithProjectNumber(graph: graph, projectNum: 2)].ShouldBe(expected: new[] { "NonskippableTarget1", "SkippableExistingTarget" }); 1955var outerBuildReferencingNode = GetFirstNodeWithProjectNumber(graph, 1); 2005var nonMultitargetingNode = GetFirstNodeWithProjectNumber(graph, 2); 2033var nonMultitargetingNode = GetFirstNodeWithProjectNumber(graph, 2); 2052var nonMultitargetingNode = GetFirstNodeWithProjectNumber(graph, 2); 2074AssertNonMultitargetingNode(GetFirstNodeWithProjectNumber(graph, 2)); 2075AssertNonMultitargetingNode(GetFirstNodeWithProjectNumber(graph, 3)); 2102AssertNonMultitargetingNode(GetFirstNodeWithProjectNumber(graph, 3)); 2103AssertNonMultitargetingNode(GetFirstNodeWithProjectNumber(graph, 5)); 2141AssertNonMultitargetingNode(GetFirstNodeWithProjectNumber(graph, 2), additionalGlobalProperties); 2145var two = GetFirstNodeWithProjectNumber(graph, 2); 2545GetFirstNodeWithProjectNumber(graph, 2).AssertReferencesIgnoringOrder(new[] { 3, 4, 4, 4, 5, 6, 6, 6 }); 2698ProjectGraphNode project1 = GetFirstNodeWithProjectNumber(graph, 1); 2699ProjectGraphNode project2 = GetFirstNodeWithProjectNumber(graph, 2); 2740ProjectGraphNode project1 = GetFirstNodeWithProjectNumber(graph, 1); 2741ProjectGraphNode project2 = GetFirstNodeWithProjectNumber(graph, 2); 2874ProjectGraphNode project1Node = GetFirstNodeWithProjectNumber(projectGraph, 1); 2875ProjectGraphNode project2Node = GetFirstNodeWithProjectNumber(projectGraph, 2);