summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/jrummikub/control/TurnControlTest.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/jrummikub/control/TurnControlTest.java b/test/jrummikub/control/TurnControlTest.java
index 6a37c67..27d9aec 100644
--- a/test/jrummikub/control/TurnControlTest.java
+++ b/test/jrummikub/control/TurnControlTest.java
@@ -118,6 +118,7 @@ public class TurnControlTest {
assertTrue(mockView.playerPanel.endTurnEvent.listeners.isEmpty());
}
+
@Test
public void timerEndOfTurn() {
eventFired = false;
@@ -138,6 +139,19 @@ public class TurnControlTest {
}
@Test
+ public void deselctOnEndOfTurn() {
+
+ Stone firstStone = new Stone(StoneColor.RED);
+
+ // Select first stone
+ mockView.playerPanel.handPanel.stoneClickEvent.emit(firstStone, false);
+ mockTimer.timeRunOutEvent.emit();
+
+ assertCollection(new ArrayList<Stone>());
+ }
+
+
+ @Test
public void selectStoneInHand() {
Stone firstStone = new Stone(StoneColor.RED);
@@ -386,6 +400,6 @@ public class TurnControlTest {
ArrayList<Stone> selectedStones = new ArrayList<Stone>(
mockView.selectedStones);
ArrayList<Stone> expectedStones = new ArrayList<Stone>(expected);
- assertEquals(selectedStones, expectedStones);
+ assertEquals(expectedStones, selectedStones);
}
}