Sometimes it's needed to test sequence of events with file system and currently it's impossible to do that with current implementation of MockFileSystem. Basically, we should add a couple of events, so we could subscribe on that events in our test. Moreover, this way we could simulate various situations (e.g. throw sharing violation exception when particular file is opened).
List of events:
- File is being opened
- File is being created
- File is being deleted
- File is being updated
- File stream is opened
- File stream is closed
- Directory is being created
- Directory is being deleted
I could implement that and create a PR for you. Will you approve such kind of PR?
Do you see some other ways to achieve the desired behavior?
Sometimes it's needed to test sequence of events with file system and currently it's impossible to do that with current implementation of
MockFileSystem. Basically, we should add a couple of events, so we could subscribe on that events in our test. Moreover, this way we could simulate various situations (e.g. throw sharing violation exception when particular file is opened).List of events:
I could implement that and create a PR for you. Will you approve such kind of PR?
Do you see some other ways to achieve the desired behavior?