12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package rocks.zipcode;
-
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- import java.util.List;
-
- import static org.junit.Assert.*;
-
- public class PlayerTest {
-
- @Before
- public void setUp() throws Exception {
- }
-
- @After
- public void tearDown() throws Exception {
- }
-
- @Test
- public void addCard() {
- }
-
- @Test
- public void handScore() {
- }
-
- @Test
- public void clearHand() {
- }
-
- @Test
- public void testPlayer1() {
- Player player1 = new Player();
-
- List<Cards> deck = Cards.newDeck();
-
- Cards c1 = deck.get(0);
- Cards c2 = deck.get(16);
-
- player1.addCard(c1);
- player1.addCard(c2);
- int score = player1.handScore();
-
- int cardSum = c1.rank().getRankpoints() + c2.rank().getRankpoints();
-
- player1.printHand();
-
- assertEquals(cardSum, score);
- }
- }
|