1 write to Path
Microsoft.Build.UnitTests.Shared (1)
TestEnvironment.cs (1)
725Path = folderPath ?? FileUtilities.GetTemporaryDirectory(createFolder, subfolder);
254 references to Path
Microsoft.Build.BuildCheck.UnitTests (3)
EndToEndTests.cs (2)
153$"{Path.Combine(analysisCandidatePath, $"{analysisCandidate}.csproj")} /m:1 -nr:False -restore /p:OutputPath={env.CreateFolder().Path} -analyze -verbosity:n", 172$"{candidateAnalysisProjectPath} /m:1 -nr:False -restore /p:OutputPath={env.CreateFolder().Path} -getTargetResult:Build", out bool success, attachProcessId: false);
TestAssemblyInfo.cs (1)
67_testEnvironment.SetTempPath(assemblyTempFolder.Path);
Microsoft.Build.CommandLine.UnitTests (13)
PerfLog_Tests.cs (5)
30testEnv.SetEnvironmentVariable("DOTNET_PERFLOG_DIR", perfLogFolder.Path); 42string projectPath = Path.Combine(projectFolder.Path, "ClassLibrary.csproj"); 52string[] files = Directory.GetFiles(perfLogFolder.Path, "perf-*.log"); 65string perfLogPath = Path.Combine(perfLogFolder.Path, "logs"); 78string projectPath = Path.Combine(projectFolder.Path, "ClassLibrary.csproj");
TerminalLogger_Tests.cs (2)
671RunnerUtilities.ExecMSBuild($"{projectFile.Path} /m /bl:{logFileWithTL} -flp:logfile={Path.Combine(logFolder.Path, "logFileWithTL.log")};verbosity=diagnostic -tl:on", out bool success); 675RunnerUtilities.ExecMSBuild($"{projectFile.Path} /m /bl:{logFileWithoutTL} -flp:logfile={Path.Combine(logFolder.Path, "logFileWithoutTL.log")};verbosity=diagnostic", out success);
TestAssemblyInfo.cs (1)
67_testEnvironment.SetTempPath(assemblyTempFolder.Path);
XMake_Tests.cs (5)
1267string directory = _env.DefaultTestDirectory.Path; 1295env.SetCurrentDirectory(folder.Path); 1490var msbuildParameters = "\"" + directory.Path + "\""; 1534output.ShouldContain($"[A={directory.Path}{Path.DirectorySeparatorChar}]"); 2483string binLogLocation = _env.DefaultTestDirectory.Path;
Microsoft.Build.Engine.OM.UnitTests (3)
Construction\ConstructionEditing_Tests.cs (1)
3171var testSdkRoot = env.CreateFolder().Path;
Definition\ProjectItem_Tests.cs (1)
453IList<ProjectItem> items = ObjectModelHelpers.GetItemsFromFragment(itemDefinition.Replace("somedir", directory.Path), allItems: false, ignoreCondition: true);
TestAssemblyInfo.cs (1)
67_testEnvironment.SetTempPath(assemblyTempFolder.Path);
Microsoft.Build.Engine.UnitTests (118)
BackEnd\BuildRequestConfiguration_Tests.cs (1)
559project.FullPath = _env.CreateFolder().Path;
BackEnd\IntrinsicTask_Tests.cs (2)
2468env.SetCurrentDirectory(projectDirectory.Path); 2478<i1 Remove='" + projectDirectory.Path + Path.DirectorySeparatorChar + @"*.tmp'/>
BackEnd\SdkResolverLoader_Tests.cs (8)
220var root = env.CreateFolder().Path; 245var root = env.CreateFolder().Path; 272var root = env.CreateFolder().Path; 296var root = env.CreateFolder().Path; 312var root = env.CreateFolder().Path; 339var testRoot = env.CreateFolder().Path; 367var testRoot = env.CreateFolder().Path; 368var additionalRoot = env.CreateFolder().Path;
BackEnd\SdkResultOutOfProc_Tests.cs (2)
118string projectFolder = _env.CreateFolder().Path; 153string projectFolder = _env.CreateFolder().Path;
BackEnd\TaskExecutionHost_Tests.cs (1)
1066env.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugFolder.Path);
BinaryLogger_Tests.cs (12)
359RunnerUtilities.ExecMSBuild($"{_logFile} -flp:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic", out success); 362string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log")); 416RunnerUtilities.ExecMSBuild($"{projectFile.Path} -nr:False -bl:{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile2.log")};verbosity=normal", out bool success); 421string text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile.log")); 425string text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile2.log")); 428RunnerUtilities.ExecMSBuild($"{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile3.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile4.log")};verbosity=normal", out success); 430text = File.ReadAllText(Path.Combine(logFolder.Path, "logFile3.log")); 434text2 = File.ReadAllText(Path.Combine(logFolder.Path, "logFile4.log")); 479string symlinkPath = Path.Combine(testFolder2.Path, symlinkName); 480string symlinkLvl2Path = Path.Combine(testFolder2.Path, symlinkLvl2Name);
Construction\SolutionFile_Tests.cs (3)
700env.CreateFolder(Path.Combine(solutionFolder.Path, "RelativePath")); 703p.FullPath = Path.Combine(solutionFolder.Path, "RelativePath", "project file"); 704p.SolutionFileDirectory = Path.GetFullPath(solutionFolder.Path);
Construction\SolutionFilter_Tests.cs (5)
49TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "ClassLibrary"), createFolder: true); 50TransientTestFolder classLibSubFolder = testEnvironment.CreateFolder(Path.Combine(classLibFolder.Path, "ClassLibrary"), createFolder: true); 59TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "SimpleProject"), createFolder: true); 60TransientTestFolder simpleProjectSubFolder = testEnvironment.CreateFolder(Path.Combine(simpleProjectFolder.Path, "SimpleProject"), createFolder: true); 224TransientTestFolder src = testEnvironment.CreateFolder(Path.Combine(folder.Path, "src"), createFolder: true);
Construction\SolutionProjectGenerator_Tests.cs (6)
88TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true); 97TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true); 131TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true); 146TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true); 205TransientTestFolder classLibFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "classlib"), createFolder: true); 220TransientTestFolder simpleProjectFolder = testEnvironment.CreateFolder(Path.Combine(folder.Path, "simpleProject"), createFolder: true);
Definition\ProjectEvaluationContext_Tests.cs (34)
123{Path.Combine(_env.DefaultTestDirectory.Path, "1.file"), 1}, 124{Path.Combine(_env.DefaultTestDirectory.Path, "2.file"), 1} 181{ _env.DefaultTestDirectory.Path, 1}, 182{ Path.Combine(_env.DefaultTestDirectory.Path, "1.file"), 2 } 187{ _env.DefaultTestDirectory.Path, 1 } 371var projectDirectory = _env.DefaultTestDirectory.Path; 430var projectDirectory1 = _env.DefaultTestDirectory.CreateDirectory("1").Path; 431var projectDirectory2 = _env.DefaultTestDirectory.CreateDirectory("2").Path; 481var project1Directory = project1Root.CreateDirectory("1").Path; 482var project1GlobDirectory = project1Root.CreateDirectory("Glob").CreateDirectory("1").Path; 485var project2Directory = project2Root.CreateDirectory("2").Path; 486var project2GlobDirectory = project2Root.CreateDirectory("Glob").CreateDirectory("2").Path; 546var project1GlobDirectory = project1Directory.CreateDirectory("Glob").CreateDirectory("1").Path; 561Path.Combine(project1Directory.Path, "1"), 569Path.Combine(project2Directory.Path, "2"), 572<i Include=`{Path.Combine(project1Directory.Path, "Glob", "**", "*.cs")}` /> 590.Select(i => Path.Combine(project1Directory.Path, i)) 621File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), ""); 627Path.Combine(project1Directory.Path, "1"), 634Path.Combine(project2Directory.Path, "2"), 659File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), ""); 686: globDirectory.Path; 688Directory.CreateDirectory(globDirectory.Path); 719.Select((p, i) => new ProjectSpecification(Path.Combine(testDirectory.Path, $"ProjectDirectory{i}", $"Project{i}.proj"), p)); 725File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), ""); 735File.WriteAllText(Path.Combine(globDirectory.Path, $"{evaluationCount}.cs"), ""); 756var projectDirectory = _env.DefaultTestDirectory.Path; 799var projectDirectory = _env.DefaultTestDirectory.Path; 861<SearchedPath>$([MSBuild]::GetDirectoryNameOfFileAbove('{subdirectory.Path}', 'a'))</SearchedPath> 875searchedPath.EvaluatedValue.ShouldBe(subdirectory.Path); 881? subdirectory.Path 882: _env.DefaultTestDirectory.Path); 917<SearchedPath>$([MSBuild]::GetPathOfFileAbove('a', '{subdirectory.Path}'))</SearchedPath> 957projectContents.Select((p, i) => new ProjectSpecification(Path.Combine(_env.DefaultTestDirectory.Path, $"Project{i}.proj"), p)),
Evaluation\Evaluator_Tests.cs (1)
63<Import {importParameter.Replace("realFolder", existentDirectory.Path)} />
Evaluation\Expander_Tests.cs (8)
4747includes.ShouldContain(root.Path); 4748includes.ShouldContain(alpha.Path); 4749includes.ShouldContain(beta.Path); 4750includes.ShouldNotContain(gamma.Path); 4791includes.ShouldContain(root.Path); 4792includes.ShouldContain(alpha.Path); 4793includes.ShouldContain(beta.Path); 4794includes.ShouldContain(gamma.Path);
Evaluation\Preprocessor_Tests.cs (4)
848string testSdkDirectory = env.CreateFolder().Path; 937string testDirectory = env.CreateFolder().Path; 1052string sdk1 = env.CreateFolder().Path; 1053string sdk2 = env.CreateFolder().Path;
Evaluation\ProjectSdkImplicitImport_Tests.cs (2)
88_testSdkRoot = _env.CreateFolder().Path; 348var projectFolder = _env.CreateFolder().Path;
Evaluation\SdkResultEvaluation_Tests.cs (1)
40_testFolder = _env.CreateFolder().Path;
FileMatcher_Tests.cs (11)
66File.WriteAllBytes(Path.Combine(testFolder.Path, file), new byte[1]); 69string[] fileMatches = FileMatcher.Default.GetFiles(testFolder.Path, pattern).FileList; 80TransientTestFolder tf2 = _env.CreateFolder(Path.Combine(testFolder.Path, "subfolder")); 81string symlinkPath = Path.Combine(tf2.Path, "mySymlink"); 84Directory.CreateSymbolicLink(symlinkPath, testFolder.Path); 85string[] fileMatches = FileMatcher.Default.GetFiles(testFolder.Path, "**").FileList; 105foreach (string fullPath in GetFilesComplexGlobbingMatchingInfo.FilesToCreate.Select(i => Path.Combine(testFolder.Path, i.ToPlatformSlash()))) 114string[] matchedFiles = fileMatcher.GetFiles(testFolder.Path, include, excludes?.ToList()).FileList; 1224string workingPath = _env.CreateFolder().Path; 1238string workingPath = _env.CreateFolder().Path; 1255string workingPath = _env.CreateFolder().Path;
Graph\GetCompatiblePlatformGraph_Tests.cs (6)
365TransientTestFolder project1Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, firstProjectName), createFolder: true); 366TransientTestFolder project1SubFolder = testEnvironment.CreateFolder(Path.Combine(project1Folder.Path, firstProjectName), createFolder: true); 380TransientTestFolder project2Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, secondProjectName), createFolder: true); 381TransientTestFolder project2SubFolder = testEnvironment.CreateFolder(Path.Combine(project2Folder.Path, secondProjectName), createFolder: true); 391TransientTestFolder project3Folder = testEnvironment.CreateFolder(Path.Combine(folder.Path, thirdProjectName), createFolder: true); 392TransientTestFolder project3SubFolder = testEnvironment.CreateFolder(Path.Combine(project3Folder.Path, thirdProjectName), createFolder: true);
Graph\ProjectGraph_Tests.cs (8)
843string project1Path = Path.Combine(env.DefaultTestDirectory.Path, "Project1.csproj"); 844string project2Path = Path.Combine(env.DefaultTestDirectory.Path, "Project2.vcxproj"); 845string project3Path = Path.Combine(env.DefaultTestDirectory.Path, "Project3.vcxproj"); 846string project4Path = Path.Combine(env.DefaultTestDirectory.Path, "Project4.vcxproj"); 847string project5Path = Path.Combine(env.DefaultTestDirectory.Path, "Project5.vcxproj"); 848string project6Path = Path.Combine(env.DefaultTestDirectory.Path, "Project6.wapproj"); 849string project7Path = Path.Combine(env.DefaultTestDirectory.Path, "Project7.csproj"); 850string project8Path = Path.Combine(env.DefaultTestDirectory.Path, "Project8.csproj");
TestAssemblyInfo.cs (1)
67_testEnvironment.SetTempPath(assemblyTempFolder.Path);
TypeLoader_Tests.cs (2)
104string newAssemblyLocation = Path.Combine(folder.Path, Path.GetFileName(currentAssembly)); 109File.Copy(utilities, Path.Combine(folder.Path, utilitiesName));
Microsoft.Build.Framework.UnitTests (1)
TestAssemblyInfo.cs (1)
67_testEnvironment.SetTempPath(assemblyTempFolder.Path);
Microsoft.Build.Tasks.UnitTests (82)
Copy_Tests.cs (16)
176DestinationFolder = new TaskItem(destinationFolder.Path), 218SourceFolders = new ITaskItem[] { new TaskItem(s0Folder.Path), new TaskItem(s1Folder.Path) }, 219DestinationFolder = new TaskItem(destinationFolder.Path), 228Directory.Exists(Path.Combine(destinationFolder.Path, "source0")).ShouldBeTrue(); 229Directory.Exists(Path.Combine(destinationFolder.Path, "source1")).ShouldBeTrue(); 244DestinationFolder = new TaskItem(destinationFolder.Path), 274SourceFolders = new ITaskItem[] { new TaskItem(sourceFolder.Path) }, 275DestinationFolder = new TaskItem(destinationFolder.Path), 299DestinationFolder = new TaskItem(destinationFolder.Path), 323DestinationFolder = new TaskItem(destinationFolder.Path), 372DestinationFolder = new TaskItem(destinationFolder.Path), 395SourceFolders = new ITaskItem[] { new TaskItem(sourceFolder.Path) }, 1104var sourceFile = FileUtilities.GetTemporaryFile(env.DefaultTestDirectory.Path, null, "src", false); 1105var destinationFile = FileUtilities.GetTemporaryFile(env.DefaultTestDirectory.Path, null, "dst", false); 2945string destFile = Path.Combine(destFolder.Path, "The Destination");
CreateCSharpManifestResourceName_Tests.cs (1)
460env.SetCurrentDirectory(env.DefaultTestDirectory.Path);
DownloadFile_Tests.cs (9)
37DestinationFolder = new TaskItem(folder.Path), 66DestinationFolder = new TaskItem(folder.Path), 77FileInfo file = new FileInfo(Path.Combine(folder.Path, "foo.txt")); 114DestinationFolder = new TaskItem(folder.Path), 122FileInfo file = new FileInfo(Path.Combine(folder.Path, filename)); 144DestinationFolder = new TaskItem(folder.Path), 156FileInfo file = new FileInfo(Path.Combine(folder.Path, filename)); 209DestinationFolder = new TaskItem(folder.Path), 322DestinationFolder = new TaskItem(folder.Path),
GenerateBindingRedirects_Tests.cs (1)
268TransientTestFolder testFolder = env.CreateFolder(Path.Combine(rootTestFolder.Path, "\uD873\uDD02\u9FA8\u82D8\u722B\u9EA4\u03C5\u33D1\uE038\u486B\u0033"));
GetSDKReference_Tests.cs (2)
279GetSDKReferenceFiles.SDKFilesCache cache = new(null, folder.Path, null, null, null); 281GetSDKReferenceFiles.SDKFilesCache cache2 = new(null, folder.Path, null, null, null);
HintPathResolver_Tests.cs (1)
45var longTempFilePath = tempfolder.Path + "\\..\\tempfolder_for_CanResolveLongHintPath\\..\\tempfolder_for_CanResolveLongHintPath\\..\\tempfolder_for_CanResolveLongHintPath\\..\\tempfolder_for_CanResolveLongHintPath\\..\\tempfolder_for_CanResolveLongHintPath\\..\\tempfolder_for_CanResolveLongHintPath\\..\\tempfolder_for_CanResolveLongHintPath\\..\\tempfolder_for_CanResolveLongHintPath\\FakeSystem.Net.Http.dll";
PortableTasks_Tests.cs (1)
51var folder = env.CreateFolder().Path;
RemoveDir_Tests.cs (1)
56list.Add(new TaskItem(env.CreateFolder().Path));
ResourceHandling\GenerateResource_Tests.cs (2)
3669env.SetCurrentDirectory(env.DefaultTestDirectory.Path); 3675env.CreateFolder(Path.Combine(env.DefaultTestDirectory.Path, "tmp_dir")),
ResourceHandling\MSBuildResXReader_Tests.cs (1)
179Path.Combine(baseDir.Path, nameof(LoadsStringFromFileRefAsStringWithShiftJISEncoding) + ".resx"),
RoslynCodeTaskFactory_Tests.cs (2)
116string output = RunnerUtilities.ExecMSBuild(assemblyProj.Path + $" /p:OutDir={Path.Combine(folder.Path, "subFolder")} /restore", out bool success); 124<Reference Include=""{Path.Combine(folder.Path, "subFolder", "5106.dll")}"" />
TestAssemblyInfo.cs (1)
67_testEnvironment.SetTempPath(assemblyTempFolder.Path);
Unzip_Tests.cs (32)
39DestinationFolder = new TaskItem(source.Path), 67DestinationFolder = new TaskItem(destination.Path), 80DestinationFolder = new TaskItem(destination.Path), 88_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 89_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 95DestinationFolder = new TaskItem(destination.Path), 124DestinationFolder = new TaskItem(destination.Path), 132_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 133_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 134_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "subdir", "F83E9633685494E53BEF3794EDEEE6A6.txt"), customMessage: _mockEngine.Log); 135_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "subdir", "21D6D4596067723B3AC5DF9A8B3CBFE7.txt"), customMessage: _mockEngine.Log); 136Directory.Exists(Path.Combine(destination.Path, "emptyDir")); 192DestinationFolder = new TaskItem(source.Path), 216DestinationFolder = new TaskItem(folder.Path), 236DestinationFolder = new TaskItem(folder.Path), 237SourceFiles = new ITaskItem[] { new TaskItem(Path.Combine(testEnvironment.DefaultTestDirectory.Path, "foo.zip")), } 261DestinationFolder = new TaskItem(destination.Path), 270_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 271_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 290DestinationFolder = new TaskItem(destination.Path), 299_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "BE78A17D30144B549D21F71D5C633F7D.txt"), customMessage: _mockEngine.Log); 300_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "A04FF4B88DF14860B7C73A8E75A4FB76.txt"), customMessage: _mockEngine.Log); 323DestinationFolder = new TaskItem(destination.Path), 333_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file1.js"), customMessage: _mockEngine.Log); 334_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "file1.js.map"), customMessage: _mockEngine.Log); 335_mockEngine.Log.ShouldContain(Path.Combine(destination.Path, "file2.js"), customMessage: _mockEngine.Log); 336_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "readme.txt"), customMessage: _mockEngine.Log); 337_mockEngine.Log.ShouldNotContain(Path.Combine(destination.Path, "sub", "subfile.js"), customMessage: _mockEngine.Log); 356DestinationFolder = new TaskItem(destination.Path), 384DestinationFolder = new TaskItem(destination.Path), 412DestinationFolder = new TaskItem(destination.Path), 440DestinationFolder = new TaskItem(destination.Path),
WriteCodeFragment_Tests.cs (3)
105TaskItem folder = new TaskItem(env.CreateFolder(folderPath: null, createFolder: false).Path); 128TaskItem file = new TaskItem(Path.Combine(env.CreateFolder(folderPath: null, createFolder: false).Path, "File.tmp")); 397TaskItem folder = new TaskItem(env.CreateFolder(folderPath: null, createFolder: false).Path);
WriteLinesToFile_Tests.cs (3)
301var file = Path.Combine(directory.Path, $"{Guid.NewGuid().ToString("N")}.tmp"); 311Directory.Exists(directory.Path).ShouldBeFalse(); 315Directory.Exists(directory.Path).ShouldBeTrue();
ZipDirectory_Tests.cs (6)
32string zipFilePath = Path.Combine(testEnvironment.CreateFolder(createFolder: true).Path, "test.zip"); 38SourceDirectory = new TaskItem(sourceFolder.Path) 43_mockEngine.Log.ShouldContain(sourceFolder.Path, customMessage: _mockEngine.Log); 80SourceDirectory = new TaskItem(sourceFolder.Path) 85_mockEngine.Log.ShouldContain(sourceFolder.Path, customMessage: _mockEngine.Log); 118SourceDirectory = new TaskItem(folder.Path)
Microsoft.Build.UnitTests.Shared (20)
EngineTestEnvironment.cs (1)
112public string TestRoot => _folder.Path;
TestEnvironment.cs (19)
183return SetTempPath(folder.Path, true); 192return WithTransientTestState(SetTempPath(folder.Path, true)); 223return WithTransientTestState(new TransientTestFile(transientTestFolder.Path, fileName, contents)); 234return WithTransientTestState(new TransientTestFile(transientTestFolder.Path, extension, 257return WithTransientTestState(new TransientTestFile(transientTestFolder.Path, extension, 290Assert.True(!(createFolder ^ FileSystems.Default.DirectoryExists(folder.Path))); 729Directory.CreateDirectory(Path); 735return new TransientTestFolder(System.IO.Path.Combine(Path, directoryName)); 740return new TransientTestFile(Path, fileName, contents); 749Path.ShouldNotBeNullOrEmpty(); 750Path.ShouldNotBe(@"\"); 751Path.ShouldNotBe(@"/"); 752System.IO.Path.GetFullPath(Path).ShouldNotBe(System.IO.Path.GetFullPath(System.IO.Path.GetTempPath())); 753System.IO.Path.IsPathRooted(Path).ShouldBeTrue($"{Path} is not rooted"); 755FileUtilities.DeleteDirectoryNoThrow(Path, true); 804Directory.CreateDirectory(destination.Path); 806string path = System.IO.Path.Combine(destination.Path, filename); 808ZipFile.CreateFromDirectory(source.Path, path);
Microsoft.Build.Utilities.UnitTests (14)
TestAssemblyInfo.cs (1)
67_testEnvironment.SetTempPath(assemblyTempFolder.Path);
ToolLocationHelper_Tests.cs (12)
2504string rootDir = Path.Combine(env.DefaultTestDirectory.Path, "framework-root"); 2533string customFrameworkRootPath = Path.Combine(env.DefaultTestDirectory.Path, "framework-root"); 2556string rootDir = Path.Combine(env.CreateFolder().Path, "framework-root"); 2557string fallbackPath = Path.Combine(env.CreateFolder().Path, "framework-root"); 2587string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root"); 2600string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root"); 2602string rootDir = env.CreateFolder().Path; 2617string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root"); 2634string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root"); 2649string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root"); 2651string rootDir = env.CreateFolder().Path; 2666string customFrameworkDirToUse = Path.Combine(env.CreateFolder().Path, "framework-root");
ToolTask_Tests.cs (1)
659string tempDirectory = env.CreateFolder().Path;