DsaKeyTest.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. using Renci.SshNet.Security;
  2. using Microsoft.VisualStudio.TestTools.UnitTesting;
  3. using System;
  4. using Renci.SshNet.Common;
  5. using Renci.SshNet.Tests.Common;
  6. namespace Renci.SshNet.Tests
  7. {
  8. /// <summary>
  9. ///This is a test class for DsaKeyTest and is intended
  10. ///to contain all DsaKeyTest Unit Tests
  11. ///</summary>
  12. [TestClass()]
  13. public class DsaKeyTest : TestBase
  14. {
  15. /// <summary>
  16. ///A test for DsaKey Constructor
  17. ///</summary>
  18. [TestMethod()]
  19. public void DsaKeyConstructorTest()
  20. {
  21. DsaKey target = new DsaKey();
  22. Assert.Inconclusive("TODO: Implement code to verify target");
  23. }
  24. /// <summary>
  25. ///A test for DsaKey Constructor
  26. ///</summary>
  27. [TestMethod()]
  28. public void DsaKeyConstructorTest1()
  29. {
  30. byte[] data = null; // TODO: Initialize to an appropriate value
  31. DsaKey target = new DsaKey(data);
  32. Assert.Inconclusive("TODO: Implement code to verify target");
  33. }
  34. /// <summary>
  35. ///A test for DsaKey Constructor
  36. ///</summary>
  37. [TestMethod()]
  38. public void DsaKeyConstructorTest2()
  39. {
  40. BigInteger p = new BigInteger(); // TODO: Initialize to an appropriate value
  41. BigInteger q = new BigInteger(); // TODO: Initialize to an appropriate value
  42. BigInteger g = new BigInteger(); // TODO: Initialize to an appropriate value
  43. BigInteger y = new BigInteger(); // TODO: Initialize to an appropriate value
  44. BigInteger x = new BigInteger(); // TODO: Initialize to an appropriate value
  45. DsaKey target = new DsaKey(p, q, g, y, x);
  46. Assert.Inconclusive("TODO: Implement code to verify target");
  47. }
  48. /// <summary>
  49. ///A test for Dispose
  50. ///</summary>
  51. [TestMethod()]
  52. public void DisposeTest()
  53. {
  54. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  55. target.Dispose();
  56. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  57. }
  58. /// <summary>
  59. ///A test for G
  60. ///</summary>
  61. [TestMethod()]
  62. public void GTest()
  63. {
  64. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  65. BigInteger actual;
  66. actual = target.G;
  67. Assert.Inconclusive("Verify the correctness of this test method.");
  68. }
  69. /// <summary>
  70. ///A test for KeyLength
  71. ///</summary>
  72. [TestMethod()]
  73. public void KeyLengthTest()
  74. {
  75. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  76. int actual;
  77. actual = target.KeyLength;
  78. Assert.Inconclusive("Verify the correctness of this test method.");
  79. }
  80. /// <summary>
  81. ///A test for P
  82. ///</summary>
  83. [TestMethod()]
  84. public void PTest()
  85. {
  86. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  87. BigInteger actual;
  88. actual = target.P;
  89. Assert.Inconclusive("Verify the correctness of this test method.");
  90. }
  91. /// <summary>
  92. ///A test for Public
  93. ///</summary>
  94. [TestMethod()]
  95. public void PublicTest()
  96. {
  97. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  98. BigInteger[] expected = null; // TODO: Initialize to an appropriate value
  99. BigInteger[] actual;
  100. target.Public = expected;
  101. actual = target.Public;
  102. Assert.AreEqual(expected, actual);
  103. Assert.Inconclusive("Verify the correctness of this test method.");
  104. }
  105. /// <summary>
  106. ///A test for Q
  107. ///</summary>
  108. [TestMethod()]
  109. public void QTest()
  110. {
  111. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  112. BigInteger actual;
  113. actual = target.Q;
  114. Assert.Inconclusive("Verify the correctness of this test method.");
  115. }
  116. /// <summary>
  117. ///A test for X
  118. ///</summary>
  119. [TestMethod()]
  120. public void XTest()
  121. {
  122. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  123. BigInteger actual;
  124. actual = target.X;
  125. Assert.Inconclusive("Verify the correctness of this test method.");
  126. }
  127. /// <summary>
  128. ///A test for Y
  129. ///</summary>
  130. [TestMethod()]
  131. public void YTest()
  132. {
  133. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  134. BigInteger actual;
  135. actual = target.Y;
  136. Assert.Inconclusive("Verify the correctness of this test method.");
  137. }
  138. }
  139. }