From 09aa507e3b3d08cc168077c093c6ad264bdc4e8f Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Sun, 29 May 2011 15:32:00 +0200 Subject: Test initial meld threshold in settings control git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@295 72836036-5685-4462-b002-a69064685172 --- test/jrummikub/control/SettingsControlTest.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/jrummikub/control/SettingsControlTest.java b/test/jrummikub/control/SettingsControlTest.java index 8dc286c..40a9265 100644 --- a/test/jrummikub/control/SettingsControlTest.java +++ b/test/jrummikub/control/SettingsControlTest.java @@ -15,7 +15,8 @@ import org.junit.Test; /** */ public class SettingsControlTest { MockView view = new MockView(); - SettingsControl settingsControl = new SettingsControl(view); + GameSettings initialSettings = new GameSettings(); + SettingsControl settingsControl = new SettingsControl(view, initialSettings); GameSettings gameSettings = null; /** */ @@ -173,5 +174,15 @@ public class SettingsControlTest { view.settingsPanel.startGameEvent.emit(); assertNull(gameSettings); } + + /** */ + @Test + public void initialMeldThresholdTest() { + assertEquals(initialSettings.getInitialMeldThreshold(), view.settingsPanel.initialMeldThreshold); + + view.settingsPanel.changeInitialMeldThresholdEvent.emit(25); + view.settingsPanel.startGameEvent.emit(); + assertEquals(25, gameSettings.getInitialMeldThreshold()); + } } -- cgit v1.2.3