@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); }
@Test public void testGetCard() { card = deck.getCard(0); assertTrue(card instanceof Card); }
@Test public void deckTest() { int length = deck.getDeckList().size(); assertEquals(52, length); }