示例#1
0
        public async Task GetPlayableRaceAsync_Gets_PlayableRace()
        {
            IPlayableRaceApi             warcraftClient = ClientFactory.BuildClient();
            RequestResult <PlayableRace> result         = await warcraftClient.GetPlayableRaceAsync(2, "static-us");

            Assert.NotNull(result.Value);
        }
    public async Task GetPlayableRaceAsync_Gets_PlayableRace()
    {
        IPlayableRaceApi warcraftClient = ClientFactory.BuildClient();

        RequestResult <PlayableRace> result = await warcraftClient.GetPlayableRaceAsync(2, "static-us");

        await result.Should().BeSuccessfulRequest()
        .BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/playable-race/2?namespace=static-us&locale=en_US");
    }
        public async Task GetPlayableRaceAsync_Gets_PlayableRace()
        {
            IPlayableRaceApi warcraftClient = ClientFactory.BuildMockClient(
                requestUri: "https://us.api.blizzard.com/data/wow/playable-race/2?namespace=static-us&locale=en_US",
                responseContent: Resources.PlayableRaceResponse);

            RequestResult <PlayableRace> result = await warcraftClient.GetPlayableRaceAsync(2, "static-us");

            Assert.NotNull(result.Value);
        }