示例#1
0
        public void GetOwner_ValidRequest_HasResult()
        {
            EveXmlResponse <OwnerCollection> xml = api.GetOwnerId(CharName);

            Assert.IsNotNull(xml.Result.Owners.First());
            Assert.AreEqual(CharId, xml.Result.Owners.First().OwnerId);
        }
示例#2
0
        private async Task ensureInitialized()
        {
            EveXmlResponse <ApiKeyInfo> result = await GetApiKeyInfoAsync().ConfigureAwait(false);

            LazyInitializer.EnsureInitialized(ref _apiKeyInfo, ref _isInitialized, ref _lazyLoadLock,
                                              () => result.Result.Key);
        }
示例#3
0
        public void GetCallList_ValidRequest_HasResult()
        {
            EveXmlResponse <CallList> xml = api.GetCallList();

            Assert.IsNotNull(xml.Result.CallGroups.First());
            Assert.IsNotNull(xml.Result.Calls.First());
        }
示例#4
0
        public void GetAllianceList_ValidRequest_HasResult()
        {
            EveXmlResponse <AllianceList> xml = api.GetAllianceList(true);

            Assert.IsNotNull(xml.Result.Alliances.First());
            Assert.IsNotNull(xml.Result.Alliances.First().Corporations);
        }
示例#5
0
        /// <summary>
        ///     Returns all transactions between, not including, fromId (newest) and untilId (oldest).
        /// </summary>
        /// <param name="untilId">The backward-limiting ID</param>
        /// <param name="division">Optional; Wallet Division used for request. Default is Master Wallet.</param>
        /// <param name="fromId">Optional; The forward-limiting ID</param>
        /// <returns></returns>
        public async Task <List <WalletTransactions.Transaction> > GetWalletTransactionsUntilAsync(long untilId,
                                                                                                   int division = 1000, long fromId = 0)
        {
            EveXmlResponse <WalletTransactions> res =
                await GetWalletTransactionsAsync(division, 2560, fromId).ConfigureAwait(false);

            var list = new List <WalletTransactions.Transaction>();

            while (res.Result.Transactions.Any())
            {
                IOrderedEnumerable <WalletTransactions.Transaction> sortedList =
                    res.Result.Transactions.OrderByDescending(f => f.TransactionId);
                foreach (WalletTransactions.Transaction entry in sortedList)
                {
                    if (entry.TransactionId <= untilId)
                    {
                        return(list);
                    }
                    list.Add(entry);
                }
                res =
                    await
                    GetWalletTransactionsAsync(division, 2560, sortedList.Last().TransactionId)
                    .ConfigureAwait(false);
            }
            return(list);
        }
示例#6
0
        public void GetAssetList_ValidRequest_HasResult()
        {
            EveXmlResponse <AssetList>   res  = _validKey.Characters[0].GetAssetList();
            IEnumerable <AssetList.Item> list = res.Result.Flatten();

            Assert.IsNotNull(res.Result);
        }
示例#7
0
        public void GetKillLog()
        {
            // BUG Returns 000 OK when exhausted
            EveXmlResponse <KillLog> res = _validKey.Characters[0].GetKillLog();

            Assert.IsNotNull(res.Result);
        }
        public void GetKillLog_ValidRequest_HasResult()
        {
            EveXmlResponse <KillLog> res = _validKey.Corporation.GetKillLog();

            Assert.IsNotNull(res.Result);
            // TODO Test this further
        }
        public void GetContactList()
        {
            EveXmlResponse <ContactList> xml = _character.GetContactList();

            Assert.AreEqual(3010913, xml.Result.PersonalContacts.First().ContactId);
            Assert.AreEqual(797400947, xml.Result.CorporationContacts.First().ContactId);
            Assert.AreEqual(797400947, xml.Result.AllianceContacts.First().ContactId);
        }
        public void GetKillLog()
        {
            EveXmlResponse <KillLog> xml = _character.GetKillLog();

            Assert.AreEqual(63, xml.Result.Kills.First().KillId);
            Assert.AreEqual(150340823, xml.Result.Kills.First().Victim.CharacterId);
            Assert.AreEqual(1000127, xml.Result.Kills.First().Attackers.First().CorporationId);
        }
示例#11
0
        /// <summary>
        ///     Returns all journal entries between, not including, fromId (newest) and untilId (oldest).
        /// </summary>
        /// <param name="untilId">The backward-limiting ID</param>
        /// <param name="fromId">Optional; The forward-limiting ID</param>
        /// <returns></returns>
        public async Task <List <WalletJournal.JournalEntry> > GetWalletJournalUntilAsync(long untilId, long fromId = 0)
        {
            EveXmlResponse <WalletJournal> res = await GetWalletJournalAsync(2560, fromId).ConfigureAwait(false);

            var list = new List <WalletJournal.JournalEntry>();

            while (res.Result.Journal.Any())
            {
                IOrderedEnumerable <WalletJournal.JournalEntry> sortedList =
                    res.Result.Journal.OrderByDescending(f => f.RefId);
                foreach (WalletJournal.JournalEntry entry in sortedList)
                {
                    if (entry.RefId == untilId)
                    {
                        return(list);
                    }
                    list.Add(entry);
                }
                res = await GetWalletJournalAsync(2560, sortedList.Last().RefId).ConfigureAwait(false);
            }
            return(list);
        }
示例#12
0
        public void GetSkillTree_ValidRequest_HasResult()
        {
            EveXmlResponse <SkillTree> xml = api.GetSkillTree();

            Assert.IsNotNull(xml.Result.Groups.First());
        }
示例#13
0
        public void GetReferenceTypes_ValidRequest_HasResult()
        {
            EveXmlResponse <ReferenceTypes> xml = api.GetReferenceTypes();

            Assert.IsNotNull(xml.Result.RefTypes.First().RefTypeName);
        }
示例#14
0
        public void GetFactionWarfareStats_ValidRequest_HasResult()
        {
            EveXmlResponse <FactionWarfareStats> xml = api.GetFactionWarfareStats();

            Assert.IsNotNull(xml.Result.Factions.First().FactionName);
        }
示例#15
0
        public void GetConquerableStations_ValidRequest_HasResult()
        {
            EveXmlResponse <ConquerableStations> xml = api.GetConquerableStations();

            Assert.IsNotNull(xml.Result.Stations.First().StationName);
        }
 public void GetContracts()
 {
     EveXmlResponse <ContractList> xml = _corp.GetContracts();
     // TODO Get sample
 }
        public void GetContainerLog()
        {
            EveXmlResponse <ContainerLog> xml = _corp.GetContainerLog();

            Assert.AreEqual(2051471251, xml.Result.LogEntries.First().ItemId);
        }
示例#18
0
        public void GetTypeName_ValidId_HasResult()
        {
            EveXmlResponse <TypeName> xml = api.GetTypeName(12345);

            Assert.AreEqual("200mm Railgun I Blueprint", xml.Result.Types.First().TypeName);
        }
示例#19
0
        public void GetServerStatus_ValidRequest_HasResult()
        {
            EveXmlResponse <ServerStatus> xml = api.GetServerStatus();

            Assert.IsNotNull(xml.Result.ServerOpen);
        }
示例#20
0
        public void GetCertificateTree_ValidRequest_HasResult()
        {
            EveXmlResponse <CertificateTree> xml = api.GetCertificateTree();

            Assert.IsNotNull(xml.Result);
        }
        public void GetContractItems()
        {
            EveXmlResponse <ContractItems> xml = _corp.GetContractItems(0);

            Assert.AreEqual(600515136, xml.Result.Items.First().RecordId);
        }
示例#22
0
        public void GetCharacterInfo_ValidId_IdIsEqual()
        {
            EveXmlResponse <CharacterInfo> xml = api.GetCharacterInfo(CharId);

            Assert.AreEqual(CharId, xml.Result.CharacterId);
        }
示例#23
0
        public void GetCharacterAffiliation_ValidRequest_HasResult()
        {
            EveXmlResponse <CharacterAffiliation> xml = api.GetCharacterAffiliation(CharId);

            Assert.IsNotNull(xml.Result.Characters.First());
        }
        public void GetContractBids()
        {
            EveXmlResponse <ContractBids> xml = _corp.GetContractBids();

            Assert.AreEqual(123123123, xml.Result.Bids.First().BidId);
        }
示例#25
0
        public void GetCharacterName_ValidId_NameIsEqual()
        {
            EveXmlResponse <CharacterNameId> xml = api.GetCharacterName(CharId);

            Assert.AreEqual(CharName, xml.Result.Characters.First().CharacterName);
        }
        public void GetCorporationSheet()
        {
            EveXmlResponse <CorporationSheet> xml = _corp.GetCorporationSheet();

            Assert.AreEqual(150212025, xml.Result.CorporationId);
        }
示例#27
0
        public void GetErrorList_ValidRequest_HasResult()
        {
            EveXmlResponse <ErrorList> xml = api.GetErrorList();

            Assert.IsNotNull(xml.Result.Errors.First().ErrorText);
        }
        public void GetFactionalWarfareStats()
        {
            EveXmlResponse <FactionWarfareStats> xml = _corp.GetFactionWarfareStats();

            Assert.AreEqual(500001, xml.Result.FactionId);
        }
示例#29
0
        public void GetFactionWarfareTopList_ValidRequest_HasResult()
        {
            EveXmlResponse <FactionWarTopStats> xml = api.GetFactionWarfareTopList();

            Assert.IsNotNull(xml.Result.Characters.KillsYesterday.First().CharacterName);
        }
 public void GetIndustryJobs()
 {
     EveXmlResponse <IndustryJobs> xml = _corp.GetIndustryJobs();
 }