Exemplo n.º 1
0
        public void TaxpayerIdentificationNumberTest()
        {
            bool actual;
            Dictionary <string, bool> testINN = new Dictionary <string, bool>();

            testINN.Add("", false);
            testINN.Add("qwahfynfjndy", false);
            testINN.Add("qwahfynfjn", false);
            testINN.Add("000000000000", true);
            testINN.Add("00000000000", false);
            testINN.Add("0000000000", true);
            testINN.Add("000000000", false);
            testINN.Add("526317984689", true);
            testINN.Add("526317984686", false);
            testINN.Add("526317984669", false);
            testINN.Add("3664069397", true);
            testINN.Add("3664069395", false);
            foreach (string element in testINN.Keys)
            {
                actual = CheckString.TaxpayerIdentificationNumber(element);
                Assert.AreEqual(testINN[element], actual, "Строка на входе = \"" + element + "\"");
            }
        }
Exemplo n.º 2
0
 private void TextBoxCustomerINN_TextChanged(object sender, EventArgs e)
 {
     tbCustomerINN.BackColor = CheckString.GetColorAfterCheckString(tbCustomerINN.Text, CheckString.TaxpayerIdentificationNumber(tbCustomerINN.Text));
 }