public async Task GetItemAsync_Gets_Item() { IItemApi warcraftClient = ClientFactory.BuildClient(); RequestResult <Item> result = await warcraftClient.GetItemAsync(19019, "static-us"); Assert.NotNull(result.Value); }
public async Task GetItemAsync_Gets_Item() { IItemApi warcraftClient = ClientFactory.BuildClient(); RequestResult <Item> result = await warcraftClient.GetItemAsync(19019, "static-us"); await result.Should().BeSuccessfulRequest() .BeEquivalentToBlizzardResponseAsync("https://us.api.blizzard.com/data/wow/item/19019?namespace=static-us&locale=en_US"); }
public async Task GetItemAsync_Gets_Item() { IItemApi warcraftClient = ClientFactory.BuildMockClient( requestUri: "https://us.api.blizzard.com/data/wow/item/19019?namespace=static-us&locale=en_US", responseContent: Resources.ItemResponse); RequestResult <Item> result = await warcraftClient.GetItemAsync(19019, "static-us"); Assert.NotNull(result.Value); }