KeyTest.cs 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Common;
  3. using Renci.SshNet.Security;
  4. using Renci.SshNet.Tests.Common;
  5. namespace Renci.SshNet.Tests.Classes.Security
  6. {
  7. /// <summary>
  8. ///This is a test class for KeyTest and is intended
  9. ///to contain all KeyTest Unit Tests
  10. ///</summary>
  11. [TestClass()]
  12. public class KeyTest : TestBase
  13. {
  14. internal virtual Key CreateKey()
  15. {
  16. // TODO: Instantiate an appropriate concrete class.
  17. Key target = null;
  18. return target;
  19. }
  20. /// <summary>
  21. ///A test for Sign
  22. ///</summary>
  23. [TestMethod]
  24. [Ignore] // placeholder for actual test
  25. public void SignTest()
  26. {
  27. Key target = CreateKey(); // TODO: Initialize to an appropriate value
  28. byte[] data = null; // TODO: Initialize to an appropriate value
  29. byte[] expected = null; // TODO: Initialize to an appropriate value
  30. byte[] actual;
  31. actual = target.Sign(data);
  32. Assert.AreEqual(expected, actual);
  33. Assert.Inconclusive("Verify the correctness of this test method.");
  34. }
  35. /// <summary>
  36. ///A test for VerifySignature
  37. ///</summary>
  38. [TestMethod]
  39. [Ignore] // placeholder for actual test
  40. public void VerifySignatureTest()
  41. {
  42. Key target = CreateKey(); // TODO: Initialize to an appropriate value
  43. byte[] data = null; // TODO: Initialize to an appropriate value
  44. byte[] signature = null; // TODO: Initialize to an appropriate value
  45. bool expected = false; // TODO: Initialize to an appropriate value
  46. bool actual;
  47. actual = target.VerifySignature(data, signature);
  48. Assert.AreEqual(expected, actual);
  49. Assert.Inconclusive("Verify the correctness of this test method.");
  50. }
  51. /// <summary>
  52. ///A test for KeyLength
  53. ///</summary>
  54. [TestMethod]
  55. [Ignore] // placeholder for actual test
  56. public void KeyLengthTest()
  57. {
  58. Key target = CreateKey(); // TODO: Initialize to an appropriate value
  59. int actual;
  60. actual = target.KeyLength;
  61. Assert.Inconclusive("Verify the correctness of this test method.");
  62. }
  63. /// <summary>
  64. ///A test for Public
  65. ///</summary>
  66. [TestMethod]
  67. [Ignore] // placeholder for actual test
  68. public void PublicTest()
  69. {
  70. Key target = CreateKey(); // TODO: Initialize to an appropriate value
  71. BigInteger[] expected = null; // TODO: Initialize to an appropriate value
  72. BigInteger[] actual;
  73. target.Public = expected;
  74. actual = target.Public;
  75. Assert.AreEqual(expected, actual);
  76. Assert.Inconclusive("Verify the correctness of this test method.");
  77. }
  78. }
  79. }