Skip to content

Commit

Permalink
Add ISftpClient interface to SftpClient (#197)
Browse files Browse the repository at this point in the history
Add ISftpClient interface to **SftpClient for mocking and testing purposes.
Fixes #193.
  • Loading branch information
ericbrumfield authored Jul 19, 2020
1 parent 90a13a6 commit cefdc20
Show file tree
Hide file tree
Showing 7 changed files with 1,082 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,9 @@
</Compile>
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
<Link>Sftp\Flags.cs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,9 @@
</Compile>
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
<Link>Sftp\Flags.cs</Link>
Expand Down
3 changes: 3 additions & 0 deletions src/Renci.SshNet.UAP10/Renci.SshNet.UAP10.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@
<Compile Include="..\Renci.SshNet\ISession.cs">
<Link>ISession.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
<Link>ISubsystemSession.cs</Link>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,9 @@
</Compile>
<Compile Include="..\Renci.SshNet\SftpClient.cs">
<Link>SftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
<Link>Sftp\Flags.cs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@
<Compile Include="..\Renci.SshNet\ISession.cs">
<Link>ISession.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
<Link>ISftpClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
<Link>ISubsystemSession.cs</Link>
</Compile>
Expand Down Expand Up @@ -1441,7 +1444,7 @@
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
1,065 changes: 1,065 additions & 0 deletions src/Renci.SshNet/ISftpClient.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Renci.SshNet/SftpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Renci.SshNet
/// <summary>
/// Implementation of the SSH File Transfer Protocol (SFTP) over SSH.
/// </summary>
public class SftpClient : BaseClient
public class SftpClient : BaseClient, ISftpClient
{
private static readonly Encoding Utf8NoBOM = new UTF8Encoding(false, true);

Expand Down

0 comments on commit cefdc20

Please sign in to comment.