当前位置: 首页>>代码示例>>C#>>正文


C# TestContext.SetMonsterInFirstRank方法代码示例

本文整理汇总了C#中NUnit.Framework.TestContext.SetMonsterInFirstRank方法的典型用法代码示例。如果您正苦于以下问题:C# TestContext.SetMonsterInFirstRank方法的具体用法?C# TestContext.SetMonsterInFirstRank怎么用?C# TestContext.SetMonsterInFirstRank使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NUnit.Framework.TestContext的用法示例。


在下文中一共展示了TestContext.SetMonsterInFirstRank方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Ossuous_can_be_attacked_if_hero_of_at_least_level_1_is_present

        public void Ossuous_can_be_attacked_if_hero_of_at_least_level_1_is_present()
        {
            // Arrange
            var context = new TestContext();
            var hero = context.DrawHeroFromTopOfDeck(x => x.Level == 1);
            context.SetPlayerHand(hero);
            var ossuous = context.SetMonsterInFirstRank<UndeadSkeleton>("Ossuous");

            // Act
            Assert.That(context.Game.Dungeon.Ranks[0].Card, Is.SameAs(ossuous));
            context.Player.SelectMonster();

            // Assert
            Assert.That(context.SelectCardsIds, Has.Member(ossuous.Id), "Valid targets should contain Ossuous");
        }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:15,代码来源:UndeadSkeletonTest.cs

示例2: A_hero_not_armed_with_a_pike_is_not_immune_to_battle_effects

        public void A_hero_not_armed_with_a_pike_is_not_immune_to_battle_effects()
        {
            // Arrange
            var context = new TestContext();
            var player = context.Player;
            var hero = context.CreateCard<Criochan>();
            var pike = context.CreateCard<Pike>();
            context.SetPlayerHand(hero, pike);
            var ettin = context.SetMonsterInFirstRank<OgreHumanoid>("Ettin");

            // Act
            context.WhenBattling(ettin);

            // Assert
            Assert.That(player.Hand, Has.No.Member(hero), "Ettin eats hero.");
        }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:16,代码来源:PikeTest.cs

示例3: Pike_only_protects_the_hero_that_has_it_equipped

        public void Pike_only_protects_the_hero_that_has_it_equipped()
        {
            // Arrange
            var context = new TestContext();
            var player = context.Player;
            var equippedHero = context.CreateCard<Criochan>();
            var unequippedHero = context.CreateCard<Criochan>();
            var pike = context.CreateCard<Pike>();
            context.SetPlayerHand(equippedHero, pike);
            var ettin = context.SetMonsterInFirstRank<OgreHumanoid>("Ettin");

            // Act
            context.HeroEquipsWeapon(equippedHero, pike);
            context.WhenBattling(ettin);

            // Assert
            Assert.That(player.Hand, Has.Member(equippedHero), "Pike should protect hero from Ettin.");
            Assert.That(player.Hand, Has.No.Member(unequippedHero), "Ettin eats unequipped hero.");
        }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:19,代码来源:PikeTest.cs

示例4: Pike_does_not_protect_from_non_battle_effects

        public void Pike_does_not_protect_from_non_battle_effects()
        {
            // Arrange
            var context = new TestContext();
            var player = context.Player;
            var hero = context.CreateBasicCard<Regular>();
            var pike = context.CreateCard<Pike>();
            context.SetPlayerHand(hero, pike);
            var ogre = context.SetMonsterInFirstRank<OgreHumanoid>("Ogre");

            // Act
            context.HeroEquipsWeapon(hero, pike);
            context.SetPlayerState(Phase.Aftermath);
            player.OnSelectMonster(ogre);
            context.UseAbilityOf(ogre);

            // Assert
            Assert.That(player.Hand, Has.No.Member(hero), "Pike should not protect hero from Ogre.");
        }
开发者ID:Slugburn,项目名称:Thunderstone,代码行数:19,代码来源:PikeTest.cs


注:本文中的NUnit.Framework.TestContext.SetMonsterInFirstRank方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。