Exemplo n.º 1
0
 @Test
 public void middleTest() {
   Direction[] expectedDirections = {
     Down.getInstance(), Up.getInstance(), Right.getInstance(), Left.getInstance()
   };
   positionTest(Middle.getInstance(), expectedDirections);
 }
Exemplo n.º 2
0
 @Test
 public void LeftGetNextPositionTest() {
   BoardModel boardModel = BoardModel.initialize();
   int currentPosition = boardModel.getPositionOfEmptySlot();
   int nextPosition = Left.getInstance().getNextPosition(boardModel);
   assertTrue(nextPosition == currentPosition - 1);
 }
Exemplo n.º 3
0
 @Test
 public void RightOppositeTest() {
   assertTrue(Right.getInstance().opposite() == Left.getInstance());
 }
Exemplo n.º 4
0
 @Test
 public void topRightCornerTest() {
   Direction[] expectedDirections = {Down.getInstance(), Left.getInstance()};
   positionTest(TopRightCorner.getInstance(), expectedDirections);
 }
Exemplo n.º 5
0
 @Test
 public void topEdgeTest() {
   Direction[] expectedDirections = {Down.getInstance(), Right.getInstance(), Left.getInstance()};
   positionTest(TopEdge.getInstance(), expectedDirections);
 }
Exemplo n.º 6
0
 @Test
 public void bottomRightCornerTest() {
   Direction[] expectedDirections = {Up.getInstance(), Left.getInstance()};
   positionTest(BottomRightCorner.getInstance(), expectedDirections);
 }
Exemplo n.º 7
0
 @Test
 public void bottomEdgeTest() {
   Direction[] expectedDirections = {Up.getInstance(), Left.getInstance(), Right.getInstance()};
   positionTest(BottomEdge.getInstance(), expectedDirections);
 }