コード例 #1
0
        public void Apply_ValidEntity_RevealCard()
        {
            var entity = new EntityData(1, "NAME", "CARD_ID", Zone.DECK);
            var game   = new MockGameState();

            game.Entities.Add(1, new Entity(1, ""));
            var mod = new ShowEntity(entity, new MockBlockData {
                Type = BlockType.REVEAL_CARD
            });

            mod.Apply(game);
            Assert.IsTrue(game.Entities[entity.Id].Info.JoustReveal);
        }
コード例 #2
0
        public void Apply_InvalidEntity()
        {
            var entityData = new EntityData(2, "NAME", "CARD_ID", Zone.DECK);
            var game       = new MockGameState();
            var entity     = new Entity(1, "");

            entity.Info.Hidden = true;
            game.Entities.Add(1, entity);
            var mod = new ShowEntity(entityData, new MockBlockData());

            mod.Apply(game);
            Assert.AreNotEqual(entityData.CardId, game.Entities[1].CardId);
            Assert.IsTrue(game.Entities[1].Info.Hidden);
            Assert.AreEqual(1, game.Entities.Count);
        }
コード例 #3
0
        public void Apply_ValidEntity()
        {
            var entityData = new EntityData(1, "NAME", "CARD_ID", Zone.DECK);
            var game       = new MockGameState();
            var entity     = new Entity(1, "");

            entity.Info.Hidden = true;
            game.Entities.Add(1, entity);
            var mod = new ShowEntity(entityData, new MockBlockData());

            mod.Apply(game);
            Assert.IsFalse(game.Entities[entityData.Id].Info.Hidden);
            Assert.IsFalse(game.Entities[entityData.Id].Info.JoustReveal);
            Assert.AreEqual(entityData.CardId, game.Entities[entityData.Id].CardId);
        }