Exemplo n.º 1
0
        public void OnEnemyKilledMethod_AppropriatelyFiresEnemyKilledEvent()
        {
            _enemy.OnEnemyKilled(new EnemyKilledEventArgs(_fighter));

            var logs = _logger.Logs;

            Assert.AreEqual(1, logs.Count);
            Assert.AreEqual(EventType.EnemyKilled, logs[0].Type);
            Assert.AreEqual(_enemy, logs[0].Sender);
            EnemyKilledEventArgs e = logs[0].E as EnemyKilledEventArgs;

            Assert.NotNull(e);
            Assert.AreEqual(_fighter, e.Enemy);
        }