git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@252 72836036-5685-4462-b002-a69064685172
35 lines
810 B
Java
35 lines
810 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 RoundState}
|
|
*/
|
|
public class RoundStateTest {
|
|
private IRoundState testGame;
|
|
|
|
/** */
|
|
@Before
|
|
public void createGame() {
|
|
testGame = new RoundState(new GameSettings());
|
|
}
|
|
|
|
/** */
|
|
@Test
|
|
public void nextActiveTest() {
|
|
// All there?
|
|
assertEquals(4, testGame.getPlayerCount());
|
|
assertSame(Color.red, testGame.getActivePlayer().getPlayerSettings().getColor());
|
|
testGame.nextPlayer();
|
|
assertSame(Color.yellow, testGame.getActivePlayer().getPlayerSettings().getColor());
|
|
testGame.nextPlayer();
|
|
testGame.nextPlayer();
|
|
testGame.nextPlayer();
|
|
assertSame(Color.red, testGame.getActivePlayer().getPlayerSettings().getColor());
|
|
}
|
|
|
|
}
|