private bool ExecuteInternal(char character, IRobotWars robot, IValidateCommand validation) { if (validation.IsMoveCommand(character.ToString(CultureInfo.InvariantCulture))) { ICommand command = new MoveCommand(); command.Execute(character, robot); } else { ICommand command = new SpinCommand(); command.Execute(character, robot); } return(true); }
public void Execute_RobotSupplied_SpinLeftCalledOnRobot() { command.Execute('L', robotStub); robotStub.AssertWasCalled(s => s.Spin(false), o => o.Repeat.Once()); }