Esempio n. 1
0
        public void HeroShouldGainsXPWhenTheTargetDies()
        {
            Hero    hero   = new Hero("Pesho", new FakeAxe());
            ITarget target = new FakeTarget();

            hero.Attack(target);

            Assert.That(hero.Experience, Is.EqualTo(giveXP), "Hero doesn't receive XP.");
        }
        public void HeroGainsXPWhenTheTargetDies()
        {
            ITarget target = new FakeTarget();
            IWeapon weapon = new FakeWeapon();
            var     hero   = new Hero("Ivan", weapon);

            hero.Attack(target);

            Assert.That(hero.Experience, Is.EqualTo(20));
        }
Esempio n. 3
0
        public void HeroShouldGainExperienceWhenTargetDies()
        {
            IWeapon weapon = new FakeWeapon();
            ITarget target = new FakeTarget();
            Hero    hero   = new Hero("Ivan", weapon);

            hero.Attack(target);

            Assert.That(hero.Experience, Is.EqualTo(ExpectedHeroExperience));
        }
Esempio n. 4
0
        public void HeroGainsExperienceAfterAttackIfTargetDies()
        {
            ITarget fakeTarget = new FakeTarget();
            IWeapon fakeWeapon = new FakeWeapon();

            Hero hero = new Hero(HeroName, fakeWeapon);

            hero.Attack(fakeTarget);

            Assert.That(hero.Experience, Is.EqualTo(20));
        }