diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-27 17:54:42 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-27 17:54:42 +0200 |
commit | f7743efa7ddf473a9ee24bfe7b69e0ccccdeacd5 (patch) | |
tree | deaa144e619eeb790b8cdb50d5bcdf53cb252a9e /test | |
parent | 531fe57b17394c931ee968a66104429e69cf60c6 (diff) | |
download | JRummikub-f7743efa7ddf473a9ee24bfe7b69e0ccccdeacd5.tar JRummikub-f7743efa7ddf473a9ee24bfe7b69e0ccccdeacd5.zip |
Test redealing in RoundControl
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@286 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'test')
-rw-r--r-- | test/jrummikub/control/RoundControlTest.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java index bc8dce9..68ae825 100644 --- a/test/jrummikub/control/RoundControlTest.java +++ b/test/jrummikub/control/RoundControlTest.java @@ -25,6 +25,7 @@ import jrummikub.model.Score; import jrummikub.model.Stone; import jrummikub.model.StoneSet; import jrummikub.model.Table; +import jrummikub.util.IListener; import jrummikub.util.IListener1; import jrummikub.util.Pair; import jrummikub.view.MockView; @@ -47,6 +48,7 @@ public class RoundControlTest { private boolean roundEnded; private Score roundScore; + protected boolean roundRestarted; /** * For each test create a round control initialized by a mock model and view @@ -888,4 +890,19 @@ public class RoundControlTest { assertFalse(14 == testRoundState.players.get(i).hand.getSize()); } } + + /** */ + @Test + public void testRedeal() { + testRound.getRestartRoundEvent().add(new IListener() { + @Override + public void handle() { + roundRestarted = true; + } + }); + testRound.startRound(); + view.startTurnEvent.emit(); + view.playerPanel.redealEvent.emit(); + assertTrue(roundRestarted); + } } |