Exemplo n.º 1
0
        public static void PrintAllAssets()
        {
            AssetList assetList = EveApi.GetAssetList(AssetListType.Corporation, 1237, 453, "fullApiKey");

            foreach (AssetList.AssetListItem ali in assetList.AssetListItems)
            {
                PrintAsset(ali);
            }
        }
Exemplo n.º 2
0
        public void GetAssetList()
        {
            AssetList assetList = EveApi.GetAssetList(AssetListType.Corporation, 432435, 234523, "apiKey");

            AssetList.AssetListItem parent     = GetAsset(197977287, assetList.AssetListItems);
            AssetList.AssetListItem child      = GetAsset(331125392, parent.Contents);
            AssetList.AssetListItem grandChild = GetAsset(109617951, child.Contents);

            Assert.AreEqual(197977287, parent.ItemId);
            Assert.AreEqual(331125392, child.ItemId);
            Assert.AreEqual(109617951, grandChild.ItemId);
        }
Exemplo n.º 3
0
        public void PersistAssetList()
        {
            ResponseCache.Clear();
            AssetList assetList = EveApi.GetAssetList(AssetListType.Corporation, 432435, 234523, "apiKey");

            ResponseCache.Save("ResponseCache.xml");
            ResponseCache.Clear();
            ResponseCache.Load("ResponseCache.xml");
            AssetList cachedAssetList = EveApi.GetAssetList(AssetListType.Corporation, 432435, 234523, "apiKey");

            Assert.AreEqual(assetList.CachedUntilLocal, cachedAssetList.CachedUntilLocal);

            for (int i = 0; i < assetList.AssetListItems.Length; i++)
            {
                Assert.AreEqual(true, CompareAssets(assetList.AssetListItems[i], cachedAssetList.AssetListItems[i]));
            }
        }