public void calculates_best_2_card_score_no_ace(int card1Value, int card2Value, int handValue)
        {
            // Arrange
            var card1 = Substitute.For<IBlackjackCard>();
            var card2 = Substitute.For<IBlackjackCard>();

            card1.Value.Returns(card1Value);
            card2.Value.Returns(card2Value);

            var cards = new List<IBlackjackCard>(){card1, card2};

            var hand = Substitute.For<IBlackjackHand>();
            hand.GetCards().Returns(cards);

            var handValueCalculator = new HandValueCalculator();

            // Act
            var value = handValueCalculator.Value(hand);

            // Assert
            value.Should().Equal(handValue);
        }
Exemple #2
0
 protected Hand()
 {
     _cards = new List<IBlackjackCard>();
     EligibleForBlackjack = true;
     HandValueCalculator = new HandValueCalculator();
 }