2 writes to Root
Microsoft.DotNet.Open.Api.Tools.Tests (2)
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (2)
21Root = Path.Combine(ResolveLinks(Path.GetTempPath()), "dotnet-tool-tests", Guid.NewGuid().ToString("N")); 27Root = path;
37 references to Root
Microsoft.DotNet.Open.Api.Tools.Tests (37)
OpenApiAddFileTests.cs (2)
45Assert.Contains($"The project '{Path.Combine(_tempDir.Root, csproj)}' does not exist.", _error.ToString()); 112var absolute = Path.GetFullPath(nswagJsonFile, project.Project.Dir().Root);
OpenApiAddProjectTests.cs (1)
96var refProjFile = Path.Join(refProj.Root, $"{refProjName}.csproj");
OpenApiAddURLTests.cs (12)
36var jsonFile = Path.Combine(_tempDir.Root, expectedJsonName); 69var jsonFile = Path.Combine(_tempDir.Root, expectedJsonName); 102var jsonFile = Path.Combine(_tempDir.Root, expectedJsonName); 135var jsonFile = Path.Combine(_tempDir.Root, expectedJsonName); 167var jsonFile = Path.Combine(_tempDir.Root, expectedJsonName); 199var firstJsonFile = Path.Combine(_tempDir.Root, firstExpectedJsonName); 227var secondJsonFile = Path.Combine(_tempDir.Root, secondExpectedJsonName); 259var resultFile = Path.Combine(_tempDir.Root, expectedJsonName); 291var resultFile = Path.Combine(_tempDir.Root, expectedJsonName); 323var resultFile = Path.Combine(_tempDir.Root, expectedJsonName); 356var resultFile = Path.Combine(_tempDir.Root, expectedJsonName); 441var jsonFile = Path.Combine(_tempDir.Root, expectedJsonName);
OpenApiRefreshTests.cs (3)
25var expectedJsonPath = Path.Combine(_tempDir.Root, "filename.json"); 55var expectedJsonPath = Path.Combine(_tempDir.Root, "filename.json"); 83var expectedJsonPath = Path.Combine(_tempDir.Root, "filename.json");
OpenApiRemoveTests.cs (10)
32var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 47csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 56Assert.False(File.Exists(Path.Combine(_tempDir.Root, nswagJsonFile))); 75var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 90csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 118var refProjFile = Path.Join(refProj.Root, $"{refProjName}.csproj"); 124using (var csprojStream = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")).OpenRead()) 138using (var csprojStream = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")).OpenRead()) 177var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 186Assert.False(File.Exists(Path.Combine(_tempDir.Root, nswagJsonFile)));
OpenApiTestBase.cs (1)
87_tempDir.Root, wrapper, _output, _error);
src\Tools\Shared\TestHelpers\TemporaryCSharpProject.cs (1)
30public string Path => System.IO.Path.Combine(_directory.Root, _filename);
src\Tools\Shared\TestHelpers\TemporaryDirectory.cs (7)
32var subdir = new TemporaryDirectory(Path.Combine(Root, name), this); 78Directory.CreateDirectory(Root); 98File.WriteAllText(Path.Combine(Root, filename), contents); 103if (Root == null || !Directory.Exists(Root) || _parent != null) 110Directory.Delete(Root, recursive: true); 114Console.Error.WriteLine($"Test cleanup failed to delete '{Root}'");