System.IO.Abstractions icon indicating copy to clipboard operation
System.IO.Abstractions copied to clipboard

Observing changes in the MockFileSystem

Open SuperJMN opened this issue 3 years ago • 4 comments

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.

SuperJMN avatar Feb 03 '22 12:02 SuperJMN

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.

fgreinacher avatar Feb 16 '22 16:02 fgreinacher