From 95378380339da507fd737eec2cdffb750f83bbf9 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Thu, 5 May 2011 21:35:40 +0200 Subject: Check deselecting of stones on end of turn git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@157 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/TurnControlTest.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'test') 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; @@ -137,6 +138,19 @@ public class TurnControlTest { assertFalse(mockTimer.timerRunning); } + @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()); + } + + @Test public void selectStoneInHand() { @@ -386,6 +400,6 @@ public class TurnControlTest { ArrayList selectedStones = new ArrayList( mockView.selectedStones); ArrayList expectedStones = new ArrayList(expected); - assertEquals(selectedStones, expectedStones); + assertEquals(expectedStones, selectedStones); } } -- cgit v1.2.3