예제 #1
0
 public void secondCardDealtIs1()
 {
     deck.dealCard();
     Card actual = deck.dealCard();
     Card expected = new Card(1);
     Assert.AreEqual(expected, actual);
 }
예제 #2
0
 private bool isCardEqual(Card card)
 {
     if (isSameRankAndSuit(card))
     {
         return true;
     }
     return false;
 }
예제 #3
0
 private bool isSameRankAndSuit(Card card)
 {
     return (this.Rank == card.Rank && this.Suit == card.Suit);
 }
예제 #4
0
 public void addCardToHand(Card card)
 {
     Hand.addCard(card);
 }
예제 #5
0
 public void addCard(Card card)
 {
     CardsInDeck.Add(card);
 }
예제 #6
0
 public void firstCardDealtIs0()
 {
     Card actual = deck.dealCard();
     Card expected = new Card(0);
     Assert.AreEqual(expected, actual);
 }
예제 #7
0
 public void cardsCanBeEqual()
 {
     Card a = new Card(5);
     Card b = new Card(5);
     Assert.IsTrue(a.Equals(b));
 }
예제 #8
0
 public void twoOfClubsHasRankOfTwo()
 {
     Card twoOfClubs = new Card(1);
     CardRank rank = twoOfClubs.Rank;
     Assert.AreEqual(CardRank.TWO, rank);
 }
예제 #9
0
 public void cardValueBelow0ThrowsException()
 {
     Card card = new Card(-1);
 }
예제 #10
0
 public void cardValueAbove51ThrowsException()
 {
     Card card = new Card(52);
 }