Ejemplo n.º 1
0
 public void TestExtractPhoneNumberZQuirk()
 {
     MainForm form = new MainForm();
     // ':' read as 'Z', sometimes it happens
     string strNum = form.extractPhoneNumber("AutodialZ 3456782345");
     Assert.AreEqual("3456782345", strNum);
 }
Ejemplo n.º 2
0
 public void TestExtractPhoneNumberSpaces()
 {
     MainForm form = new MainForm();
     // Spaces
     string strNum = form.extractPhoneNumber("Autodial: 34 5678 2345");
     Assert.AreEqual("3456782345", strNum);
     strNum = form.extractPhoneNumber("Autodial: 3456 782 345");
     Assert.AreEqual("3456782345", strNum);
 }
Ejemplo n.º 3
0
        public void TestCleanNumber()
        {
            MainForm form = new MainForm();
            string strCleanedNum = form.cleanNumber("12 344 5555 2");
            Assert.AreEqual("1234455552", strCleanedNum);

            strCleanedNum = form.cleanNumber("12 4455 5523");
            Assert.AreEqual("1244555523", strCleanedNum);

            strCleanedNum = form.cleanNumber("1244 555 523");
            Assert.AreEqual("1244555523", strCleanedNum);
        }
Ejemplo n.º 4
0
 public void TestWeirdSituations()
 {
     MainForm form = new MainForm();
     // Other mixed weird situations
     string strNum = form.extractPhoneNumber("AutodialZ 34 5678 2345");
     Assert.AreEqual("3456782345", strNum);
     strNum = form.extractPhoneNumber("AutodialZ 3456 782 345");
     Assert.AreEqual("3456782345", strNum);
     strNum = form.extractPhoneNumber("Autodial  34 5678 2345");
     Assert.AreEqual("3456782345", strNum);
     strNum = form.extractPhoneNumber("Autodial  3456 782 345");
     Assert.AreEqual("3456782345", strNum);
 }