本文整理匯總了C#中NUnit.Framework.TestContext.SetDungeonHall方法的典型用法代碼示例。如果您正苦於以下問題:C# TestContext.SetDungeonHall方法的具體用法?C# TestContext.SetDungeonHall怎麽用?C# TestContext.SetDungeonHall使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NUnit.Framework.TestContext
的用法示例。
在下文中一共展示了TestContext.SetDungeonHall方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: When_laird_is_defeated_then_correct_monsters_are_discarded
public void When_laird_is_defeated_then_correct_monsters_are_discarded()
{
// Arrange
var context = new TestContext();
var player = context.Player;
var ambusher = context.CreateCard<KoboldHumanoid>("Drakeclan Ambusher");
var laird = context.CreateCard<KoboldHumanoid>("Drakeclan Laird");
var phoenix = context.CreateCard<BurnmarkedFire>("Phoenix");
var ogre = context.CreateCard<OgreHumanoid>("Ogre");
context.SetDungeonHall(ambusher, laird, phoenix, ogre);
var hand = Enumerable.Range(0, 6).Select(x => context.CreateCard<Criochan>("Criochan Captain")).ToArray();
context.SetPlayerHand(hand);
// Act
context.WhenBattling(laird);
player.DetermineBattleResult();
// Assert
var discardedMonsters = player.Discard.Where(c => c.Type == CardType.Monster);
Assert.That(discardedMonsters, Has.Member(laird));
Assert.That(discardedMonsters, Has.Member(ambusher));
Assert.That(context.GetMonsterInRank(1), Is.SameAs(phoenix));
Assert.That(context.GetMonsterInRank(2), Is.SameAs(ogre));
}