SftpClientTest.DeleteDirectory.cs 699 B

1234567891011121314151617181920212223
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Common;
  3. using Renci.SshNet.Tests.Properties;
  4. namespace Renci.SshNet.Tests.Classes
  5. {
  6. /// <summary>
  7. /// Implementation of the SSH File Transfer Protocol (SFTP) over SSH.
  8. /// </summary>
  9. public partial class SftpClientTest
  10. {
  11. [TestMethod]
  12. [TestCategory("Sftp")]
  13. [ExpectedException(typeof(SshConnectionException))]
  14. public void Test_Sftp_DeleteDirectory_Without_Connecting()
  15. {
  16. using (var sftp = new SftpClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD))
  17. {
  18. sftp.DeleteDirectory("test");
  19. }
  20. }
  21. }
  22. }