private bool compareWords(WordGuess firstWordGuess, WordGuess secondWordGuess) { var firstWordModel = new WordModel { Word = firstWordGuess.Word.ToLower().Trim() }; var secondWordModel = new WordModel { Word = secondWordGuess.Word.ToLower().Trim() }; var stringArray = new string[] { firstWordModel.Word, secondWordModel.Word }; var metaphone = new Metaphone(); var soundex = new Soundex(); var similarMetaphone = metaphone.IsSimilar(stringArray); var similarSoundex = soundex.IsSimilar(stringArray); return(similarMetaphone || similarSoundex); }
public void Should_Be_Similar() { Assert.True(_generator.IsSimilar(Words)); Assert.True(_generator.IsSimilar(Words2)); }