private static void InitializeServices() { IKernel kernel = new StandardKernel(new NinjectComposer()); _parseInputsService = kernel.Get <ParseInputsService>(); _processRobotMovementService = kernel.Get <RobotMovementService>(); }
public void Initialization() { _instructionFactory = new Mock <IInstructionFactory>(); _parseInputsService = new ParseInputsService(_instructionFactory.Object); _instructionFactory.Setup(f => f.CreateInstruction('L')).Returns(new RotateLeftInstruction()); _instructionFactory.Setup(f => f.CreateInstruction('R')).Returns(new RotateRightInstruction()); _instructionFactory.Setup(f => f.CreateInstruction('F')).Returns(new GoForwardInstruction()); }
public MartianRobotsMainViewModel(IRobotMovementService processRobotMovement, IParseInputsService parseInputsService) { _processRobotMovement = processRobotMovement; _parseInputsService = parseInputsService; InitializeCommands(); PlainInput = new RawInput(); InputRobots = new ObservableCollection <Robot>(); RobotsProcessedOutputs = new ObservableCollection <RobotOutput>(); RobotId = 0; OrientationType = OrientationTypes.N; LogMessages = _parseInputsService.ParseMessages; }