1 write to _testDirectoryRoot
dotnet.Tests (1)
ToolManifestTests\ToolManifestFinderTests.cs (1)
26
_testDirectoryRoot
= _fileSystem.Directory.CreateTemporaryDirectory().DirectoryPath;
83 references to _testDirectoryRoot
dotnet.Tests (83)
ToolManifestTests\ToolManifestFinderTests.cs (83)
34
new DirectoryPath(
_testDirectoryRoot
),
40
new DirectoryPath(
_testDirectoryRoot
),
48
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContent);
51
new DirectoryPath(
_testDirectoryRoot
),
63
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
64
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContent);
79
var dotnetconfigDirectory = Path.Combine(
_testDirectoryRoot
, ".config");
84
new DirectoryPath(
_testDirectoryRoot
),
96
var rootDirectory = new DirectoryPath(
_testDirectoryRoot
);
106
new DirectoryPath(
_testDirectoryRoot
),
134
var rootDirectory = new DirectoryPath(
_testDirectoryRoot
);
144
new DirectoryPath(
_testDirectoryRoot
),
157
var rootDirectory = new DirectoryPath(
_testDirectoryRoot
);
167
new DirectoryPath(
_testDirectoryRoot
),
203
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename),
207
new DirectoryPath(
_testDirectoryRoot
),
222
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, customFileName), _jsonContent);
225
new DirectoryPath(
_testDirectoryRoot
),
230
toolManifest.Find(new FilePath(Path.Combine(
_testDirectoryRoot
, customFileName)));
251
new DirectoryPath(
_testDirectoryRoot
),
255
Action a = () => toolManifest.Find(new FilePath(Path.Combine(
_testDirectoryRoot
, "non-exists")));
258
Path.Combine(
_testDirectoryRoot
, "non-exists"),
267
new DirectoryPath(
_testDirectoryRoot
),
279
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonWithMissingField);
282
new DirectoryPath(
_testDirectoryRoot
),
290
Path.Combine(
_testDirectoryRoot
, _manifestFilename),
299
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonWithInvalidField);
302
new DirectoryPath(
_testDirectoryRoot
),
316
Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonWithInvalidType);
319
new DirectoryPath(
_testDirectoryRoot
),
333
Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonInvalidJsonInterger);
336
new DirectoryPath(
_testDirectoryRoot
),
348
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
350
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename),
376
new DirectoryPath(
_testDirectoryRoot
),
392
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
394
string manifestFileInParentDirectory = Path.Combine(
_testDirectoryRoot
, _manifestFilename);
429
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
446
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
448
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename),
466
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContentHigherVersion);
469
new DirectoryPath(
_testDirectoryRoot
),
483
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContentIsRootMissing);
486
new DirectoryPath(
_testDirectoryRoot
),
498
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContent);
501
new DirectoryPath(
_testDirectoryRoot
),
511
new DirectoryPath(
_testDirectoryRoot
),
518
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContent);
521
new DirectoryPath(
_testDirectoryRoot
),
531
new DirectoryPath(
_testDirectoryRoot
),
538
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
539
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContent);
552
new DirectoryPath(
_testDirectoryRoot
),
561
new DirectoryPath(
_testDirectoryRoot
),
571
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonWithMissingField);
574
new DirectoryPath(
_testDirectoryRoot
),
585
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonWithInvalidField);
588
new DirectoryPath(
_testDirectoryRoot
),
599
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename), _jsonContentInvalidJson);
602
new DirectoryPath(
_testDirectoryRoot
),
613
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
615
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename),
638
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
640
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename),
658
string manifestFilePath = Path.Combine(
_testDirectoryRoot
, _manifestFilename);
663
= new ToolManifestFinder(new DirectoryPath(
_testDirectoryRoot
), _fileSystem, fakeMarkOfTheWebDetector);
676
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename),
680
new DirectoryPath(
_testDirectoryRoot
),
692
string manifestPath = Path.Combine(
_testDirectoryRoot
, _manifestFilename);
696
new DirectoryPath(
_testDirectoryRoot
),
708
string manifestPath = Path.Combine(
_testDirectoryRoot
, _manifestFilename);
712
new DirectoryPath(
_testDirectoryRoot
),
726
new DirectoryPath(
_testDirectoryRoot
),
739
var subdirectoryOfTestRoot = Path.Combine(
_testDirectoryRoot
, "sub");
741
_fileSystem.File.WriteAllText(Path.Combine(
_testDirectoryRoot
, _manifestFilename),
749
.SourceManifest.Value.Should().Be(Path.Combine(
_testDirectoryRoot
, "sub", _manifestFilename));
752
.SourceManifest.Value.Should().Be(Path.Combine(
_testDirectoryRoot
, _manifestFilename));
755
.SourceManifest.Value.Should().Be(Path.Combine(
_testDirectoryRoot
, "sub", _manifestFilename));
761
var testRoot = Path.Combine(
_testDirectoryRoot
);
772
new DirectoryPath(
_testDirectoryRoot
),
778
createdManifest.Value.Should().Be(Path.Combine(
_testDirectoryRoot
, "dotnet-tools.json"));
779
_fileSystem.File.Exists(Path.Combine(
_testDirectoryRoot
, "dotnet-tools.json")).Should().BeTrue();
780
_fileSystem.Directory.Exists(Path.Combine(
_testDirectoryRoot
, ".config")).Should().BeFalse("New manifests should not create .config directories");