示例#1
0
        public void OnAttackSuccessfulMethod_AppropriatelyFiresAttackSuccessfulEvent()
        {
            _fighter.OnAttackSuccessful(new AttackSuccessfulEventArgs(_enemy, 2));

            var logs = _logger.Logs;

            Assert.AreEqual(1, logs.Count);
            Assert.AreEqual(EventType.AttackSuccessful, logs[0].Type);
            Assert.AreEqual(_fighter, logs[0].Sender);
            var e = logs[0].E as AttackSuccessfulEventArgs;

            Assert.NotNull(e);
            Assert.AreEqual(2, e.DamageDealt);
        }