コード例 #1
0
        public async Task StandingsAsync_successfully_returns_a_list_of_V2CharactersStandings()
        {
            int             characterId = 88823;
            CharacterScopes scopes      = CharacterScopes.esi_characters_read_standings_v1;

            SsoToken inputToken = new SsoToken {
                AccessToken = "This is a old access token", RefreshToken = "This is a old refresh token", CharacterId = characterId, CharacterScopesFlags = scopes
            };

            LatestCharacterEndpoints internalLatestCharacter = new LatestCharacterEndpoints(string.Empty, true);

            IList <V2CharactersStandings> getCharactersStandings = await internalLatestCharacter.StandingsAsync(inputToken);

            Assert.Equal(3, getCharactersStandings.Count);
            Assert.Equal(3009841, getCharactersStandings.First().FromId);
            Assert.Equal(StandingFromType.Agent, getCharactersStandings.First().FromType);
            Assert.Equal(0.1f, getCharactersStandings.First().Standing);
            Assert.Equal(StandingFromType.NpcCorp, getCharactersStandings[1].FromType);
            Assert.Equal(StandingFromType.Faction, getCharactersStandings[2].FromType);
        }