Ejemplo n.º 1
0
        private CompassPoint ParseCompassPoint(string stringCompassPoint)
        {
            CompassPoint givenDirection;

            Assert.That(CompassPoint.TryParse(stringCompassPoint, false, out givenDirection), Is.Not.False);

            return(givenDirection);
        }
Ejemplo n.º 2
0
        public void When_reports_Direction_then_Direction_matches_initialDirection(string direction)
        {
            var map   = new Map(10, 10);
            var rover = new Rover();

            CompassPoint givenDirection;

            Assert.That(CompassPoint.TryParse(direction, false, out givenDirection), Is.Not.False);

            rover.Land(map, 0, 0, givenDirection);

            Assert.That(rover.Direction, Is.EqualTo(givenDirection));
        }