2
0

CbcCipherModeTest.cs 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Security.Cryptography.Ciphers.Modes;
  3. using Renci.SshNet.Tests.Common;
  4. namespace Renci.SshNet.Tests.Classes.Security.Cryptography.Ciphers.Modes
  5. {
  6. /// <summary>
  7. ///This is a test class for CbcCipherModeTest and is intended
  8. ///to contain all CbcCipherModeTest Unit Tests
  9. ///</summary>
  10. [TestClass()]
  11. public class CbcCipherModeTest : TestBase
  12. {
  13. /// <summary>
  14. ///A test for EncryptBlock
  15. ///</summary>
  16. [TestMethod]
  17. [Ignore] // placeholder for actual test
  18. public void EncryptBlockTest()
  19. {
  20. byte[] iv = null; // TODO: Initialize to an appropriate value
  21. CbcCipherMode target = new CbcCipherMode(iv); // TODO: Initialize to an appropriate value
  22. byte[] inputBuffer = null; // TODO: Initialize to an appropriate value
  23. int inputOffset = 0; // TODO: Initialize to an appropriate value
  24. int inputCount = 0; // TODO: Initialize to an appropriate value
  25. byte[] outputBuffer = null; // TODO: Initialize to an appropriate value
  26. int outputOffset = 0; // TODO: Initialize to an appropriate value
  27. int expected = 0; // TODO: Initialize to an appropriate value
  28. int actual;
  29. actual = target.EncryptBlock(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset);
  30. Assert.AreEqual(expected, actual);
  31. Assert.Inconclusive("Verify the correctness of this test method.");
  32. }
  33. /// <summary>
  34. ///A test for DecryptBlock
  35. ///</summary>
  36. [TestMethod]
  37. [Ignore] // placeholder for actual test
  38. public void DecryptBlockTest()
  39. {
  40. byte[] iv = null; // TODO: Initialize to an appropriate value
  41. CbcCipherMode target = new CbcCipherMode(iv); // TODO: Initialize to an appropriate value
  42. byte[] inputBuffer = null; // TODO: Initialize to an appropriate value
  43. int inputOffset = 0; // TODO: Initialize to an appropriate value
  44. int inputCount = 0; // TODO: Initialize to an appropriate value
  45. byte[] outputBuffer = null; // TODO: Initialize to an appropriate value
  46. int outputOffset = 0; // TODO: Initialize to an appropriate value
  47. int expected = 0; // TODO: Initialize to an appropriate value
  48. int actual;
  49. actual = target.DecryptBlock(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset);
  50. Assert.AreEqual(expected, actual);
  51. Assert.Inconclusive("Verify the correctness of this test method.");
  52. }
  53. /// <summary>
  54. ///A test for CbcCipherMode Constructor
  55. ///</summary>
  56. [TestMethod()]
  57. public void CbcCipherModeConstructorTest()
  58. {
  59. byte[] iv = null; // TODO: Initialize to an appropriate value
  60. CbcCipherMode target = new CbcCipherMode(iv);
  61. Assert.Inconclusive("TODO: Implement code to verify target");
  62. }
  63. }
  64. }