summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-05-31 00:58:50 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-05-31 00:58:50 +0200
commit2e24ee3e7fd7ebff1676218a56941415fa5ca61e (patch)
tree62240b66bf10a2fe934a88fc8fffcf132ce3d8c4 /test
parent489e7858e796a15ec1268de320525ba23bd75f5a (diff)
downloadJRummikub-2e24ee3e7fd7ebff1676218a56941415fa5ca61e.tar
JRummikub-2e24ee3e7fd7ebff1676218a56941415fa5ca61e.zip
Man kann im Model bestimmen, wie viele Steine gegeben werden. Test geht auch
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@335 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test')
-rw-r--r--test/jrummikub/control/RoundControlTest.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java
index 1ec91ca..a71e231 100644
--- a/test/jrummikub/control/RoundControlTest.java
+++ b/test/jrummikub/control/RoundControlTest.java
@@ -79,17 +79,17 @@ public class RoundControlTest {
}
private void checkCorrectlyDealt() {
- int totalStones = gameSettings.getHighestCard()
- * gameSettings.getStoneSetNumber()
- * gameSettings.getStoneColors().size()
- + gameSettings.getJokerNumber();
+ GameSettings settings = testRoundState.getGameSettings();
+ int totalStones = settings.getHighestCard()
+ * settings.getStoneSetNumber()
+ * settings.getStoneColors().size() + settings.getJokerNumber();
assertEquals(
totalStones - testRoundState.getPlayerCount()
- * gameSettings.getNumberOfStonesDealt()
+ * settings.getNumberOfStonesDealt()
- testRoundState.table.getSize(), testRoundState
.getGameHeap().getSize());
for (int i = 0; i < testRoundState.getPlayerCount(); i++) {
- assertEquals(gameSettings.getNumberOfStonesDealt(), testRoundState
+ assertEquals(settings.getNumberOfStonesDealt(), testRoundState
.getNthNextPlayer(i).getHand().getSize());
}
}
@@ -124,8 +124,8 @@ public class RoundControlTest {
@Test
public void checkCorrectlyDealtMoreStones() {
- gameSettings.setNumberOfStonesDealt(15);
- roundControl.startRound();
+ testRoundState.getGameSettings().setNumberOfStonesDealt(15);
+ testRound.deal();
checkCorrectlyDealt();
}