ApplicationControlTest: fixed pauseTest()

git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@602 72836036-5685-4462-b002-a69064685172
This commit is contained in:
Matthias Schiffer 2011-07-04 17:26:45 +02:00
parent aca4b25210
commit a3fc740af5
3 changed files with 7 additions and 9 deletions

View file

@ -17,8 +17,6 @@ public class MockPlayerPanel implements IPlayerPanel {
/** */ /** */
public MockEvent sortByRunsEvent = new MockEvent(); public MockEvent sortByRunsEvent = new MockEvent();
/** */ /** */
public MockEvent pauseEvent = new MockEvent();
/** */
public TurnMode turnMode; public TurnMode turnMode;
@Override @Override

View file

@ -50,8 +50,6 @@ public class MockView implements IView {
/** */ /** */
public boolean pauseModeEnabled = false; public boolean pauseModeEnabled = false;
/** */ /** */
public boolean isPaused = false;
/** */
public boolean savingEnabled = false; public boolean savingEnabled = false;
/** */ /** */
public boolean loadingError = false; public boolean loadingError = false;

View file

@ -1,10 +1,9 @@
package jrummikub.control; package jrummikub.control;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.*;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import jrummikub.util.LoginData; import jrummikub.util.LoginData;
import jrummikub.view.IQuitWarningPanel.QuitMode; import jrummikub.view.IQuitWarningPanel.QuitMode;
import jrummikub.view.IView.BottomPanelType;
import jrummikub.view.MockView; import jrummikub.view.MockView;
import org.junit.Before; import org.junit.Before;
@ -41,8 +40,11 @@ public class ApplicationControlTest {
testAppControl = new ApplicationControl(view); testAppControl = new ApplicationControl(view);
testAppControl.startApplication(); testAppControl.startApplication();
view.settingsPanel.startGameEvent.emit(); view.settingsPanel.startGameEvent.emit();
view.getPlayerPanel().pauseEvent.emit(); assertSame(BottomPanelType.START_TURN_PANEL, view.bottomPanelType);
// assertTrue(view.isPaused); view.startTurnEvent.emit();
assertSame(BottomPanelType.HUMAN_HAND_PANEL, view.bottomPanelType);
view.pauseEvent.emit();
assertTrue(view.pauseModeEnabled);
} }
/** */ /** */