diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/jrummikub/control/RoundControlTest.java | 11 | ||||
-rw-r--r-- | test/jrummikub/control/turn/TurnControlTest.java | 16 |
2 files changed, 13 insertions, 14 deletions
diff --git a/test/jrummikub/control/RoundControlTest.java b/test/jrummikub/control/RoundControlTest.java index 49db913..d709b6b 100644 --- a/test/jrummikub/control/RoundControlTest.java +++ b/test/jrummikub/control/RoundControlTest.java @@ -10,6 +10,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; +import jrummikub.control.turn.TurnMode; import jrummikub.model.GameSettings; import jrummikub.model.Hand; import jrummikub.model.IHand; @@ -934,13 +935,12 @@ public class RoundControlTest { hand.drop(new Stone(1, BLUE), new Position(0, 0)); testRoundState.players.get(0).hand = hand; view.startTurnEvent.emit(); - assertTrue(view.playerPanel.inspectOnly); - assertFalse(view.playerPanel.mayRedeal); + assertEquals(view.playerPanel.turnMode, TurnMode.INSPECT_ONLY); for (int i = 0; i < 4; i++) { view.playerPanel.endTurnEvent.emit(); view.startTurnEvent.emit(); } - assertFalse(view.playerPanel.inspectOnly); + assertEquals(view.playerPanel.turnMode, TurnMode.NORMAL_TURN); } /** */ @@ -953,12 +953,11 @@ public class RoundControlTest { } testRoundState.players.get(0).hand = hand; view.startTurnEvent.emit(); - assertTrue(view.playerPanel.inspectOnly); - assertTrue(view.playerPanel.mayRedeal); + assertEquals(view.playerPanel.turnMode, TurnMode.MAY_REDEAL); for (int i = 0; i < 4; i++) { view.playerPanel.endTurnEvent.emit(); view.startTurnEvent.emit(); } - assertFalse(view.playerPanel.inspectOnly); + assertEquals(view.playerPanel.turnMode, TurnMode.NORMAL_TURN); } } diff --git a/test/jrummikub/control/turn/TurnControlTest.java b/test/jrummikub/control/turn/TurnControlTest.java index a59197f..4784f98 100644 --- a/test/jrummikub/control/turn/TurnControlTest.java +++ b/test/jrummikub/control/turn/TurnControlTest.java @@ -111,7 +111,7 @@ public class TurnControlTest { mockPlayer.hand = mockHand; testControl = new HumanTurnControl(mockTimer); testControl.setup(new GameSettings(), mockPlayer, mockTable, mockView, - false, false); + TurnMode.NORMAL_TURN); } /** */ @@ -136,7 +136,7 @@ public class TurnControlTest { testControl = new HumanTurnControl(mockTimer); testControl.setup(new GameSettings(), mockPlayer, mockTable, mockView, - false, false); + TurnMode.NORMAL_TURN); testControl.startTurn(); int i = 0; @@ -629,8 +629,8 @@ public class TurnControlTest { public void testAddLeft() { AccessibleTable table = new AccessibleTable(); HumanTurnControl turnControl = new HumanTurnControl(mockTimer); - turnControl.setup(new GameSettings(), mockPlayer, table, mockView, false, - false); + turnControl.setup(new GameSettings(), mockPlayer, table, mockView, + TurnMode.NORMAL_TURN); turnControl.startTurn(); Stone blueOne = new Stone(1, BLUE); Stone redOne = new Stone(1, RED); @@ -747,8 +747,8 @@ public class TurnControlTest { public void testAddRight() { AccessibleTable table = new AccessibleTable(); HumanTurnControl turnControl = new HumanTurnControl(mockTimer); - turnControl.setup(new GameSettings(), mockPlayer, table, mockView, false, - false); + turnControl.setup(new GameSettings(), mockPlayer, table, mockView, + TurnMode.NORMAL_TURN); turnControl.startTurn(); Stone blueOne = new Stone(1, BLUE); Stone redOne = new Stone(1, RED); @@ -865,8 +865,8 @@ public class TurnControlTest { public void testAddNewSet() { AccessibleTable table = new AccessibleTable(); HumanTurnControl turnControl = new HumanTurnControl(mockTimer); - turnControl.setup(new GameSettings(), mockPlayer, table, mockView, false, - false); + turnControl.setup(new GameSettings(), mockPlayer, table, mockView, + TurnMode.NORMAL_TURN); turnControl.startTurn(); Stone blueOne = new Stone(1, BLUE); Stone redOne = new Stone(1, RED); |