package jrummikub.model; import static org.junit.Assert.*; import java.awt.Color; import org.junit.Before; import org.junit.Test; 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()); } }