Exemplo n.º 1
0
        public void CanChangeOrientationToRightFacingSouth()
        {
            //  arrange
            const int x = 1;
            const int y = 2;
            const CardinalDirection cardinalDirection = CardinalDirection.South;
            var rover = new Rover(x, y, cardinalDirection);

            //  act
            rover.ChangeOrientation(Orientation.Right);

            //  assert
            Assert.AreEqual(CardinalDirection.West, rover.Position.CardinalDirection);
        }
Exemplo n.º 2
0
        public void CanChangeOrientationToLeftFacingEast()
        {
            //  arrange
            const int x = 1;
            const int y = 2;
            const CardinalDirection cardinalDirection = CardinalDirection.East;
            var rover = new Rover(x, y, cardinalDirection);

            //  act
            rover.ChangeOrientation(Orientation.Left);

            //  assert
            Assert.AreEqual(CardinalDirection.North, rover.Position.CardinalDirection);
        }