KeyboardInteractiveAuthenticationMethodTest.cs 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. [Ignore] // placeholder for actual test
  35. public void NameTest()
  36. {
  37. string username = string.Empty; // TODO: Initialize to an appropriate value
  38. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username); // TODO: Initialize to an appropriate value
  39. string actual;
  40. actual = target.Name;
  41. Assert.Inconclusive("Verify the correctness of this test method.");
  42. }
  43. /// <summary>
  44. ///A test for Dispose
  45. ///</summary>
  46. [TestMethod]
  47. [Ignore] // placeholder for actual test
  48. public void DisposeTest()
  49. {
  50. string username = string.Empty; // TODO: Initialize to an appropriate value
  51. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username); // TODO: Initialize to an appropriate value
  52. target.Dispose();
  53. Assert.Inconclusive("A method that does not return a value cannot be verified.");
  54. }
  55. /// <summary>
  56. ///A test for Authenticate
  57. ///</summary>
  58. [TestMethod]
  59. [Ignore] // placeholder for actual test
  60. public void AuthenticateTest()
  61. {
  62. string username = string.Empty; // TODO: Initialize to an appropriate value
  63. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username); // TODO: Initialize to an appropriate value
  64. Session session = null; // TODO: Initialize to an appropriate value
  65. AuthenticationResult expected = new AuthenticationResult(); // TODO: Initialize to an appropriate value
  66. AuthenticationResult actual;
  67. actual = target.Authenticate(session);
  68. Assert.AreEqual(expected, actual);
  69. Assert.Inconclusive("Verify the correctness of this test method.");
  70. }
  71. /// <summary>
  72. ///A test for KeyboardInteractiveAuthenticationMethod Constructor
  73. ///</summary>
  74. [TestMethod]
  75. [Ignore] // placeholder for actual test
  76. public void KeyboardInteractiveAuthenticationMethodConstructorTest()
  77. {
  78. string username = string.Empty; // TODO: Initialize to an appropriate value
  79. KeyboardInteractiveAuthenticationMethod target = new KeyboardInteractiveAuthenticationMethod(username);
  80. Assert.Inconclusive("TODO: Implement code to verify target");
  81. }
  82. }
  83. }