Example #1
0
        public void BlackJack_DrawCardResultToString_OutputsResultOfPlayerCardDrawInCorrectFormat()
        {
            //Given
            Blackjack blackjack = new Blackjack();

            blackjack.ResetGame();
            Card cardDrawn = new Card(CardRank.JACK, CardSuit.CLUB);

            //When
            const string expected = "You draw ['JACK', 'CLUB']";
            string       actual   = blackjack.DrawCardResultToString(blackjack.Player, cardDrawn);

            //Then
            Assert.Equal(expected, actual);
        }
Example #2
0
        public void BlackJack_DrawCardResultToString_OutputsResultOfDealerCardDrawInCorrectFormat()
        {
            //Given
            Blackjack blackjack = new Blackjack();

            blackjack.ResetGame();
            Card cardDrawn = new Card(CardRank.SEVEN, CardSuit.DIAMOND);

            //When
            const string expected = "\nDealer draws [7, 'DIAMOND']";
            string       actual   = blackjack.DrawCardResultToString(blackjack.Dealer, cardDrawn);

            //Then
            Assert.Equal(expected, actual);
        }