예제 #1
0
        public async Task Get_AuctionDataAsync()
        {
            var getAuctionFile = await EuClient.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 EuClient.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);
                    });
                }
            }
        }
예제 #2
0
        public async Task Get_EU_AuctionData()
        {
            var getAuctionFile = await EuClient.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 EuClient.GetAuctionsAsync(TestConstants.EU_en_GB_Realm);

                var auction = getAuction.Auctions;

                string owner = "";
                foreach (var a in auction.Take(51))
                {
                    Assert.IsNotNull(a.Bid);
                    Assert.IsNotNull(a.Buyout);
                    Assert.IsNotNull(a.Context);
                    Assert.IsNotNull(a.Item);

                    Console.WriteLine(a.Item);
                    Console.WriteLine(a.Bid);
                    Console.WriteLine(a.BidGold);
                    Console.WriteLine(a.BidSilver);
                    Console.WriteLine(a.BidCopper);
                    Console.WriteLine("-------------------");
                    owner = a.Owner;
                }
            }
        }