SftpClientTest.DeleteFileAsync.cs 690 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Threading.Tasks;
  3. using Microsoft.VisualStudio.TestTools.UnitTesting;
  4. using Renci.SshNet.Tests.Properties;
  5. namespace Renci.SshNet.Tests.Classes
  6. {
  7. /// <summary>
  8. /// Implementation of the SSH File Transfer Protocol (SFTP) over SSH.
  9. /// </summary>
  10. public partial class SftpClientTest
  11. {
  12. [TestMethod]
  13. public async Task Test_Sftp_DeleteFileAsync_Null()
  14. {
  15. using (var sftp = new SftpClient(Resources.HOST, Resources.USERNAME, Resources.PASSWORD))
  16. {
  17. await Assert.ThrowsExceptionAsync<ArgumentNullException>(() => sftp.DeleteFileAsync(null, default));
  18. }
  19. }
  20. }
  21. }