Example #1
0
        public void Blackjack_CheckForDealer17_DealerStaysIfHandIs17OrGreater()
        {
            Blackjack blackjack = new Blackjack();

            blackjack.ResetGame();
            List <Card> cards = new List <Card> {
                new Card(CardRank.KING, CardSuit.HEART), new Card(CardRank.SEVEN, CardSuit.DIAMOND)
            };

            blackjack.Dealer.Hand = new Hand(cards);
            blackjack.CheckForDealer17();

            Assert.True(blackjack.Dealer.HasStayed);
        }