887 references to Helpers
Microsoft.Build.Engine.OM.UnitTests (625)
Construction\ConstructionEditing_Tests.cs (104)
40Helpers.VerifyAssertProjectContent(expected, project); 43Assert.Equal(1, Helpers.Count(project.Children)); 44Assert.Equal(0, Helpers.Count(target.Children)); 56Helpers.ClearDirtyFlag(project); 67Helpers.VerifyAssertProjectContent(expected, project); 90Helpers.VerifyAssertProjectContent(expected, project); 93var targets = Helpers.MakeList(project.Targets); 381Helpers.VerifyAssertProjectContent(expected, project); 403Helpers.VerifyAssertProjectContent(expected, project); 423Helpers.VerifyAssertProjectContent(expected, project); 426var children = Helpers.MakeList(project.Children); 450Helpers.VerifyAssertProjectContent(expected, project); 453var children = Helpers.MakeList(project.Children); 479Helpers.VerifyAssertProjectContent(expected, project); 502Helpers.VerifyAssertProjectContent(expected, project); 527Helpers.VerifyAssertProjectContent(expected, project); 530var children = Helpers.MakeList(project.Children); 555Helpers.VerifyAssertProjectContent(expected, project); 576Helpers.VerifyAssertProjectContent(expected, project); 599Helpers.VerifyAssertProjectContent(expected, project); 621Helpers.VerifyAssertProjectContent(expected, project); 694Helpers.VerifyAssertProjectContent(expected, project); 722Helpers.VerifyAssertProjectContent(expected, project); 763Helpers.VerifyAssertProjectContent(expected, project); 1087Helpers.VerifyAssertProjectContent(expected, project); 1109Helpers.VerifyAssertProjectContent(expected, project); 1132Helpers.VerifyAssertProjectContent(expected, project); 1175Helpers.ClearDirtyFlag(project); 1182Helpers.VerifyAssertProjectContent(expected, project); 1183Assert.Equal(0, Helpers.Count(project.Children)); 1322Helpers.VerifyAssertProjectContent(expected, project); 1323Assert.Equal(1, Helpers.Count(project.Children)); 1324Assert.Equal(2, Helpers.Count(choose.Children)); 1346Helpers.VerifyAssertProjectContent(expected, project); 1347Assert.Equal(1, Helpers.Count(project.Children)); 1348Assert.Equal(target1, Helpers.GetFirst(project.Children)); 1370Helpers.VerifyAssertProjectContent(expected, project); 1371Assert.Equal(1, Helpers.Count(project.Children)); 1372Assert.Equal(target2, Helpers.GetFirst(project.Children)); 1427Helpers.VerifyAssertProjectContent(expected, project); 1428Assert.Equal(2, Helpers.Count(project.Children)); 1429Assert.Equal(target2, Helpers.GetFirst(project.Children)); 1452Helpers.VerifyAssertProjectContent(expected, project); 1474Helpers.VerifyAssertProjectContent(expected, project); 1494Helpers.VerifyAssertProjectContent(expected, project); 1514Helpers.VerifyAssertProjectContent(expected, project); 1538Helpers.VerifyAssertProjectContent(expected, project); 1539Assert.Equal(3, Helpers.Count(project.Children)); 1540Assert.Equal(propertyGroup, Helpers.GetFirst(project.Children)); 1571Helpers.VerifyAssertProjectContent(expected, project); 1572Assert.Equal(5, Helpers.Count(project.Children)); 1573Assert.Equal(propertyGroup3, Helpers.GetLast(project.Children)); 1590Helpers.VerifyAssertProjectContent(expected, project); 1609Helpers.VerifyAssertProjectContent(expected, project); 1610Assert.Equal(itemGroup2, Helpers.GetLast(project.ItemGroups)); 1629Helpers.VerifyAssertProjectContent(expected, project); 1651Helpers.VerifyAssertProjectContent(expected, project); 1652Assert.Equal(itemGroup2, Helpers.GetLast(project.ItemGroups)); 1672Helpers.VerifyAssertProjectContent(expected, project); 1692Helpers.VerifyAssertProjectContent(expected, project); 1713Helpers.VerifyAssertProjectContent(expected, project); 1736Helpers.VerifyAssertProjectContent(expected, project); 1762Helpers.VerifyAssertProjectContent(expected, project); 1788Helpers.VerifyAssertProjectContent(expected, project); 1789Assert.Equal(item, Helpers.GetFirst(Helpers.GetFirst(project.ItemGroups).Items)); 1817Helpers.VerifyAssertProjectContent(expected, project); 1841Helpers.VerifyAssertProjectContent(expected, project); 1865Helpers.VerifyAssertProjectContent(expected, project); 1899Helpers.VerifyAssertProjectContent(expected, project); 1920Helpers.VerifyAssertProjectContent(expected, project); 1960Helpers.VerifyAssertProjectContent(expected, project); 1994Helpers.VerifyAssertProjectContent(expected, project); 2014Helpers.VerifyAssertProjectContent(expected, project); 2015Assert.Equal(itemDefinition, Helpers.GetFirst(Helpers.GetFirst(project.ItemDefinitionGroups).ItemDefinitions)); 2037Helpers.VerifyAssertProjectContent(expected, project); 2060Helpers.VerifyAssertProjectContent(expected, project); 2084Helpers.VerifyAssertProjectContent(expected, project); 2085Assert.Equal(last, Helpers.GetLast(Helpers.GetFirst(project.ItemDefinitionGroups).ItemDefinitions)); 2109Helpers.VerifyAssertProjectContent(expected, project); 2129Helpers.VerifyAssertProjectContent(expected, project); 2130Assert.Equal(property, Helpers.GetFirst(Helpers.GetFirst(project.PropertyGroups).Properties)); 2151Helpers.VerifyAssertProjectContent(expected, project); 2175Helpers.VerifyAssertProjectContent(expected, project); 2197Helpers.VerifyAssertProjectContent(expected, project); 2222Helpers.VerifyAssertProjectContent(expected, project); 2248Helpers.VerifyAssertProjectContent(expected, project); 2325ProjectItem item = Helpers.GetFirst(project.Items); 2329Assert.Equal(1, Helpers.Count(project.Items)); 2333Assert.Equal(0, Helpers.Count(project.Items)); 2353ProjectMetadata metadatum = Helpers.GetFirst(project.Items).GetMetadata("m"); 2360metadatum = Helpers.GetFirst(project.Items).GetMetadata("m"); 2385Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 }); 2408Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item2, item1 }); 2431Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item2, item1 }); 2454Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 }); 2477Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 }); 2501Helpers.AssertListsValueEqual(allChildren, new List<ProjectElement> { item1, item2 }); 3137Helpers.VerifyAssertProjectContent(expected, project); 3160Helpers.VerifyAssertProjectContent(expected, project); 3175Helpers.VerifyAssertProjectContent(expected, project);
Construction\ElementLocationPublic_Tests.cs (1)
199Helpers.VerifyAssertLineByLine(expected, locations);
Construction\ProjectChooseElement_Tests.cs (8)
178ProjectChooseElement choose = (ProjectChooseElement)Helpers.GetFirst(project.Children); 180Assert.Null(Helpers.GetFirst(choose.Children)); 198ProjectChooseElement choose = (ProjectChooseElement)Helpers.GetFirst(project.Children); 200Assert.Equal(1, Helpers.Count(choose.WhenElements)); 222ProjectChooseElement choose = (ProjectChooseElement)Helpers.GetFirst(project.Children); 224List<ProjectWhenElement> whens = Helpers.MakeList(choose.WhenElements); 276ProjectChooseElement choose = Helpers.GetFirst(project.Xml.ChooseElements); 277ProjectWhenElement when = Helpers.GetFirst(choose.WhenElements);
Construction\ProjectExtensionsElement_Tests.cs (7)
36ProjectExtensionsElement extensions = (ProjectExtensionsElement)Helpers.GetFirst(project.Children); 84Helpers.ClearDirtyFlag(extensions.ContainingProject); 122ProjectExtensionsElement extensions = (ProjectExtensionsElement)Helpers.GetFirst(project.Children); 148ProjectExtensionsElement extensions = (ProjectExtensionsElement)Helpers.GetFirst(project.Children); 174ProjectExtensionsElement extensions = (ProjectExtensionsElement)Helpers.GetFirst(project.Children); 197ProjectExtensionsElement extensions = (ProjectExtensionsElement)Helpers.GetFirst(project.Children); 216ProjectExtensionsElement extensions = (ProjectExtensionsElement)Helpers.GetFirst(project.Children);
Construction\ProjectFormatting_Tests.cs (1)
491Helpers.VerifyAssertLineByLine(expected, actual, false, _testOutput);
Construction\ProjectImportElement_Tests.cs (5)
101List<ProjectImportElement> imports = Helpers.MakeList(project.Imports); 124ProjectImportElement import = (ProjectImportElement)Helpers.GetFirst(project.Children); 146ProjectImportElement import = (ProjectImportElement)Helpers.GetFirst(project.Children); 180ProjectImportElement import = Helpers.GetFirst(project.Xml.Imports); 219ProjectImportElement import = Helpers.GetFirst(project.Xml.Imports);
Construction\ProjectImportGroupElement_Tests.cs (17)
46Helpers.CompareProjectXml(expectedContent, project.RawXml); 98Helpers.CompareProjectXml(expectedContent, project.RawXml); 138Helpers.CompareProjectXml(expectedContent, project.RawXml); 167ProjectImportGroupElement importGroup = (ProjectImportGroupElement)Helpers.GetFirst(project.ImportGroups); 170Assert.Equal(0, Helpers.Count(importGroup.Imports)); 267List<ProjectImportElement> imports = Helpers.MakeList(project.Imports); 268List<ProjectImportGroupElement> importGroups = Helpers.MakeList(project.ImportGroups); 299List<ProjectImportElement> imports = Helpers.MakeList(project.Imports); 300List<ProjectImportGroupElement> importGroups = Helpers.MakeList(project.ImportGroups); 331ProjectImportGroupElement importGroup = (ProjectImportGroupElement)Helpers.GetFirst(project.Children); 333ProjectImportElement import = (ProjectImportElement)Helpers.GetFirst(importGroup.Imports); 358ProjectImportGroupElement importGroup = (ProjectImportGroupElement)Helpers.GetFirst(project.Children); 360ProjectImportElement import = (ProjectImportElement)Helpers.GetFirst(importGroup.Imports); 373Helpers.ClearDirtyFlag(project); 375ProjectImportGroupElement importGroup = Helpers.GetFirst(project.ImportGroups); 390Helpers.ClearDirtyFlag(project); 392ProjectImportGroupElement importGroup = Helpers.GetFirst(project.ImportGroups);
Construction\ProjectItemDefinitionElement_Tests.cs (12)
36ProjectItemDefinitionGroupElement itemDefinitionGroup = (ProjectItemDefinitionGroupElement)Helpers.GetFirst(project.Children); 37ProjectItemDefinitionElement itemDefinition = Helpers.GetFirst(itemDefinitionGroup.ItemDefinitions); 39Assert.Equal(0, Helpers.Count(itemDefinition.Metadata)); 60ProjectItemDefinitionGroupElement itemDefinitionGroup = (ProjectItemDefinitionGroupElement)Helpers.GetFirst(project.Children); 61ProjectItemDefinitionElement definition = Helpers.GetFirst(itemDefinitionGroup.ItemDefinitions); 64Assert.Equal(1, Helpers.Count(definition.Metadata)); 65Assert.Equal("m1", Helpers.GetFirst(definition.Metadata).Name); 66Assert.Equal("v1", Helpers.GetFirst(definition.Metadata).Value); 109ProjectItemDefinitionGroupElement itemDefinitionGroup = (ProjectItemDefinitionGroupElement)Helpers.GetFirst(project.Children); 110ProjectItemDefinitionElement itemDefinition = Helpers.GetFirst(itemDefinitionGroup.ItemDefinitions); 112var metadata = Helpers.MakeList(itemDefinition.Metadata); 208Helpers.ClearDirtyFlag(project);
Construction\ProjectItemDefinitionGroupElement_Tests.cs (10)
26Assert.Equal(0, Helpers.Count(project.Children)); 61ProjectItemDefinitionGroupElement itemDefinitionGroup = (ProjectItemDefinitionGroupElement)Helpers.GetFirst(project.Children); 63Assert.Equal(0, Helpers.Count(itemDefinitionGroup.ItemDefinitions)); 87var itemDefinitionGroups = Helpers.MakeList(project.ItemDefinitionGroups); 90Assert.Equal(1, Helpers.Count(itemDefinitionGroups[0].ItemDefinitions)); 91Assert.Equal(2, Helpers.Count(itemDefinitionGroups[1].ItemDefinitions)); 103Helpers.ClearDirtyFlag(project); 105ProjectItemDefinitionGroupElement itemDefinitionGroup = Helpers.GetFirst(project.ItemDefinitionGroups); 120Helpers.ClearDirtyFlag(project); 122ProjectItemDefinitionGroupElement itemDefinitionGroup = Helpers.GetFirst(project.ItemDefinitionGroups);
Construction\ProjectItemElement_Tests.cs (12)
82Assert.Equal(0, Helpers.Count(item.Metadata)); 361var items = Helpers.MakeList(itemGroup.Items); 366var metadata1 = Helpers.MakeList(items[0].Metadata); 371var metadata2 = Helpers.MakeList(items[1].Metadata); 413ProjectItemElement item = Helpers.GetFirst(itemGroup.Items); 415var metadata = Helpers.MakeList(item.Metadata); 964Assert.Empty(Helpers.MakeList(project.Items)); 980Assert.Equal("i2", Helpers.GetFirst(project.Items).EvaluatedInclude); 996Assert.Empty(Helpers.MakeList(project.Items)); 1009Helpers.ClearDirtyFlag(project); 1029Helpers.ClearDirtyFlag(project); 1044return Helpers.GetFirst(project.Items);
Construction\ProjectItemGroupElement_tests.cs (9)
26Assert.Equal(0, Helpers.Count(project.Children)); 44ProjectItemGroupElement group = (ProjectItemGroupElement)Helpers.GetFirst(project.Children); 46Assert.Equal(0, Helpers.Count(group.Items)); 66ProjectItemGroupElement group = (ProjectItemGroupElement)Helpers.GetFirst(project.Children); 68var items = Helpers.MakeList(group.Items); 83Helpers.ClearDirtyFlag(project); 85ProjectItemGroupElement itemGroup = Helpers.GetFirst(project.ItemGroups); 100Helpers.ClearDirtyFlag(project); 102ProjectItemGroupElement itemGroup = Helpers.GetFirst(project.ItemGroups);
Construction\ProjectMetadataElement_Tests.cs (23)
234Helpers.ClearDirtyFlag(metadatum.ContainingProject); 303var items = Helpers.MakeList(itemGroup.Items); 330var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 431var items = Helpers.MakeList(itemGroup.Items); 456var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 490var items = Helpers.MakeList(itemGroup.Items); 515var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 567var items = Helpers.MakeList(itemGroup.Items); 610var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 684var items = Helpers.MakeList(itemGroup.Items); 727var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 813var items = Helpers.MakeList(itemGroup.Items); 876var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 945var items = Helpers.MakeList(itemGroup.Items); 988var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 1060var items = Helpers.MakeList(itemGroup.Items); 1100var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 1171var items = Helpers.MakeList(itemGroup.Items); 1218var itemDefinitions = Helpers.MakeList(itemDefinitionGroup.ItemDefinitions); 1271ProjectItemGroupElement itemGroup = (ProjectItemGroupElement)Helpers.GetFirst(project.Children); 1272ProjectItemElement item = Helpers.GetFirst(itemGroup.Items); 1273ProjectMetadataElement metadata = Helpers.GetFirst(item.Metadata); 1279Helpers.VerifyAssertLineByLine(expected, actual, false, _testOutput);
Construction\ProjectOnErrorElement_Tests.cs (10)
51ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 52var onErrors = Helpers.MakeList(target.OnErrors); 81ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 82ProjectOnErrorElement onError = (ProjectOnErrorElement)Helpers.GetFirst(target.Children); 107ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 108ProjectOnErrorElement onError = (ProjectOnErrorElement)Helpers.GetFirst(target.Children); 262Helpers.ClearDirtyFlag(project); 280Helpers.ClearDirtyFlag(project); 303ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 304ProjectOnErrorElement onError = (ProjectOnErrorElement)Helpers.GetFirst(target.Children);
Construction\ProjectOutputElement_Tests.cs (9)
213Helpers.ClearDirtyFlag(output.ContainingProject); 227Helpers.ClearDirtyFlag(output.ContainingProject); 254Helpers.ClearDirtyFlag(output.ContainingProject); 292ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 293ProjectTaskElement task = (ProjectTaskElement)Helpers.GetFirst(target.Children); 294return Helpers.GetFirst(task.Outputs); 315ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 316ProjectTaskElement task = (ProjectTaskElement)Helpers.GetFirst(target.Children); 317return Helpers.GetFirst(task.Outputs);
Construction\ProjectPropertyElement_Tests.cs (9)
49ProjectPropertyGroupElement propertyGroup = (ProjectPropertyGroupElement)Helpers.GetFirst(project.Children); 50ProjectPropertyElement property = Helpers.GetFirst(propertyGroup.Properties); 160Helpers.ClearDirtyFlag(property.ContainingProject); 176Helpers.ClearDirtyFlag(property.ContainingProject); 203Helpers.ClearDirtyFlag(property.ContainingProject); 230Helpers.ClearDirtyFlag(property.ContainingProject); 258Helpers.ClearDirtyFlag(property.ContainingProject); 280ProjectPropertyGroupElement propertyGroup = (ProjectPropertyGroupElement)Helpers.GetFirst(project.Children); 281ProjectPropertyElement property = Helpers.GetFirst(propertyGroup.Properties);
Construction\ProjectPropertyGroupElement_Tests.cs (10)
25Assert.Equal(0, Helpers.Count(project.Children)); 43ProjectPropertyGroupElement group = (ProjectPropertyGroupElement)Helpers.GetFirst(project.Children); 45Assert.Equal(0, Helpers.Count(group.Properties)); 65ProjectPropertyGroupElement group = (ProjectPropertyGroupElement)Helpers.GetFirst(project.Children); 67var properties = Helpers.MakeList(group.Properties); 81Helpers.ClearDirtyFlag(project); 83ProjectPropertyGroupElement propertyGroup = Helpers.GetFirst(project.PropertyGroups); 98Helpers.ClearDirtyFlag(project); 100ProjectPropertyGroupElement propertyGroup = Helpers.GetFirst(project.PropertyGroups); 126Helpers.VerifyAssertProjectContent(expected, project);
Construction\ProjectRootElement_Tests.cs (12)
108Assert.Equal(0, Helpers.Count(project.Children)); 542Console.WriteLine(@"Children: {0}", Helpers.Count(project.Children)); 543Console.WriteLine(@"Targets: {0}", Helpers.MakeList(project.Targets).Count); 544Console.WriteLine(@"Root ItemGroups: {0}", Helpers.MakeList(project.ItemGroups).Count); 545Console.WriteLine(@"Root PropertyGroups: {0}", Helpers.MakeList(project.PropertyGroups).Count); 546Console.WriteLine(@"UsingTasks: {0}", Helpers.MakeList(project.UsingTasks).Count); 547Console.WriteLine(@"ItemDefinitionGroups: {0}", Helpers.MakeList(project.ItemDefinitionGroups).Count); 589Helpers.VerifyAssertLineByLine(expected, builder.ToString()); 619Helpers.VerifyAssertLineByLine(expected, actual); 830List<ProjectPropertyElement> properties = Helpers.MakeList(project.Properties); 888List<ProjectItemElement> items = Helpers.MakeList(project.Items); 1987Helpers.VerifyAssertLineByLine(expected, actual, false);
Construction\ProjectTargetElement_Tests.cs (13)
61ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 63Assert.Equal(0, Helpers.Count(target.Children)); 202var tasks = Helpers.MakeList(target.Children); 221Helpers.ClearDirtyFlag(project); 237Helpers.ClearDirtyFlag(project); 253Helpers.ClearDirtyFlag(project); 269Helpers.ClearDirtyFlag(project); 285Helpers.ClearDirtyFlag(project); 301Helpers.ClearDirtyFlag(project); 318Helpers.ClearDirtyFlag(project); 325Helpers.ClearDirtyFlag(project); 332Helpers.ClearDirtyFlag(project); 385ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children);
Construction\ProjectTaskElement_Tests.cs (15)
35var parameters = Helpers.MakeDictionary(task.Parameters); 38Assert.Equal(0, Helpers.Count(task.Outputs)); 119var parameters = Helpers.MakeDictionary(task.Parameters); 140var parameters = Helpers.MakeDictionary(task.Parameters); 157Helpers.ClearDirtyFlag(task.ContainingProject); 161var parameters = Helpers.MakeDictionary(task.Parameters); 225Helpers.ClearDirtyFlag(task.ContainingProject); 229var parameters = Helpers.MakeDictionary(task.Parameters); 241Helpers.ClearDirtyFlag(task.ContainingProject); 245var parameters = Helpers.MakeDictionary(task.Parameters); 263var parameters = Helpers.MakeDictionary(task.Parameters); 275Helpers.ClearDirtyFlag(task.ContainingProject); 290Helpers.ClearDirtyFlag(task.ContainingProject); 304ProjectTargetElement target = (ProjectTargetElement)Helpers.GetFirst(project.Children); 305return (ProjectTaskElement)Helpers.GetFirst(target.Children);
Construction\ProjectUsingTaskElement_Tests.cs (11)
250Helpers.ClearDirtyFlag(usingTask.ContainingProject); 264Helpers.ClearDirtyFlag(usingTask.ContainingProject); 305Helpers.ClearDirtyFlag(usingTask.ContainingProject); 320Helpers.ClearDirtyFlag(usingTask.ContainingProject); 335Helpers.ClearDirtyFlag(usingTask.ContainingProject); 422ProjectUsingTaskElement usingTask = (ProjectUsingTaskElement)Helpers.GetFirst(project.Children); 446Helpers.GetFirst(project.Children); 467Helpers.GetFirst(project.Children); 484ProjectUsingTaskElement usingTask = (ProjectUsingTaskElement)Helpers.GetFirst(project.Children); 502ProjectUsingTaskElement usingTask = (ProjectUsingTaskElement)Helpers.GetFirst(project.Children); 519ProjectUsingTaskElement usingTask = (ProjectUsingTaskElement)Helpers.GetFirst(project.Children);
Construction\UsingTaskBodyElement_Tests.cs (3)
78Helpers.ClearDirtyFlag(body.ContainingProject); 92Helpers.ClearDirtyFlag(body.ContainingProject); 140ProjectUsingTaskElement usingTask = (ProjectUsingTaskElement)Helpers.GetFirst(project.Children);
Construction\UsingTaskParameterElement_Tests.cs (11)
103Helpers.ClearDirtyFlag(parameter.ContainingProject); 117Helpers.ClearDirtyFlag(parameter.ContainingProject); 131Helpers.ClearDirtyFlag(parameter.ContainingProject); 145Helpers.ClearDirtyFlag(parameter.ContainingProject); 159Helpers.ClearDirtyFlag(parameter.ContainingProject); 173Helpers.ClearDirtyFlag(parameter.ContainingProject); 187Helpers.ClearDirtyFlag(parameter.ContainingProject); 201Helpers.ClearDirtyFlag(parameter.ContainingProject); 215Helpers.ClearDirtyFlag(parameter.ContainingProject); 229ProjectUsingTaskElement usingTask = (ProjectUsingTaskElement)Helpers.GetFirst(project.Children); 231ProjectUsingTaskParameterElement body = Helpers.GetFirst(parameterGroup.Parameters);
Construction\UsingTaskParameterGroup_Tests.cs (1)
141ProjectUsingTaskElement usingTask = (ProjectUsingTaskElement)Helpers.GetFirst(project.Children);
Construction\WhiteSpacePreservation_Tests.cs (1)
494Helpers.VerifyAssertLineByLine(expected, actual, false);
Definition\DefinitionEditing_Tests.cs (156)
161Helpers.VerifyAssertProjectContent(expected, project.Xml); 163List<ProjectItem> items = Helpers.MakeList(project.Items); 167Assert.Equal("i1", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 168Assert.Equal("i1", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 188Helpers.VerifyAssertProjectContent(expected, project.Xml); 190List<ProjectItem> items = Helpers.MakeList(project.Items); 194Assert.Equal("i(1)", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 195Assert.Equal("i(1)", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 220Helpers.VerifyAssertProjectContent(expected, project.Xml); 255Helpers.VerifyAssertProjectContent(expected, project.Xml); 271Assert.Equal("$(p)", Helpers.GetFirst(project.Items).UnevaluatedInclude); 272Assert.Equal("v1", Helpers.GetFirst(project.Items).EvaluatedInclude); 286paths = Helpers.CreateFiles("i1.xxx", "i2.xxx"); 292List<ProjectItem> items = Helpers.MakeList(project.Items); 299Helpers.DeleteFiles(paths); 359Helpers.VerifyAssertProjectContent(expected, project); 383Helpers.VerifyAssertProjectContent(expected, project); 408Helpers.VerifyAssertProjectContent(expected, project); 434Helpers.VerifyAssertProjectContent(expected, project); 460Helpers.VerifyAssertProjectContent(expected, project); 483Helpers.VerifyAssertProjectContent(expected, project); 511Helpers.VerifyAssertProjectContent(expected, project); 546Helpers.VerifyAssertProjectContent(expected, project); 571Helpers.VerifyAssertProjectContent(expected, project); 602Helpers.VerifyAssertProjectContent(expected, project); 630Helpers.VerifyAssertProjectContent(expected, project); 654Helpers.VerifyAssertProjectContent(expected, project); 668paths = Helpers.CreateFiles("i1.xxx", "i2.xxx"); 677Helpers.GetFirst(project.GetItems("i")).SetMetadataValue("n", "n1"); 695Helpers.VerifyAssertProjectContent(expected, project.Xml); 699Helpers.DeleteFiles(paths); 722Helpers.GetFirst(project.GetItems("i")).SetMetadataValue("m", "m2"); 739Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 762ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m"); 775Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 789paths = Helpers.CreateFiles("i1.xxx", "i2.xxx"); 798Helpers.GetFirst(project.GetItems("i")).RemoveMetadata("m"); 813Helpers.VerifyAssertProjectContent(expected, project.Xml); 817Helpers.DeleteFiles(paths); 846Helpers.VerifyAssertProjectContent(expected, project); 861ProjectItem item = Helpers.GetLast(project.Items); 872Helpers.VerifyAssertProjectContent(expected, project); 888ProjectItem item = Helpers.GetFirst(project.Items); 898ProjectItemElement newItemElement = Helpers.GetFirst((Helpers.GetFirst(project.Xml.ItemGroups)).Items); 916ProjectItem item = Helpers.GetLast(project.Items); 926ProjectItemElement newItemElement = Helpers.GetLast((Helpers.GetLast(project.Xml.ItemGroups)).Items); 944ProjectItem item = Helpers.GetLast(project.Items); 952ProjectItemElement newItemElement = Helpers.GetLast((Helpers.GetLast(project.Xml.ItemGroups)).Items); 974ProjectItem item = Helpers.GetLast(project.Items); 1002ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 1020Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 1034ProjectItem item = Helpers.MakeList(project.GetItems("i"))[1]; 1046Helpers.VerifyAssertProjectContent(expected, project.Xml); 1063ProjectItem item = Helpers.MakeList(project.GetItems("i"))[1]; 1078Helpers.VerifyAssertProjectContent(expected, project.Xml); 1080Assert.Equal("$(p)", (Helpers.MakeList(project.Items))[1].EvaluatedInclude); 1094paths = Helpers.CreateFiles("i1.xxx", "i2.xxx"); 1102ProjectItem item = Helpers.GetFirst(project.Items); 1115Helpers.VerifyAssertProjectContent(expected, project.Xml); 1119Helpers.DeleteFiles(paths); 1134paths = Helpers.CreateFiles("i1.xxx"); 1144ProjectItem item = Helpers.GetFirst(project.Items); 1147Helpers.VerifyAssertLineByLine(before, project.Xml.RawXml); 1151Helpers.DeleteFiles(paths); 1174ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 1186Helpers.VerifyAssertProjectContent(expected, project.Xml); 1188ProjectItemGroupElement itemGroupElement = Helpers.GetFirst(project.Xml.ItemGroups); 1189Assert.Single(Helpers.MakeList(itemGroupElement.Items)); 1192Assert.Single(Helpers.MakeList(project.Items)); 1193Assert.Single(Helpers.MakeList(project.ItemsIgnoringCondition)); 1195Assert.Empty(Helpers.MakeList(project.GetItems("i"))); 1196Assert.Empty(Helpers.MakeList(project.GetItemsIgnoringCondition("i"))); 1198Assert.True(object.ReferenceEquals(item, Helpers.GetFirst(project.GetItems("j")))); 1199Assert.True(object.ReferenceEquals(item, Helpers.GetFirst(project.GetItemsIgnoringCondition("j")))); 1200Assert.True(object.ReferenceEquals(item, Helpers.GetFirst(project.GetItemsByEvaluatedInclude("i1")))); 1218ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 1233Helpers.VerifyAssertProjectContent(expected, project.Xml); 1236ProjectItemElement itemElement = Helpers.GetFirst(Helpers.GetFirst(project.Xml.ItemGroups).Items); 1239Assert.Equal(2, Helpers.MakeList(itemElement.Metadata).Count); 1256Helpers.VerifyAssertProjectContent(expected, project.Xml); 1269ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 1280Helpers.VerifyAssertProjectContent(expected, project.Xml); 1282ProjectItemGroupElement itemGroupElement = Helpers.GetFirst(project.Xml.ItemGroups); 1283Assert.Equal(2, Helpers.MakeList(itemGroupElement.Items).Count); 1285Assert.True(object.ReferenceEquals(itemGroupElement, Helpers.GetFirst(project.GetItems("i")).Xml.Parent)); 1306project.RemoveItem(Helpers.GetFirst(project.GetItems("i"))); 1310Helpers.VerifyAssertProjectContent(expected, project.Xml); 1312Assert.Equal(0, Helpers.Count(project.Items)); 1313Assert.Empty(Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))); 1337project.RemoveItem(Helpers.GetFirst(project.GetItems("i"))); 1351Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 1365project.RemoveItem(Helpers.GetFirst(project.GetItems("i"))); 1374Helpers.VerifyAssertProjectContent(expected, project.Xml); 1389paths = Helpers.CreateFiles("i1.xxx", "i2.xxx"); 1398ProjectItem item = Helpers.GetFirst(project.Items); 1412Helpers.VerifyAssertProjectContent(expected, project.Xml); 1416Helpers.DeleteFiles(paths); 1437Assert.Empty(Helpers.MakeList(project.GetItems("i"))); 1438List<ProjectItem> itemsIgnoringCondition = Helpers.MakeList(project.GetItemsIgnoringCondition("i")); 1446itemsIgnoringCondition = Helpers.MakeList(project.GetItemsIgnoringCondition("i")); 1473int environmentPropertyCount = Helpers.MakeList(project.Properties).Count; 1484Helpers.VerifyAssertProjectContent(expected, project.Xml); 1488Assert.Equal(1, Helpers.Count(project.Properties) - environmentPropertyCount); 1498int environmentPropertyCount = Helpers.MakeList(project.Properties).Count; 1509Helpers.VerifyAssertProjectContent(expected, project.Xml); 1513Assert.Equal(1, Helpers.Count(project.Properties) - environmentPropertyCount); 1533Assert.Single(Helpers.MakeList(xml.Properties)); 1819int environmentPropertyCount = Helpers.MakeList(project.Properties).Count; 1828Helpers.VerifyAssertProjectContent(expected, project.Xml); 1833Assert.Equal(0, Helpers.Count(project.Properties) - environmentPropertyCount); 1856Helpers.VerifyAssertProjectContent(expected, project.Xml); 1880Helpers.VerifyAssertProjectContent(expected, project.Xml); 1882List<ProjectItem> items = Helpers.MakeList(project.Items); 1884Assert.Equal("m1", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].GetMetadataValue("m")); 1908Helpers.VerifyAssertProjectContent(expected, project.Xml); 1910List<ProjectItem> items = Helpers.MakeList(project.Items); 1912Assert.Equal("m1$$", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].GetMetadataValue("m")); 1938Helpers.VerifyAssertProjectContent(expected, project.Xml); 1940List<ProjectItem> items = Helpers.MakeList(project.Items); 1958items = Helpers.MakeList(project.Items); 1988Helpers.VerifyAssertProjectContent(expected, project.Xml); 2011ProjectItem item = Helpers.GetFirst(project.Items); 2028Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 2032item = Helpers.GetFirst(project.Items); 2065Helpers.VerifyAssertProjectContent(expected, project.Xml); 2085Helpers.VerifyAssertProjectContent(expected, project.Xml); 2087List<ProjectItem> items = Helpers.MakeList(project.Items); 2091Assert.Equal("i1", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 2092Assert.Equal("i1", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 2112Helpers.VerifyAssertProjectContent(expected, project.Xml); 2114List<ProjectItem> items = Helpers.MakeList(project.Items); 2118Assert.Equal("i(1)", Helpers.GetFirst(project.GetItems("i")).EvaluatedInclude); 2119Assert.Equal("i(1)", Helpers.MakeList(project.CreateProjectInstance().GetItems("i"))[0].EvaluatedInclude); 2144Helpers.VerifyAssertProjectContent(expected, project.Xml); 2179Helpers.VerifyAssertProjectContent(expected, project.Xml); 2195Assert.Equal("$(p)", Helpers.GetFirst(project.Items).UnevaluatedInclude); 2196Assert.Equal("v1", Helpers.GetFirst(project.Items).EvaluatedInclude); 2210paths = Helpers.CreateFiles("i1.xxx", "i2.xxx"); 2216List<ProjectItem> items = Helpers.MakeList(project.Items); 2223Helpers.DeleteFiles(paths); 2280Helpers.VerifyAssertProjectContent(expected, project); 2304Helpers.VerifyAssertProjectContent(expected, project); 2329Helpers.VerifyAssertProjectContent(expected, project); 2355Helpers.VerifyAssertProjectContent(expected, project); 2381Helpers.VerifyAssertProjectContent(expected, project); 2404Helpers.VerifyAssertProjectContent(expected, project); 2432Helpers.VerifyAssertProjectContent(expected, project); 2463Helpers.VerifyAssertProjectContent(expected, project); 2488Helpers.VerifyAssertProjectContent(expected, project); 2519Helpers.VerifyAssertProjectContent(expected, project); 2547Helpers.VerifyAssertProjectContent(expected, project); 2571Helpers.VerifyAssertProjectContent(expected, project);
Definition\EditingElementsReferencedByOrReferences_Tests.cs (8)
46Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 81Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 110Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 161Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 207Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 261Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 299Helpers.VerifyAssertProjectContent(expected, project.Xml, false); 333Helpers.VerifyAssertProjectContent(expected, project.Xml, false);
Definition\Project_Tests.cs (23)
603List<ProjectItem> items = Helpers.MakeList(project.GetItems("i")); 1669List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1")); 1692List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i&1")); 1714List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i2")); 1744count = Helpers.Count(projectConstruction.Items); 1749count = Helpers.Count(project.GetItems("foo")); 1762count = Helpers.Count(project.GetItems("foo")); 1766count = Helpers.Count(projectInstance.Items); 1794List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1")); 1800items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1")); 1814List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1")); 1829List<ProjectItem> items = Helpers.MakeList(project.GetItemsByEvaluatedInclude("i1")); 1858Helpers.MakeList(project.GetItems("i"))[0].EvaluatedInclude.ShouldBe("i1"); 1894Helpers.MakeList(project.GetItems("i"))[0].EvaluatedInclude.ShouldBe("i2"); 1930Helpers.MakeList(project.GetItems("i"))[0].EvaluatedInclude.ShouldBe("i2"); 2222ProjectItem itemToRemove = Helpers.GetFirst(project.GetItems("Compile")); 2226Helpers.MakeList(project.Items).ShouldBeEmpty(); 2244ProjectItem itemToRemove = Helpers.GetFirst(project.GetItems("Compile")); 2248Helpers.MakeList(project.Items).ShouldBeEmpty(); 2332Helpers.CompareProjectXml(projectExpectedContents, writer.ToString()); 2511Helpers.GetFirst(items).UnevaluatedInclude.ShouldBe(unevaluatedInclude); 2512Helpers.GetFirst(items).EvaluatedInclude.ShouldBe(evaluatedInclude); 4424IList<ProjectItem> items = Helpers.MakeList(project.GetItems("i"));
Definition\ProjectCollection_Tests.cs (13)
428List<Project> projects = Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects); 616Helpers.ClearDirtyFlag(project1.Xml); 638Helpers.ClearDirtyFlag(project1.Xml); 655Helpers.ClearDirtyFlag(project1.Xml); 656Helpers.ClearDirtyFlag(project2.Xml); 684Helpers.ClearDirtyFlag(project1.Xml); 705Assert.Empty(Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects)); 794Assert.True(ReferenceEquals(project, Helpers.MakeList(ProjectCollection.GlobalProjectCollection.LoadedProjects)[0])); 960List<Toolset> toolsets = Helpers.MakeList(collection.Toolsets); 983List<Toolset> toolsets = Helpers.MakeList(collection.Toolsets); 1006List<Toolset> toolsets = Helpers.MakeList(collection.Toolsets); 1034int initial = Helpers.MakeList(collection.Toolsets).Count; 1042Assert.Equal(1, Helpers.MakeList(collection.Toolsets).Count - initial);
Definition\ProjectItem_Tests.cs (17)
127var itemMetadata = Helpers.MakeList(item.Metadata); 164ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 783Helpers.ResetStateForDriveEnumeratingWildcardTests(env, "1"); 830Helpers.ResetStateForDriveEnumeratingWildcardTests(env, "0"); 949Helpers.ResetStateForDriveEnumeratingWildcardTests(env, throwException ? "1" : "0"); 987var includeWithForwardSlash = Helpers.ToForwardSlash(includeString); 988var excludeWithForwardSlash = Helpers.ToForwardSlash(excludeString); 1531var itemMetadata = Helpers.MakeList(item.Metadata); 1881Assert.Equal(0, Helpers.Count(item.Xml.Metadata)); 1895ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 1900Assert.Equal(0, Helpers.Count(item.DirectMetadata)); 1919ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 1951ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 2067ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 2098ProjectItem item = Helpers.GetFirst(project.GetItems("i")); 2130item = Helpers.GetFirst(project.GetItems("i")); 3710itemsFromFragmentWithGlobs = Helpers.MakeList(new Project(testProject.ProjectFile).GetItems("i"));
Definition\ProjectItemDefinition_Tests.cs (5)
50Helpers.VerifyAssertProjectContent(expected, project.Xml); 70Assert.Equal("v", Helpers.GetFirst(project.GetItems("i")).GetMetadataValue("m")); 86List<ProjectMetadata> metadataList = Helpers.MakeList(metadataCollection); 106List<ProjectMetadata> metadataList = Helpers.MakeList(metadataCollection); 180Helpers.VerifyAssertProjectContent(expected, project.Xml);
Definition\ProjectMetadata_Tests.cs (12)
60Helpers.GetFirst(project.GetItems("i")).SetMetadataValue("m1", "v2"); 61Helpers.GetFirst(project.GetItems("i")).SetMetadataValue("m2", "v%214"); 79Helpers.CompareProjectXml(expected, writer.ToString()); 80Assert.Equal("v!4", Helpers.GetFirst(project.GetItems("i")).GetMetadataValue("m2")); 162ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("j")).GetMetadata("m1"); 189ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1"); 215ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1"); 242ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1"); 274ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1"); 306ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1"); 338ProjectMetadata metadatum = Helpers.GetFirst(project.GetItems("i")).GetMetadata("m1"); 469ProjectItem item = Helpers.GetFirst(project.GetItems("i"));
Instance\ProjectInstance_Tests.cs (62)
66IList<ProjectItemInstance> items = Helpers.MakeList(p.GetItems("i")); 135Assert.True(object.ReferenceEquals(returned, Helpers.MakeList(p.GetItems("i"))[0])); 141var metadataOut = Helpers.MakeList(item.Metadata); 265Assert.Single(Helpers.MakeList(project.GetItems("j"))); 266Assert.Equal("i1", Helpers.MakeList(project.GetItems("j"))[0].EvaluatedInclude); 267Assert.Equal("m1", Helpers.MakeList(project.GetItems("j"))[0].GetMetadataValue("m")); 268Assert.Equal("n;;", Helpers.MakeList(project.GetItems("j"))[0].GetMetadataValue("n")); 309Assert.Equal(2, Helpers.MakeList(projectInstance.GetItems("i")).Count); 310Assert.Equal(file1, Helpers.MakeList(projectInstance.GetItems("i"))[0].EvaluatedInclude); 311Assert.Equal(file2, Helpers.MakeList(projectInstance.GetItems("i"))[1].EvaluatedInclude); 331Assert.False(Object.ReferenceEquals(Helpers.MakeList(first.GetItems("i"))[0], Helpers.MakeList(second.GetItems("i"))[0])); 334Assert.Equal(4, Helpers.MakeList(first.GetItems("i")).Count); 335Assert.Equal(3, Helpers.MakeList(second.GetItems("i")).Count); 671Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.SetProperty("a", "b"); }); 682Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.RemoveProperty("p1"); }); 693Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.RemoveItem(Helpers.GetFirst(instance.Items)); }); 704Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.AddItem("a", "b"); }); 715Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.AddItem("a", "b", new List<KeyValuePair<string, string>>()); }); 726Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.Build(); }); 737Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).EvaluatedInclude = "x"; }); 748Helpers.VerifyAssertThrowsInvalidOperation(delegate () { ((ITaskItem2)Helpers.GetFirst(instance.Items)).EvaluatedIncludeEscaped = "x"; }); 759Helpers.VerifyAssertThrowsInvalidOperation(delegate () { ((ITaskItem2)Helpers.GetFirst(instance.Items)).ItemSpec = "x"; }); 770Helpers.VerifyAssertThrowsInvalidOperation(delegate () { ((ITaskItem2)Helpers.GetFirst(instance.Items)).SetMetadataValueLiteral("a", "b"); }); 781Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).SetMetadata(new List<KeyValuePair<string, string>>()); }); 792Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).SetMetadata("a", "b"); }); 803Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).RemoveMetadata("n"); }); 814Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Properties).EvaluatedValue = "v2"; }); 825Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.GetProperty("p1").EvaluatedValue = "v2"; }); 836Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.SetProperty("newproperty", "v2"); }); 848Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.SetProperty("g", "gv2"); }); 860Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.SetProperty("username", "someone_else_here"); }); 875Helpers.GetFirst(instance.Items).EvaluatedInclude = "new"; 891Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.GetProperty("g").EvaluatedValue = "v2"; }); 892Helpers.VerifyAssertThrowsInvalidOperation( 898Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Properties).EvaluatedValue = "v2"; }); 899Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).EvaluatedInclude = "new"; }); 916Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.GetProperty("g").EvaluatedValue = "v2"; }); 917Helpers.VerifyAssertThrowsInvalidOperation( 923Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Properties).EvaluatedValue = "v2"; }); 924Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).EvaluatedInclude = "new"; }); 938Helpers.VerifyAssertThrowsInvalidOperation(delegate () { instance.GetProperty("g").EvaluatedValue = "v2"; }); 939Helpers.VerifyAssertThrowsInvalidOperation( 945Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Properties).EvaluatedValue = "v2"; }); 946Helpers.VerifyAssertThrowsInvalidOperation(delegate () { Helpers.GetFirst(instance.Items).EvaluatedInclude = "new"; }); 963Helpers.GetFirst(instance.Items).EvaluatedInclude = "new"; 980Helpers.GetFirst(instance.Items).EvaluatedInclude = "new";
Instance\ProjectItemInstance_Tests.cs (14)
455Assert.Equal(0 + BuiltInMetadataCount, Helpers.MakeList(item.MetadataNames).Count); 478var itemMetadata = Helpers.MakeList(item.Metadata); 557Assert.Equal(3, Helpers.MakeList(item.Metadata).Count); 558Assert.Equal(3 + BuiltInMetadataCount, Helpers.MakeList(item.MetadataNames).Count); 636var itemMetadata = Helpers.MakeList(item.Metadata); 1000Helpers.CleanContentsAndBuildTargetWithDriveEnumeratingWildcard( 1004Helpers.ExpectedBuildResult.FailWithError); 1038Helpers.CleanContentsAndBuildTargetWithDriveEnumeratingWildcard( 1042Helpers.ExpectedBuildResult.SucceedWithWarning); 1069Helpers.CleanContentsAndBuildTargetWithDriveEnumeratingWildcard( 1073Helpers.ExpectedBuildResult.SucceedWithWarning); 1113Helpers.CleanContentsAndBuildTargetWithDriveEnumeratingWildcard( 1117Helpers.ExpectedBuildResult.SucceedWithNoErrorsAndWarnings); 1174return Helpers.MakeList(project.GetItems("i"));
Instance\ProjectTargetInstance_Tests.cs (1)
40IList<ProjectTaskInstance> tasks = Helpers.MakeList(target.Tasks);
Microsoft.Build.Engine.UnitTests (242)
BackEnd\BatchingEngine_Tests.cs (7)
269MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 308MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 342MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 365MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 391MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 418MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 455MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content);
BackEnd\BuildManager_Tests.cs (31)
177var graph = Helpers.CreateProjectGraph( 186return Helpers.CreateProjectFile( 981using (var buildManagerSession = new Helpers.BuildManagerSession( 1268<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(1)) + @"'/> 1360<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(500)) + @"'/> 1484<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(20)) + @"'/> 1504<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(20)) + @"'/> 1528<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(60)) + @"'/> 1583<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(5)) + @"'/> 1623<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(10)) + @"'/> 1660<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(20)) + @"'/> 1698<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(20)) + @"'/> 1736<Exec Command='{Helpers.GetSleepCommand(TimeSpan.FromSeconds(10))}'/> 1797<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(3)) + @"'/> 1833<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromSeconds(3)) + @"'/> 2655<Exec Command='" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(500)) + @"' /> 2727<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(500)) + @"` /> 2823<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(500)) + @"` /> 2923<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(500)) + @"` /> 3009<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(500)) + @"` /> 3113<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(200)) + @"` /> 3175<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(100)) + @"` /> 3180<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(100)) + @"` /> 3260<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(100)) + @"` /> 3265<Exec Command=`" + Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(100)) + @"` /> 3998<Exec Command=`{Helpers.GetSleepCommand(TimeSpan.FromSeconds(1))}` /> 4006<Exec Command=`{Helpers.GetSleepCommand(TimeSpan.FromSeconds(2))}` /> 4021<Exec Command=`{Helpers.GetSleepCommand(TimeSpan.FromSeconds(5))}` YieldDuringToolExecution=`true` StandardOutputImportance=`low` /> 4062<Exec Command='{Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(200))}' /> 4345var graph = Helpers.CreateProjectGraph(env: _env, dependencyEdges: new Dictionary<int, int[]> { { 1, new[] { 2, 3 } } }); 4349using (var buildSession = new Helpers.BuildManagerSession(_env))
BackEnd\BuildRequestConfiguration_Tests.cs (1)
176Assert.Equal(props.Count, Helpers.MakeList((IEnumerable<ProjectPropertyInstance>)(config1.GlobalProperties)).Count);
BackEnd\TargetBuilder_Tests.cs (5)
261using (var buildSession = new Helpers.BuildManagerSession(env, buildParameters)) 387MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 419MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 442MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 478MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content);
BackEnd\TargetEntry_Tests.cs (4)
650MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 698MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 795MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 918MockLogger log = Helpers.BuildProjectWithNewOMExpectFailure(content, allowTaskCrash: true);
BackEnd\TaskBuilder_Tests.cs (1)
149string sleepCommand = Helpers.GetSleepCommand(TimeSpan.FromSeconds(10));
BackEnd\TaskHost_Tests.cs (2)
727MockLogger mockLogger = Helpers.BuildProjectWithNewOMExpectSuccess(projectFileContents, globalProperties); 757MockLogger mockLogger = Helpers.BuildProjectWithNewOMExpectSuccess(projectFileContents);
Collections\MultiDictionary_Tests.cs (4)
105List<string> values = Helpers.MakeList<string>(dictionary["x"]); 112values = Helpers.MakeList<string>(dictionary["y"]); 117values = Helpers.MakeList<string>(dictionary["z"]); 143List<string> values = Helpers.MakeList<string>(dictionary["x"]);
CommunicationUtilities_Tests.cs (1)
31Helpers.AssertCollectionsValueEqual(envVars, referenceVars2);
Construction\ElementLocation_Tests.cs (1)
341Helpers.VerifyAssertLineByLine(readWriteLoadLocations, readOnlyLoadLocations);
Construction\SolutionProjectGenerator_Tests.cs (1)
871Helpers.VerifyAssertLineByLine(expected, solutionConfigurationContents);
Definition\ProjectEvaluationContext_Tests.cs (3)
105var fileSystem = new Helpers.LoggingFileSystem(); 135var fileSystem = new Helpers.LoggingFileSystem(); 147var directoryCacheFactory = new Helpers.LoggingDirectoryCacheFactory();
Definition\ProjectItem_Tests.cs (2)
36Assert.Single(Helpers.MakeList(item2.Metadata)); 84IList<ProjectItem> item = Helpers.MakeList(project.GetItems("i"));
EndToEndCondition_Tests.cs (2)
35BuildResult result = Helpers.BuildProjectContentUsingBuildManager($@"<Project> 58BuildResult result = Helpers.BuildProjectContentUsingBuildManager($@"<Project>
EscapingInProjects_Tests.cs (12)
91MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 112MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 222Helpers.CompareProjectXml(projectNewExpectedContents, project.Xml.RawXml); 267Helpers.CompareProjectXml(projectNewExpectedContents, project.Xml.RawXml); 316Helpers.CompareProjectXml(projectNewExpectedContents, project.Xml.RawXml); 372Helpers.CompareProjectXml(projectNewExpectedContents, project.Xml.RawXml); 434Helpers.CompareProjectXml(projectNewExpectedContents, project.Xml.RawXml); 475Helpers.CompareProjectXml(projectNewExpectedContents, project.Xml.RawXml); 517Helpers.CompareProjectXml(projectNewExpectedContents, project.Xml.RawXml); 542MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(String.Format(@" 584MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 609MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@"
Evaluation\Evaluator_Tests.cs (1)
1429Assert.Equal("3", (Helpers.GetFirst(instance.Targets["t"].Tasks)).GetParameter("Text"));
Evaluation\Expander_Tests.cs (36)
381MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 443MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 466MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 488MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 511MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 532MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 554MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 576MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 598MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 619MockLogger log = Helpers.BuildProjectWithNewOMExpectFailure(content, false /* no crashes */); 639MockLogger log = Helpers.BuildProjectWithNewOMExpectFailure(content, false /* no crashes */); 824MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 836logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 856MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 907MockLogger logger = Helpers.BuildProjectWithNewOMExpectFailure(@" 926MockLogger logger = Helpers.BuildProjectWithNewOMExpectFailure(@" 966MockLogger logger = Helpers.BuildProjectWithNewOMExpectFailure(@" 985MockLogger logger = Helpers.BuildProjectWithNewOMExpectFailure(@" 1025MockLogger logger = Helpers.BuildProjectWithNewOMExpectFailure(@" 1041var logger = Helpers.BuildProjectContentUsingBuildManagerExpectResult( 1057var logger = Helpers.BuildProjectContentUsingBuildManagerExpectResult( 1076MockLogger logger = Helpers.BuildProjectWithNewOMExpectFailure(@" 1095MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 1139MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(""" 1166MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 1192MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 1221MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 1250Helpers.BuildProjectWithNewOMExpectFailure(@" 1277Helpers.BuildProjectWithNewOMExpectFailure(@" 1299MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 1315MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 1331MockLogger logger = Helpers.BuildProjectWithNewOMExpectSuccess(@" 1941MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 1989MockLogger log = Helpers.BuildProjectWithNewOMExpectSuccess(content); 2886string currentPlatformString = Helpers.GetOSPlatformAsString(); 3209var osPlatformLowerCase = Helpers.GetOSPlatformAsString().ToLower();
Evaluation\Preprocessor_Tests.cs (19)
69Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 114Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 158Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 202Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 249Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 284Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 331Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 404Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 457Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 532Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 594Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 655Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 693Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 775Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 806Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 842Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 931Helpers.VerifyAssertLineByLine(expected, writer.ToString()); 1046Helpers.VerifyAssertLineByLine(expected, actual); 1211Helpers.VerifyAssertLineByLine(expected, writer.ToString());
FileMatcher_Tests.cs (4)
1354Helpers.ResetStateForDriveEnumeratingWildcardTests(env, "1"); 1395Helpers.ResetStateForDriveEnumeratingWildcardTests(env, "0"); 2385var forwardSlashFileSpec = Helpers.ToForwardSlash(filespec); 2386var forwardSlashExcludeSpecs = excludeFilespecs.Select(Helpers.ToForwardSlash).ToArray();
Graph\GraphLoadedFromSolution_tests.cs (1)
19using static Microsoft.Build.UnitTests.Helpers;
Graph\GraphTestingUtilities.cs (1)
204return Helpers.CreateProjectFile(
Graph\IsolateProjects_Tests.cs (2)
540using (var buildManagerSession = new Helpers.BuildManagerSession(_env, buildParameters)) 602using (var buildManagerSession = new Helpers.BuildManagerSession(_env, buildParameters))
Graph\ProjectGraph_Tests.cs (15)
74var graph = Helpers.CreateProjectGraph( 1520ProjectGraph graph = Helpers.CreateProjectGraph( 1572ProjectGraph graph = Helpers.CreateProjectGraph( 1811var projectGraph = Helpers.CreateProjectGraph(env, edges); 1832var graph = Helpers.CreateProjectGraph( 1836createProjectFile: (env, projectId, references, _, _, _) => Helpers.CreateProjectFile( 2327var projectGraph = Helpers.CreateProjectGraph(env, edges, globalProperties, entryPoints: entryPoints); 2346var projectGraph = Helpers.CreateProjectGraph( 2359var graph = Helpers.CreateProjectGraph( 2487var graph = Helpers.CreateProjectGraph( 2498var graph = Helpers.CreateProjectGraph( 2561var graph = Helpers.CreateProjectGraph( 2667var graph = Helpers.CreateProjectGraph( 2709var graph = Helpers.CreateProjectGraph( 2752ProjectGraph graph = Helpers.CreateProjectGraph(
Graph\ResultCacheBasedBuilds_Tests.cs (1)
19using static Microsoft.Build.UnitTests.Helpers;
Instance\ProjectInstance_Internal_Tests.cs (5)
178List<ProjectPropertyGroupTaskPropertyInstance> properties = Helpers.MakeList(propertyGroup.Properties); 216List<ProjectItemGroupTaskItemInstance> items = Helpers.MakeList(itemGroup.Items); 234List<ProjectItemGroupTaskMetadataInstance> metadata1 = Helpers.MakeList(items[0].Metadata); 235List<ProjectItemGroupTaskMetadataInstance> metadata2 = Helpers.MakeList(items[1].Metadata); 236List<ProjectItemGroupTaskMetadataInstance> metadata3 = Helpers.MakeList(items[2].Metadata);
InternalEngineHelpers.cs (1)
165Helpers.AssertDictionariesEqual(
ProjectCache\ProjectCacheTests.cs (24)
108=> Helpers.CreateProjectGraph( 468using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 496using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 578using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 692using (var buildSession = new Helpers.BuildManagerSession(_env)) 760using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 891using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 924using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 950using (var buildSession = new Helpers.BuildManagerSession(_env)) 1001using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 1021var graph = Helpers.CreateProjectGraph( 1041using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 1053var graph = Helpers.CreateProjectGraph( 1073using (var buildSession = new Helpers.BuildManagerSession(_env)) 1117Helpers.BuildManagerSession? buildSession = null; 1122buildSession = new Helpers.BuildManagerSession( 1229var graph = Helpers.CreateProjectGraph( 1245using var buildSession = new Helpers.BuildManagerSession( 1346using var buildSession = new Helpers.BuildManagerSession(_env, buildParameters); 1402using var buildSession = new Helpers.BuildManagerSession(_env, buildParameters); 1476using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 1537using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters)) 1565<Exec Command=`{Helpers.GetSleepCommand(TimeSpan.FromMilliseconds(200))}` /> 1613using (var buildSession = new Helpers.BuildManagerSession(_env, buildParameters))
SolutionFileBuilder.cs (1)
83return FromGraph(Helpers.CreateProjectGraph(env, edges), solutionDependenciesProjectNameToGuids: solutionDependenciesProjectNameToGuids);
TestComparers\ProjectInstanceModelTestComparers.cs (50)
29Helpers.AssertDictionariesEqual(x.GlobalProperties, y.GlobalProperties); 34Helpers.AssertDictionariesEqual( 42Helpers.AssertDictionariesEqual(((EvaluatorData)x).BeforeTargets, ((EvaluatorData)y).BeforeTargets, AssertTargetSpecificationPairsEqual); 43Helpers.AssertDictionariesEqual(((EvaluatorData)x).AfterTargets, ((EvaluatorData)y).AfterTargets, AssertTargetSpecificationPairsEqual); 54Assert.Equal(x.ProjectFileLocation, y.ProjectFileLocation, new Helpers.ElementLocationComparerIgnoringType()); 58Helpers.AssertDictionariesEqual(x.ItemDefinitions, y.ItemDefinitions, 94Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 95Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 96Assert.Equal(x.InputsLocation, y.InputsLocation, new Helpers.ElementLocationComparerIgnoringType()); 97Assert.Equal(x.OutputsLocation, y.OutputsLocation, new Helpers.ElementLocationComparerIgnoringType()); 98Assert.Equal(x.ReturnsLocation, y.ReturnsLocation, new Helpers.ElementLocationComparerIgnoringType()); 99Assert.Equal(x.KeepDuplicateOutputsLocation, y.KeepDuplicateOutputsLocation, new Helpers.ElementLocationComparerIgnoringType()); 100Assert.Equal(x.DependsOnTargetsLocation, y.DependsOnTargetsLocation, new Helpers.ElementLocationComparerIgnoringType()); 101Assert.Equal(x.BeforeTargetsLocation, y.BeforeTargetsLocation, new Helpers.ElementLocationComparerIgnoringType()); 102Assert.Equal(x.AfterTargetsLocation, y.AfterTargetsLocation, new Helpers.ElementLocationComparerIgnoringType()); 154Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 155Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 180Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 181Assert.Equal(x.IncludeLocation, y.IncludeLocation, new Helpers.ElementLocationComparerIgnoringType()); 182Assert.Equal(x.ExcludeLocation, y.ExcludeLocation, new Helpers.ElementLocationComparerIgnoringType()); 183Assert.Equal(x.RemoveLocation, y.RemoveLocation, new Helpers.ElementLocationComparerIgnoringType()); 184Assert.Equal(x.KeepMetadataLocation, y.KeepMetadataLocation, new Helpers.ElementLocationComparerIgnoringType()); 185Assert.Equal(x.RemoveMetadataLocation, y.RemoveMetadataLocation, new Helpers.ElementLocationComparerIgnoringType()); 186Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 189Assert.Equal(x.MatchOnMetadataLocation, y.MatchOnMetadataLocation, new Helpers.ElementLocationComparerIgnoringType()); 192Assert.Equal(x.MatchOnMetadataOptionsLocation, y.MatchOnMetadataOptionsLocation, new Helpers.ElementLocationComparerIgnoringType()); 212Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 213Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 229Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 230Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 265Assert.Equal(x.ReferenceLocation, y.ReferenceLocation, new Helpers.ElementLocationComparerIgnoringType()); 283Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 284Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 301Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 302Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 303Assert.Equal(x.ExecuteTargetsLocation, y.ExecuteTargetsLocation, new Helpers.ElementLocationComparerIgnoringType()); 323Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 324Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 325Assert.Equal(x.ContinueOnErrorLocation, y.ContinueOnErrorLocation, new Helpers.ElementLocationComparerIgnoringType()); 326Assert.Equal(x.MSBuildRuntimeLocation, y.MSBuildRuntimeLocation, new Helpers.ElementLocationComparerIgnoringType()); 327Assert.Equal(x.MSBuildRuntimeLocation, y.MSBuildRuntimeLocation, new Helpers.ElementLocationComparerIgnoringType()); 352Assert.Equal(xPair.Value.Item2, yPair.Value.Item2, new Helpers.ElementLocationComparerIgnoringType()); 385Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 386Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 387Assert.Equal(x.TaskParameterLocation, y.TaskParameterLocation, new Helpers.ElementLocationComparerIgnoringType()); 388Assert.Equal(x.ItemTypeLocation, y.ItemTypeLocation, new Helpers.ElementLocationComparerIgnoringType()); 406Assert.Equal(x.ConditionLocation, y.ConditionLocation, new Helpers.ElementLocationComparerIgnoringType()); 407Assert.Equal(x.Location, y.Location, new Helpers.ElementLocationComparerIgnoringType()); 408Assert.Equal(x.PropertyNameLocation, y.PropertyNameLocation, new Helpers.ElementLocationComparerIgnoringType()); 409Assert.Equal(x.TaskParameterLocation, y.TaskParameterLocation, new Helpers.ElementLocationComparerIgnoringType());
TestComparers\TaskRegistryComparers.cs (4)
25Helpers.AssertDictionariesEqual( 53Helpers.AssertDictionariesEqual( 80Helpers.AssertDictionariesEqual( 131Helpers.AssertDictionariesEqual(
Microsoft.Build.Tasks.UnitTests (18)
CodeTaskFactoryEmbeddedFileInBinlogTestHelper.cs (2)
62Helpers.BuildProjectWithNewOMAndBinaryLogger(projectFileContents, binaryLogger, out bool result, out string projectDirectoryPath); 114Helpers.BuildProjectWithNewOMAndBinaryLogger(projectFileContents, binaryLogger, out bool result, out string projectDirectory);
CodeTaskFactoryTests.cs (1)
1227MockLogger mockLogger = Helpers.BuildProjectWithNewOMExpectFailure(projectFileContents, allowTaskCrash: false);
Copy_Tests.cs (4)
1908Helpers.DeleteFiles(sourceFile, destFile); 1969Helpers.DeleteFiles(sourceFile, destFile); 2604Helpers.DeleteFiles(sourceFile, destFile); 2903Helpers.DeleteFiles(sourceFile, destFile);
CreateItem_Tests.cs (8)
298Helpers.ResetStateForDriveEnumeratingWildcardTests(env, "1"); 350Helpers.ResetStateForDriveEnumeratingWildcardTests(env, "0"); 391Helpers.CleanContentsAndBuildTargetWithDriveEnumeratingWildcard( 395Helpers.ExpectedBuildResult.FailWithError, 418Helpers.CleanContentsAndBuildTargetWithDriveEnumeratingWildcard( 422Helpers.ExpectedBuildResult.SucceedWithWarning, 445Helpers.CleanContentsAndBuildTargetWithDriveEnumeratingWildcard( 449Helpers.ExpectedBuildResult.SucceedWithWarning,
FileStateTests.cs (3)
50Helpers.VerifyAssertThrowsSameWay( 359Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(Path.GetTempPath()).Length; }, delegate () { var x = new FileState(Path.GetTempPath()).Length; }); 387Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(file).Length; }, delegate () { var x = new FileState(file).Length; });
Microsoft.Build.UnitTests.Shared (2)
EngineTestEnvironment.cs (1)
133CreatedFiles = Helpers.CreateFilesInDirectory(TestRoot, files);
ObjectModelHelpers.cs (1)
1105IList<ProjectItem> item = Helpers.MakeList(