public void GetFuzzyComparer_ValidComparerType_ShouldReturnTheCorrectStrategy(FuzzyStringComparerType comparerType, string expectedComparerTypeName) { // Act IFuzzyComparerStrategy returnedComparer = this.fuzzyComparerFactory.GetFuzzyComparer(comparerType); // Assert Assert.AreEqual(expectedComparerTypeName, returnedComparer.GetType().Name); }
public double CompareStrings(FuzzyStringComparerType fuzzyComparerType, string stringOne, string stringTwo) { IFuzzyComparerStrategy comparerStrategy = fuzzyComparerFactory.GetFuzzyComparer(fuzzyComparerType); return(comparerStrategy.Compare(stringOne, stringTwo)); }
public LevenshteinDistancePercentageFuzzyComparer(IFuzzyComparerStrategy levenshteinDistanceComparer) { this.levenshteinDistanceComparer = levenshteinDistanceComparer; }