diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-10 06:55:14 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-10 06:55:14 +0200 |
commit | 60e7432c5e8cf5d27dae7f7177fd4b70ca6b880a (patch) | |
tree | 594949294ae74cfb7272f0207d7ac01141aec13e /backend/src/test/java/org/luxons | |
parent | Add more complicated test for playability (diff) | |
download | seven-wonders-60e7432c5e8cf5d27dae7f7177fd4b70ca6b880a.tar.gz seven-wonders-60e7432c5e8cf5d27dae7f7177fd4b70ca6b880a.tar.bz2 seven-wonders-60e7432c5e8cf5d27dae7f7177fd4b70ca6b880a.zip |
Refac requirement-checking methods
Diffstat (limited to 'backend/src/test/java/org/luxons')
-rw-r--r-- | backend/src/test/java/org/luxons/sevenwonders/game/cards/RequirementsTest.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/backend/src/test/java/org/luxons/sevenwonders/game/cards/RequirementsTest.java b/backend/src/test/java/org/luxons/sevenwonders/game/cards/RequirementsTest.java index b46a5bb9..797f14d3 100644 --- a/backend/src/test/java/org/luxons/sevenwonders/game/cards/RequirementsTest.java +++ b/backend/src/test/java/org/luxons/sevenwonders/game/cards/RequirementsTest.java @@ -36,9 +36,9 @@ public class RequirementsTest { Board board = TestUtils.createBoard(ResourceType.CLAY, boardGold); Table table = new Table(Collections.singletonList(board)); - assertEquals(boardGold >= requiredGold, requirements.isAffordedBy(board)); - assertEquals(boardGold >= requiredGold, requirements.isAffordedBy(board, Collections.emptyList())); - assertEquals(boardGold >= requiredGold, requirements.couldBeAffordedBy(table, 0)); + assertEquals(boardGold >= requiredGold, requirements.areMetWithoutNeighboursBy(board)); + assertEquals(boardGold >= requiredGold, requirements.areMetWithHelpBy(board, Collections.emptyList())); + assertEquals(boardGold >= requiredGold, requirements.couldBeMetBy(table, 0)); } @Theory @@ -48,11 +48,11 @@ public class RequirementsTest { Board board = TestUtils.createBoard(initialResource, 0); Table table = new Table(Collections.singletonList(board)); - assertEquals(initialResource == requiredResource, requirements.isAffordedBy(board)); - assertEquals(initialResource == requiredResource, requirements.isAffordedBy(board, Collections.emptyList())); + assertEquals(initialResource == requiredResource, requirements.areMetWithoutNeighboursBy(board)); + assertEquals(initialResource == requiredResource, requirements.areMetWithHelpBy(board, Collections.emptyList())); if (initialResource == requiredResource) { - assertTrue(requirements.couldBeAffordedBy(table, 0)); + assertTrue(requirements.couldBeMetBy(table, 0)); } } @@ -67,11 +67,11 @@ public class RequirementsTest { board.getProduction().addFixedResource(producedResource, 1); Table table = new Table(Collections.singletonList(board)); - assertEquals(producedResource == requiredResource, requirements.isAffordedBy(board)); - assertEquals(producedResource == requiredResource, requirements.isAffordedBy(board, Collections.emptyList())); + assertEquals(producedResource == requiredResource, requirements.areMetWithoutNeighboursBy(board)); + assertEquals(producedResource == requiredResource, requirements.areMetWithHelpBy(board, Collections.emptyList())); if (producedResource == requiredResource) { - assertTrue(requirements.couldBeAffordedBy(table, 0)); + assertTrue(requirements.couldBeMetBy(table, 0)); } } |