public async Task<RealTimeStockItem> GetRealTimeStockAsync(StockInfoItem stockItem) { GoogleStockClient client = new GoogleStockClient(); RealTimeStockModel stockData = await client.QueryStockAsync(stockItem.Id); return RealTimeStockItem.ConvertFrom(stockData); }
public void QueryStockTest() { GoogleStockClient query = new GoogleStockClient(); RealTimeStockModel item = query.QueryStockAsync("2115").GetAwaiter().GetResult(); Assert.IsNotNull(item.CurrentPrice); }