Beispiel #1
0
        /// <summary>
        /// Returns the rover position and heading in string format
        /// </summary>
        /// <param name="rover"></param>
        /// <returns></returns>
        private string GetRoverPositionAndHeadingString(IRover rover)
        {
            var position = _roverService.GetRoverPosition(rover);
            var heading  = _roverService.GetRoverHeading(rover);

            return($"{position.X} {position.Y} {heading.ToString().First()}");
        }
Beispiel #2
0
        public void SetGetRoverHeading()
        {
            // Arrange
            var expected = Heading.West;

            _service.SetRoverHeading(_rover, expected);

            // Act
            var actual = _service.GetRoverHeading(_rover);

            // Assert
            Assert.IsTrue(actual == expected);
        }