summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/src/test/java/org/luxons/sevenwonders/game/cards/RequirementsTest.java17
1 files changed, 17 insertions, 0 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 1b1607d4..b01f9002 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
@@ -3,6 +3,7 @@ package org.luxons.sevenwonders.game.cards;
import java.util.Arrays;
import java.util.Collections;
+import org.junit.Test;
import org.junit.experimental.theories.DataPoints;
import org.junit.experimental.theories.Theories;
import org.junit.experimental.theories.Theory;
@@ -12,10 +13,12 @@ import org.luxons.sevenwonders.game.boards.Board;
import org.luxons.sevenwonders.game.resources.BoughtResources;
import org.luxons.sevenwonders.game.resources.Provider;
import org.luxons.sevenwonders.game.resources.ResourceType;
+import org.luxons.sevenwonders.game.resources.Resources;
import org.luxons.sevenwonders.game.test.TestUtils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
@@ -32,6 +35,20 @@ public class RequirementsTest {
return ResourceType.values();
}
+ @Test
+ public void getResources_emptyAfterInit() throws Exception {
+ Requirements requirements = new Requirements();
+ assertTrue(requirements.getResources().isEmpty());
+ }
+
+ @Test
+ public void setResources_success() throws Exception {
+ Requirements requirements = new Requirements();
+ Resources resources = new Resources();
+ requirements.setResources(resources);
+ assertSame(resources, requirements.getResources());
+ }
+
@Theory
public void goldRequirement(int boardGold, int requiredGold) {
Requirements requirements = new Requirements();
bgstack15