96 writes to Sources
Microsoft.Build.Tasks.UnitTests (96)
ResourceHandling\GenerateResource_Tests.cs (96)
68t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 120t.Sources = new ITaskItem[] { 156t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 206t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 247t.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 254t2a.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 261t2b.Sources = new ITaskItem[] { new TaskItem(t2a.FilesWritten[0].ItemSpec) }; 296t.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 329t.Sources = new ITaskItem[] { new TaskItem(resxFileInput) }; 355t2.Sources = new ITaskItem[] { new TaskItem(resxFileInput) }; 375t.Sources = new ITaskItem[] { new TaskItem(resxFileInput) }; 383t2.Sources = new ITaskItem[] { new TaskItem(resxFileInput) }; 408t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 419t2.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 461t1.Sources = sources; 471t2.Sources = sources; 479t3.Sources = sources; 490t4.Sources = sources; 498t5.Sources = sources; 528t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 597t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 629t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 640t2.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 683createResources.Sources = new ITaskItem[] { new TaskItem(firstResx), new TaskItem(secondResx) }; 695t2.Sources = new ITaskItem[] { new TaskItem(firstResx), new TaskItem(secondResx) }; 743t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 758t2.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 799t.Sources = new ITaskItem[] { new TaskItem(resxFile), new TaskItem(txtFile) }; 815t2.Sources = new ITaskItem[] { new TaskItem(resxFile), new TaskItem(txtFile) }; 882initialCreator.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 892incrementalUpToDate.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 904incrementalOutOfDate.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 971t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 978t2.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 988t3.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 1035t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1068t.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 1075t2a.Sources = new ITaskItem[] { new TaskItem(t.FilesWritten[0].ItemSpec) }; 1082t2b.Sources = new ITaskItem[] { new TaskItem(t2a.FilesWritten[0].ItemSpec) }; 1116t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1127t2.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 1161t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1224t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1264t2.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1316t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 1337t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 1350t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 1367t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 1408t.Sources = new ITaskItem[] { new TaskItem(txtFile) }; 1469t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1529t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1587t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 1713t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1729t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1764t.Sources = new ITaskItem[] { new TaskItem(resxFile1), new TaskItem(resxFile2) }; 1841t.Sources = new ITaskItem[] { new TaskItem(resxFile1), new TaskItem(resxFile2) }; 1913t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 1940t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 1970t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 2031gr.Sources = new ITaskItem[] { new TaskItem(resource.Path) }; 2053t.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 2084t.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 2104t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2144t.Sources = new ITaskItem[] { new TaskItem(txtFile) }; 2190t.Sources = new ITaskItem[] { i }; 2228t.Sources = new ITaskItem[] { i }; 2255t.Sources = new ITaskItem[] { 2291t.Sources = new ITaskItem[] { 2335t.Sources = new ITaskItem[] { 2421t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2464t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2547t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2579t.Sources = new ITaskItem[] { new TaskItem("non-existent.resx"), new TaskItem(txtFile) }; 2616t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2655t.Sources = new ITaskItem[] { new TaskItem(newTextFile) }; 2687t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2719t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2751t.Sources = new ITaskItem[] { new TaskItem(textFile) }; 2788t.Sources = new ITaskItem[] { new TaskItem(resxFile), new TaskItem(resxFile2) }; 2837t.Sources = new ITaskItem[] { new TaskItem(txtFile) }; 2877t.Sources = new ITaskItem[] { new TaskItem(txtFile) }; 2914t.Sources = new ITaskItem[] { new TaskItem(txtFile) }; 2951t.Sources = new ITaskItem[] { new TaskItem(txtFile) }; 2992t.Sources = new ITaskItem[] { new TaskItem(txtFile) }; 3039t.Sources = new ITaskItem[] { new TaskItem(resourcesFile) }; 3213t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) }; 3362t.Sources = new ITaskItem[] { new TaskItem(Path.Combine(ObjectModelHelpers.TempProjectDir, "MyStrings.resx")) }; 3417t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 3453t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 3496t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 3542t.Sources = new ITaskItem[] { new TaskItem(resxFile), new TaskItem(resxFile1) }; 3627t.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 3684task.Sources = new ITaskItem[] { new TaskItem(resxFile) }; 3718t.Sources = new ITaskItem[] { new TaskItem("non-existent") }; 3861t.Sources = new ITaskItem[] { new TaskItem(sourceFile) }; 4214t.Sources = new ITaskItem[] { new TaskItem(textFile) };
69 references to Sources
Microsoft.Build.Tasks.UnitTests (69)
ResourceHandling\GenerateResource_Tests.cs (69)
69t.Sources[0].SetMetadata("Attribute", "InputValue"); 92File.Delete(t.Sources[0].ItemSpec); 128Assert.Equal(expectedOutFile0, t.Sources[0].GetMetadata("OutputResource")); 129Assert.Equal(expectedOutFile1, t.Sources[1].GetMetadata("OutputResource")); 130Assert.Equal(expectedOutFile2, t.Sources[2].GetMetadata("OutputResource")); 131Assert.Equal(expectedOutFile3, t.Sources[3].GetMetadata("OutputResource")); 157t.Sources[0].SetMetadata("Attribute", "InputValue"); 175File.Delete(t.Sources[0].ItemSpec); 269Utilities.AssertLogContainsResource(t2b, "GenerateResource.ProcessingFile", t2b.Sources[0].ItemSpec, t2b.OutputResources[0].ItemSpec); 270Utilities.AssertLogContainsResource(t2b, "GenerateResource.ReadResourceMessage", 4, t2b.Sources[0].ItemSpec); 305Utilities.AssertLogContainsResource(t, "GenerateResource.ProcessingFile", t.Sources[0].ItemSpec, outputFile); 306Utilities.AssertLogContainsResource(t, "GenerateResource.ReadResourceMessage", 4, t.Sources[0].ItemSpec); 309File.Delete(t.Sources[0].ItemSpec); 364Utilities.AssertLogContainsResource(t2, "GenerateResource.InputNewer", t2.Sources[0].ItemSpec, t2.OutputResources[0].ItemSpec); 390Utilities.AssertLogContainsResource(t2, "GenerateResource.ResourceNotFound", t2.Sources[0].ItemSpec); 439File.Delete(t.Sources[0].ItemSpec); 568File.Delete(t.Sources[0].ItemSpec); 606File.Delete(t.Sources[0].ItemSpec); 657File.Delete(t.Sources[0].ItemSpec); 769File.Delete(t.Sources[0].ItemSpec); 1047File.Delete(t.Sources[0].ItemSpec); 1138File.Delete(t.Sources[0].ItemSpec); 1144File.Delete(t2.Sources[0].ItemSpec); 1176string stronglyTypedFileName = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs"); 1200File.Delete(t.Sources[0].ItemSpec); 1240string stronglyTypedFileName = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs"); 1273Assert.Equal(t2.FilesWritten[2].ItemSpec, Path.ChangeExtension(t2.Sources[0].ItemSpec, ".cs")); 1278File.Delete(t.Sources[0].ItemSpec); 1476string stronglyTypedFileName = Path.ChangeExtension(t.Sources[0].ItemSpec, ".vb"); 1507File.Delete(t.Sources[0].ItemSpec); 1543string STRfile = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs"); 1560File.Delete(t.Sources[0].ItemSpec); 1601string STRfile = Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs"); 1718File.Delete(t.Sources[0].ItemSpec); 1737File.Delete(t.Sources[0].ItemSpec); 1922File.Delete(t.Sources[0].ItemSpec); 1949File.Delete(t.Sources[0].ItemSpec); 2064File.Delete(t.Sources[0].ItemSpec); 2120File.Delete(t.Sources[0].ItemSpec); 2210File.Delete(t.Sources[0].ItemSpec); 2240File.Delete(t.Sources[0].ItemSpec); 2265for (int i = 0; i < t.Sources.Length; i++) 2267string outputFile = Path.ChangeExtension(t.Sources[i].ItemSpec, ".resources"); 2272foreach (ITaskItem item in t.Sources) 2315foreach (ITaskItem item in t.Sources) 2342foreach (ITaskItem taskItem in t.Sources) 2353string outputFile = Path.ChangeExtension(t.Sources[0].ItemSpec, ".resources"); 2356outputFile = Path.ChangeExtension(t.Sources[1].ItemSpec, ".resources"); 2360outputFile = Path.ChangeExtension(t.Sources[2].ItemSpec, ".resources"); 2363outputFile = Path.ChangeExtension(t.Sources[3].ItemSpec, ".resources"); 2368Assert.Equal(t.FilesWritten[0].ItemSpec, Path.ChangeExtension(t.Sources[0].ItemSpec, ".resources")); 2369Assert.Equal(t.FilesWritten[1].ItemSpec, Path.ChangeExtension(t.Sources[1].ItemSpec, ".resources")); 2381Assert.Equal(t.FilesWritten[2].ItemSpec, Path.ChangeExtension(t.Sources[3].ItemSpec, ".resources")); 2393foreach (ITaskItem item in t.Sources) 2441File.Delete(t.Sources[0].ItemSpec); 2466File.Delete(Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs")); 2475Assert.Equal(t.StronglyTypedFileName, Path.ChangeExtension(t.Sources[0].ItemSpec, ".cs")); 2486File.Delete(t.Sources[0].ItemSpec); 2629File.Delete(t.Sources[0].ItemSpec); 2664File.Delete(t.Sources[0].ItemSpec); 2696File.Delete(t.Sources[0].ItemSpec); 2728File.Delete(t.Sources[0].ItemSpec); 2760File.Delete(t.Sources[0].ItemSpec); 3653File.Delete(t.Sources[0].ItemSpec); 3885if (t.OutputResources?[0] != null && t.Sources[0] != null) 3887File.GetLastWriteTime(t.OutputResources[0].ItemSpec).ShouldBeGreaterThanOrEqualTo(File.GetLastWriteTime(t.Sources[0].ItemSpec), $"we're talking here about {t.OutputResources[0].ItemSpec} and {t.Sources[0].ItemSpec}"); 4256Assert.Equal(Path.ChangeExtension(t.Sources[0].ItemSpec, codeFileExtension), t.StronglyTypedFileName); 4297File.Delete(t.Sources[0].ItemSpec);