System.IO.Abstractions
System.IO.Abstractions copied to clipboard
Observing changes in the MockFileSystem
Describe the solution you'd like
I'd like to be able to observe common/interesting events (from a testing perspective) that happen into a MockFileSystem.
Why? I'm creating a cache service that uses an IFileSystem and I need to test that a file is only written once.
Describe alternatives you've considered
I've tried to implement my own MockFileSystem using System.Reactive, but the work is a bit overwhelming.
This is the same as https://github.com/TestableIO/System.IO.Abstractions/issues/168 which has gone stale.
As mentioned over there I generally like the idea and would accept a contribution here unless it's getting overly complex.