示例#1
0
        public void ShouldNotExceedBaseHitpointsWhenHealing()
        {
            //given
            const int teamMaxHitpoints = 10;
            var       yoloTeam         = new YoloTeam(StartingPosition, teamMaxHitpoints);

            yoloTeam.Take(new Damage {
                Hitpoints = 2
            });

            const int hitpointsToHeal = 4;

            //when
            yoloTeam.Heal(hitpointsToHeal);

            //then
            Assert.That(yoloTeam.Hitpoints, Is.EqualTo(teamMaxHitpoints));
        }
示例#2
0
        public void ShouldHealSpecifiedNumberOfHitpoints()
        {
            //given
            const int teamMaxHitpoints = 10;
            var       yoloTeam         = new YoloTeam(StartingPosition, teamMaxHitpoints);

            yoloTeam.Take(new Damage {
                Hitpoints = 2
            });
            var hitpointsWhenHealing = yoloTeam.Hitpoints;

            const int hitpointsToHeal = 1;

            //when
            yoloTeam.Heal(hitpointsToHeal);

            //then
            Assert.That(yoloTeam.Hitpoints, Is.EqualTo(hitpointsWhenHealing + hitpointsToHeal));
        }