From 4a9a8999fe13e16505ca2c837eb4fcac467b53d7 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Wed, 1 Feb 2017 22:35:52 +0100 Subject: Refactor Military to be independent of Settings --- .../org/luxons/sevenwonders/game/boards/MilitaryTest.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'backend/src/test') diff --git a/backend/src/test/java/org/luxons/sevenwonders/game/boards/MilitaryTest.java b/backend/src/test/java/org/luxons/sevenwonders/game/boards/MilitaryTest.java index 7ef253db..16073e91 100644 --- a/backend/src/test/java/org/luxons/sevenwonders/game/boards/MilitaryTest.java +++ b/backend/src/test/java/org/luxons/sevenwonders/game/boards/MilitaryTest.java @@ -10,11 +10,9 @@ import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theory; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; -import org.luxons.sevenwonders.game.Settings; -import org.luxons.sevenwonders.game.api.CustomizableSettings; import org.luxons.sevenwonders.game.boards.Military.UnknownAgeException; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; @RunWith(Theories.class) public class MilitaryTest { @@ -35,13 +33,7 @@ public class MilitaryTest { private static Military createMilitary(int age, int nbPointsPerVictory, int nbPointsPerDefeat) { Map wonPointsPerAge = new HashMap<>(); wonPointsPerAge.put(age, nbPointsPerVictory); - - CustomizableSettings customSettings = new CustomizableSettings(); - customSettings.setWonPointsPerVictoryPerAge(wonPointsPerAge); - customSettings.setLostPointsPerDefeat(nbPointsPerDefeat); - - Settings settings = new Settings(5, customSettings); - return new Military(settings); + return new Military(nbPointsPerDefeat, wonPointsPerAge); } @Theory -- cgit