public async Task Test_Get_EU_AuctionDataAsync() { var client = new ApiClientAsync(Region.EU, Locale.en_GB, TestConstants.ApiKey); var getAuctionFile = await client.GetAuctionFileAsync(TestConstants.EU_en_GB_Realm); var someCachedValue = "14218549882000"; var lm = from f in getAuctionFile.Files select f.LastModified; if (!lm.Equals(someCachedValue)) { var getAuction = await client.GetAuctionsAsync(TestConstants.EU_en_GB_Realm); var auction = getAuction.Auctions; string owner = ""; using (auction.GetEnumerator()) { Parallel.ForEach(auction.Take(51), a => { Assert.IsNotNull(a.Auc); Assert.IsNotNull(a.Bid); Assert.IsNotNull(a.Buyout); Assert.IsNotNull(a.Context); Assert.IsNotNull(a.Item); owner = a.Owner; Console.WriteLine(a.BidGold); Console.WriteLine(a.BidSilver); Console.WriteLine(a.BidCopper); }); } } }
public async Task Test_US_GetAuctionData() { var client = new ApiClientAsync(Region.US, Locale.en_US, TestConstants.ApiKey); var auctions = await client.GetAuctionsAsync(TestConstants.US_en_US_Realm); Assert.IsNotNull(auctions); Parallel.ForEach(auctions.Auctions.Take(150), auction => { Assert.IsNotNull(auction.Auc); Assert.IsNotNull(auction.Bid); Assert.IsNotNull(auction.Buyout); Assert.IsNotNull(auction.Context); Assert.IsNotNull(auction.Item); }); }