forked from TestableIO/System.IO.Abstractions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better cache invalidation in MockDirectoryInfo
When invoking the `Create()` and `Delete()` methods on `MockDirectoryInfo`, the `Exists` property should intrinsically invoke `Refresh()` the next time it is called. This is necessary to prevent returning stale state about the directory after those operations. Additional test cases have been added for `MoveTo()` as well, to ensure it also not returning stale state. For context, this change was motivated by PR TestableIO#828 where similar issues were solved in `MockFileInfo`.
- Loading branch information
Showing
2 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters