This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
JRummikub/test/jrummikub/model/GameStateTest.java
Ida Massow f7aace7234 Tests und imlementierung für Wert von Sets bestimmen, fertig und getestet
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@242 72836036-5685-4462-b002-a69064685172
2011-05-16 20:54:37 +02:00

35 lines
728 B
Java

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());
}
}