Пример #1
0
        public void ApplyEffect()
        {
            Effect effect = new InitiatorBonus();

            Assert.IsTrue(player.ApplyEffect(effect));
            Assert.AreEqual(1, player.HasEffect(effect));

            Assert.IsTrue(player.ApplyEffect(new InitiatorBonus()));
            Assert.AreEqual(2, player.HasEffect(new InitiatorBonus()));
        }
Пример #2
0
        public void RemoveEffect()
        {
            Assert.IsTrue(player.ApplyEffect(new InitiatorBonus()));
            Assert.IsTrue(player.ApplyEffect(new InitiatorBonus()));

            Assert.AreEqual(2, player.HasEffect(new InitiatorBonus()));

            Assert.IsTrue(player.RemoveEffect(new InitiatorBonus()));

            Effect e = new InitiatorBonus();

            Assert.AreEqual(1, player.HasEffect(e));
            Assert.IsTrue(player.RemoveEffect(e));
            Assert.AreEqual(0, player.HasEffect(new InitiatorBonus()));

            Assert.IsFalse(player.RemoveEffect(e));
        }