コード例 #1
0
        public RobotInputProcessorTests()
        {
            _commandProcessor = new Mock <IRobotCommandProcessor>();
            _commandParser    = new Mock <IRobotCommandParser>();

            _processor = new RobotInputProcessor(_commandProcessor.Object, _commandParser.Object);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            IRobotInputProcessor inputProcessor = new RobotInputProcessor();
            var input           = inputProcessor.TakeAndProcessInput(Console.ReadLine);
            var positionContext = new RobotPositioningContext();
            var robot           = new Robot(input, positionContext);

            robot.Run();
            Console.WriteLine(robot.Report());
        }