Example #1
0
 public void TestCoordinateStepsWestDecreasesX()
 {
     var start = new Coordinate { X = 10, Y = 10 };
     start.OneStep(CardinalDirection.West);
     RobotAssert.AreEqual(start, 9, 10);
 }
Example #2
0
 public void TestCoordinateStepsNorthIncreasesY()
 {
     var start = new Coordinate { X = 10, Y = 10 };
     start.OneStep(CardinalDirection.North);
     RobotAssert.AreEqual(start, 10, 11);
 }
Example #3
0
 public void TestCoordinateStepsSouthDecreasesY()
 {
     var start = new Coordinate { X = 10, Y = 10 };
     start.OneStep(CardinalDirection.South);
     RobotAssert.AreEqual(start, 10, 9);
 }
Example #4
0
 /// <summary>
 /// Compare the X and Y value of a Coordinate with two integers
 /// </summary>
 /// <param name="a"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 public static void AreEqual(Coordinate a, int x, int y)
 {
     Assert.AreEqual(a.X, x);
     Assert.AreEqual(a.Y, y);
 }