public async Task PortraitAsync_successfully_returns_a_V2CharactersPortrait() { int characterId = 88823; LatestCharacterEndpoints internalLatestCharacter = new LatestCharacterEndpoints(string.Empty, true); V2CharactersPortrait getCharactersPortrait = await internalLatestCharacter.PortraitAsync(characterId); Assert.Equal("https://images.evetech.net/Character/95465499_64.jpg", getCharactersPortrait.Px64X64); Assert.Equal("https://images.evetech.net/Character/95465499_128.jpg", getCharactersPortrait.Px128X128); Assert.Equal("https://images.evetech.net/Character/95465499_256.jpg", getCharactersPortrait.Px256X256); Assert.Equal("https://images.evetech.net/Character/95465499_512.jpg", getCharactersPortrait.Px512X512); }
public async Task PortraitAsync_successfully_returns_a_V2CharactersPortrait() { Mock <IWebClient> mockedWebClient = new Mock <IWebClient>(); int characterId = 88823; string json = "{\"px64x64\": \"https://imageserver.eveonline.com/Character/95465499_64.jpg\",\"px128x128\": \"https://imageserver.eveonline.com/Character/95465499_128.jpg\",\"px256x256\": \"https://imageserver.eveonline.com/Character/95465499_256.jpg\",\"px512x512\": \"https://imageserver.eveonline.com/Character/95465499_512.jpg\"}"; mockedWebClient.Setup(x => x.GetAsync(It.IsAny <WebHeaderCollection>(), It.IsAny <string>(), It.IsAny <int>())).ReturnsAsync(new EsiModel { Model = json }); InternalLatestCharacter internalLatestCharacter = new InternalLatestCharacter(mockedWebClient.Object, string.Empty); V2CharactersPortrait getCharactersPortrait = await internalLatestCharacter.PortraitAsync(characterId); Assert.Equal("https://imageserver.eveonline.com/Character/95465499_64.jpg", getCharactersPortrait.Px64X64); Assert.Equal("https://imageserver.eveonline.com/Character/95465499_128.jpg", getCharactersPortrait.Px128X128); Assert.Equal("https://imageserver.eveonline.com/Character/95465499_256.jpg", getCharactersPortrait.Px256X256); Assert.Equal("https://imageserver.eveonline.com/Character/95465499_512.jpg", getCharactersPortrait.Px512X512); }