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