
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@116 72836036-5685-4462-b002-a69064685172
24 lines
627 B
Java
24 lines
627 B
Java
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());
|
|
}
|
|
}
|
|
|
|
}
|