8000 Enable list directory async for net framework by Patrick-3000 · Pull Request #1206 · sshnet/SSH.NET · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test moved to separate file
  • Loading branch information
Patrick-3000 committed Oct 13, 2023
commit 231e747ab1387a4f1f9b01bbfff422fe247c891c
18 changes: 0 additions & 18 deletions src/Renci.SshNet.Tests/Classes/SftpClientTest.ListDirectory.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Renci.SshNet.Common;
using Renci.SshNet.Tests.Properties;

Expand All @@ -28,19 +24,5 @@ public void Test_Sftp_ListDirectory_Without_Connecting()
}
}
}

[TestMethod]
[TestCategory("Sftp")]
[ExpectedException(typeof(SshConnectionException))]
public async Task Test_Sftp_ListDirectoryAsync_Without_Connecting()
{
using (var sftp = new SftpClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD))
{
await foreach (var file in sftp.ListDirectoryAsync(".", CancellationToken.None))
{
Debug.WriteLine(file.FullName);
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Renci.SshNet.Common;
using Renci.SshNet.Tests.Properties;

namespace Renci.SshNet.Tests.Classes
{
/// <summary>
/// Implementation of the SSH File Transfer Protocol (SFTP) over SSH.
/// </summary>
public partial class SftpClientTest
{
[TestMethod]
[TestCategory("Sftp")]
[ExpectedException(typeof(SshConnectionException))]
public async Task Test_Sftp_ListDirectoryAsync_Without_ConnectingAsync()
{
using (var sftp = new SftpClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD))
{
await foreach (var file in sftp.ListDirectoryAsync(".", CancellationToken.None))
{
Debug.WriteLine(file.FullName);
}
}
}
}
}
0