You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SftpClient.OpenAsync currently returns an SftpFileStream which cannot be mocked by NSubstitute or even faked because it has private/internal constructors.
It would be nice if OpenAsync was instead defined as returning Stream, even though it actually returns a SftpFileStream. The only non-Stream public member that I can see is the Timeout property. If it's absolutely vital that this property is exposed, maybe define an ISftpFileStream interface instead? Or the timeout could be passed to OpenAsync.