예제 #1
0
 @Test
 // Tests that getRandomCard() returns 52 cards in a row and then returns null when deck is empty
 public void testGetRandomCard() {
   for (int i = 0; i < 52; i++) {
     randomCard = deck.getRandomCard();
     assertTrue(randomCard instanceof Card);
   }
   nullRandomCard = deck.getRandomCard();
   assertNull(nullRandomCard);
 }
예제 #2
0
 @Test
 public void testGetCard() {
   card = deck.getCard(0);
   assertTrue(card instanceof Card);
 }
예제 #3
0
 @Test
 public void deckTest() {
   int length = deck.getDeckList().size();
   assertEquals(52, length);
 }