Пример #1
0
        public CommandStrategyTests()
        {
            commandExecutor = new List <ICommandExecutor>();
            commandExecutor.Add(new LeftCommandExecutor());
            commandExecutor.Add(new MoveCommandExecutor(new ToyTable(5, 5)));
            var parameterConvertor = new ParameterConvertor();

            commandExecutor.Add(new PlaceCommandExecutor(parameterConvertor, new ToyTable(5, 5)));
            commandExecutor.Add(new RightCommandExecutor());

            sut = new CommandStrategy(commandExecutor);
        }
Пример #2
0
        public RobotControlProcesserTests()
        {
            var commandExecutor = new List <ICommandExecutor>
            {
                new LeftCommandExecutor(),
                new MoveCommandExecutor(new ToyTable(5, 5))
            };
            var parameterConvertor = new ParameterConvertor();

            commandExecutor.Add(new PlaceCommandExecutor(parameterConvertor, new ToyTable(5, 5)));
            commandExecutor.Add(new RightCommandExecutor());

            var CommandStrategy = new CommandStrategy(commandExecutor);

            sut = new RobotControlProcesser(parameterConvertor, CommandStrategy);
        }