From 687aebaaed106897d169f50110f3d42ace285542 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Sat, 14 Jan 2017 03:45:24 +0100 Subject: Add support for '1 free per age' special ability --- .../luxons/sevenwonders/game/cards/HandsTest.java | 26 ++++------------------ 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'src/test/java/org/luxons') diff --git a/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java b/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java index 4475fd3b..494b9e4c 100644 --- a/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java +++ b/src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java @@ -105,41 +105,23 @@ public class HandsTest { } @Test - public void rotate_doesNotMoveWhenOffsetIsZero() { + public void rotate_movesOfCorrectOffset_right() { Hands hands = createHands(3, 7); - Hands rotated = hands.rotate(0); - assertEquals(rotated.get(0), hands.get(0)); - assertEquals(rotated.get(1), hands.get(1)); - assertEquals(rotated.get(2), hands.get(2)); - } - - @Test - public void rotate_movesOfCorrectOffset_positive() { - Hands hands = createHands(3, 7); - Hands rotated = hands.rotate(1); + Hands rotated = hands.rotate(HandRotationDirection.RIGHT); assertEquals(rotated.get(1), hands.get(0)); assertEquals(rotated.get(2), hands.get(1)); assertEquals(rotated.get(0), hands.get(2)); } @Test - public void rotate_movesOfCorrectOffset_negative() { + public void rotate_movesOfCorrectOffset_left() { Hands hands = createHands(3, 7); - Hands rotated = hands.rotate(-1); + Hands rotated = hands.rotate(HandRotationDirection.LEFT); assertEquals(rotated.get(2), hands.get(0)); assertEquals(rotated.get(0), hands.get(1)); assertEquals(rotated.get(1), hands.get(2)); } - @Test - public void rotate_movesOfCorrectOffset_negative2() { - Hands hands = createHands(3, 7); - Hands rotated = hands.rotate(-2); - assertEquals(rotated.get(1), hands.get(0)); - assertEquals(rotated.get(2), hands.get(1)); - assertEquals(rotated.get(0), hands.get(2)); - } - @Test public void createHand_containsAllCards() { List hand0 = TestUtils.createSampleCards(0, 5); -- cgit