From cbd8737a6aa1ccf54e7ee2f85fc5fd8834d1d4ab Mon Sep 17 00:00:00 2001 From: Ida Massow Date: Tue, 3 May 2011 19:33:20 +0200 Subject: =?UTF-8?q?Test=20f=C3=BCr=20den=20GameState=20fertig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@91 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/model/GameStateTest.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'test/jrummikub/model') diff --git a/test/jrummikub/model/GameStateTest.java b/test/jrummikub/model/GameStateTest.java index 25987e9..7515e4d 100644 --- a/test/jrummikub/model/GameStateTest.java +++ b/test/jrummikub/model/GameStateTest.java @@ -1,5 +1,30 @@ package jrummikub.model; +import static org.junit.Assert.*; + +import java.awt.Color; + +import org.junit.Before; +import org.junit.Test; + public class GameStateTest { + private GameState testGame; + + @Before + public void createGame() { + testGame = new GameState(); + } + @Test + public void nextActiveTest() { + // All there? + assertEquals(4, testGame.players.size()); + assertSame(Color.red, testGame.activePlayer().getColor()); + testGame.nextPlayer(); + assertSame(Color.blue, testGame.activePlayer().getColor()); + testGame.nextPlayer(); + testGame.nextPlayer(); + testGame.nextPlayer(); + assertSame(Color.red, testGame.activePlayer().getColor()); + } } -- cgit v1.2.3