Ejemplo n.º 1
0
        public void NoFindItemTest()
        {
            Item      TestItem      = new Item(new string[] { "potato", "baked" }, "baked potato", "a baked potato");
            Inventory TestInventory = new Inventory();

            TestInventory.PutItem(TestItem);
            Assert.IsFalse(TestInventory.HasItem("chicken"));
        }
Ejemplo n.º 2
0
        public void NoFindItemTest()
        {
            Item TestItem = new Item (new string[] { "potato", "baked" }, "baked potato", "a baked potato");
            Inventory TestInventory = new Inventory ();

            TestInventory.PutItem (TestItem);
            Assert.IsFalse (TestInventory.HasItem ("chicken"));
        }
Ejemplo n.º 3
0
        public void ListItemTest()
        {
            Item      TestItem      = new Item(new string[] { "potato", "baked" }, "baked potato", "a baked potato");
            Item      TestItem2     = new Item(new string[] { "chicken", "baked" }, "baked chicken", "a baked chicken");
            Inventory TestInventory = new Inventory();

            TestInventory.PutItem(TestItem);
            TestInventory.PutItem(TestItem2);

            //Assert.IsTrue (TestItem.ShortDesc == ("A baked potato potato."));

            //ItemList.Add (Check.Name + "\t" + Check.ShortDesc + "\n");
            //"baked potato" + "\t" + "A baked potato potato." + "\n"

            Assert.IsTrue(TestInventory.HasItem("potato"));
            Assert.IsTrue(TestInventory.HasItem("chicken"));
            Assert.IsTrue(TestInventory.ItemList().Contains("baked potato" + "\t" + "A baked potato potato." + "\n"));
            Assert.IsTrue(TestInventory.ItemList().Contains("baked chicken" + "\t" + "A baked chicken chicken." + "\n"));
        }
Ejemplo n.º 4
0
        public void FetchItemTest()
        {
            Item      TestItem      = new Item(new string[] { "potato", "baked" }, "baked potato", "a baked potato");
            Inventory TestInventory = new Inventory();

            TestInventory.PutItem(TestItem);
            Assert.IsTrue(TestInventory.FetchItem("baked") == TestItem);

            Assert.IsTrue(TestInventory.HasItem("baked"));
        }
Ejemplo n.º 5
0
        public void ListItemTest()
        {
            Item TestItem = new Item (new string[] { "potato", "baked" }, "baked potato", "a baked potato");
            Item TestItem2 = new Item (new string[] { "chicken", "baked" }, "baked chicken", "a baked chicken");
            Inventory TestInventory = new Inventory ();

            TestInventory.PutItem (TestItem);
            TestInventory.PutItem (TestItem2);

            //Assert.IsTrue (TestItem.ShortDesc == ("A baked potato potato."));

            //ItemList.Add (Check.Name + "\t" + Check.ShortDesc + "\n");
            //"baked potato" + "\t" + "A baked potato potato." + "\n"

            Assert.IsTrue (TestInventory.HasItem ("potato"));
            Assert.IsTrue (TestInventory.HasItem ("chicken"));
            Assert.IsTrue (TestInventory.ItemList ().Contains("baked potato" + "\t" + "A baked potato potato." + "\n"));
            Assert.IsTrue (TestInventory.ItemList ().Contains("baked chicken" + "\t" + "A baked chicken chicken." + "\n"));
        }
Ejemplo n.º 6
0
        public void FetchItemTest()
        {
            Item TestItem = new Item (new string[] { "potato", "baked" }, "baked potato", "a baked potato");
            Inventory TestInventory = new Inventory ();

            TestInventory.PutItem (TestItem);
            Assert.IsTrue (TestInventory.FetchItem ("baked") == TestItem);

            Assert.IsTrue (TestInventory.HasItem ("baked"));
        }