summaryrefslogtreecommitdiffstats
path: root/test/jrummikub/control
diff options
context:
space:
mode:
Diffstat (limited to 'test/jrummikub/control')
-rw-r--r--test/jrummikub/control/TurnControlTest.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/jrummikub/control/TurnControlTest.java b/test/jrummikub/control/TurnControlTest.java
index 2efab67..2cca3e8 100644
--- a/test/jrummikub/control/TurnControlTest.java
+++ b/test/jrummikub/control/TurnControlTest.java
@@ -59,14 +59,14 @@ public class TurnControlTest {
mockTimer = new MockTimer();
mockTable = new MockTable();
mockHand = new MockHand();
- testControl = new TurnControl(null, mockTable, mockView, mockTimer);
+ testControl = new TurnControl(mockHand, mockTable, mockView, mockTimer);
}
@Test
public void startTimer() {
assertTrue(mockTimer.timerRunning);
}
-
+
@SuppressWarnings("unchecked")
@Test
public void showInitialHand() {
@@ -74,25 +74,25 @@ public class TurnControlTest {
mockTimer = new MockTimer();
mockTable = new MockTable();
mockHand = new MockHand();
-
-
- mockView.displayStartTurnPanel = false;
-
- List<Pair<Stone, Position>> stones = Arrays.asList(new Pair<Stone, Position>(new Stone(RED), new Position(0,0)),
- new Pair<Stone, Position>(new Stone(BLACK), new Position(1,0)));
-
+
+ mockView.displayStartTurnPanel = true;
+
+ List<Pair<Stone, Position>> stones = Arrays.asList(
+ new Pair<Stone, Position>(new Stone(RED), new Position(0, 0)),
+ new Pair<Stone, Position>(new Stone(BLACK), new Position(1, 0)));
+
mockHand.iterable = stones;
-
- testControl = new TurnControl(null, mockTable, mockView, mockTimer);
-
+
+ testControl = new TurnControl(mockHand, mockTable, mockView, mockTimer);
+
int i = 0;
for (Pair<Stone, Position> pair : mockView.playerPanel.handPanel.stones) {
assertSame(stones.get(i), pair);
i++;
}
assertEquals(stones.size(), i);
-
- assertTrue(mockView.displayStartTurnPanel);
+
+ assertFalse(mockView.displayStartTurnPanel);
}
@Test