aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/eu/equalparts/cardbase/decks/DeckTest.java43
1 files changed, 22 insertions, 21 deletions
diff --git a/test/eu/equalparts/cardbase/decks/DeckTest.java b/test/eu/equalparts/cardbase/decks/DeckTest.java
index a35bc32..1c00e5b 100644
--- a/test/eu/equalparts/cardbase/decks/DeckTest.java
+++ b/test/eu/equalparts/cardbase/decks/DeckTest.java
@@ -28,25 +28,26 @@ public class DeckTest {
public void setUp() throws Exception {
}
- @Test
- public void test_createReferenceDeckFromStandaloneDeck() throws Exception {
- ObjectMapper mapper = new ObjectMapper();
- StandaloneDeck standaloneDeck = mapper.readValue(getClass().getResourceAsStream("deck.cbd"), StandaloneDeck.class);
-
- ReferenceDeck uut = new ReferenceDeck(standaloneDeck);
-
- boolean condition = uut.name == standaloneDeck.name &&
- uut.plains == standaloneDeck.plains &&
- uut.islands == standaloneDeck.islands &&
- uut.swamps == standaloneDeck.swamps &&
- uut.mountains == standaloneDeck.mountains &&
- uut.forests == standaloneDeck.forests;
- assertTrue("Metadata was not correctly set.", condition);
- assertEquals("Wrong number of cards.", uut.cardReferences.size(), standaloneDeck.cards.size());
- for (Card card : standaloneDeck.cards) {
- Integer count = uut.cardReferences.get(card.hashCode());
- assertNotNull("Reference missing in deck.", count);
- assertEquals("Card count is wrong.", card.count, count);
- }
- }
+ // TODO sort out
+// @Test
+// public void test_createReferenceDeckFromStandaloneDeck() throws Exception {
+// ObjectMapper mapper = new ObjectMapper();
+// StandaloneDeck standaloneDeck = mapper.readValue(getClass().getResourceAsStream("deck.cbd"), StandaloneDeck.class);
+//
+// ReferenceDeck uut = new ReferenceDeck(standaloneDeck);
+//
+// boolean condition = uut.name == standaloneDeck.name &&
+// uut.plains == standaloneDeck.plains &&
+// uut.islands == standaloneDeck.islands &&
+// uut.swamps == standaloneDeck.swamps &&
+// uut.mountains == standaloneDeck.mountains &&
+// uut.forests == standaloneDeck.forests;
+// assertTrue("Metadata was not correctly set.", condition);
+// assertEquals("Wrong number of cards.", uut.cardReferences.size(), standaloneDeck.cards.size());
+// for (Card card : standaloneDeck.cards) {
+// Integer count = uut.cardReferences.get(card.hashCode());
+// assertNotNull("Reference missing in deck.", count);
+// assertEquals("Card count is wrong.", card.count, count);
+// }
+// }
}