public async Task CanParseRawMarketString() { var rawString = await DataHelper.GetRawMarketsString().ConfigureAwait(false); var res = MarketParser.Parse(rawString); Assert.True(res.Count > 0); }
public void CanCreateMarketsArray(string source) { var res = MarketParser.Parse(source); Assert.NotNull(res); Assert.AreEqual(3, res.Count); foreach (var market in res) { Assert.True(market.Id != 0); Assert.False(string.IsNullOrEmpty(market.Name)); #if DEBUG Console.WriteLine(market.ToJson()); #endif } }
public async Task <IList <Market> > LoadMarkets() { var data = await this.requestor.GetString(this.marketsFeedUrl).ConfigureAwait(false); return(MarketParser.Parse(data)); }
public static async Task <IList <Market> > GetMarketsFromRawDataFile() { var source = await GetRawMarketsString().ConfigureAwait(false); return(MarketParser.Parse(source)); }