Esempio n. 1
0
        public void TurnLeft(string start, string end)
        {
            var before   = DirectionsList.GetByCode(start);
            var expected = DirectionsList.GetByCode(end);

            var actual = before.TurnLeft();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void Create_VerifyObjectConfiguration()
        {
            int    initialPositionX = 1;
            int    initialPositionY = 2;
            string initialDirection = "N";
            var    obstacleDetector = ObstacleDetector.Create(new List <Coordinates>());

            var initialPosition = Coordinates.Create(initialPositionX, initialPositionY);
            var direction       = DirectionsList.GetByCode(initialDirection);

            var rover = Rover.Create(initialPositionX, initialPositionY, initialDirection, obstacleDetector);

            Assert.AreEqual(direction, rover.Direction);
            Assert.AreEqual(initialPosition, rover.Position);
        }