diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-20 04:25:14 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-06-20 04:25:14 +0200 |
commit | 477e8e9b82d6bcbec006914a22e05a2c18492869 (patch) | |
tree | 9ae3bdf2cbe74bf0ed84f77789bd5001f9c48270 /test/jrummikub/control | |
parent | 39da662f0dc89af73e9b5a5faee2deb419c38e3b (diff) | |
download | JRummikub-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/control')
-rw-r--r-- | test/jrummikub/control/network/NetworkRoundControlTest.java | 14 |
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); |