26 writes to OutputResources
Microsoft.Build.Tasks.UnitTests (26)
110 references to OutputResources
Microsoft.Build.Tasks.UnitTests (110)
ResourceHandling\GenerateResource_Tests.cs (110)
73Assert.Equal("InputValue", t.OutputResources[0].GetMetadata("Attribute"));
74string resourcesFile = t.OutputResources[0].ItemSpec;
161Assert.Equal("InputValue", t.OutputResources[0].GetMetadata("Attribute"));
162string resourcesFile = t.OutputResources[0].ItemSpec;
211resourcesFile = t.OutputResources[0].ItemSpec;
267Assert.Equal(Utilities.ReadFileContent(t.OutputResources[0].ItemSpec),
268Utilities.ReadFileContent(t2b.OutputResources[0].ItemSpec));
269Utilities.AssertLogContainsResource(t2b, "GenerateResource.ProcessingFile", t2b.Sources[0].ItemSpec, t2b.OutputResources[0].ItemSpec);
274File.Delete(t.OutputResources[0].ItemSpec);
275File.Delete(t2a.OutputResources[0].ItemSpec);
333t.OutputResources.Length.ShouldBe(1);
334var resourceOutput = t.OutputResources[0].ItemSpec;
349Utilities.AssertLogContainsResource(t, "GenerateResource.OutputDoesntExist", t.OutputResources[0].ItemSpec);
362File.GetLastAccessTime(t2.OutputResources[0].ItemSpec).ShouldBe(DateTime.Now, TimeSpan.FromSeconds(5));
364Utilities.AssertLogContainsResource(t2, "GenerateResource.InputNewer", t2.Sources[0].ItemSpec, t2.OutputResources[0].ItemSpec);
379Utilities.AssertLogContainsResource(t, "GenerateResource.OutputDoesntExist", t.OutputResources[0].ItemSpec);
412Path.GetExtension(t.OutputResources[0].ItemSpec).ShouldBe(".resources");
421DateTime firstWriteTime = File.GetLastWriteTime(t.OutputResources[0].ItemSpec);
427File.GetLastWriteTime(t2.OutputResources[0].ItemSpec).ShouldBeGreaterThan(firstWriteTime);
434t2.OutputResources[0].ItemSpec);
465Utilities.AssertLogContainsResource(t1, "GenerateResource.OutputDoesntExist", t1.OutputResources[0].ItemSpec);
467output = t1.OutputResources;
494Utilities.AssertLogContainsResource(t4, "GenerateResource.OutputDoesntExist", t4.OutputResources[0].ItemSpec);
633Path.GetExtension(t.OutputResources[0].ItemSpec).ShouldBe(".resources");
689DateTime firstOutputCreationTime = File.GetLastWriteTime(createResources.OutputResources[0].ItemSpec);
690DateTime secondOutputCreationTime = File.GetLastWriteTime(createResources.OutputResources[1].ItemSpec);
714File.GetLastWriteTime(t2.OutputResources[0].ItemSpec).ShouldBeGreaterThan(firstOutputCreationTime);
715File.GetLastWriteTime(t2.OutputResources[1].ItemSpec).ShouldBe(secondOutputCreationTime);
718t2.OutputResources[0].ItemSpec.ShouldBe(createResources.OutputResources[0].ItemSpec);
719t2.OutputResources[1].ItemSpec.ShouldBe(createResources.OutputResources[1].ItemSpec);
723Utilities.AssertLogContainsResource(t2, "GenerateResource.InputNewer", firstResx, t2.OutputResources[0].ItemSpec);
747string resourcesFile = t.OutputResources[0].ItemSpec;
754DateTime time = File.GetLastWriteTime(t.OutputResources[0].ItemSpec);
764Assert.True(time.Equals(File.GetLastWriteTime(t2.OutputResources[0].ItemSpec)));
805Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile1);
807Assert.Equal(t.OutputResources[1].ItemSpec, resourcesFile2);
817DateTime time = File.GetLastWriteTime(t.OutputResources[0].ItemSpec);
818DateTime time2 = File.GetLastWriteTime(t.OutputResources[1].ItemSpec);
824Assert.Equal(t2.OutputResources[0].ItemSpec, resourcesFile1);
826Assert.Equal(t2.OutputResources[1].ItemSpec, resourcesFile2);
831Assert.True(time.Equals(File.GetLastWriteTime(t2.OutputResources[0].ItemSpec)));
832Assert.True(time2.Equals(File.GetLastWriteTime(t2.OutputResources[1].ItemSpec)));
887DateTime firstWriteTime = File.GetLastWriteTime(initialCreator.OutputResources[0].ItemSpec);
897File.GetLastWriteTime(incrementalUpToDate.OutputResources[0].ItemSpec).ShouldBe(firstWriteTime);
917File.GetLastWriteTime(incrementalOutOfDate.OutputResources[0].ItemSpec).ShouldBeGreaterThan(firstWriteTime);
919resourcesFile = incrementalOutOfDate.OutputResources[0].ItemSpec;
921Utilities.AssertLogContainsResource(incrementalOutOfDate, "GenerateResource.InputNewer", localSystemDll, incrementalOutOfDate.OutputResources[0].ItemSpec);
993Utilities.AssertLogContainsResource(t3, "GenerateResource.InputNewer", additionalInputs[1].ItemSpec, t3.OutputResources[0].ItemSpec);
994resourcesFile = t3.OutputResources[0].ItemSpec;
1040string resourcesFile = t.OutputResources[0].ItemSpec;
1084File.Delete(t2b.OutputResources[0].ItemSpec);
1089Assert.Equal(Utilities.ReadFileContent(t.OutputResources[0].ItemSpec),
1090Utilities.ReadFileContent(t2b.OutputResources[0].ItemSpec));
1094File.Delete(t.OutputResources[0].ItemSpec);
1095File.Delete(t2a.OutputResources[0].ItemSpec);
1121string resourcesFile = t.OutputResources[0].ItemSpec;
1167string resourcesFile = t.OutputResources[0].ItemSpec;
1169string stronglyTypedClassName = Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec);
1230string resourcesFile = t.OutputResources[0].ItemSpec;
1232string stronglyTypedClassName = Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec);
1269Assert.Equal(t2.OutputResources[0].ItemSpec, resourcesFile);
1325resourcesFile = t.OutputResources[0].ItemSpec;
1356Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile);
1416resourcesFile = t.OutputResources[0].ItemSpec;
1418Assert.Single(t.OutputResources);
1428Utilities.AssertLogContainsResource(t, "GenerateResource.ProcessingFile", txtFile, t.OutputResources[0].ItemSpec);
1479string resourcesFile = t.OutputResources[0].ItemSpec;
1535string resourcesFile = t.OutputResources[0].ItemSpec;
1548Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec));
1593string resourcesFile = t.OutputResources[0].ItemSpec;
1606Assert.Equal(t.StronglyTypedClassName, Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec));
1789Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile2);
1790Assert.Single(t.OutputResources);
1868Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile2);
1869Assert.Single(t.OutputResources);
1976resourcesFile = t.OutputResources[0].ItemSpec;
1978Assert.Equal(t.FilesWritten[0].ItemSpec, t.OutputResources[0].ItemSpec);
2201Assert.Equal("fr", t.OutputResources[0].GetMetadata("Locale"));
2204Assert.Equal("MyAlternateResource.resources", t.OutputResources[0].ItemSpec);
2207Assert.Equal("Pumpkin", t.OutputResources[0].GetMetadata("Flavor"));
2234Assert.Equal(resourcesFile, t.OutputResources[0].ItemSpec);
2237Assert.Equal("en-GB", t.OutputResources[0].GetMetadata("Locale"));
2268Assert.Equal(outputFile, t.OutputResources[i].ItemSpec);
2307Assert.Equal(t.FilesWritten[i].ItemSpec, t.OutputResources[i].ItemSpec);
2354Assert.Equal(outputFile, t.OutputResources[0].ItemSpec);
2355Assert.True(File.Exists(t.OutputResources[0].ItemSpec));
2357Assert.Equal(outputFile, t.OutputResources[1].ItemSpec);
2358Assert.True(File.Exists(t.OutputResources[1].ItemSpec));
2364Assert.Equal(outputFile, t.OutputResources[2].ItemSpec);
2365Assert.True(File.Exists(t.OutputResources[2].ItemSpec));
2429Utilities.AssertLogContainsResource(t, "GenerateResource.ProcessingFile", textFile, t.OutputResources[0].ItemSpec);
2471Utilities.AssertLogContainsResource(t, "GenerateResource.ProcessingFile", textFile, t.OutputResources[0].ItemSpec);
2588Assert.Single(t.OutputResources);
2589Assert.Equal(t.OutputResources[0].ItemSpec, resourcesFile);
2797Assert.True(t.OutputResources == null || t.OutputResources.Length == 0);
3631string resourcesFile = t.OutputResources[0].ItemSpec;
3688string outputResourceFile = task.OutputResources[0].ItemSpec;
3689task.OutputResources[0].ItemSpec.ShouldBe(task.FilesWritten[0].ItemSpec);
3696string resourcesFile = t.OutputResources[0].ItemSpec;
3705resourcesFile = t.OutputResources[0].ItemSpec;
3867return t.OutputResources[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}");
4237string resourcesFile = t.OutputResources[0].ItemSpec;
4240Assert.Equal(Path.GetFileNameWithoutExtension(textFile), Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec));
4243string stronglyTypedClassName = Path.GetFileNameWithoutExtension(t.OutputResources[0].ItemSpec);