public void WhenAdvanceIsCalled_ThenOriginalDirectionIsReturned() { var originalDirection = CardinalPoint.S; var advanceHandler = new AdvanceMovementHandler(); var currenPosition = new Position(new Coordinates { X = 5, Y = 3 }, originalDirection); var newPosition = advanceHandler.HandleMovement(currenPosition, Movement.M); newPosition.Direction.ShouldBeEquivalentTo(originalDirection); }
public void GivenWestDirection_WhenAdvanceIsCalled_ThenRobotGoesLeft() { var advancehandler = new AdvanceMovementHandler(); var currenPosition = new Position(new Coordinates { Y = 10, X = 20 }, CardinalPoint.W); var newPosition = advancehandler.HandleMovement(currenPosition, Movement.M); newPosition.Coordinates.ShouldBeEquivalentTo(new Coordinates { Y = 10, X = 19 }); }