public void Should_find_results_for_manchester_hotel() { var autocomplete = new SearchAutoComplete(); autocomplete.BuildAutoCompleteIndex(); var results = autocomplete.SuggestTermsFor("man"); Assert.Equal(2, results.Count()); }
public void Should_find_results_for_Villalobus_hotel() { var autocomplete = new SearchAutoComplete(); autocomplete.BuildAutoCompleteIndex(); var results = autocomplete.SuggestTermsFor("villa"); Assert.Equal(1, results.Count()); }
public IEnumerable<string> SuggestTermsForSimple(string q, SearchAutoComplete autocomplete) { var hotels = autocomplete.SuggestTermsFor(q); return hotels.Select(h => h.Name); }