2
0

KeyboardInteractiveAuthenticationMethodTest.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using Microsoft.VisualStudio.TestTools.UnitTesting;
  3. using Renci.SshNet.Tests.Common;
  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. }
  31. }