-
Notifications
You must be signed in to change notification settings - Fork 266
Open
Labels
area: testinghelpersIssues that address the testing helpersIssues that address the testing helpersstate: ready to pickIssues that are ready for being worked onIssues that are ready for being worked ontype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality
Description
Describe the bug
Mock file system is not storing LastAccessTime & LastWriteTime properties for directories
To Reproduce
var fileSystem = new MockFileSystem();
var info = fileSystem.DirectoryInfo.FromDirectoryName(@"C:\\Parent\\Dir");
info.Create();
info.LastWriteTime = new DateTime(2001, 2, 3);
var c= fileSystem.DirectoryInfo.FromDirectoryName("C:\\Parent");
foreach (var info in parent.EnumerateDirectories()) {
var thisShouldBeTrue = info.LastAccessTime == new DateTime(2001, 2, 3);
}
Expected behavior
variable thisShouldBeTrue should be true.
Additional context
class MockFileSystem should have method AddDirectory(string path, MockDirectoryInfo mock) so i can set directory attributes same way as in method AddFile. MockDirectoryInfo is derived from MockFileInfo but with no content (only default ctor) and with attribute FileAttributes.Directory.
Metadata
Metadata
Assignees
Labels
area: testinghelpersIssues that address the testing helpersIssues that address the testing helpersstate: ready to pickIssues that are ready for being worked onIssues that are ready for being worked ontype: bugIssues that describe misbehaving functionalityIssues that describe misbehaving functionality