| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 | using System;using Microsoft.VisualStudio.TestTools.UnitTesting;using Renci.SshNet.Tests.Common;namespace Renci.SshNet.Tests.Classes{    /// <summary>    /// Provides functionality to perform password authentication.    /// </summary>    [TestClass]    public partial class PasswordAuthenticationMethodTest : TestBase    {        [TestMethod]        public void Password_Test_Pass_Null_Username()        {            Assert.ThrowsException<ArgumentNullException>(() => new PasswordAuthenticationMethod(null, "valid"));        }        [TestMethod]        public void Password_Test_Pass_Null_Password()        {            Assert.ThrowsException<ArgumentNullException>(() => new PasswordAuthenticationMethod("valid", (string)null));        }        [TestMethod]        public void Password_Test_Pass_Valid_Username_And_Password()        {            new PasswordAuthenticationMethod("valid", "valid");        }        [TestMethod]        public void Password_Test_Pass_Whitespace()        {            Assert.ThrowsException<ArgumentException>(() => new PasswordAuthenticationMethod(string.Empty, "valid"));        }        [TestMethod]        public void Password_Test_Pass_Valid()        {            new PasswordAuthenticationMethod("valid", string.Empty);        }    }}
 |