Example #1
0
        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);
 }