Exemple #1
0
        public void DealShouldRemoveCardFromDeck()
        {
            var deck = new Deck();

            Card? card = deck.Deal();

            Assert.That( deck.Contains(card.Value), Is.False);
        }
Exemple #2
0
        public void DeckShouldContainAllTheCards()
        {
            var deck = new Deck();

            var suits = new[] {Suit.Clubs, Suit.Diamonds, Suit.Hearts, Suit.Spades};

            foreach (var suit in suits)
            {
                foreach (int x in Enumerable.Range(2, 13))
                {
                    Assert.That(deck.Contains(x.Of(suit)), Is.True);
                }
            }
        }