Ejemplo n.º 1
0
        public void BuyerTest()
        {
            bool actual;
            Dictionary <string, bool> testByer = new Dictionary <string, bool>();

            testByer.Add("", false);
            testByer.Add("*****@*****.**", false);
            testByer.Add("ывфывфы@вывыю.выв", false);
            testByer.Add("Иванов Иван Иванович 5465 232323", true);
            testByer.Add("ООО Ромашка", true);
            foreach (string element in testByer.Keys)
            {
                actual = CheckString.Buyer(element);
                Assert.AreEqual(testByer[element], actual, "Строка на входе = \"" + element + "\"");
            }
        }
Ejemplo n.º 2
0
 private void TextBoxCustomer_TextChanged(object sender, EventArgs e)
 {
     tbCustomer.BackColor = CheckString.GetColorAfterCheckString(tbCustomer.Text, CheckString.Buyer(tbCustomer.Text));
 }