From 8f6e156ca2eb2afd46729f4b3e09e3849df49bdb Mon Sep 17 00:00:00 2001 From: jbion Date: Fri, 23 Dec 2016 00:11:14 +0100 Subject: Add tests for equals and hashcode to maximize coverage in resources package --- src/main/java/org/luxons/sevenwonders/game/resources/Production.java | 4 ++-- src/main/java/org/luxons/sevenwonders/game/resources/Resources.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/org') 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) { -- cgit