DoesItemExist() public method

Returns true if the given item exists, else false
public DoesItemExist ( string itemName, Data rarity, int level ) : bool
itemName string Name of the item
rarity Data Rarity of the item
level int Level of the item
return bool
Ejemplo n.º 1
0
        public void CommerceService_DoesItemExist_False()
        {
            // For this test, we'll also time how long it takes to check
            CommerceService cs = new CommerceService();

            var sw = new Stopwatch();
            sw.Start();
            Assert.IsFalse(cs.DoesItemExist(INVALID_ITEM_NAME, Data.Enums.ItemRarity.Basic, 0));
            sw.Stop();
            Console.WriteLine("To search for an invalid name, it took {0}ms", sw.ElapsedMilliseconds);
        }
Ejemplo n.º 2
0
        public void CommerceService_DoesItemExist_True()
        {
            CommerceService cs = new CommerceService();

            var sw = new Stopwatch();
            sw.Start();
            Assert.IsTrue(cs.DoesItemExist(VALID_ITEM_NAME, Data.Enums.ItemRarity.Basic, 0));
            sw.Stop();
            Console.WriteLine("To search for a valid name, it took {0}ms", sw.ElapsedMilliseconds);
        }