KeyboardInteractiveAuthenticationMethodTest.cs 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using Microsoft.VisualStudio.TestTools.UnitTesting;
  2. using Renci.SshNet.Tests.Common;
  3. using System;
  4. namespace Renci.SshNet.Tests.Classes
  5. {
  6. /// <summary>
  7. /// Provides functionality to perform keyboard interactive authentication.
  8. /// </summary>
  9. [TestClass]
  10. public partial class KeyboardInteractiveAuthenticationMethodTest : TestBase
  11. {
  12. [TestMethod]
  13. [TestCategory("AuthenticationMethod")]
  14. [Owner("Kenneth_aa")]
  15. [Description("KeyboardInteractiveAuthenticationMethod: Pass null as username.")]
  16. [ExpectedException(typeof(ArgumentException))]
  17. public void Keyboard_Test_Pass_Null()
  18. {
  19. new KeyboardInteractiveAuthenticationMethod(null);
  20. }
  21. [TestMethod]
  22. [TestCategory("AuthenticationMethod")]
  23. [Owner("Kenneth_aa")]
  24. [Description("KeyboardInteractiveAuthenticationMethod: Pass String.Empty as username.")]
  25. [ExpectedException(typeof(ArgumentException))]
  26. public void Keyboard_Test_Pass_Whitespace()
  27. {
  28. new KeyboardInteractiveAuthenticationMethod(string.Empty);
  29. }
  30. /// <summary>
  31. ///A test for Name
  32. ///</summary>
  33. [TestMethod()]
  34. public void NameTest()
  35. {
  36. string username = string.Empty; // TODO: Initialize to an appropriate value
  37. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username); // TODO: Initialize to an appropriate value
  38. string actual;
  39. actual = target.Name;
  40. Assert.Inconclusive("Verify the correctness of this test method.");
  41. }
  42. /// <summary>
  43. ///A test for Dispose
  44. ///</summary>
  45. [TestMethod()]
  46. public void DisposeTest()
  47. {
  48. string username = string.Empty; // TODO: Initialize to an appropriate value
  49. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username); // TODO: Initialize to an appropriate value
  50. target.Dispose();
  51. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  52. }
  53. /// <summary>
  54. ///A test for Authenticate
  55. ///</summary>
  56. [TestMethod()]
  57. public void AuthenticateTest()
  58. {
  59. string username = string.Empty; // TODO: Initialize to an appropriate value
  60. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username); // TODO: Initialize to an appropriate value
  61. Session session = null; // TODO: Initialize to an appropriate value
  62. AuthenticationResult expected = new AuthenticationResult(); // TODO: Initialize to an appropriate value
  63. AuthenticationResult actual;
  64. actual = target.Authenticate(session);
  65. Assert.AreEqual(expected, actual);
  66. Assert.Inconclusive("Verify the correctness of this test method.");
  67. }
  68. /// <summary>
  69. ///A test for KeyboardInteractiveAuthenticationMethod Constructor
  70. ///</summary>
  71. [TestMethod()]
  72. public void KeyboardInteractiveAuthenticationMethodConstructorTest()
  73. {
  74. string username = string.Empty; // TODO: Initialize to an appropriate value
  75. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username);
  76. Assert.Inconclusive("TODO: Implement code to verify target");
  77. }
  78. }
  79. }