draft: use testably abstractions interface #901
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@fgreinacher
As discussed in #883 I tried myself at a combination of the two interfaces. Here is a draft with a compiling
System.IO.Abstractionslibrary that uses the interfaces from Testably.Abstractions.Interface.This PR is only intended to discuss the general approach and also to explore other alternatives.
I had some difficulties, which I highlighted in the last commit with corresponding "TODO" code comments:
IFileSystemInfo, but this would be required for implementingResolveLinkTargetWriteAllLinesAsyncwith an array instead ofIEnumerable<string>. Where does this overload come from?MoveTomethod withoverrideparameter is available starting with .NET5, but not with netstandard2.1 (which is used in the background). Do you plan to remove explicit support for .NET5 (as it is no longer supported by Microsoft)?FileSystemWatcherWrappercan't be implemented, as you don't have a reference to theIFileSystemin the static method. Is this really required?Note: I have a
Wrapmethod on theIFileSystemWatcherFactoryinterface for this scenario...Changes in the Testably project are tracked by Issue 158.