summaryrefslogtreecommitdiffstats
path: root/test/jrummikub
diff options
context:
space:
mode:
Diffstat (limited to 'test/jrummikub')
-rw-r--r--test/jrummikub/control/RoundControlTest.java17
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);
+ }
}