summaryrefslogtreecommitdiffstats
path: root/test/jrummikub
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-20 04:25:14 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-20 04:25:14 +0200
commit477e8e9b82d6bcbec006914a22e05a2c18492869 (patch)
tree9ae3bdf2cbe74bf0ed84f77789bd5001f9c48270 /test/jrummikub
parent39da662f0dc89af73e9b5a5faee2deb419c38e3b (diff)
downloadJRummikub-477e8e9b82d6bcbec006914a22e05a2c18492869.tar
JRummikub-477e8e9b82d6bcbec006914a22e05a2c18492869.zip
Fix NetworkRoundControl test
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@508 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub')
-rw-r--r--test/jrummikub/control/network/NetworkRoundControlTest.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/jrummikub/control/network/NetworkRoundControlTest.java b/test/jrummikub/control/network/NetworkRoundControlTest.java
index b388998..82f4dc7 100644
--- a/test/jrummikub/control/network/NetworkRoundControlTest.java
+++ b/test/jrummikub/control/network/NetworkRoundControlTest.java
@@ -38,15 +38,18 @@ public class NetworkRoundControlTest {
gameSettings.getPlayerList().add(new PlayerSettings("Jannis", Color.GREEN));
gameSettings.getPlayerList().add(new PlayerSettings("Bennet", Color.BLACK));
+ gameSettings.getPlayerList().get(1).setType(Type.COMPUTER);
+ gameSettings.getPlayerList().get(2).setType(Type.NETWORK);
+ gameSettings.getPlayerList().get(3).setType(Type.COMPUTER);
+
view = new MockView();
connectionControl = new MockConnectionControl();
}
@Test
public void testHostRound() {
- gameSettings.getPlayerList().get(1).setType(Type.COMPUTER);
- gameSettings.getPlayerList().get(2).setType(Type.NETWORK);
- gameSettings.getPlayerList().get(3).setType(Type.COMPUTER);
+ connectionControl.nickname = gameSettings.getPlayerList().get(0).getName();
+
testRoundState = new RoundState(gameSettings, null);
testRound = new NetworkRoundControl(testRoundState, view,
connectionControl, true);
@@ -119,9 +122,8 @@ public class NetworkRoundControlTest {
@Test
public void testClientRound() {
- gameSettings.getPlayerList().get(0).setType(Type.NETWORK);
- gameSettings.getPlayerList().get(1).setType(Type.COMPUTER);
- gameSettings.getPlayerList().get(3).setType(Type.COMPUTER);
+ connectionControl.nickname = gameSettings.getPlayerList().get(2).getName();
+
testRoundState = new RoundState(gameSettings, null);
for (int i = 0; i < 4; ++i) {
IPlayer player = testRoundState.getNthPlayer(i);