9 instantiations of TestableFile
Microsoft.CodeAnalysis.Rebuild.UnitTests (5)
BasicDeterministicKeyBuilderTests.cs (1)
203compiler.FileSystem = TestableFileSystem.CreateForFiles((filePath, new TestableFile("hello")));
CSharpDeterministicKeyBuilderTests.cs (1)
380compiler.FileSystem = TestableFileSystem.CreateForFiles((filePath, new TestableFile("hello")));
RebuildCommandLineTests.cs (3)
38FilePathToStreamMap.Add(Path.Combine(BuildPaths.WorkingDirectory, filePath), new TestableFile(content)); 43FilePathToStreamMap.Add(Path.Combine(BuildPaths.SdkDirectory!, filePath), new TestableFile(imageBytes)); 51FilePathToStreamMap.Add(filePath, new TestableFile());
Microsoft.CodeAnalysis.Test.Utilities (4)
TestableCompiler.cs (4)
77var file = new TestableFile(content); 85var file = new TestableFile(imageBytes); 93var file = new TestableFile(); 217fileSystem.Map[Path.Combine(sdkPath, referenceInfo.FileName)] = new TestableFile(referenceInfo.ImageBytes);
15 references to TestableFile
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
RebuildCommandLineTests.cs (2)
29public Dictionary<string, TestableFile> FilePathToStreamMap { get; } = new Dictionary<string, TestableFile>(StringComparer.OrdinalIgnoreCase);
Microsoft.CodeAnalysis.Test.Utilities (13)
TestableCompiler.cs (5)
23public TestableFile TestableFile { get; } 26public TestableCompilerFile(string filePath, TestableFile testableFile) 77var file = new TestableFile(content); 85var file = new TestableFile(imageBytes); 93var file = new TestableFile();
TestableFile.cs (3)
26public TestableFile MemoryFile { get; } 29public TestableFileStream(TestableFile memoryFile) 37public TestableFileStream(TestableFile memoryFile, byte[] bytes, bool writable)
TestableFileSystem.cs (5)
18private readonly Dictionary<string, TestableFile>? _map; 24public Dictionary<string, TestableFile> Map => _map ?? throw new InvalidOperationException(); 27private TestableFileSystem(Dictionary<string, TestableFile>? map = null) 64public static TestableFileSystem CreateForFiles(params (string FilePath, TestableFile TestableFile)[] files) 74public static TestableFileSystem CreateForMap(Dictionary<string, TestableFile> map)