Exemple #1
0
        public void ElixirOfIntellectObject_ShouldIncreaseIntellectOfHero_WhenUsed()
        {
            IWarriorHero    dummy     = ClassFactory.CreateWarrior("test");
            int             intellect = dummy.Intellect;
            IUseable <Item> elixir    = ElixirFactory.CreateElixirOfIntellect("test", 1, 10);

            dummy.Use(elixir);

            Assert.AreNotEqual(dummy.Intellect, intellect);
        }
Exemple #2
0
        public void ElixirOfAgilityObject_ShouldIncreaseAgilityOfHero_WhenUsed()
        {
            IWarriorHero    dummy   = ClassFactory.CreateWarrior("test");
            int             agility = dummy.Agility;
            IUseable <Item> elixir  = ElixirFactory.CreateElixirOfAgility("test", 1, 10);

            dummy.Use(elixir);

            Assert.AreNotEqual(dummy.Agility, agility);
        }
Exemple #3
0
        public void ElixirOfStraightObject_ShouldIncreaseStraightOfHero_WhenUsed()
        {
            IWarriorHero    dummy    = ClassFactory.CreateWarrior("test");
            int             straight = dummy.Straight;
            IUseable <Item> elixir   = ElixirFactory.CreateElixirOfStraight("test", 1, 10);

            dummy.Use(elixir);

            Assert.AreNotEqual(dummy.Straight, straight);
        }
Exemple #4
0
        public void HealthPotionObject_ShouldIncreaseHealth_WhenUsed()
        {
            IWarriorHero dummy = ClassFactory.CreateWarrior("test");

            dummy.HealthCurr = 50;
            IUseable <Item> potion = PotionFactory.CreateHealthPotion("test", 1, 50);

            dummy.Use(potion);

            Assert.AreEqual(dummy.HealthCurr, 100);
        }
Exemple #5
0
        public void UseMethod_ShouldUseItem_WhenCalled()
        {
            IWarriorHero dummy = ClassFactory.CreateWarrior("test");

            dummy.HealthCurr = 1;
            double          oldHealthCurr = dummy.HealthCurr;
            IUseable <Item> healthPotion  = PotionFactory.CreateHealthPotion("test", 1, 50);

            dummy.Use(healthPotion);

            Assert.AreNotEqual(oldHealthCurr, dummy.HealthCurr);
        }