diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2017-02-01 22:35:52 +0100 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2017-02-01 22:35:52 +0100 |
commit | 4a9a8999fe13e16505ca2c837eb4fcac467b53d7 (patch) | |
tree | 1689faeeace4672447d174af116f760ec4eb08a1 /backend/src/test/java | |
parent | Add first tests for Requirements (diff) | |
download | seven-wonders-4a9a8999fe13e16505ca2c837eb4fcac467b53d7.tar.gz seven-wonders-4a9a8999fe13e16505ca2c837eb4fcac467b53d7.tar.bz2 seven-wonders-4a9a8999fe13e16505ca2c837eb4fcac467b53d7.zip |
Refactor Military to be independent of Settings
Diffstat (limited to 'backend/src/test/java')
-rw-r--r-- | backend/src/test/java/org/luxons/sevenwonders/game/boards/MilitaryTest.java | 12 |
1 files changed, 2 insertions, 10 deletions
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<Integer, Integer> 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 |