示例#1
0
        public void ActOn_AnySpinCommands(Direction startingDirection,
                                          Direction expectedDirection, params char[] commands)
        {
            marsRover = new MarsRover(1, 1, startingDirection);

            marsRover.Commands(commands);

            Assert.AreEqual(expectedDirection, marsRover.FacingDirection);
        }
示例#2
0
        public void ActOn_AnyMovementCommands(int startingX, int startingY, Direction startingDirection,
                                              int expectedX, int expectedY, params char[] commands)
        {
            marsRover = new MarsRover(startingX, startingY, startingDirection);

            marsRover.Commands(commands);

            Assert.AreEqual(expectedX, marsRover.X);
            Assert.AreEqual(expectedY, marsRover.Y);
        }