Exemplo n.º 1
0
        public void TestEffectRegenerationHealthOnCharacterDuring2sec()
        {
            //GIVEN
            Character character = new Character(500, 5, 5, 5, 10);

            character.CurrentHealth = 300;
            int expected = 400;

            //then we give regeneration effect with a total value of 100 at to distribut in a duration of 2sc
            _regenerationEffect = new RegenerationEffect(RegenerationType.Health, 100, 2);
            _regenerationEffect.RegenerationHealth(character);
            //when
            Assert.AreEqual(expected, character.CurrentHealth);
        }
Exemplo n.º 2
0
        public void TestEffectRegenerationHealthOnPlayerDuring2sec()
        {
            //GIVEN
            Player player = new Player(500, 5, 5, 5, 10, 50);

            player.CurrentHealth = 300;
            int expected = 400;

            //then we give effect to character
            _regenerationEffect = new RegenerationEffect(RegenerationType.Health, 100, 2);
            _regenerationEffect.RegenerationHealth((Character)player);
            //when
            Assert.AreEqual(expected, player.CurrentHealth);
        }
Exemplo n.º 3
0
        public void TestEffectRegenerationHealthOnCharacter()
        {
            //GIVEN
            Character character = new Character(500, 5, 5, 5, 10);

            character.CurrentHealth = 300;
            int expected = 400;

            //then we give effect to character
            _regenerationEffect = new RegenerationEffect(RegenerationType.Health, 100);
            _regenerationEffect.RegenerationHealth(character);
            //when
            Assert.AreEqual(expected, character.CurrentHealth);
        }