Ejemplo n.º 1
0
        public void RaiseStatMethod_AppropriatelyFiresEvent([Values(StatType.Strength, StatType.Defense, StatType.Speed)] StatType statToRaise,
                                                            [Range(1, 5)] int raiseAmount)
        {
            _fighter.RaiseStat(statToRaise, raiseAmount);

            Assert.AreEqual(1, _logger.Logs.Count);
        }
Ejemplo n.º 2
0
        public void RaiseStatMethod_CorrectlyRaisesStat([Values] StatType statType, [Range(1, 4)] int statIncreaseAmount)
        {
            int valueBefore = _fighter.GetStatValue(statType);

            int returnedValue = _fighter.RaiseStat(statType, statIncreaseAmount);
            int valueAfter    = _fighter.GetStatValue(statType);

            Assert.AreEqual(valueAfter, returnedValue);

            int valueDiff = valueAfter - valueBefore;

            Assert.AreEqual(statIncreaseAmount, valueDiff);
        }