14 writes to OutputFile
Microsoft.Build.Tasks.Core (3)
Microsoft.Build.Tasks.UnitTests (11)
48 references to OutputFile
Microsoft.Build.Tasks.Core (8)
Microsoft.Build.Tasks.UnitTests (40)
WriteCodeFragment_Tests.cs (40)
91Assert.Equal(file, task.OutputFile.ItemSpec);
94File.Delete(task.OutputFile.ItemSpec);
116Assert.Equal(expectedFile, task.OutputFile.ItemSpec);
136Assert.Equal(file.ItemSpec, task.OutputFile.ItemSpec);
137Assert.True(File.Exists(task.OutputFile.ItemSpec));
160Assert.Equal(fileName, task.OutputFile.ItemSpec);
185Assert.Equal(file, task.OutputFile.ItemSpec);
215Assert.Null(task.OutputFile);
242Assert.Null(task.OutputFile);
331string content = File.ReadAllText(task.OutputFile.ItemSpec);
357string content = File.ReadAllText(task.OutputFile.ItemSpec);
382Assert.True(File.Exists(task.OutputFile.ItemSpec));
383Assert.Equal(Path.GetTempPath(), task.OutputFile.ItemSpec.Substring(0, Path.GetTempPath().Length));
384Assert.Equal(".cs", task.OutputFile.ItemSpec.Substring(task.OutputFile.ItemSpec.Length - 3));
386File.Delete(task.OutputFile.ItemSpec);
405Assert.True(File.Exists(task.OutputFile.ItemSpec));
406Assert.Equal(folder.ItemSpec, task.OutputFile.ItemSpec.Substring(0, folder.ItemSpec.Length));
407Assert.Equal(".cs", task.OutputFile.ItemSpec.Substring(task.OutputFile.ItemSpec.Length - 3));
464File.Delete(task.OutputFile.ItemSpec);
510string content = File.ReadAllText(task.OutputFile.ItemSpec);
515File.Delete(task.OutputFile.ItemSpec);
534string content = File.ReadAllText(task.OutputFile.ItemSpec);
539File.Delete(task.OutputFile.ItemSpec);
566string content = File.ReadAllText(task.OutputFile.ItemSpec);
572File.Delete(task.OutputFile.ItemSpec);
602string content = File.ReadAllText(task.OutputFile.ItemSpec);
611File.Delete(task.OutputFile.ItemSpec);
705string content = File.ReadAllText(task.OutputFile.ItemSpec);
713File.Delete(task.OutputFile.ItemSpec);
738string content = File.ReadAllText(task.OutputFile.ItemSpec);
743File.Delete(task.OutputFile.ItemSpec);
1105string content = File.ReadAllText(task.OutputFile.ItemSpec);
1119if ((task.OutputFile is not null) && File.Exists(task.OutputFile.ItemSpec))
1121File.Delete(task.OutputFile.ItemSpec);
1143if ((task.OutputFile is not null) && File.Exists(task.OutputFile.ItemSpec))
1145File.Delete(task.OutputFile.ItemSpec);