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
This commit is contained in:
parent
8cef7f0f9d
commit
9537838033
1 changed files with 15 additions and 1 deletions
|
@ -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<Stone>());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void selectStoneInHand() {
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue