blob: c5915633371339c8e2be523ff9b809c255d9715b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package jrummikub.control;
import static org.junit.Assert.*;
import jrummikub.model.GameState;
import jrummikub.view.MockView;
import org.junit.Test;
public class RoundControlTest {
@Test
public void testDeal() {
MockView view = new MockView();
GameState testGameState = new GameState();
RoundControl testRound = new RoundControl(testGameState, view);
testRound.deal();
assertEquals(106 - testGameState.getPlayerCount() * 14, testGameState
.getGameHeap().getSize());
for (int i = 0; i < testGameState.getPlayerCount(); i++) {
assertEquals(14, testGameState.getPlayer(i).getHand().getSize());
}
}
}
|