Add interface to SshCommand#1775
Add interface to SshCommand#1775MartinHvolgaardHansen wants to merge 3 commits intosshnet:developfrom
Conversation
|
I am sorry, but this change won't be taken (due to the extensive duplication and therefore additional maintenance). This topic has already been discussed in e.g. #1508, #1725. In the future, I would recommend creating an issue or commenting on an existing one to discuss this kind of change before putting in the work (just to save you time) |
|
Hi Rob, I did review #1508 and, while solving the underlying problem, his changes are breaking whereas mine is not. I made sure that there's next to no 'duplication', as I've mentioned in the describtion, so I'm unsure of what you mean by that? Both of the above are the concerns you've previously mentioned, which this change effectively resolves - What would you propose otherwise? Thanks for your consideration. Br, |
This update adds an interface to SshCommand to enable easy mocking in dependent tests.
A quick overview of the changes:
There are alternatives to achieve testability, but for SSH.NET to be truly testable in future projects, this interface is needed.
Did I miss anything? Let me know, and I'll make sure to amend it.
Thanks for reviewing and your time, and a big thanks to the authors and contributors.