Пример #1
0
        public async Task GetAuctionsAsync_Gets_Auctions()
        {
            IAuctionHouseApi warcraftClient      = ClientFactory.BuildClient();
            RequestResult <AuctionsIndex> result = await warcraftClient.GetAuctionsAsync(4, "dynamic-us");

            Assert.NotNull(result.Value);
        }
Пример #2
0
    public async Task GetAuctionsAsync_Gets_Auctions()
    {
        IAuctionHouseApi warcraftClient = ClientFactory.BuildClient();

        RequestResult <AuctionsIndex> result = await warcraftClient.GetAuctionsAsync(4, "dynamic-us");

        await result.Should().BeSuccessfulRequest()
        .BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/connected-realm/4/auctions?namespace=dynamic-us&locale=en_US");
    }
        public async void GetAuctionsAsync_Gets_Auctions()
        {
            IAuctionHouseApi warcraftClient = ClientFactory.BuildMockClient(
                requestUri: "https://us.api.blizzard.com/data/wow/connected-realm/1146/auctions?namespace=dynamic-us&locale=en_US",
                responseContent: Resources.AuctionsResponse);

            RequestResult <AuctionsIndex> result = await warcraftClient.GetAuctionsAsync(1146, "dynamic-us");

            Assert.NotNull(result.Value);
        }