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());
|
assertTrue(mockView.playerPanel.endTurnEvent.listeners.isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void timerEndOfTurn() {
|
public void timerEndOfTurn() {
|
||||||
eventFired = false;
|
eventFired = false;
|
||||||
|
@ -137,6 +138,19 @@ public class TurnControlTest {
|
||||||
assertFalse(mockTimer.timerRunning);
|
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
|
@Test
|
||||||
public void selectStoneInHand() {
|
public void selectStoneInHand() {
|
||||||
|
|
||||||
|
@ -386,6 +400,6 @@ public class TurnControlTest {
|
||||||
ArrayList<Stone> selectedStones = new ArrayList<Stone>(
|
ArrayList<Stone> selectedStones = new ArrayList<Stone>(
|
||||||
mockView.selectedStones);
|
mockView.selectedStones);
|
||||||
ArrayList<Stone> expectedStones = new ArrayList<Stone>(expected);
|
ArrayList<Stone> expectedStones = new ArrayList<Stone>(expected);
|
||||||
assertEquals(selectedStones, expectedStones);
|
assertEquals(expectedStones, selectedStones);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue