MockFileSystem: IFile.GetLastWriteTimeUtc may return wrong last write time after calling IFileInfo.Open #1029
Labels
state: needs discussion
Issues that need further discussion
type: bug
Issues that describe misbehaving functionality
Describe the bug
IFile.GetLastWriteTimeUtc
returns the system time instead ofMockFileData
'sLastWriteTime
value ifIFileInfo.Open
was called withFile.Open
but withoutFileAccess.Read
.To Reproduce
The code returns an output similar to this, and the last assertion is hit:
Expected behavior
The correct write time (= the time set in the
MockFileData
initializer) is returned in all cases.Additional context
Removing the call to
Open
or adding theFileAccess.Read
argument both lead to correct behaviour.The text was updated successfully, but these errors were encountered: