Make a blackjack game, play against the computer-dealer.

CardsTest.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package rocks.zipcode;
  2. import org.junit.Assert;
  3. import org.junit.Test;
  4. import java.util.ArrayList;
  5. import java.util.Collections;
  6. public class CardsTest {
  7. @org.junit.Before
  8. public void setUp() throws Exception {
  9. }
  10. @org.junit.After
  11. public void tearDown() throws Exception {
  12. }
  13. // @org.junit.Test
  14. // public void generateCard() {
  15. // Cards card = new Cards();
  16. // Integer testCardValue = card.generateCard();
  17. //
  18. // assertTrue((testCardValue >= 1 && testCardValue <= 13));
  19. // }
  20. @Test
  21. public void testRank() {
  22. }
  23. @Test
  24. public void testSuit() {
  25. }
  26. @Test
  27. public void testToString() {
  28. }
  29. @Test
  30. public void testNewDeck() {
  31. ArrayList<Cards> deck = Cards.newDeck();
  32. for (Cards card : deck) {
  33. System.out.println(card.toString());
  34. }
  35. Assert.assertTrue(true);
  36. }
  37. @Test
  38. public void testShuffleDeck() {
  39. ArrayList<Cards> deck = Cards.newDeck();
  40. Collections.shuffle(deck);
  41. for (Cards card : deck) {
  42. System.out.println(card.toString());
  43. }
  44. Assert.assertTrue(true);
  45. }
  46. }