public void Doctor_Advice_Make() { Doctor doctor = new Doctor(); DoctorMakeAdvice doctorMakeAdvice = new DoctorMakeAdvice(doctor); CommandInvoker invoker = new CommandInvoker(); invoker.SetCommand(doctorMakeAdvice); invoker.CommandOn(); }
public void MutiCommand_Execute() { Doctor doctor = new Doctor(); DoctorMakeAdvice doctorMakeAdvice = new DoctorMakeAdvice(doctor); Light light = new Light(); LightOnCommand lightOnCommand = new LightOnCommand(light); MultiCommand multiCommand = new MultiCommand(new ICommand[] { doctorMakeAdvice, lightOnCommand }); multiCommand.Execute(); }