Esempio n. 1
0
        public async Task GetPlayableRacesIndexAsync_Gets_PlayableRacesIndex()
        {
            IPlayableRaceApi warcraftClient           = ClientFactory.BuildClient();
            RequestResult <PlayableRacesIndex> result = await warcraftClient.GetPlayableRacesIndexAsync("static-us");

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

        RequestResult <PlayableRacesIndex> result = await warcraftClient.GetPlayableRacesIndexAsync("static-us");

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

            RequestResult <PlayableRacesIndex> result = await warcraftClient.GetPlayableRacesIndexAsync("static-us");

            Assert.NotNull(result.Value);
        }