public void RelistAndDelistItemTest() { AppId.AppName app = AppId.AppName.CounterStrikGlobalOffensive; BitSkinsInventoryItem item = null; foreach (AppId.AppName appId in Enum.GetValues(typeof(AppId.AppName))) { AccountInventory accountInventorys = Inventories.GetAccountInventory(appId, 1); if (accountInventorys.BitSkinsInventory.TotalItems > 0) { item = accountInventorys.BitSkinsInventory.BitSkinsInventoryItems[0]; app = appId; break; } } if (item != null) { string itemId = item.ItemIds[0]; double itemPrice = item.Prices[0]; Console.WriteLine(item.MarketHashName + " " + itemPrice); List <DelistedItem> delistedItems = DelistFromSale.DelistItem(app, new List <string> { itemId }); Assert.AreEqual(itemId, delistedItems[0].ItemId); List <RelistedItem> relistedItems = RelistForSale.RelistItem(app, new List <string> { itemId }, new List <double> { itemPrice }); } Assert.IsTrue(true); }
public void ModifySaleTest() { AppId.AppName app = AppId.AppName.CounterStrikGlobalOffensive; BitSkinsInventoryItem item = null; foreach (AppId.AppName appId in Enum.GetValues(typeof(AppId.AppName))) { AccountInventory accountInventorys = Inventories.GetAccountInventory(appId, 1); if (accountInventorys.BitSkinsInventory.TotalItems > 0) { item = accountInventorys.BitSkinsInventory.BitSkinsInventoryItems[0]; app = appId; break; } } if (item != null) { string itemId = item.ItemIds[0]; double itemPrice = item.Prices[0]; double itemNewPrice = itemPrice * 5; List <ModifiedItem> modifiedItems = ModifySaleItems.ModifySale(app, new List <string> { itemId }, new List <double> { itemNewPrice }); Assert.AreEqual(itemId, modifiedItems[0].ItemId); modifiedItems = ModifySaleItems.ModifySale(app, new List <string> { itemId }, new List <double> { itemPrice }); Assert.AreEqual(itemId, modifiedItems[0].ItemId); } Assert.IsTrue(true); }