コード例 #1
0
        public void CanNotHoldInPouch()
        {
            ReagentPouch bag = new ReagentPouch();
            Mushroom shroom = new Mushroom();
            BattleAxe axe = new BattleAxe();

            bag.AddItem(shroom);
            bag.AddItem(axe);

            Assert.AreEqual(1, bag.ItemCount);

            bag.DisplayContents();
        }
コード例 #2
0
        public void PutItemsInBackPackTest()
        {
            Backpack bag = new Backpack();
            Mushroom shroom = new Mushroom();
            Cloth cloth = new Cloth();
            BattleAxe axe = new BattleAxe();

            bag.AddItem(shroom);
            bag.AddItem(cloth);
            bag.AddItem(axe);

            Assert.AreEqual(3, bag.ItemCount);

            bag.DisplayContents();
        }