diff options
-rw-r--r-- | mock/jrummikub/view/MockPlayerPanel.java | 2 | ||||
-rw-r--r-- | mock/jrummikub/view/MockView.java | 2 | ||||
-rw-r--r-- | test/jrummikub/control/ApplicationControlTest.java | 12 |
3 files changed, 7 insertions, 9 deletions
diff --git a/mock/jrummikub/view/MockPlayerPanel.java b/mock/jrummikub/view/MockPlayerPanel.java index 2433408..864a69f 100644 --- a/mock/jrummikub/view/MockPlayerPanel.java +++ b/mock/jrummikub/view/MockPlayerPanel.java @@ -17,8 +17,6 @@ public class MockPlayerPanel implements IPlayerPanel { /** */ public MockEvent sortByRunsEvent = new MockEvent(); /** */ - public MockEvent pauseEvent = new MockEvent(); - /** */ public TurnMode turnMode; @Override diff --git a/mock/jrummikub/view/MockView.java b/mock/jrummikub/view/MockView.java index e664c67..dd8f5a7 100644 --- a/mock/jrummikub/view/MockView.java +++ b/mock/jrummikub/view/MockView.java @@ -50,8 +50,6 @@ public class MockView implements IView { /** */ public boolean pauseModeEnabled = false; /** */ - public boolean isPaused = false; - /** */ public boolean savingEnabled = false; /** */ public boolean loadingError = false; diff --git a/test/jrummikub/control/ApplicationControlTest.java b/test/jrummikub/control/ApplicationControlTest.java index 88f365a..b239e64 100644 --- a/test/jrummikub/control/ApplicationControlTest.java +++ b/test/jrummikub/control/ApplicationControlTest.java @@ -1,10 +1,9 @@ package jrummikub.control; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import jrummikub.util.LoginData; import jrummikub.view.IQuitWarningPanel.QuitMode; +import jrummikub.view.IView.BottomPanelType; import jrummikub.view.MockView; import org.junit.Before; @@ -41,8 +40,11 @@ public class ApplicationControlTest { testAppControl = new ApplicationControl(view); testAppControl.startApplication(); view.settingsPanel.startGameEvent.emit(); - view.getPlayerPanel().pauseEvent.emit(); - // assertTrue(view.isPaused); + assertSame(BottomPanelType.START_TURN_PANEL, view.bottomPanelType); + view.startTurnEvent.emit(); + assertSame(BottomPanelType.HUMAN_HAND_PANEL, view.bottomPanelType); + view.pauseEvent.emit(); + assertTrue(view.pauseModeEnabled); } /** */ |