8 instantiations of TransientTestFile
Microsoft.Build.UnitTests.Shared (8)
TestEnvironment.cs (8)
213return WithTransientTestState(new TransientTestFile(extension, createFile: true, expectedAsOutput: false)); 223return WithTransientTestState(new TransientTestFile(transientTestFolder.Path, fileName, contents)); 234return WithTransientTestState(new TransientTestFile(transientTestFolder.Path, extension, 246return WithTransientTestState(new TransientTestFile(extension, createFile: false, expectedAsOutput: false)); 257return WithTransientTestState(new TransientTestFile(transientTestFolder.Path, extension, 268return WithTransientTestState(new TransientTestFile(extension, createFile: false, expectedAsOutput: true)); 279return WithTransientTestState(new TransientTestFile(folderPath, extension, createFile: false, expectedAsOutput: true)); 745return new TransientTestFile(Path, fileName, contents);
284 references to TransientTestFile
Microsoft.Build.BuildCheck.UnitTests (28)
ConfigurationProvider_Tests.cs (7)
24TransientTestFile config1 = testEnvironment.CreateFile(workFolder1, ".editorconfig", 45TransientTestFile config1 = testEnvironment.CreateFile(workFolder1, ".editorconfig", 72TransientTestFile config1 = testEnvironment.CreateFile(workFolder1, ".editorconfig", 105TransientTestFile config1 = testEnvironment.CreateFile(workFolder1, ".editorconfig", 130TransientTestFile config1 = testEnvironment.CreateFile(workFolder1, ".editorconfig", 161TransientTestFile config1 = testEnvironment.CreateFile(workFolder1, ".editorconfig", 193TransientTestFile config1 = testEnvironment.CreateFile(workFolder1, ".editorconfig",
EditorConfigParser_Tests.cs (4)
68TransientTestFile config1 = testEnvironment.CreateFile(workFolder2, ".editorconfig", 77TransientTestFile config2 = testEnvironment.CreateFile(workFolder1, ".editorconfig", 100TransientTestFile config1 = testEnvironment.CreateFile(workFolder2, ".editorconfig", 106TransientTestFile config2 = testEnvironment.CreateFile(workFolder1, ".editorconfig",
EndToEndTests.cs (17)
47out TransientTestFile projectFile, 76out TransientTestFile projectFile, 116out TransientTestFile projectFile, 117out TransientTestFile editorconfigFile, 175PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") }); 209PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", BC0101Severity) }); 257PrepareSampleProjectsAndConfig(true, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", BC0101Severity) }); 317PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") }); 369out TransientTestFile projectFile, 405out TransientTestFile projectFile, 430out TransientTestFile projectFile, 554PrepareSampleProjectsAndConfig(buildInOutOfProcessNode, out TransientTestFile projectFile, new List<(string, string)>() { ("BC0101", "warning") }); 607out TransientTestFile projectFile, 608out TransientTestFile editorconfigFile, 616TransientTestFile testFile = _env.CreateFile(workFolder, "somefile"); 624TransientTestFile supplementalFile = _env.CreateFile(workFolder, supplementalAssetName, supplementalContent); 650out TransientTestFile projectFile,
Microsoft.Build.CommandLine.UnitTests (26)
MSBuildServer_Tests.cs (11)
95TransientTestFile project = _env.CreateFile("testProject.proj", printPidContents); 111TransientTestFile markerFile = _env.ExpectFile(); 125TransientTestFile sleepProject = _env.CreateFile("napProject.proj", string.Format(sleepingTaskContentsFormat, markerFile.Path)); 144TransientTestFile project = _env.CreateFile("testProject.proj", printPidContents); 181TransientTestFile project = _env.CreateFile("testProject.proj", printPidContents); 183TransientTestFile markerFile = _env.ExpectFile(); 184TransientTestFile sleepProject = _env.CreateFile("napProject.proj", string.Format(sleepingTaskContentsFormat, markerFile.Path)); 241TransientTestFile project = _env.CreateFile("testProject.proj", printPidContents); 278TransientTestFile project = _env.CreateFile("testProject.proj", printPidContents); 291TransientTestFile project = _env.CreateFile("testProject.proj", printPidContents); 321TransientTestFile project = _env.CreateFile("testProject.proj", reportMSBuildStartupDirectoryProperty);
PerfLog_Tests.cs (2)
34TransientTestFile classLibrary = testEnv.CreateFile(projectFolder, "ClassLibrary.csproj", 70TransientTestFile classLibrary = testEnv.CreateFile(projectFolder, "ClassLibrary.csproj",
TerminalLogger_Tests.cs (1)
707TransientTestFile projectFile = env.CreateFile(logFolder, "myProj.proj", contents);
XMake_Tests.cs (12)
712TransientTestFile project = env.CreateFile("testProject.csproj", "Project"); 748TransientTestFile project = env.CreateFile("testProject.csproj", @" 802TransientTestFile project = env.CreateFile("testProject.csproj", @" 821TransientTestFile project = env.CreateFile("testProject.csproj", @" 851TransientTestFile project = env.CreateFile("testProject.csproj", @" 862TransientTestFile wrongSyntaxFile = env.CreateFile("Program.cs", @" 1283TransientTestFile autoRspFile = env.CreateFile(folder, AutoResponseFileName, "-nowarn:MSB1001 @myRsp.rsp %NONEXISTENTENVIRONMENTVARIABLE%"); 1284TransientTestFile projectFile = env.CreateFile(folder, "project.proj", "<Project><Target Name=\"T\"><Message Text=\"Text\"/></Target></Project>"); 1285TransientTestFile rpsFile = env.CreateFile(folder, "myRsp.rsp", "-nr:false -m:2"); 2482var projectFile = tempDir.CreateFile("missingloggertest.proj", projectString); 2517var testProject = _env.CreateFile("Importer.proj", ObjectModelHelpers.CleanupFileContents(@" 2597var testSolution = _env.CreateFile("TestSolution.sln", ObjectModelHelpers.CleanupFileContents(solutionFileContents));
Microsoft.Build.Engine.OM.UnitTests (6)
Construction\ProjectTargetElement_Tests.cs (1)
356TransientTestFile file = env.CreateFile("proj.csproj", projectFile);
Construction\SolutionFile_Tests.cs (1)
689TransientTestFile sln = testEnvironment.CreateFile(FileUtilities.GetTemporaryFileName(".sln"), solutionFileContents);
Definition\Project_Tests.cs (2)
3977var importFile = env.CreateFile(".targets"); 4024var importFile = env.CreateFile(".targets");
Definition\ProjectItem_Tests.cs (1)
452TransientTestFile file = env.CreateFile(directory, "a.cs", String.Empty);
NugetRestoreTests.cs (1)
30TransientTestFile sln = testEnvironment.CreateFile(folder, "test.sln",
Microsoft.Build.Engine.UnitTests (151)
BackEnd\GenerateTemporaryTargetAssembly_Tests.cs (1)
21TransientTestFile otherproj = testenv.CreateFile("otherproj.csproj", @"
BackEnd\MSBuild_Tests.cs (3)
792var projectFile = env.CreateFile("test.proj", ObjectModelHelpers.CleanupFileContents(projectContent)); 824var projectFile = env.CreateFile(projFileName, ObjectModelHelpers.CleanupFileContents(projectContent)); 871var projectFile = env.CreateFile("test.proj", ObjectModelHelpers.CleanupFileContents(projectContent));
BackEnd\TaskBuilder_Tests.cs (1)
100TransientTestFile projectFile = env.CreateFile("myProj.proj", projectFileContents);
BackEnd\TaskHostFactory_Tests.cs (1)
44TransientTestFile project = env.CreateFile("testProject.csproj", pidTaskProject);
BinaryLogger_Tests.cs (5)
354TransientTestFile projectFile = env.CreateFile(logFolder, "myProj.proj", contents); 413TransientTestFile projectFile = env.CreateFile(logFolder, "myProj.proj", contents); 478TransientTestFile testFile = testFolder.CreateFile(testFileName, string.Join(Environment.NewLine, new[] { "123", "456" })); 625TransientTestFile projectFile1 = env.CreateFile(testFolder, "testProject01.proj", contents); 633TransientTestFile projectFile2 = env.CreateFile(testFolder, $"testProject_{verbosity}.proj", contents);
ChangeWaves_Tests.cs (1)
59TransientTestFile file = testEnvironment.CreateFile("proj.csproj", projectFile);
Construction\ProjectImportElement_Tests.cs (2)
22TransientTestFile projectFile = testEnvironment.CreateFile( 59TransientTestFile projectFile = testEnvironment.CreateFile(
Construction\SolutionFile_NewParser_Tests.cs (1)
138TransientTestFile sln = testEnvironment.CreateFile(FileUtilities.GetTemporaryFileName(".sln"), solutionFileContents);
Construction\SolutionFilter_Tests.cs (12)
55TransientTestFile classLibrary = testEnvironment.CreateFile(classLibSubFolder, "ClassLibrary.csproj", 65TransientTestFile simpleProject = testEnvironment.CreateFile(simpleProjectSubFolder, "SimpleProject.csproj", 73TransientTestFile solutionFile = testEnvironment.CreateFile(simpleProjectFolder, "SimpleProject.sln", 110TransientTestFile filterFile = testEnvironment.CreateFile(folder, "solutionFilter.slnf", 212TransientTestFile sln = testEnvironment.CreateFile(folder, "Dev.sln"); 213TransientTestFile slnf = testEnvironment.CreateFile(folder, "Dev.slnf", slnfValue.Replace(@"C:\\notAPath\\MSBuild.Dev.sln", sln.Path.Replace("\\", "\\\\"))); 231TransientTestFile microsoftBuild = testEnvironment.CreateFile(src, "Microsoft.Build.csproj"); 232TransientTestFile msbuild = testEnvironment.CreateFile(src, "MSBuild.csproj"); 233TransientTestFile commandLineUnitTests = testEnvironment.CreateFile(src, "Microsoft.Build.CommandLine.UnitTests.csproj"); 234TransientTestFile tasksUnitTests = testEnvironment.CreateFile(src, "Microsoft.Build.Tasks.UnitTests.csproj"); 236TransientTestFile sln = testEnvironment.CreateFile(folder, "Microsoft.Build.Dev.sln", 262TransientTestFile slnf = testEnvironment.CreateFile(folder, "Dev.slnf",
Construction\SolutionProjectGenerator_Tests.cs (15)
70TransientTestFile sln = testEnvironment.CreateFile(folder, "MySln.sln", "Microsoft Visual Studio Solution File, Format Version 12.00"); 71TransientTestFile targetsFile = testEnvironment.CreateFile(folder, name, 93TransientTestFile classLibrary = testEnvironment.CreateFile(classLibFolder, "classlib.csproj", 103TransientTestFile simpleProject = testEnvironment.CreateFile(simpleProjectFolder, "simpleProject.csproj", 112TransientTestFile solutionFile = testEnvironment.CreateFile(folder, "testFolder.sln", 138TransientTestFile classLibrary = testEnvironment.CreateFile(classLibFolder, "classlib.csproj", 154TransientTestFile simpleProject = testEnvironment.CreateFile(simpleProjectFolder, "simpleProject.csproj", 169TransientTestFile solutionFile = testEnvironment.CreateFile(folder, "testFolder.sln", 214TransientTestFile classLibrary = testEnvironment.CreateFile(classLibFolder, "classlib.csproj", 230TransientTestFile simpleProject = testEnvironment.CreateFile(simpleProjectFolder, "simpleProject.csproj", 245TransientTestFile solutionFile = testEnvironment.CreateFile(folder, "testFolder.sln", 883TransientTestFile proj1 = env.CreateFile("A.csproj", @"<Project><Target Name=""Printer""><Message Importance=""high"" Text=""print string"" /></Target></Project>"); 884TransientTestFile proj2 = env.CreateFile("B.csproj", @"<Project><Target Name=""Printer""><Message Importance=""high"" Text=""print string"" /></Target></Project>"); 885TransientTestFile proj3 = env.CreateFile("C.csproj", @"<Project><Target Name=""Printer""><Message Importance=""high"" Text=""print string"" /></Target></Project>"); 886TransientTestFile proj = env.CreateFile("mysln.sln",
Definition\ProjectEvaluationContext_Tests.cs (3)
852var subdirectoryFile = subdirectory.CreateFile("a"); 908var subdirectoryFile = subdirectory.CreateFile("a"); 909var rootFile = _env.DefaultTestDirectory.CreateFile("a");
Evaluation\Evaluator_Tests.cs (4)
57TransientTestFile projectFile = env.CreateFile("project.proj", $@" 77TransientTestFile realFile = env.CreateFile(existentDirectory, "realFile.csproj", @"<Project> </Project>"); 78TransientTestFile projectFile = env.CreateFile("project.proj", @$" 5017var tempPath = env.CreateFile(Guid.NewGuid().ToString(), testTargets);
Evaluation\Expander_Tests.cs (12)
4783var projectFile = env.CreateFile(alpha, ".proj", 4827var projectFile = env.CreateFile(alpha, ".proj", 4861var projectFile = env.CreateFile(root, ".proj", 4901var projectFile = env.CreateFile(root, ".proj", 4915var one = alpha.CreateFile("One.cs"); 4916var three = alpha.CreateFile("Three.cs"); 4942var projectFile = env.CreateFile(root, ".proj", 4984var projectFile = env.CreateFile(root, ".proj", 5028var projectFile = env.CreateFile(root, ".proj", 5071var projectFile = env.CreateFile(root, ".proj", 5103var projectFile = env.CreateFile(root, ".proj", 5175var dummyAssemblyFile = env.CreateFile(env.CreateFolder(), "test.dll");
FileLogger_Tests.cs (1)
403var logFile = testEnvironment.CreateFile(".log");
FileMatcher_Tests.cs (1)
79TransientTestFile file = _env.CreateFile(testFolder, "Foo.cs");
Graph\GetCompatiblePlatformGraph_Tests.cs (27)
43TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 51var proj2 = env.CreateFile("2.proj", @" 70TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 80var proj2 = env.CreateFile("2.proj", @" 91var proj3 = env.CreateFile("3.proj", @" 111TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 121var proj2 = env.CreateFile("2.proj", @" 133var proj3 = env.CreateFile("3.proj", @" 153TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 162var proj2 = env.CreateFile("2.proj", @" 173var proj3 = env.CreateFile("3.proj", @" 194TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 203var proj2 = env.CreateFile("2.proj", @" 221TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 230var proj2 = env.CreateFile("2.proj", @" 249TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 258var proj2 = env.CreateFile("2.proj", @" 276TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 285var proj2 = env.CreateFile("2.proj", @" 304TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 313var proj2 = env.CreateFile("2.proj", @" 334TransientTestFile entryProject = CreateProjectFile(env, 1, extraContent: @"<PropertyGroup> 342var proj2 = env.CreateFile("2.proj", @" 367TransientTestFile project1 = testEnvironment.CreateFile(project1SubFolder, $"{firstProjectName}.csproj", 382TransientTestFile project2 = testEnvironment.CreateFile(project2SubFolder, $"{secondProjectName}.proj", 393TransientTestFile project3 = testEnvironment.CreateFile(project3SubFolder, $"{thirdProjectName}.proj", 404TransientTestFile solutionFile = testEnvironment.CreateFile(folder, "SimpleProject.sln",
Graph\GraphLoadedFromSolution_tests.cs (1)
75var root = GraphTestingUtilities.CreateProjectFile(
Graph\GraphTestingUtilities.cs (1)
196internal static TransientTestFile CreateProjectFile(
Graph\IsolateProjects_Tests.cs (1)
559TransientTestFile CreateTmpFile(TestEnvironment env)
Graph\ProjectGraph_Tests.cs (50)
64TransientTestFile entryProject = CreateProjectFile(env, 1); 91TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2 }); 102TransientTestFile entryProject = CreateProjectFile(env, 1); 205TransientTestFile entryProject = CreateProjectFile(env, 1); 227TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3 }); 252TransientTestFile entryProject = CreateProjectFile(env, 2, new[] { 3, 5, 6 }); 305TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2 }); 306var proj2 = CreateProjectFile(env, 2, new[] { 3 }); 307var proj3 = CreateProjectFile(env, 3, new[] { 1 }); 319TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3 }); 332TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3, 4 }); 333var proj2 = CreateProjectFile(env, 2, new[] { 5, 6 }); 334var proj3 = CreateProjectFile(env, 3, new[] { 2, 8 }); 337var proj6 = CreateProjectFile(env, 6, new[] { 7 }); 338var proj7 = CreateProjectFile(env, 7, new[] { 3 }); 351var entryFile1 = CreateProjectFile(_env, 1, new[] { 3, 4 }); 352var entryFile2 = CreateProjectFile(_env, 2, new[] { 4, 5 }); 389TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3 }); 422TransientTestFile entryProject = env.CreateFile("1.proj", @" 441TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3 }); 481TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3 }); 512TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3, 4 }); 554TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2 }); 575TransientTestFile entryProject1 = CreateProjectFile(env, 1, new[] { 3 }); 576TransientTestFile entryProject2 = CreateProjectFile(env, 2, new[] { 3 }); 596TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2 }); 630TransientTestFile entryProject = env.CreateFile("1.proj", @" 667TransientTestFile entryProject1 = CreateProjectFile(env, 1, new[] { 4 }); 668TransientTestFile entryProject2 = CreateProjectFile(env, 2, new[] { 4, 5 }); 669TransientTestFile entryProject3 = CreateProjectFile(env, 3, new[] { 2, 6 }); 817TransientTestFile slnFile = env.CreateFile(@"Solution.sln", SolutionFileContents); 919TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2, 3 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }); 948TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: projectReferenceTargets); 976TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2, 3, 5 }, projectReferenceTargets: projectReferenceTargets); 1002TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }, defaultTargets: "A"); 1020TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }, defaultTargets: "A"); 1040TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { "B" } } }, defaultTargets: string.Empty); 1063TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: new Dictionary<string, string[]> { { "A", new[] { " ; ; " } } }, defaultTargets: string.Empty); 1084TransientTestFile entryProject = CreateProjectFile(env: env, projectNumber: 1); 1391TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2 }, new Dictionary<string, string[]> { { "A", new[] { ".default" } } }, defaultTargets: "A"); 1409TransientTestFile entryProject = CreateProjectFile( 1439TransientTestFile entryProject = CreateProjectFile(env, 1, new[] { 2, 3, 4 }, projectReferenceTargets); 1473var entryProject = CreateProjectFile( 1630TransientTestFile entryProject1 = CreateProjectFile(env, 1, projectReferences: new[] { 2 }, defaultTargets: "A", extraContent: ProjectReferenceTargetsWithMultitargeting); 1631TransientTestFile entryProject2 = CreateProjectFile(env, 2, defaultTargets: "A", extraContent: OuterBuildSpecificationWithProjectReferenceTargets); 2838TransientTestFile project1File = CreateProjectFile(env: env, projectNumber: 1, defaultTargets: "Project1Default", extraContent: ExtraContent); 2839TransientTestFile project2File = CreateProjectFile(env: env, projectNumber: 2, defaultTargets: "Project2Default", extraContent: ExtraContent); 2870TransientTestFile slnFile = env.CreateFile(@"Solution.sln", solutionFileContents); 2891TransientTestFile project1File = CreateProjectFile(env: env, projectNumber: 1); 2915TransientTestFile slnFile = env.CreateFile(@"Solution.sln", solutionFileContents);
Graph\ResultCacheBasedBuilds_Tests.cs (2)
512private static TransientTestFile CreateProjectFileWrapper(TestEnvironment env, int projectNumber, int[] projectReferences, Dictionary<string, string[]> projectReferenceTargets, string defaultTargets, string extraContent) 517internal static TransientTestFile CreateProjectFileWithBuildTargetAndItems(
ProjectCache\ProjectCacheTests.cs (3)
873var project1 = _env.CreateFile("1.proj", @" 1110var project = _env.CreateFile("1.proj", @$" 1327var project = _env.CreateFile(
TerminalLoggerConfiguration_Tests.cs (1)
32TransientTestFile projectFile = _env.CreateFile(logFolder, "myProj.proj", $"""
Utilities_Tests.cs (2)
78TransientTestFile inputFile = env.CreateFile("tempInput.tmp", ObjectModelHelpers.CleanupFileContents(@" 82TransientTestFile outputFile = env.CreateFile("tempOutput.tmp");
Microsoft.Build.Tasks.UnitTests (59)
AssemblyDependency\ResolveAssemblyReferenceCacheSerialization.cs (3)
124TransientTestFile file = env.CreateFile(); 160TransientTestFile file = env.CreateFile(); 186TransientTestFile file = env.CreateFile();
CodeTaskFactoryEmbeddedFileInBinlogTestHelper.cs (3)
32var sourceClass = env.CreateFile(folder, $"{taskName}.cs", sourceContent); 54TransientTestFile binlog = env.ExpectFile(".binlog"); 106TransientTestFile binlog = env.ExpectFile(".binlog");
Copy_Tests.cs (11)
145var sourceFile = env.CreateFile("source.txt"); 169var sourceFile = env.CreateFile("source.txt"); 262var sourceFile = env.CreateFile("source.txt"); 341var sourceFile = env.CreateFile("source.txt"); 364var sourceFile = env.CreateFile("source.txt"); 388var sourceFile = env.CreateFile("source.txt"); 412var sourceFile = env.CreateFile("source.txt"); 437var sourceFile = env.CreateFile("source.txt"); 463var sourceFile = env.CreateFile("source.txt"); 2942TransientTestFile sourceFile1 = env.CreateFile("source1.tmp", "This is the first source temp file."); // HIGHCHAR: Test writes in UTF8 without preamble. 2943TransientTestFile sourceFile2 = env.CreateFile("source2.tmp", "This is the second source temp file."); // HIGHCHAR: Test writes in UTF8 without preamble.
CreateCSharpManifestResourceName_Tests.cs (14)
386var csFile = env.CreateFile("SR1.cs", "namespace MyStuff.Namespace { class Class { } }"); 387var resXFile = env.CreateFile("SR1.resx", ""); 418var csFile = env.CreateFile("SR1.cs", "namespace MyStuff.Namespace { class Class { } }"); 420var resourceFile = env.CreateFile(ResourceFileName, ""); 457var csFile = subfolder.CreateFile("SR1.cs", "namespace MyStuff.Namespace { class Class { } }"); 458var resXFile = subfolder.CreateFile("SR1.resx", ""); 490var resXFile = env.CreateFile("SR1.resx", ""); 523var conventionCSFile = env.CreateFile("SR1.cs", "namespace MyStuff.Namespace { class Class { } }"); 524var nonConventionCSFile = env.CreateFile("SR2.cs", "namespace MyStuff2.Namespace { class Class2 { } }"); 525var resXFile = env.CreateFile("SR1.resx", ""); 554var csFile = env.CreateFile("SR1.cs", "namespace MyStuff.Namespace { class Class { } }"); 555var resXFile = env.CreateFile("SR1.resx", ""); 588var csFile = env.CreateFile("SR1.cs", "namespace MyStuff.Namespace { class Class { } }"); 589var resXFile = env.CreateFile("SR1.de.resx", "");
HintPathResolver_Tests.cs (3)
34var tempFile = _env.CreateFile("FakeSystem.Net.Http.dll", ""); 54var tempFile = _env.CreateFile("FakeSystem.Net.Http.dll", ""); 63var tempFile = _env.CreateFile("FakeSystem.Net.Http.dll", "");
RARPrecomputedCache_Tests.cs (3)
25TransientTestFile standardCache = env.CreateFile(".cache"); 60TransientTestFile standardCache = env.CreateFile(".cache"); 111TransientTestFile precomputedCache = env.CreateFile(".cache");
ResourceHandling\GenerateResource_Tests.cs (2)
2001TransientTestFile resource = env.CreateFile(".resx", @"<?xml version=""1.0"" encoding=""utf-8""?> 3919var dll = folder.CreateFile("System.Resource.Extensions.dll");
ResourceHandling\MSBuildResXReader_Tests.cs (2)
161var linkedTextFile = resourceHandlingFolder.CreateFile("TextFileInShiftJIS.txt"); 296var linkedTextFile = resourceHandlingFolder.CreateFile("FileToBeIncluded.txt");
RoslynCodeTaskFactory_Tests.cs (9)
52TransientTestFile inlineTask = env.CreateFile(folder, "5106.proj", @$" 92TransientTestFile assemblyProj = env.CreateFile(folder, "5106.csproj", @$" 105TransientTestFile csFile = env.CreateFile(folder, "Class1.cs", @" 119TransientTestFile inlineTask = env.CreateFile(folder, "5106.proj", @$" 294TransientTestFile file = testEnvironment.CreateFile(fileName: "236D48CE30064161B31B55DBF088C8B2", contents: "6159BD98607A460AA4F11D2FA92E5436"); 391TransientTestFile file = env.CreateFile(fileName: "CSharpClassSourceCodeFromFile.tmp", contents: taskClassSourceCode); 408TransientTestFile file = testEnvironment.CreateFile(fileName: "CSharpFragmentSourceCodeFromFile.tmp", contents: sourceCodeFileContents); 424TransientTestFile file = testEnvironment.CreateFile(fileName: "CSharpMethodSourceCodeFromFile.tmp", contents: sourceCodeFileContents); 600TransientTestFile file = testEnvironment.CreateFile(fileName: "CB3096DA4A454768AA9C0C4D422FC188.tmp", contents: sourceCodeFileContents);
Unzip_Tests.cs (4)
31TransientTestFile file1 = testEnvironment.CreateFile(source, "638AF4AE88A146E09CB69FE1CA7083DC.txt", "file1"); 184TransientTestFile file1 = testEnvironment.CreateFile(source, "D6DFD219DACE48F8B86EFCDF98433333.txt", "file1"); 212TransientTestFile file = testEnvironment.CreateFile("foo.txt", "foo"); 460var sourceFile = testEnvironment.CreateFile(source, executableName, "Dummy executable");
WriteCodeFragment_Tests.cs (1)
147var file = env.ExpectFile(Directory.GetCurrentDirectory(), ".tmp");
WriteLinesToFile_Tests.cs (2)
328var file = testEnv.CreateFile("FileToBeEmptied.txt", "Contents that should be erased"); 355var file = testEnv.GetTempFile();
ZipDirectory_Tests.cs (2)
73TransientTestFile file = testEnvironment.CreateFile(testEnvironment.DefaultTestDirectory, "test.zip", contents: "test"); 112TransientTestFile file = testEnvironment.CreateFile("foo.zip", "foo");
Microsoft.Build.UnitTests.Shared (13)
ObjectModelHelpers.cs (4)
1682public delegate TransientTestFile CreateProjectFileDelegate( 1690public static TransientTestFile CreateProjectFile( 1762TransientTestFile file = createProjectFile( 1785TransientTestFile file = createProjectFile(
TestEnvironment.cs (9)
211public TransientTestFile CreateFile(string extension = ".tmp") 216public TransientTestFile CreateFile(string fileName, string contents = "") 221public TransientTestFile CreateFile(TransientTestFolder transientTestFolder, string fileName, string contents = "") 232public TransientTestFile CreateFile(TransientTestFolder transientTestFolder, string extension = ".tmp") 244public TransientTestFile GetTempFile(string extension = ".tmp") 255public TransientTestFile GetTempFile(TransientTestFolder transientTestFolder, string extension = ".tmp") 266public TransientTestFile ExpectFile(string extension = ".tmp") 277public TransientTestFile ExpectFile(string folderPath, string extension = ".tmp") 743public TransientTestFile CreateFile(string fileName, string contents = null)
Microsoft.Build.Utilities.UnitTests (1)
ToolTask_Tests.cs (1)
848var output = testEnvironment.ExpectFile();