System.IO.Abstractions
System.IO.Abstractions copied to clipboard
[Test] public void MockFileInfo_Exists_LazyLoadsData() { // Arrange var fileSystem = new MockFileSystem(); var path1 = XFS.Path(@"c:\temp\file1.txt"); var fileInfo = fileSystem.FileInfo.FromFileName(path1); var otherFileInfo = fileSystem.FileInfo.FromFileName(path1); loadedFileInfo.Exists; // this forces a lazyload of the data. // Act fileSystem.AddFile(path1, new MockFileData("1")); // Assert Assert.IsTrue(fileInfo.Exists); Assert.IsFalse(loadedFileInfo.Exists); }
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
@MaxamadjonovD Can you please update the title and description to describe what you mean?
Closed, due to missing information and feedback