Exemplo n.º 1
0
        public void Baseline()
        {
            var sut = new LevenstineDistanceDynamicProgramming();

            Assert.Equal(5, sut.GetLevenstineDistance("benyam", "ephrem"));
            Assert.Equal(3, sut.GetLevenstineDistance("kitten", "sitting"));
        }
Exemplo n.º 2
0
        public void EmptyStrings()
        {
            var sut = new LevenstineDistanceDynamicProgramming();

            Assert.Equal(0, sut.GetLevenstineDistance("", ""));
        }
Exemplo n.º 3
0
        public void DifferentLengthStringsInversed()
        {
            var sut = new LevenstineDistanceDynamicProgramming();

            Assert.Equal(2, sut.GetLevenstineDistance("gigo", "big"));
        }
Exemplo n.º 4
0
        public void OneCharacterStringEquals()
        {
            var sut = new LevenstineDistanceDynamicProgramming();

            Assert.Equal(0, sut.GetLevenstineDistance("a", "a"));
        }