diff options
author | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-18 15:25:26 +0200 |
---|---|---|
committer | Ida Massow <massow@informatik.uni-luebeck.de> | 2011-05-18 15:25:26 +0200 |
commit | b3c903a2ad86aa803fe9bcf83aea947c452241b5 (patch) | |
tree | 51c2f9e9a6ef68d0857ce493e38282ebc8178ec3 /test/jrummikub/model/RoundStateTest.java | |
parent | d0a70145772a17ab75db4c705efb421e3bcce378 (diff) | |
download | JRummikub-b3c903a2ad86aa803fe9bcf83aea947c452241b5.tar JRummikub-b3c903a2ad86aa803fe9bcf83aea947c452241b5.zip |
GameState ist jetzt RoundState
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@249 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test/jrummikub/model/RoundStateTest.java')
-rw-r--r-- | test/jrummikub/model/RoundStateTest.java | 35 |
1 files changed, 35 insertions, 0 deletions
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()); + } + +} |