Beispiel #1
0
        public async Task CorporationLocationsAsync_successfully_returns_a_ListV2AssetsCorporationLocation()
        {
            int          characterId = 88823;
            IList <long> ids         = new List <long> {
                3, 5, 6
            };
            AssetScopes scopes = AssetScopes.esi_assets_read_corporation_assets_v1;

            SsoToken inputToken = new SsoToken {
                AccessToken = "This is a old access token", RefreshToken = "This is a old refresh token", CharacterId = characterId, AssetScopesFlags = scopes
            };
            LatestAssetsEndpoints internalLatestAssets = new LatestAssetsEndpoints(string.Empty, true);

            IList <V2AssetsCorporationLocation> getCorporationAssetsLocations = await internalLatestAssets.CorporationLocationsAsync(inputToken, characterId, ids);

            Assert.Equal(1, getCorporationAssetsLocations.Count);
            Assert.Equal(12345, getCorporationAssetsLocations.First().ItemId);
        }
Beispiel #2
0
        public async Task CharactersAsync_successfully_returns_a_pagedModelV4AssetsCharacter()
        {
            int         characterId = 88823;
            int         page        = 1;
            AssetScopes scopes      = AssetScopes.esi_assets_read_assets_v1;

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

            LatestAssetsEndpoints internalLatestAssets = new LatestAssetsEndpoints(string.Empty, true);

            PagedModel <V5AssetsCharacter> getCharacterAssets = await internalLatestAssets.CharactersAsync(inputToken, page);

            Assert.Equal(1, getCharacterAssets.CurrentPage);
            Assert.Equal(1, getCharacterAssets.Model.Count);
            Assert.Equal(LocationFlagCharacter.Hangar, getCharacterAssets.Model.First().LocationFlag);
        }
Beispiel #3
0
        public void Corporations_successfully_returns_a_pagedModelV4AssetsCorporations()
        {
            int         characterId   = 88823;
            int         corporationId = 888233;
            int         page          = 1;
            AssetScopes scopes        = AssetScopes.esi_assets_read_corporation_assets_v1;

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

            LatestAssetsEndpoints internalLatestAssets = new LatestAssetsEndpoints(string.Empty, true);

            PagedModel <V5AssetsCorporations> getCorporationAssets = internalLatestAssets.Corporations(inputToken, corporationId, page);

            Assert.Equal(1, getCorporationAssets.CurrentPage);
            Assert.Equal(1, getCorporationAssets.Model.Count);
            Assert.Equal(LocationFlagCorporation.Hangar, getCorporationAssets.Model.First().LocationFlag);
        }
Beispiel #4
0
        public void CharacterNames_successfully_returns_a_ListV1AssetsCharacterName()
        {
            int          characterId = 88823;
            IList <long> ids         = new List <long> {
                3, 5, 6
            };
            AssetScopes scopes = AssetScopes.esi_assets_read_assets_v1;

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

            LatestAssetsEndpoints internalLatestAssets = new LatestAssetsEndpoints(string.Empty, true);

            IList <V1AssetsCharacterName> getCharactersAssetsNames = internalLatestAssets.CharacterNames(inputToken, ids);

            Assert.Equal(1, getCharactersAssetsNames.Count);
            Assert.Equal(12345, getCharactersAssetsNames.First().ItemId);
            Assert.Equal("Awesome Name", getCharactersAssetsNames.First().Name);
        }