コード例 #1
0
        public void LongSimplePasswordGetsFixed()
        {
            PasswordCheck_Accessor target = new PasswordCheck_Accessor();
            PasswordCheck pc = new PasswordCheck();

            string password = "******";
            string username = "******";

            password = pc.CheckAndFix(password, username);

            bool valid = target.ComplexEnough(password);
            Assert.IsTrue(valid);
        }
コード例 #2
0
        public void PasswordContainingAllSortsIsValid()
        {
            PasswordCheck_Accessor target = new PasswordCheck_Accessor();

            string password = "******";
            bool expected = true;

            bool actual = target.ComplexEnough(password);

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void PasswordContainingUppercaseLowercaseAndSymbolsIsValid()
        {
            PasswordCheck_Accessor target = new PasswordCheck_Accessor();

            string password = "******";
            bool expected = true;

            bool actual = target.ComplexEnough(password);

            Assert.AreEqual(expected, actual);
        }
コード例 #4
0
        public void PasswordContainingUppercaseLowercaseAndNumberIsValid()
        {
            PasswordCheck_Accessor target = new PasswordCheck_Accessor();

            string password = "******";
            bool expected = true;

            bool actual = target.ComplexEnough(password);

            Assert.AreEqual(expected, actual);
        }
コード例 #5
0
        public void PasswordContainingOnlyLettersNotComplexEnough()
        {
            PasswordCheck_Accessor target = new PasswordCheck_Accessor();

            string password = "******";
            bool expected = false;

            bool actual = target.ComplexEnough(password);

            Assert.AreEqual(expected, actual);
        }
コード例 #6
0
        public void PasswordContainingLowercaseAndNumbersNotComplexEnough()
        {
            PasswordCheck_Accessor target = new PasswordCheck_Accessor();

            string password = "******";
            bool expected = false;

            bool actual = target.ComplexEnough(password);

            Assert.AreEqual(expected, actual);
        }