Exemplo n.º 1
0
        public void MoveRover_Should_Move_To_Given_Position()
        {
            //arrangeLMLMLMLMM
            var rover = new Rover(1, 2, _plateau);

            rover.UpdateOrientation(new NOrientation());
            rover.UpdateInstructions(new List <IInstruction>()
            {
                new TurnLeftInstruction(),
                new MoveTowardsInstruction(),
                new TurnLeftInstruction(),
                new MoveTowardsInstruction(),
                new TurnLeftInstruction(),
                new MoveTowardsInstruction(),
                new TurnLeftInstruction(),
                new MoveTowardsInstruction(),
                new MoveTowardsInstruction()
            });
            //act
            rover.MoveRover();
            //assert
            Assert.Equal("1 3 N", rover.ExposeData());
        }