public void shouldBeAbleToGetWatchListsForAllAttachedAccounts() { var results = TD_API_Interface.API_Calls.WatchList.getWishlistsForAllAccounts(testingHttpClient.client); var contents = results.Content.ReadAsStringAsync().Result; var wishLists = new DataModels.AllWatchLists(contents); Assert.IsTrue(wishLists.Lists.Count > 3); }
public void testGettingAllWatchListsForAccount() { //In order to make this work I created a watchlist on my account on the standard site var results = TD_API_Interface.API_Calls.WatchList.getWatchilistsforSingleAccount(testingHttpClient.client, testingHttpClient.account01); Assert.IsTrue(results.StatusCode == System.Net.HttpStatusCode.OK); var contents = results.Content.ReadAsStringAsync().Result; Assert.IsTrue(contents.Length > 2); //var json = JsonConvert.DeserializeObject(contents); dynamic data = JsonConvert.DeserializeObject(contents); var wishLists = new DataModels.AllWatchLists(contents); Assert.IsFalse(string.IsNullOrWhiteSpace(wishLists.Lists.First().name)); Assert.IsNotNull(wishLists.Lists.First().watchlistItems.First().symbol); }