diff options
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.java | 8 | ||||
-rw-r--r-- | src/test/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.java | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/test/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.java b/src/test/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.java index c2c6f86d..5f42bc53 100644 --- a/src/test/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.java +++ b/src/test/java/org/luxons/sevenwonders/game/effects/BonusPerBoardElementTest.java @@ -67,7 +67,9 @@ public class BonusPerBoardElementTest { @Theory public void computePoints_countsDefeatTokens(RelativeBoardPosition boardPosition, int nbDefeatTokens, int points, int gold) { Board board = table.getBoard(0, boardPosition); - board.setNbDefeatTokens(nbDefeatTokens); + for (int i = 0; i < nbDefeatTokens; i++) { + board.getMilitary().defeat(); + } BonusPerBoardElement bonus = createBonus(BoardElementType.DEFEAT_TOKEN, gold, points); bonus.setBoards(Collections.singletonList(boardPosition)); @@ -106,7 +108,9 @@ public class BonusPerBoardElementTest { @Theory public void apply_countsDefeatTokens(RelativeBoardPosition boardPosition, int nbDefeatTokens, int points, int gold) { Board board = table.getBoard(0, boardPosition); - board.setNbDefeatTokens(nbDefeatTokens); + for (int i = 0; i < nbDefeatTokens; i++) { + board.getMilitary().defeat(); + } BonusPerBoardElement bonus = createBonus(BoardElementType.DEFEAT_TOKEN, gold, points); bonus.setBoards(Collections.singletonList(boardPosition)); diff --git a/src/test/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.java b/src/test/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.java index fbfc2d6c..d3c2cc03 100644 --- a/src/test/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.java +++ b/src/test/java/org/luxons/sevenwonders/game/effects/MilitaryReinforcementsTest.java @@ -27,12 +27,12 @@ public class MilitaryReinforcementsTest { @Theory public void apply_increaseGoldWithRightAmount(int initialShields, int additionalShields, ResourceType type) { Board board = TestUtils.createBoard(type); - board.setNbWarSymbols(initialShields); + board.getMilitary().addShields(initialShields); MilitaryReinforcements reinforcements = new MilitaryReinforcements(additionalShields); reinforcements.apply(board); - assertEquals(initialShields + additionalShields, board.getNbWarSymbols()); + assertEquals(initialShields + additionalShields, board.getMilitary().getNbShields()); } @Theory |