Exemple #1
0
        public void AndTheRoverIsFacingNorthThenTheYDecreasesByOne()
        {
            var rover    = new Rover(0, 0, Direction.North);
            var newRover = RoverCommands.MoveBackward(rover);

            Assert.AreEqual(newRover.X, rover.X);
            Assert.AreEqual(newRover.Y, rover.Y - 1);
            Assert.AreEqual(newRover.Direction, rover.Direction);
        }
Exemple #2
0
        public void AndTheRoverIsFacingWestThenTheXIncreasesByOne()
        {
            var rover    = new Rover(0, 0, Direction.West);
            var newRover = RoverCommands.MoveBackward(rover);

            Assert.AreEqual(newRover.X, rover.X + 1);
            Assert.AreEqual(newRover.Y, rover.Y);
            Assert.AreEqual(newRover.Direction, rover.Direction);
        }