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

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

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

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

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