summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/jrummikub/control/turn/TurnControlTest.java (renamed from test/jrummikub/control/TurnControlTest.java)22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/jrummikub/control/TurnControlTest.java b/test/jrummikub/control/turn/TurnControlTest.java
index edace0a..150f3e9 100644
--- a/test/jrummikub/control/TurnControlTest.java
+++ b/test/jrummikub/control/turn/TurnControlTest.java
@@ -1,4 +1,4 @@
-package jrummikub.control;
+package jrummikub.control.turn;
import static jrummikub.model.StoneColor.BLACK;
import static jrummikub.model.StoneColor.BLUE;
@@ -16,6 +16,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import jrummikub.control.ITurnTimer;
+import jrummikub.control.turn.HumanTurnControl;
import jrummikub.model.IHand;
import jrummikub.model.ITable;
import jrummikub.model.MockHand;
@@ -35,7 +37,7 @@ import org.junit.Before;
import org.junit.Test;
/**
- * Tests for {@link TurnControl}
+ * Tests for {@link HumanTurnControl}
*/
public class TurnControlTest {
static class AccessibleTable extends Table {
@@ -65,7 +67,7 @@ public class TurnControlTest {
}
- TurnControl testControl;
+ HumanTurnControl testControl;
MockView mockView;
MockTimer mockTimer;
MockTable mockTable;
@@ -103,7 +105,7 @@ public class TurnControlTest {
mockTimer = new MockTimer();
mockTable = new MockTable();
mockHand = new MockHand();
- testControl = new TurnControl(mockHand, mockTable, mockView, mockTimer);
+ testControl = new HumanTurnControl(mockHand, mockTable, mockView, mockTimer);
}
/** */
@@ -126,7 +128,7 @@ public class TurnControlTest {
mockHand.iterable = stones;
- testControl = new TurnControl(mockHand, mockTable, mockView, mockTimer);
+ testControl = new HumanTurnControl(mockHand, mockTable, mockView, mockTimer);
testControl.startTurn();
@@ -619,7 +621,7 @@ public class TurnControlTest {
@Test
public void testAddLeft() {
AccessibleTable table = new AccessibleTable();
- TurnControl turnControl = new TurnControl(mockHand, table, mockView,
+ HumanTurnControl turnControl = new HumanTurnControl(mockHand, table, mockView,
mockTimer);
turnControl.startTurn();
Stone blueOne = new Stone(1, BLUE);
@@ -736,7 +738,7 @@ public class TurnControlTest {
@Test
public void testAddRight() {
AccessibleTable table = new AccessibleTable();
- TurnControl turnControl = new TurnControl(mockHand, table, mockView,
+ HumanTurnControl turnControl = new HumanTurnControl(mockHand, table, mockView,
mockTimer);
turnControl.startTurn();
Stone blueOne = new Stone(1, BLUE);
@@ -853,7 +855,7 @@ public class TurnControlTest {
@Test
public void testAddNewSet() {
AccessibleTable table = new AccessibleTable();
- TurnControl turnControl = new TurnControl(mockHand, table, mockView,
+ HumanTurnControl turnControl = new HumanTurnControl(mockHand, table, mockView,
mockTimer);
turnControl.startTurn();
Stone blueOne = new Stone(1, BLUE);
@@ -976,7 +978,7 @@ public class TurnControlTest {
List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>(
mockHand.stones);
- Collections.sort(stones, new TurnControl.HandStonePositionComparator());
+ Collections.sort(stones, new HumanTurnControl.HandStonePositionComparator());
assertEquals(stones.size(), 13);
@@ -1037,7 +1039,7 @@ public class TurnControlTest {
List<Pair<Stone, Position>> stones = new ArrayList<Pair<Stone, Position>>(
mockHand.stones);
- Collections.sort(stones, new TurnControl.HandStonePositionComparator());
+ Collections.sort(stones, new HumanTurnControl.HandStonePositionComparator());
assertEquals(stones.size(), 13);