Exemplo n.º 1
0
        public void ZeroLengthInputs()
        {
            List <int> result   = FuzzyMatching.FindBestFuzzyMatch("", "");
            List <int> expected = new List <int>();

            Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result));
        }
Exemplo n.º 2
0
        public void ZeroLengthSearchString()
        {
            List <int> result   = FuzzyMatching.FindBestFuzzyMatch("whatsapp hellow", "");
            List <int> expected = new List <int>();

            Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result));
        }
Exemplo n.º 3
0
        public void NoResult()
        {
            List <int> result   = FuzzyMatching.FindBestFuzzyMatch("what is going on?", "whatsx goin on?");
            List <int> expected = new List <int>();

            Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result));
        }
Exemplo n.º 4
0
        public void RealWorldProgramManager()
        {
            List <int> result   = FuzzyMatching.FindBestFuzzyMatch("Program Manager", "pr");
            List <int> expected = new List <int>()
            {
                0, 1
            };

            Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result));
        }
Exemplo n.º 5
0
        public void BestMatch()
        {
            List <int> result   = FuzzyMatching.FindBestFuzzyMatch("aaacaab", "ab");
            List <int> expected = new List <int>()
            {
                5, 6
            };

            Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result));
        }
Exemplo n.º 6
0
        public void SimpleMatching()
        {
            List <int> result   = FuzzyMatching.FindBestFuzzyMatch("watsapp hellow", "hello");
            List <int> expected = new List <int>()
            {
                8, 9, 10, 11, 12
            };

            Assert.IsTrue(FuzzyMatchingUnitTest.IsEqual(expected, result));
        }