コード例 #1
0
        public async Task GetPvpSeasonAsync_Gets_PvpSeason()
        {
            IPvpSeasonApi             warcraftClient = ClientFactory.BuildClient();
            RequestResult <PvpSeason> result         = await warcraftClient.GetPvpSeasonAsync(27, "dynamic-us");

            Assert.NotNull(result.Value);
        }
コード例 #2
0
        public async void GetPvpSeasonAsync_Gets_PvpSeason()
        {
            IPvpSeasonApi warcraftClient = ClientFactory.BuildMockClient(
                requestUri: "https://us.api.blizzard.com/data/wow/pvp-season/27?namespace=dynamic-us&locale=en_US",
                responseContent: Resources.PvpSeasonResponse);

            RequestResult<PvpSeason> result = await warcraftClient.GetPvpSeasonAsync(27, "dynamic-us");
            Assert.NotNull(result.Value);
        }
コード例 #3
0
    public async Task GetPvpSeasonAsync_Gets_PvpSeason()
    {
        IPvpSeasonApi warcraftClient = ClientFactory.BuildClient();

        RequestResult <PvpSeason> result = await warcraftClient.GetPvpSeasonAsync(27, "dynamic-us");

        await result.Should().BeSuccessfulRequest()
        .BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/pvp-season/27?namespace=dynamic-us&locale=en_US");
    }