Пример #1
0
        public void TestCharIdToName()
        {
            CharacterIdName charId = EveApi.GetCharacterIdName("test123");

            Assert.AreEqual(797400947, charId.CharacterIdItems[0].CharacterId);
            Assert.AreEqual("CCP Garthagk", charId.CharacterIdItems[0].Name);
        }
Пример #2
0
        public void PersistCharacterId()
        {
            ResponseCache.Clear();
            CharacterIdName cid = EveApi.GetCharacterIdName("test");

            ResponseCache.Save("ResponseCache.xml");
            ResponseCache.Clear();
            ResponseCache.Load("ResponseCache.xml");
            CharacterIdName ccid = EveApi.GetCharacterIdName("test");

            Assert.AreEqual(cid.CachedUntilLocal, ccid.CachedUntilLocal);

            Assert.AreEqual(cid.CharacterIdItems[0].Name, ccid.CharacterIdItems[0].Name);
            Assert.AreEqual(cid.CharacterIdItems[0].CharacterId, ccid.CharacterIdItems[0].CharacterId);
        }
Пример #3
0
        public static int GetCharacterIdByName(string characterName)
        {
            CharacterIdName characterId = EveApi.GetCharacterIdName(characterName);

            return(characterId.CharacterIdItems[0].CharacterId);
        }