Implemented end of turn event handling, tested
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@112 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
3cd6dee363
commit
ac08bc112f
2 changed files with 25 additions and 3 deletions
|
@ -19,7 +19,8 @@ import static org.junit.Assert.*;
|
|||
public class TurnControlTest {
|
||||
|
||||
class MockTimer implements ITurnTimer {
|
||||
boolean timerRunning;
|
||||
public boolean timerRunning;
|
||||
public Event timeRunOutEvent = new Event();
|
||||
|
||||
@Override
|
||||
public void startTimer() {
|
||||
|
@ -33,7 +34,7 @@ public class TurnControlTest {
|
|||
|
||||
@Override
|
||||
public IEvent getTimeRunOutEvent() {
|
||||
return null;
|
||||
return timeRunOutEvent;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -82,7 +83,7 @@ public class TurnControlTest {
|
|||
}
|
||||
});
|
||||
|
||||
mockView.playerPanel.endTurnEvent.emit();
|
||||
mockTimer.timeRunOutEvent.emit();
|
||||
|
||||
assertTrue(eventFired);
|
||||
assertFalse(mockTimer.timerRunning);
|
||||
|
|
Reference in a new issue