From b3c903a2ad86aa803fe9bcf83aea947c452241b5 Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Wed, 18 May 2011 15:25:26 +0200 Subject: GameState ist jetzt RoundState git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@249 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/RoundControlTest.java | 6 ++--- test/jrummikub/model/GameStateTest.java | 35 ---------------------------- test/jrummikub/model/RoundStateTest.java | 35 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 test/jrummikub/model/GameStateTest.java create mode 100644 test/jrummikub/model/RoundStateTest.java (limited to 'test/jrummikub') diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java index 1be11e4..4cfb03f 100644 --- a/test/jrummikub/control/RoundControlTest.java +++ b/test/jrummikub/control/RoundControlTest.java @@ -20,7 +20,7 @@ import java.util.Set; import jrummikub.model.Hand; import jrummikub.model.IHand; import jrummikub.model.ITable; -import jrummikub.model.MockGameState; +import jrummikub.model.MockRoundState; import jrummikub.model.MockTable; import jrummikub.model.Position; import jrummikub.model.Stone; @@ -37,7 +37,7 @@ import org.junit.Test; */ public class RoundControlTest { private MockView view; - private MockGameState testGameState; + private MockRoundState testGameState; private RoundControl testRound; private MockTable newTable; @@ -47,7 +47,7 @@ public class RoundControlTest { @Before public void setup() { view = new MockView(); - testGameState = new MockGameState(); + testGameState = new MockRoundState(); testRound = new RoundControl(testGameState, view); Stone stone = testGameState.getGameHeap().drawStone(); testGameState.table.drop(new StoneSet(stone), new Position(5, 0)); diff --git a/test/jrummikub/model/GameStateTest.java b/test/jrummikub/model/GameStateTest.java deleted file mode 100644 index 5a55aef..0000000 --- a/test/jrummikub/model/GameStateTest.java +++ /dev/null @@ -1,35 +0,0 @@ -package jrummikub.model; - -import static org.junit.Assert.*; - -import java.awt.Color; - -import org.junit.Before; -import org.junit.Test; -/** - * Test class for {@link GameState} - */ -public class GameStateTest { - private IGameState testGame; - - /** */ - @Before - public void createGame() { - testGame = new GameState(); - } - - /** */ - @Test - public void nextActiveTest() { - // All there? - assertEquals(4, testGame.getPlayerCount()); - assertSame(Color.red, testGame.getActivePlayer().getColor()); - testGame.nextPlayer(); - assertSame(Color.yellow, testGame.getActivePlayer().getColor()); - testGame.nextPlayer(); - testGame.nextPlayer(); - testGame.nextPlayer(); - assertSame(Color.red, testGame.getActivePlayer().getColor()); - } - -} diff --git a/test/jrummikub/model/RoundStateTest.java b/test/jrummikub/model/RoundStateTest.java new file mode 100644 index 0000000..80b752e --- /dev/null +++ b/test/jrummikub/model/RoundStateTest.java @@ -0,0 +1,35 @@ +package jrummikub.model; + +import static org.junit.Assert.*; + +import java.awt.Color; + +import org.junit.Before; +import org.junit.Test; +/** + * Test class for {@link RoundState} + */ +public class RoundStateTest { + private IRoundState testGame; + + /** */ + @Before + public void createGame() { + testGame = new RoundState(); + } + + /** */ + @Test + public void nextActiveTest() { + // All there? + assertEquals(4, testGame.getPlayerCount()); + assertSame(Color.red, testGame.getActivePlayer().getColor()); + testGame.nextPlayer(); + assertSame(Color.yellow, testGame.getActivePlayer().getColor()); + testGame.nextPlayer(); + testGame.nextPlayer(); + testGame.nextPlayer(); + assertSame(Color.red, testGame.getActivePlayer().getColor()); + } + +} -- cgit v1.2.3