-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
draft: use testably abstractions interface #901
draft: use testably abstractions interface #901
Conversation
…s to focus on functional changes instead of using statements.
Many thanks for the initiative here @vbreuss, really appreciated! I'm out traveling for the long weekend, will have a look mid next week! |
Don't get me wrong here, but I'd really like this library to stay independent. I'm totally open to adapt the interfaces to be more compatible downstream, but I'm not eager to take a hard dependency here. That being said here are my thoughts regarding your questions:
(Not really relevant given my comment above, but we could add that implementation)
Good question, it has been there for a while 😄 If it hurts we could get rid of it, overload resolution should pick the
No plans to remove it right now, maybe when .NET 7 is released.
We explicitly highlight that in the readme so this could hurt folks and I think we should not remove it. |
All good!
I will work on a pull request to implement your suggestion in #883
|
@fgreinacher
As discussed in #883 I tried myself at a combination of the two interfaces. Here is a draft with a compiling
System.IO.Abstractions
library 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 implementingResolveLinkTarget
WriteAllLinesAsync
with an array instead ofIEnumerable<string>
. Where does this overload come from?MoveTo
method withoverride
parameter 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)?FileSystemWatcherWrapper
can't be implemented, as you don't have a reference to theIFileSystem
in the static method. Is this really required?Note: I have a
Wrap
method on theIFileSystemWatcherFactory
interface for this scenario...Changes in the Testably project are tracked by Issue 158.