Ejemplo n.º 1
0
 public void OneLeftFromEast()
 {
     LeftTurn leftTurn = new LeftTurn();
     Direction direction = Direction.E;
     Point location = new Point(0, 0);
     leftTurn.ExecuteMove(ref direction, ref location);
     Assert.AreEqual(Direction.N, direction);
     Assert.AreEqual(new Point(0, 0), location);
 }
Ejemplo n.º 2
0
 public void FourLeftFromSouth()
 {
     LeftTurn leftTurn = new LeftTurn();
     Direction direction = Direction.S;
     Point location = new Point(0, 0);
     leftTurn.ExecuteMove(ref direction, ref location);
     leftTurn.ExecuteMove(ref direction, ref location);
     leftTurn.ExecuteMove(ref direction, ref location);
     leftTurn.ExecuteMove(ref direction, ref location);
     Assert.AreEqual(Direction.S, direction);
     Assert.AreEqual(new Point(0, 0), location);
 }
Ejemplo n.º 3
0
 public void ThreeLeftFromNorth()
 {
     LeftTurn leftTurn = new LeftTurn();
     Direction direction = Direction.N;
     Point location = new Point(0, 0);
     leftTurn.ExecuteMove(ref direction, ref location);
     leftTurn.ExecuteMove(ref direction, ref location);
     leftTurn.ExecuteMove(ref direction, ref location);
     Assert.AreEqual(Direction.E, direction);
     Assert.AreEqual(new Point(0, 0), location);
 }