예제 #1
0
파일: Program.cs 프로젝트: vbncmx/robots
        private static ICommand ConstructCommand(string instructions)
        {
            ICommand command = new TextCommand(instructions, CommandFactory);

            command = new ReportingCommandDecorator(command, Reporter);

            return(command);
        }
 public void Setup()
 {
     _baseCommandMock = new Mock <ICommand>();
     _reporterMock    = new Mock <IReporter>();
     _gridMock        = new Mock <IGrid>();
     _robotMock       = new Mock <IRobot>();
     _decorator       = new ReportingCommandDecorator(_baseCommandMock.Object, _reporterMock.Object);
 }