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);