Ejemplo n.º 1
0
        public void ValidEntity()
        {
            var entity = new Entity(0);

            entity.SetTag(GameTag.SECRET, 1);
            entity.SetTag(GameTag.CLASS, (int)CardClass.PALADIN);
            var secret = new Secret(entity);

            Assert.AreEqual(secret.Entity, entity);

            Assert.AreEqual(CardIds.Secrets.Paladin.All.Count, secret.Excluded.Count);

            foreach (var id in CardIds.Secrets.Hunter.All)
            {
                Assert.IsFalse(secret.Excluded.ContainsKey(id));
            }
            foreach (var id in CardIds.Secrets.Mage.All)
            {
                Assert.IsFalse(secret.Excluded.ContainsKey(id));
            }

            foreach (var id in CardIds.Secrets.Paladin.All)
            {
                Assert.IsTrue(secret.Excluded.ContainsKey(id));
                Assert.IsFalse(secret.Excluded[id]);
            }

            foreach (var id in CardIds.Secrets.Paladin.All)
            {
                secret.Exclude(id);
            }

            foreach (var id in CardIds.Secrets.Paladin.All)
            {
                Assert.IsTrue(secret.Excluded[id]);
            }

            secret.Include(CardIds.Secrets.Paladin.Avenge);
            Assert.IsFalse(secret.IsExcluded(CardIds.Secrets.Paladin.Avenge));
        }