public async Task GetPetsIndexAsync_Gets_PetsIndex() { IPetApi warcraftClient = ClientFactory.BuildClient(); RequestResult <PetsIndex> result = await warcraftClient.GetPetsIndexAsync("static-us"); Assert.NotNull(result.Value); }
public async Task GetPetAbilityMediaAsync_Gets_PetAbilityMedia() { IPetApi warcraftClient = ClientFactory.BuildClient(); RequestResult <PetAbilityMedia> result = await warcraftClient.GetPetAbilityMediaAsync(110, "static-us"); Assert.NotNull(result.Value); }
public async Task GetPetsIndexAsync_Gets_PetsIndex() { IPetApi warcraftClient = ClientFactory.BuildClient(); RequestResult <PetsIndex> result = await warcraftClient.GetPetsIndexAsync("static-us"); await result.Should().BeSuccessfulRequest() .BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/pet/index?namespace=static-us&locale=en_US"); }
public async void GetPetsIndexAsync_Gets_PetsIndex() { IPetApi warcraftClient = ClientFactory.BuildMockClient( requestUri: "https://us.api.blizzard.com/data/wow/pet/index?namespace=static-us&locale=en_US", responseContent: Resources.PetsIndexResponse); RequestResult <PetsIndex> result = await warcraftClient.GetPetsIndexAsync("static-us"); Assert.NotNull(result.Value); }
public async void GetPetAbilityMediaAsync_Gets_PetAbilityMedia() { IPetApi warcraftClient = ClientFactory.BuildMockClient( requestUri: "https://us.api.blizzard.com/data/wow/media/pet-ability/110?namespace=static-us&locale=en_US", responseContent: Resources.PetAbilityMediaResponse); RequestResult <PetAbilityMedia> result = await warcraftClient.GetPetAbilityMediaAsync(110, "static-us"); Assert.NotNull(result.Value); }
public PetApiTests() : base(Array.Empty <string>()) { _instance = _host.Services.GetRequiredService <IPetApi>(); }