MockApplicationControlTest: added quitWarningTest
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@607 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
cabf7868e2
commit
aa0f3e658b
2 changed files with 14 additions and 1 deletions
|
@ -67,6 +67,8 @@ public class MockView implements IView {
|
||||||
/** */
|
/** */
|
||||||
public MockEvent quitEvent = new MockEvent();
|
public MockEvent quitEvent = new MockEvent();
|
||||||
/** */
|
/** */
|
||||||
|
public MockEvent endProgramEvent = new MockEvent();
|
||||||
|
/** */
|
||||||
public MockEvent newRoundEvent = new MockEvent();
|
public MockEvent newRoundEvent = new MockEvent();
|
||||||
/** */
|
/** */
|
||||||
public MockEvent newGameEvent = new MockEvent();
|
public MockEvent newGameEvent = new MockEvent();
|
||||||
|
@ -133,7 +135,7 @@ public class MockView implements IView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEvent getEndProgramEvent() {
|
public IEvent getEndProgramEvent() {
|
||||||
return quitEvent;
|
return endProgramEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -47,6 +47,17 @@ public class ApplicationControlTest {
|
||||||
assertTrue(view.pauseModeEnabled);
|
assertTrue(view.pauseModeEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** */
|
||||||
|
@Test
|
||||||
|
public void quitWarningTest() {
|
||||||
|
testAppControl = new ApplicationControl(view);
|
||||||
|
testAppControl.startApplication();
|
||||||
|
view.settingsPanel.startGameEvent.emit();
|
||||||
|
view.quitEvent.emit();
|
||||||
|
assertSame(QuitMode.QUIT_PROCESS, view.quitWarningPanel.quitMode);
|
||||||
|
assertTrue(view.isQuitWarningPanelVisible);
|
||||||
|
}
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
@Test
|
@Test
|
||||||
public void networkTest() {
|
public void networkTest() {
|
||||||
|
|
Reference in a new issue