parent
58ac3cffd4
commit
52877d4932
@ -1,8 +1,27 @@
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class CardGameTest {
|
||||
|
||||
CardGame cardGame;
|
||||
@org.junit.jupiter.api.Test
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
cardGame = new CardGame(10, 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
void createDeck() {
|
||||
assertEquals(2, cardGame.players.length);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
assertEquals(20, cardGame.players[i].drawPile.count());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void play() {
|
||||
cardGame.play();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class PlayerTest {
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void draw() {
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue