public void HeroShouldGainExperianceWhenTargetDies() { Hero hero = new Hero("Pesho", new FakeWeapon()); ITarget target = new FakeTarget(); hero.Attack(target); Assert.That(hero.Experience, Is.EqualTo(10), "Hero doesn't gain experiance!"); }
public void HeroGetsExperinceWhenTargetIsDead() { var fakeTarget = new FakeTarget(); var fakeWeapon = new FakeWeapon(); var hero = new Hero(HeroName, fakeWeapon); hero.Attack(fakeTarget); Assert.AreEqual(TargetXP, hero.Experience, "Hero does not get targets XP!"); }
public void HeroShouldGainExperinceWhenKillsATarget() { ITarget target = new FakeTarget(); IWeapon weapon = new FakeWeapon(); Hero hero = new Hero(HeroName, weapon); hero.Attack(target); Assert.AreEqual(20, hero.Experience, "The hero does not gain experience after killing a target."); }
public void HeroGainsExperienceAfterAttackWhenTargetDies() { IWeapon fakeWeapon = new FakeWeapon(); ITarget fakeTarget = new FakeTarget(); Hero hero = new Hero(HERO_NAME, fakeWeapon); hero.Attack(fakeTarget); Assert.AreEqual(40, hero.Experience + fakeTarget.GiveExperience()); }
public void HeroGainingExpiriance() { ITarget fakeTarget = new FakeTarget(); IWeapon fakeWeapon = new FakeWeapon(); Hero hero = new Hero(Name, fakeWeapon); int initialHeroEXP = hero.Experience; hero.Attack(fakeTarget); //1990 is the fake exp the dummy will give to Hero and it will always return Isdead=true! Assert.That(initialHeroEXP + 1990 == hero.Experience); }
public void HeroGainsXPWhenTargetDies() { IWeapon fakeWeapon = new FakeWeapon(); Hero hero = new Hero("Ivo", fakeWeapon); ITarget target = new FakeTarget(); hero.Attack(target); Assert.That(hero.Experience, Is.EqualTo(target.GiveExperience())); }
public void HeroGainsXPAfterAttackIfTargetDies() { IWeapon weapon = new FakeWeapon(); ITarget target = new FakeTarget(); Hero hero = new Hero("Ilko", weapon); hero.Attack(target); int expectedXP = 20; Assert.That(hero.Experience, Is.EqualTo(expectedXP) , "Hero doesnt gain Xp after kill"); }
public void HeroCanTakeXP() { int attack = 10; int durability = 10; int enemyXP = 10; int enemyHealth = 3; IWeapon axe = new FakeWeapon(); ITarget target = new FakeTarget(); Hero hero = new Hero("Stamat", axe); hero.Attack(target); Assert.That(hero.Experience, Is.EqualTo(target.GiveExperience())); }