예제 #1
0
 public void TakenCardDoesntAppearInDeck()
 {
     var deck = new Deck();
     var takenCard = (Card)deck.TakeCard();
     Assert.IsFalse(deck.Cards.Any(c => c.Suit == takenCard.Suit &&
                                   c.CardNumber == takenCard.CardNumber));
 }
예제 #2
0
 public void ResetPutsCountBack()
 {
     var deck = new Deck();
     var card = deck.TakeCard();
     Assert.AreEqual(51, deck.Cards.Count);
     deck.Reset();
     Assert.AreEqual(52, deck.Cards.Count);
 }
예제 #3
0
 public void CantTakeMoreThan52Cards()
 {
     var deck = new Deck();
     var cards = deck.TakeCards(52);
     Assert.IsNull(deck.TakeCard());
 }