diff options
author | jbion <joffrey.bion@amadeus.com> | 2016-12-23 00:11:14 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2016-12-23 00:11:14 +0100 |
commit | 8f6e156ca2eb2afd46729f4b3e09e3849df49bdb (patch) | |
tree | fe9108a7f4698769b54967cefa62a6dcce9a79ff /src/main/java/org | |
parent | Add bought resources cost computation (diff) | |
download | seven-wonders-8f6e156ca2eb2afd46729f4b3e09e3849df49bdb.tar.gz seven-wonders-8f6e156ca2eb2afd46729f4b3e09e3849df49bdb.tar.bz2 seven-wonders-8f6e156ca2eb2afd46729f4b3e09e3849df49bdb.zip |
Add tests for equals and hashcode to maximize coverage in resources package
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/game/resources/Production.java | 4 | ||||
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/game/resources/Resources.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/resources/Production.java b/src/main/java/org/luxons/sevenwonders/game/resources/Production.java index c6be8472..b7701c27 100644 --- a/src/main/java/org/luxons/sevenwonders/game/resources/Production.java +++ b/src/main/java/org/luxons/sevenwonders/game/resources/Production.java @@ -29,8 +29,8 @@ public class Production { } public void addAll(Production production) { - fixedResources.addAll(production.fixedResources); - alternativeResources.addAll(production.alternativeResources); + fixedResources.addAll(production.getFixedResources()); + alternativeResources.addAll(production.getAlternativeResources()); } public Resources getFixedResources() { diff --git a/src/main/java/org/luxons/sevenwonders/game/resources/Resources.java b/src/main/java/org/luxons/sevenwonders/game/resources/Resources.java index d3f6de94..5bf6f269 100644 --- a/src/main/java/org/luxons/sevenwonders/game/resources/Resources.java +++ b/src/main/java/org/luxons/sevenwonders/game/resources/Resources.java @@ -14,7 +14,7 @@ public class Resources { } public void addAll(Resources resources) { - resources.quantities.forEach(this::add); + resources.getQuantities().forEach(this::add); } public int getQuantity(ResourceType type) { |