public void Should_return_two_when_calculating_distance_with_different_words() { LevenshteinDistanceCalculator distanceCalculator = new LevenshteinDistanceCalculator(); int disctance = distanceCalculator.Calculate("a", "bc"); Check.That(disctance).IsEqualTo(2); }
public void Should_return_one_when_calculating_distance_with_words_with_one_different_letter() { LevenshteinDistanceCalculator distanceCalculator = new LevenshteinDistanceCalculator(); int disctance = distanceCalculator.Calculate("a", "b"); Check.That(disctance).IsEqualTo(1); }
public void Should_return_one_when_calculating_distance_with_one_word_and_one_same_with_an_additional_letter() { LevenshteinDistanceCalculator distanceCalculator = new LevenshteinDistanceCalculator(); int disctance = distanceCalculator.Calculate("a", "ab"); Check.That(disctance).IsEqualTo(1); }
public void Should_return_zero_when_calculating_distance_with_same_word() { LevenshteinDistanceCalculator distanceCalculator = new LevenshteinDistanceCalculator(); int disctance = distanceCalculator.Calculate("a", "a"); Check.That(disctance).IsEqualTo(0); }