DsaKeyTest.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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.Cryptography
  6. {
  7. /// <summary>
  8. ///This is a test class for DsaKeyTest and is intended
  9. ///to contain all DsaKeyTest Unit Tests
  10. ///</summary>
  11. [TestClass()]
  12. public class DsaKeyTest : TestBase
  13. {
  14. /// <summary>
  15. ///A test for DsaKey Constructor
  16. ///</summary>
  17. [TestMethod()]
  18. public void DsaKeyConstructorTest()
  19. {
  20. DsaKey target = new DsaKey();
  21. Assert.Inconclusive("TODO: Implement code to verify target");
  22. }
  23. /// <summary>
  24. ///A test for DsaKey Constructor
  25. ///</summary>
  26. [TestMethod]
  27. [Ignore] // placeholder for actual test
  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. [Ignore] // placeholder for actual test
  96. public void PublicTest()
  97. {
  98. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  99. BigInteger[] expected = null; // TODO: Initialize to an appropriate value
  100. BigInteger[] actual;
  101. target.Public = expected;
  102. actual = target.Public;
  103. Assert.AreEqual(expected, actual);
  104. Assert.Inconclusive("Verify the correctness of this test method.");
  105. }
  106. /// <summary>
  107. ///A test for Q
  108. ///</summary>
  109. [TestMethod()]
  110. public void QTest()
  111. {
  112. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  113. BigInteger actual;
  114. actual = target.Q;
  115. Assert.Inconclusive("Verify the correctness of this test method.");
  116. }
  117. /// <summary>
  118. ///A test for X
  119. ///</summary>
  120. [TestMethod()]
  121. public void XTest()
  122. {
  123. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  124. BigInteger actual;
  125. actual = target.X;
  126. Assert.Inconclusive("Verify the correctness of this test method.");
  127. }
  128. /// <summary>
  129. ///A test for Y
  130. ///</summary>
  131. [TestMethod()]
  132. public void YTest()
  133. {
  134. DsaKey target = new DsaKey(); // TODO: Initialize to an appropriate value
  135. BigInteger actual;
  136. actual = target.Y;
  137. Assert.Inconclusive("Verify the correctness of this test method.");
  138. }
  139. }
  140. }