Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public void Execute_RobotSupplied_SpinLeftCalledOnRobot()
 {
     command.Execute('L', robotStub);
     robotStub.AssertWasCalled(s => s.Spin(false), o => o.Repeat.Once());
 }