@Test public void theCardOnHandHasTheSameValueThatBefore() { BlackjackCard twoOfHearts = new BlackjackCard(Rank.TWO, Suit.HEART); hand.addCard(twoOfHearts); final int VALUE_OF_TWO_OF_HEARTS = twoOfHearts.getValue(); assertEquals(VALUE_OF_TWO_OF_HEARTS, hand.getValue()); }
@Test public void invisibleCardsAreNotShown() { aceOfHearts.setVisible(false); hand.addCard(aceOfHearts); String UNKNOW_CARD = "**"; assertEquals(UNKNOW_CARD, hand.toString()); }
@Test public void testFlippedCardDoesNotCountOnValue() { aceOfHearts.setVisible(false); hand.addCard(aceOfHearts); final int VALUE_OF_HAND_WITH_FLIPPED_CARDS = 0; assertEquals(VALUE_OF_HAND_WITH_FLIPPED_CARDS, hand.getValue()); }
@Test public void testFlipCardsLeaveCardsAsVisible() { aceOfHearts.setVisible(false); hand.addCard(aceOfHearts); hand.flipCards(); String ACE_OF_HEARTS_REPRESENTATION = "AH"; assertEquals(ACE_OF_HEARTS_REPRESENTATION, hand.toString()); }