示例#1
0
        public void Test_Bad_Param()
        {
            string actual = RandomChars.Generate(-1);

            Assert.AreNotEqual(-1, actual.Length, "length should not be less than zero");
            Assert.AreEqual(0, actual.Length, "actual length should be 0");
        }
示例#2
0
        public void Allwoed_Chars_Test()
        {
            string actual       = RandomChars.Generate(100);
            string CharsAllowed = "abcdefghijklmnopqrstyvwxyz";

            for (int z = 0; z < 100; z++)
            {
                for (int c = 0; c < 25; c++)
                {
                    Assert.AreNotEqual(actual, z, CharsAllowed, c, 1);
                    Assert.AreEqual(actual, z, CharsAllowed, c, 1, "generated char is not allowed");
                }
            }
        }
示例#3
0
        public void Test_Password_Eq1024()
        {
            string actual = RandomChars.Generate(1024);

            Assert.AreEqual(1024, actual.Length, "testing for 1024 symbol password failed");
        }
示例#4
0
        public void Test_Zero_Password()
        {
            string actual = RandomChars.Generate(0);

            Assert.AreEqual(0, actual.Length, "testing for none symbol password failed");
        }