Closed rcdailey closed 1 year ago
hi @rcdailey , The above looks usefull to me. In my opinion, they should be part of the base package but I know @fgreinacher is not really into it. @fgreinacher can you please review the above and see if it makes sense to add them to the TestableIO.System.IO.Abstractions.TestingHelpers library.
If not the only alternative is to create a second library in this repo, something like TestableIO.System.IO.Abstractions.TestingHelpers.Extensions, otherwise the normal extensions would depend on the testing library which doesn't make any sense.
I'm also fine adding them to MockFileSystem
. The changes go well with existing methods like AddFileFromEmbeddedResource
. I just don't want to change the core abstractions like IFile
or IDirectory
.
Would you find the below extension methods useful? If so, I am happy to open a pull request. I'm hesitant to do so right away because I'm not sure if these should be extension methods in this library or if I should contribute them as actual class members upstream (upstream being the actual
IO.Abstractions
package).I found these extension methods to be absolutely invaluable in my own code base in conjunction with the Extensions package. It eliminates a lot of boilerplate in my unit tests, namely these:
If you could provide some guidance and feedback, I'm happy to move this to a PR. Thanks for your time!