private void TextBoxCustomer_TextChanged(object sender, EventArgs e) { tbCustomer.BackColor = CheckString.GetColorAfterCheckString(tbCustomer.Text, CheckString.Buyer(tbCustomer.Text)); }
private void TextBoxEmail_TextChanged(object sender, EventArgs e) { tbEmail.BackColor = CheckString.GetColorAfterCheckString(tbEmail.Text, CheckString.Email(tbEmail.Text)); }
private void TextBoxCustomerINN_TextChanged(object sender, EventArgs e) { tbCustomerINN.BackColor = CheckString.GetColorAfterCheckString(tbCustomerINN.Text, CheckString.TaxpayerIdentificationNumber(tbCustomerINN.Text)); }
public void GetColorAfterCheckStringTest() { Assert.AreEqual(Color.Snow, CheckString.GetColorAfterCheckString("", false)); Assert.AreEqual(Color.LightGreen, CheckString.GetColorAfterCheckString("1qe1", true)); Assert.AreEqual(Color.LightCoral, CheckString.GetColorAfterCheckString("1qe1", false)); }