示例#1
0
        public void Move(MoveInstructions input, int position)
        {
            var instruction = new Instruction(_pluto, _rover, input.ToString());

            _movementOperation.Execute(instruction);
            _rover.PosX.Should().Be(0);
            _rover.PosY.Should().Be(position);
        }
示例#2
0
        public void TurnAndMove(TurnInstructions turnInstruction, MoveInstructions moveInstruction, int yPosition, int xPosition)
        {
            var firstInstruction  = new Instruction(_pluto, _rover, turnInstruction.ToString());
            var secondInstruction = new Instruction(_pluto, _rover, moveInstruction.ToString());

            _turnOperation.Execute(firstInstruction);
            _movementOperation.Execute(secondInstruction);
            _rover.PosY.Should().Be(yPosition);
            _rover.PosX.Should().Be(xPosition);
        }