示例#1
0
 private void TextBoxFIO_TextChanged(object sender, EventArgs e)
 {
     if (CheckString.FullName(tbFIO.Text))
     {
         tbFIO.BackColor = Color.Snow;
     }
     else
     {
         tbFIO.BackColor = Color.LightCoral;
     }
 }
示例#2
0
        public void FullNameTest()
        {
            bool actual;
            Dictionary <string, bool> testFullName = new Dictionary <string, bool>();

            testFullName.Add("", false);
            testFullName.Add("*****@*****.**", false);
            testFullName.Add("ывфывфы@вывыю.выв", false);
            testFullName.Add("Иванов Иван Иванович", true);
            foreach (string element in testFullName.Keys)
            {
                actual = CheckString.FullName(element);
                Assert.AreEqual(testFullName[element], actual, "Строка на входе = \"" + element + "\"");
            }
        }