public void HeroGainsExpirienceWhenDummyIsDead() { Hero hero = new Hero("Barbarian", new FakeWapon()); ITarget fakeTarget = new FakeTarget(); while (!fakeTarget.IsDead()) { hero.Attack(fakeTarget); } Assert.AreEqual(hero.Experience, FakeGiveExpirience); }
public void HeroGainsExperienceAfterKillingTarget() { //Arrange FakeTarget fakeTarget = new FakeTarget(TargetHealth, TargetExperience); FakeWeapon fakeWeapon = new FakeWeapon(WeaponDamage, WeaponDurability); Hero hero = new Hero(HeroName, fakeWeapon); //Act while (!fakeTarget.IsDead()) { hero.Attack(fakeTarget); } //Assert Assert.AreEqual(TargetExperience, hero.Experience, "Hero doesn't gain experience after killing a target."); }