summaryrefslogtreecommitdiffstats
path: root/test/jrummikub/control/SettingsControlTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/jrummikub/control/SettingsControlTest.java')
-rw-r--r--test/jrummikub/control/SettingsControlTest.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/jrummikub/control/SettingsControlTest.java b/test/jrummikub/control/SettingsControlTest.java
index 534904d..a8e9849 100644
--- a/test/jrummikub/control/SettingsControlTest.java
+++ b/test/jrummikub/control/SettingsControlTest.java
@@ -9,6 +9,7 @@ import java.util.HashSet;
import jrummikub.control.turn.TurnControlFactory;
import jrummikub.model.GameSettings;
+import jrummikub.model.PlayerSettings.Type;
import jrummikub.model.StoneColor;
import jrummikub.util.IListener1;
import jrummikub.view.ISettingsPanel;
@@ -41,7 +42,8 @@ public class SettingsControlTest {
/** */
@Test
public void initialStateTest() {
- assertSame(ISettingsPanel.SettingsError.NO_ERROR, view.settingsPanel.error);
+ assertSame(ISettingsPanel.SettingsError.NO_ERROR,
+ view.settingsPanel.error);
view.settingsPanel.startGameEvent.emit();
assertNotNull(gameSettings);
assertEquals(2, gameSettings.getPlayerList().size());
@@ -162,7 +164,8 @@ public class SettingsControlTest {
view.settingsPanel.changePlayerNameEvent.emit(1, name2);
assertTrue(view.settingsPanel.startButtonEnabled);
- assertSame(ISettingsPanel.SettingsError.NO_ERROR, view.settingsPanel.error);
+ assertSame(ISettingsPanel.SettingsError.NO_ERROR,
+ view.settingsPanel.error);
view.settingsPanel.startGameEvent.emit();
assertNotNull(gameSettings);
@@ -243,8 +246,8 @@ public class SettingsControlTest {
assertEquals(initialSettings.getStoneColors(),
view.settingsPanel.stoneColors);
- view.settingsPanel.changeStoneColorsEvent.emit(new HashSet<StoneColor>(Arrays.asList(
- BLUE, RED, BLACK)));
+ view.settingsPanel.changeStoneColorsEvent.emit(new HashSet<StoneColor>(
+ Arrays.asList(BLUE, RED, BLACK)));
view.settingsPanel.startGameEvent.emit();
assertEquals(new HashSet<StoneColor>(Arrays.asList(BLUE, RED, BLACK)),
gameSettings.getStoneColors());
@@ -253,19 +256,16 @@ public class SettingsControlTest {
/** */
@Test
public void typeChangeTest() {
- view.settingsPanel.changePlayerTypeEvent.emit(0,
- TurnControlFactory.Type.COMPUTER);
- view.settingsPanel.changePlayerTypeEvent.emit(1,
- TurnControlFactory.Type.COMPUTER);
- view.settingsPanel.changePlayerTypeEvent.emit(1,
- TurnControlFactory.Type.HUMAN);
+ view.settingsPanel.changePlayerTypeEvent.emit(0, Type.COMPUTER);
+ view.settingsPanel.changePlayerTypeEvent.emit(1, Type.COMPUTER);
+ view.settingsPanel.changePlayerTypeEvent.emit(1, Type.HUMAN);
view.settingsPanel.startGameEvent.emit();
assertNotNull(gameSettings);
assertEquals(2, gameSettings.getPlayerList().size());
- assertSame(TurnControlFactory.Type.COMPUTER, gameSettings.getPlayerList()
- .get(0).getTurnControlType());
- assertSame(TurnControlFactory.Type.HUMAN,
- gameSettings.getPlayerList().get(1).getTurnControlType());
+ assertSame(Type.COMPUTER, gameSettings.getPlayerList().get(0)
+ .getTurnControlType());
+ assertSame(Type.HUMAN, gameSettings.getPlayerList().get(1)
+ .getTurnControlType());
}
}