public static void Test( ) { GoogleSuggestion engine = new GoogleSuggestion(); InputQuery query = new InputQuery( "baim" ); query.QueryType = InputQueryType.Text; SuggestionResult item = engine.Search( query ) as SuggestionResult; Console.WriteLine( item ); }
public static void Test( ) { GoogleSuggestion engine = new GoogleSuggestion(); InputQuery query = new InputQuery("baim"); query.QueryType = InputQueryType.Text; SuggestionResult item = engine.Search(query) as SuggestionResult; Console.WriteLine(item); }
public void GetSuggestions_ValidQuery_ReturnsCorrectInfo() { var service = new GoogleSuggestionService("matsuri", "en"); var results = service.GetSuggestions().Result; Assert.AreEqual(10, results.Count); GoogleSuggestion first = results[0]; GoogleSuggestion second = results[1]; GoogleSuggestion third = results[2]; Assert.AreEqual("matsuri", first.ToString()); Assert.AreEqual("matsuri osaka", second.ToString()); Assert.AreEqual("matsuri festival", third.ToString()); }