コード例 #1
0
 public void GetPossibleAnnounceShouldReturnNoAnnounceWhenKingIsPlayedButTheRespectiveQueenIsMissing()
 {
     IAnnounceValidator validator = new AnnounceValidator();
     var announce = validator.GetPossibleAnnounce(
         this.playerCards,
         new Card(CardSuit.Spade, CardType.King),
         new Card(CardSuit.Heart, CardType.Ace));
     Assert.AreEqual(Announce.None, announce);
 }
コード例 #2
0
 public void GetPossibleAnnounceShouldReturnFortyWhenQueenIsPlayedTheKingIsPresentAndTheTrumpIsTheSameSuit()
 {
     IAnnounceValidator validator = new AnnounceValidator();
     var announce = validator.GetPossibleAnnounce(
         this.playerCards,
         new Card(CardSuit.Diamond, CardType.Queen),
         new Card(CardSuit.Diamond, CardType.Ace));
     Assert.AreEqual(Announce.Forty, announce);
 }
コード例 #3
0
 public void GetPossibleAnnounceShouldReturnFalseWhenThePlayerIsNotFirst()
 {
     IAnnounceValidator validator = new AnnounceValidator();
     var announce = validator.GetPossibleAnnounce(
         this.playerCards,
         new Card(CardSuit.Heart, CardType.King),
         new Card(CardSuit.Heart, CardType.Nine),
         false);
     Assert.AreEqual(Announce.None, announce);
 }
コード例 #4
0
 public void GetPossibleAnnounceShouldReturnNoAnnounceWhenNoKingOrQueenIsPlayed(CardType cardType)
 {
     IAnnounceValidator validator = new AnnounceValidator();
     var announce = validator.GetPossibleAnnounce(
         this.playerCards,
         new Card(CardSuit.Club, cardType),
         new Card(CardSuit.Club, CardType.Ace));
     Assert.AreEqual(Announce.None, announce);
 }
コード例 #5
0
 public void GetPossibleAnnounceShouldReturnNoAnnounceWhenGivenNullCard()
 {
     IAnnounceValidator validator = new AnnounceValidator();
     var announce = validator.GetPossibleAnnounce(this.playerCards, null, new Card(CardSuit.Heart, CardType.Ace));
     Assert.AreEqual(Announce.None, announce);
 }
コード例 #6
0
 public void GetPossibleAnnounceShouldReturnTwentyWhenQueenIsPlayedTheKingIsPresentAndTheTrumpIsDifferentSuit()
 {
     IAnnounceValidator validator = new AnnounceValidator();
     var announce = validator.GetPossibleAnnounce(
         this.playerCards,
         new Card(CardSuit.Club, CardType.Queen),
         new Card(CardSuit.Heart, CardType.Ace));
     Assert.AreEqual(Announce.Twenty, announce);
 }