Exemple #1
0
        public void MovesBackFromDirectionFacing(string facing, int[] endPosition)
        {
            Rover rover = new Rover(facing, 5, 5);

            rover.Go("B");
            CollectionAssert.AreEqual(endPosition, rover.Position);
        }
Exemple #2
0
        public void TurnsLeftAntiClockwise(string startFacing, string endFacing)
        {
            Rover rover = new Rover(startFacing, 0, 0);

            rover.Go("L");
            Assert.AreEqual(endFacing, rover.Facing);
        }
Exemple #3
0
        public void ExecutesSequenceOfInstructions()
        {
            Rover rover = new Rover("N", 5, 5);

            rover.Go("RFF");
            Assert.AreEqual("E", rover.Facing);
            CollectionAssert.AreEqual(new [] { 7, 5 }, rover.Position);
        }