コード例 #1
0
        public void Given_the_player_has_a_score_of_10_and_dealer_has_score_of_12_dealer_wins()
        {
            // Given I have a total of 10
            // And The dealer has a list of cards with a total of 12
            var playerScore = 10;
            var dealerScore = 12;

            // When the I call the win method
            ICheckWinner checkWinner = new CheckWinner();
            string       result      = checkWinner.CheckTheWinnerBetweenPlayerAndDealer(playerScore, dealerScore);

            // Then I should expect the dealer has won
            Assert.AreEqual("Dealer", result);
        }
コード例 #2
0
        public void Given_the_player_has_a_score_of_21_and_dealer_has_score_of_21_draw()
        {
            // Given I have a total of 21
            // And The dealer has a list of cards with a total of 21
            var playerScore = 21;
            var dealerScore = 21;

            // When the I call the win method
            ICheckWinner checkWinner = new CheckWinner();
            string       result      = checkWinner.CheckTheWinnerBetweenPlayerAndDealer(playerScore, dealerScore);

            // Then I should expect nobody won - 'draw'
            Assert.AreEqual("Draw", result);
        }