コード例 #1
0
ファイル: MountApiTests.cs プロジェクト: yschuurmans/warcraft
        public async Task GetMountAsync_Gets_Mount()
        {
            IMountApi             warcraftClient = ClientFactory.BuildClient();
            RequestResult <Mount> result         = await warcraftClient.GetMountAsync(6, "static-us");

            Assert.NotNull(result.Value);
        }
コード例 #2
0
    public async Task GetMountAsync_Gets_Mount()
    {
        IMountApi warcraftClient = ClientFactory.BuildClient();

        RequestResult <Mount> result = await warcraftClient.GetMountAsync(6, "static-us");

        await result.Should().BeSuccessfulRequest()
        .BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/mount/6?namespace=static-us&locale=en_US");
    }
コード例 #3
0
        public async void GetMountAsync_Gets_Mount()
        {
            IMountApi warcraftClient = ClientFactory.BuildMockClient(
                requestUri: "https://us.api.blizzard.com/data/wow/mount/6?namespace=static-us&locale=en_US",
                responseContent: Resources.MountResponse);

            RequestResult <Mount> result = await warcraftClient.GetMountAsync(6, "static-us");

            Assert.NotNull(result.Value);
        }