TestPrivateKeyFile.cs 799 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Microsoft.VisualStudio.TestTools.UnitTesting;
  6. using System.IO;
  7. namespace Renci.SshClient.Tests.Security
  8. {
  9. [TestClass]
  10. public class TestPrivateKeyFile
  11. {
  12. [TestMethod]
  13. [ExpectedException(typeof(ArgumentNullException))]
  14. public void Test_PrivateKeyFile_EmptyFileName()
  15. {
  16. string fileName = string.Empty;
  17. var keyFile = new PrivateKeyFile(fileName);
  18. }
  19. [TestMethod]
  20. [ExpectedException(typeof(ArgumentNullException))]
  21. public void Test_PrivateKeyFile_StreamIsNull()
  22. {
  23. Stream stream = null;
  24. var keyFile = new PrivateKeyFile(stream);
  25. }
  26. }
  27. }