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); }
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); }
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); }
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); }
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); }