summaryrefslogtreecommitdiff
path: root/src/test/java/org/luxons
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/luxons')
-rw-r--r--src/test/java/org/luxons/sevenwonders/game/cards/HandsTest.java26
1 files changed, 4 insertions, 22 deletions
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,42 +105,24 @@ 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<Card> hand0 = TestUtils.createSampleCards(0, 5);
List<Card> hand1 = TestUtils.createSampleCards(5, 10);
bgstack15