예제 #1
0
        public void FortifyDefense_ProperlyRaisesDefense([Values(1, 3)] int fortifyAmount)
        {
            IronBattleShield shield = new IronBattleShield(5, 0, 0);

            shield.FortifyDefense(fortifyAmount);

            Assert.AreEqual(fortifyAmount, shield.Defense);
        }
예제 #2
0
        public void FortifyDefense_ThrowsFortifyEvent([Values(1, 3)] int fortifyAmount)
        {
            IronBattleShield shield = new IronBattleShield(5, 0, 0);

            _logger.Subscribe(EventType.ShieldFortified, shield);
            shield.FortifyDefense(fortifyAmount);

            List <EventLog> logs = _logger.Logs;

            Assert.AreEqual(1, logs.Count);

            ShieldFortifiedEventArgs e = logs[0].E as ShieldFortifiedEventArgs;

            Assert.NotNull(e);
            Assert.AreEqual(fortifyAmount, e.FortifyAmount);
        }