Skip to content

Add interface to SshCommand#1775

Open
MartinHvolgaardHansen wants to merge 3 commits intosshnet:developfrom
MartinHvolgaardHansen:refactor/create-sshcommand-interface
Open

Add interface to SshCommand#1775
MartinHvolgaardHansen wants to merge 3 commits intosshnet:developfrom
MartinHvolgaardHansen:refactor/create-sshcommand-interface

Conversation

@MartinHvolgaardHansen
Copy link

This update adds an interface to SshCommand to enable easy mocking in dependent tests.

A quick overview of the changes:

  1. Add the ISshCommand interface.
  2. Move breaking changes to implementations to the V2 namespace to ensure backwards compatibility.
  3. Change existing implementations to be thin wrappers around changed implementations.
  4. Update and run tests associated with the changes (except the Docker integration tests).
  5. Update examples in doc files to reflect these 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant