-
-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
Description
Inspired by TestableIO/System.IO.Abstractions#1081:
Add an option to verify which methods were called on the MockFileSystem. This should cover the following use cases:
- Determine if a method was called with specific parameters
- Determine if a method was called before another method
- Determine how often a method was called
Idea:
- Add a
Statisticsproperty on theMockFileSystem. All external calls get registered there. - This property should expose a list of called methods, each with the name of the method and its parameters.
- The calls should contain a global incremented "sort order" to determine the order in which the methods were called.
We could then write extension methods (e.g. in https://github.com/Testably/Testably.Abstractions.FluentAssertions) to verify the above scenarios.