public void SimpleSearch2() { string searchQuery = "invi"; IUserSearchEngine searchEngine = new UserSearchEngine(TokenTestSingleton.Instance); List <IUser> searchResult = searchEngine.Search(searchQuery, 2, 2); Assert.AreNotEqual(searchResult, null); Assert.AreEqual(searchResult.Count, 2); }
public void SimpleSearch3() { string searchQuery = "TweetinviApi"; UserSearchEngine searchEngine = new UserSearchEngine(TokenTestSingleton.Instance); List <IUser> searchResult = searchEngine.Search(searchQuery, 2, 0); Assert.AreNotEqual(searchResult, null); Assert.AreEqual(searchResult.Count, 1); Assert.AreEqual(searchResult[0].Id, 1577389800); Assert.AreEqual(searchResult[0].ScreenName, "TweetinviApi"); }
private static void SearchUser(IToken token) { string searchQuery = "tweetinvi"; IUserSearchEngine searchEngine = new UserSearchEngine(token); List <IUser> searchResult = searchEngine.Search(searchQuery); foreach (var user in searchResult) { Console.Write(user.ScreenName); } }