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


C# Deck.ChangeTrumpCard方法代码示例

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


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

示例1: ChangingTrumpCardShouldNotThrow

 public void ChangingTrumpCardShouldNotThrow()
 {
     Deck deck = new Deck();
     Card trumpCard = deck.GetTrumpCard;
     Card newCard = new Card(CardSuit.Heart, CardType.Nine);
     deck.ChangeTrumpCard(newCard);
 }
开发者ID:Rostech,项目名称:TelerikAcademyHomeworks,代码行数:7,代码来源:DeckTests.cs

示例2: ExpectTrumpCardToEqualSwappedCard

 public void ExpectTrumpCardToEqualSwappedCard()
 {
     var deck = new Deck();
     var card = new Card(CardSuit.Club, CardType.Ace);
     deck.ChangeTrumpCard(card);
     Assert.AreEqual(card, deck.GetTrumpCard);
 }
开发者ID:kiko81,项目名称:Teleric-Academy-Homeworks,代码行数:7,代码来源:DeckTests.cs

示例3: TestDeckChangeTrumpCard

 public void TestDeckChangeTrumpCard()
 {
     var card = new Card(CardSuit.Club, CardType.Jack);
     var deck = new Santase.Logic.Cards.Deck();
     deck.ChangeTrumpCard(card);
     Assert.AreEqual(card, deck.GetTrumpCard);
 }
开发者ID:SimoPrG,项目名称:TelerikAcademyHomeworks,代码行数:7,代码来源:DeckNUnitTests.cs

示例4: Test_DeckClassGetTrumpCardAndTryToChangeItWithTheSame

 public void Test_DeckClassGetTrumpCardAndTryToChangeItWithTheSame()
 {
     var deck = new Deck();
     var trumpCard = deck.GetTrumpCard;
     deck.ChangeTrumpCard(trumpCard);
     Assert.AreEqual(trumpCard, deck.GetTrumpCard, "Trump card should no tbe changed");
 }
开发者ID:tddold,项目名称:High-Quality-Code-Homeworks,代码行数:7,代码来源:TestDeck.cs

示例5: ExpectTrumpCardToBeCorrectAfterAChange

 public void ExpectTrumpCardToBeCorrectAfterAChange()
 {
     var deck = new Deck();
     var trumpCard = deck.GetNextCard();
     deck.ChangeTrumpCard(trumpCard);
     Assert.AreSame(deck.GetTrumpCard, trumpCard);
 }
开发者ID:radenkovn,项目名称:Telerik-Homework,代码行数:7,代码来源:DeckClassTests.cs

示例6: TestChangeWtihDifferentTrumps

        public void TestChangeWtihDifferentTrumps(string patternForCard)
        {
            Deck cards = new Deck();
            Card trump = GenerateCard(patternForCard);
            cards.ChangeTrumpCard(trump);

            Assert.AreEqual(trump.Type.ToFriendlyString() + trump.Suit.ToFriendlyString(), cards.GetTrumpCard.ToString());
        }
开发者ID:viktorD1m1trov,项目名称:T-Academy,代码行数:8,代码来源:DeckTest.cs

示例7: ChangeTrumpCardShouldWorkProperly

 public void ChangeTrumpCardShouldWorkProperly()
 {
     IDeck deck = new Deck();
     var card = new Card(CardSuit.Spade, CardType.Nine);
     deck.ChangeTrumpCard(card);
     var trumpCard = deck.TrumpCard;
     Assert.AreEqual(card, trumpCard);
 }
开发者ID:NotDemons,项目名称:NotDemonsRepo,代码行数:8,代码来源:DeckTests.cs

示例8: DeckShouldReturnProperTrumpCardAfterChangingIt

 public void DeckShouldReturnProperTrumpCardAfterChangingIt()
 {
     var deck = new Deck();
     var newTrumpCard = new Card(CardSuit.Heart, CardType.Ace);
     deck.ChangeTrumpCard(newTrumpCard);
     var currentTrumpCard = deck.GetTrumpCard;
     Assert.AreSame(newTrumpCard, currentTrumpCard);
 }
开发者ID:zondario,项目名称:TelerikAcademy-Homeworks,代码行数:8,代码来源:DeckTests.cs

示例9: ChangeTrumpCardShouldChangeTheTrumpCardIfThereAreCardsLeftInTheDeck

 public void ChangeTrumpCardShouldChangeTheTrumpCardIfThereAreCardsLeftInTheDeck()
 {
     Deck testDeck = new Deck();
     Card initialTrumpCard = testDeck.GetTrumpCard;
     Card newCard = testDeck.GetNextCard();
     testDeck.ChangeTrumpCard(newCard);
     Assert.AreNotSame(initialTrumpCard, testDeck.GetTrumpCard);
 }
开发者ID:Hris21,项目名称:High-Quality-Code,代码行数:8,代码来源:DeckTests.cs

示例10: ChangeTrumpCardChangesItSuccessfully

        public void ChangeTrumpCardChangesItSuccessfully()
        {
            var deck = new Deck();
            var trumpCard = deck.GetTrumpCard;
            deck.ChangeTrumpCard(new Card(CardSuit.Club, CardType.Ace));
            var changedTrumpCard = deck.GetTrumpCard;

            Assert.AreNotEqual(trumpCard, changedTrumpCard, "Trump cards are the same! Rerun test if by chance the original trump card was the same as the new one!");
        }
开发者ID:NK-Hertz,项目名称:Telerik-Academy-2015,代码行数:9,代码来源:Class1.cs

示例11: CreatingNewDeckAndChangingDefaultTrumpCardWithTheSameTrumpCardShouldReturnTheSameTrumpCard

        public void CreatingNewDeckAndChangingDefaultTrumpCardWithTheSameTrumpCardShouldReturnTheSameTrumpCard()
        {
            var deck = new Deck();
            var trumpCard = deck.GetTrumpCard;

            deck.ChangeTrumpCard(trumpCard);

            Assert.AreSame(trumpCard, deck.GetTrumpCard);
        }
开发者ID:AYankova,项目名称:HQC,代码行数:9,代码来源:DeckTests.cs

示例12: DeckShouldChangeTrumpCardCorrectly

        public void DeckShouldChangeTrumpCardCorrectly()
        {
            Deck deck = new Deck();
            Card newTrumpCard = new Card(CardSuit.Spade, CardType.Ace);

            deck.ChangeTrumpCard(newTrumpCard);

            Assert.AreEqual(newTrumpCard, deck.GetTrumpCard);
        }
开发者ID:atanas-georgiev,项目名称:TelerikAcademy-1,代码行数:9,代码来源:DeckTests.cs

示例13: ChangeTrumpCardTest

        public void ChangeTrumpCardTest(CardSuit suit, CardType type)
        {
            var newCard = new Card(suit, type);
            var deck = new Deck();

            deck.ChangeTrumpCard(newCard);

            Assert.AreNotEqual(0, deck.CardsLeft, "Change card doesn't work");
        }
开发者ID:deyantodorov,项目名称:TelerikAcademy,代码行数:9,代码来源:DeckTests.cs

示例14: ChangeTrumpCardShouldChangeDeckTrumpCardToTheNewTrumpCardInstance

        public void ChangeTrumpCardShouldChangeDeckTrumpCardToTheNewTrumpCardInstance()
        {
            var deck = new Deck();
            var newTrumpCard = new Card(CardSuit.Club, CardType.Ace);

            deck.ChangeTrumpCard(newTrumpCard);

            Assert.AreEqual(newTrumpCard, deck.GetTrumpCard);
        }
开发者ID:tddold,项目名称:TelerikAcademy-5,代码行数:9,代码来源:DeckNUnitTests.cs

示例15: TestChangeDeckTrump

        public void TestChangeDeckTrump()
        {
            Card trumpCard = new Card(CardSuit.Heart, CardType.King);
            Deck deck = new Deck();

            deck.ChangeTrumpCard(trumpCard);

            Assert.AreEqual(trumpCard, deck.GetTrumpCard);
            Assert.AreEqual(true, deck.GetTrumpCard.Equals(trumpCard));
        }
开发者ID:tddold,项目名称:Telerik-Academy-3,代码行数:10,代码来源:DeckTest.cs


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