Пример #1
0
        public void HeroGainsExperienceAfterAttackIfTargetDies()
        {
            // Arrange
            var fakeTarget = new FakeDeadTarget();
            var fakeWeapon = new FakeWeapon();
            var hero       = new Hero(HeroName, fakeWeapon);

            // Act
            hero.Attack(fakeTarget);
            var expectedExperience = fakeTarget.GiveExperience();

            // Assert
            Assert.AreEqual(expectedExperience, hero.Experience);
        }