static void Main(string[] args)
        {
            CalculationFactory factory = new CalculationFactory();
            decimal            a       = 10;
            decimal            b       = 2;

            decimal result = factory.Divide(a, b);

            Console.WriteLine("Result of dividing " + a.ToString() + " by " + b.ToString() + " is " + result.ToString());
            Console.WriteLine();

            Console.WriteLine("***************************************************************");

            Console.WriteLine();

            //Invalid password
            string password = "******";

            //Valid Password
            //string password = "******";

            Console.WriteLine("Password selected: " + password);
            Console.WriteLine();
            //var validationtext = ValidatePassword.PassWordValid(password);
            var validationtext = RefactoredValidatePassword.PassWordValid(password);

            if (!string.IsNullOrEmpty(validationtext))
            {
                Console.WriteLine("Selected password is a NOT a VALID password ");
                Console.WriteLine();
                Console.WriteLine("**********************************************************************************");
                Console.WriteLine(validationtext);
                Console.WriteLine("**********************************************************************************");
            }
            else
            {
                Console.WriteLine("Selected password is a valid password");
            }

            Console.ReadLine();
        }
示例#2
0
 public void CheckForSpecialCharectersTest()
 {
     Assert.IsTrue(RefactoredValidatePassword.CheckForSpecialCharecters(password));
 }
示例#3
0
 public void CheckForRecentPasswordsTest()
 {
     Assert.IsTrue(RefactoredValidatePassword.CheckForRecentPasswords(password));
 }
示例#4
0
 public void CheckForUserNameMatchTest()
 {
     Assert.IsTrue(RefactoredValidatePassword.CheckForUserNameMatch(password));
 }
示例#5
0
 public void CheckPasswordLengthTest()
 {
     Assert.IsTrue(RefactoredValidatePassword.CheckPasswordLength(password));
 }
示例#6
0
 public void CheckUpperCaseAndNumericTest()
 {
     Assert.IsTrue(RefactoredValidatePassword.CheckUpperCaseAndNumeric(password));
 }