Ejemplo n.º 1
0
        public void TestExtractAllEGNsEmptyText()
        {
            string        text     = String.Empty;
            List <string> expected = new List <string>()
            {
            };
            List <string> actual = EGNExtractor_Accessor.ExtractAllEGNs(text);

            CollectionAssert.AreEqual(expected, actual,
                                      "There is a problem in extracting all EGNs from text!");
        }
Ejemplo n.º 2
0
        public void TestExtractAllEGNsWithEGNsPartOfSubstring()
        {
            string text = "I am bay Ivan and my personal ID number is 4806" +
                          " and my phone number is0896296263!";

            List <string> expected = new List <string>()
            {
            };
            List <string> actual = EGNExtractor_Accessor.ExtractAllEGNs(text);

            CollectionAssert.AreEqual(expected, actual,
                                      "There is a problem in extracting all EGNs from text!");
        }
Ejemplo n.º 3
0
        public void TestExtractAllEGNsTooLongEGNsAndDifferentNumbers()
        {
            string text = "I am bay Ivan and my personal ID number is 48061829062" +
                          " and my phone number is 08962962653!";

            List <string> expected = new List <string>()
            {
            };
            List <string> actual = EGNExtractor_Accessor.ExtractAllEGNs(text);

            CollectionAssert.AreEqual(expected, actual,
                                      "There is a problem in extracting all EGNs from text!");
        }
Ejemplo n.º 4
0
        public void TestExtractAllEGNsNormalCase()
        {
            string        text     = "I am bay Ivan and my personal ID number is 4806182906!";
            List <string> expected = new List <string>()
            {
                "4806182906"
            };

            List <string> actual = EGNExtractor_Accessor.ExtractAllEGNs(text);

            CollectionAssert.AreEqual(expected, actual,
                                      "There is a problem in extracting all EGNs from text!");
        }
Ejemplo n.º 5
0
        public void TestExtractAllEGNsFor3CorrectEGNs()
        {
            string text = "I am bay Ivan and my personal ID number is 4806484852" +
                          " and my phone number is 0896296265!";

            List <string> expected = new List <string>()
            {
                "4806484852", "0896296265"
            };
            List <string> actual = EGNExtractor_Accessor.ExtractAllEGNs(text);

            CollectionAssert.AreEqual(expected, actual,
                                      "There is a problem in extracting all EGNs from text!");
        }