public void SetUp() { _eventScheduler = new EventSchedulerFake(); var eventSchedulerFactory = Substitute.For <IEventSchedulerFactory>(); eventSchedulerFactory.Create( Arg.Do <System.Action>(a => _eventScheduler.Callback = a)).Returns(_eventScheduler); _timer = new TimerFake(); _currentTimestamp = 0; _batchEventAggregator = new BatchEventAggregator <DebugEventBatch, DebugEventBatchParams, DebugEventBatchSummary>(_timeout, eventSchedulerFactory, _timer); }
public void SetUp() { _mockDebuggerStackFrame = Substitute.For <RemoteFrame>(); var childAdapterFactory = new RemoteValueChildAdapter.Factory(); var varInfoFactory = new LLDBVariableInformationFactory(childAdapterFactory); _vsExpressionCreator = new VsExpressionCreator(); _metrics = Substitute.For <IMetrics>(); var eventScheduler = new EventSchedulerFake(); var eventSchedulerFactory = Substitute.For <IEventSchedulerFactory>(); eventSchedulerFactory.Create(Arg.Do <System.Action>(a => eventScheduler.Callback = a)) .Returns(eventScheduler); var timer = new TimerFake(); const int minimumBatchSeparationMilliseconds = 1; var batchEventAggregator = new BatchEventAggregator <ExpressionEvaluationBatch, ExpressionEvaluationBatchParams, ExpressionEvaluationBatchSummary>(minimumBatchSeparationMilliseconds, eventSchedulerFactory, timer); _expressionEvaluationRecorder = new ExpressionEvaluationRecorder(batchEventAggregator, _metrics); _timeSource = new MonotonicTimeSource(); _taskExecutor = Substitute.ForPartsOf <FakeTaskExecutor>(); var enumFactory = new VariableInformationEnum.Factory(_taskExecutor); var childrenProviderFactory = new ChildrenProvider.Factory(); var debugPropertyFactory = new DebugProperty.Factory( enumFactory, childrenProviderFactory, null, _vsExpressionCreator, _taskExecutor); _createPropertyDelegate = debugPropertyFactory.Create; childrenProviderFactory.Initialize(_createPropertyDelegate); _varInfoBuilder = new VarInfoBuilder(varInfoFactory); varInfoFactory.SetVarInfoBuilder(_varInfoBuilder); _engineCommandsMock = Substitute.For <IDebugEngineCommands>(); _mockDebugEngineHandler = Substitute.For <IDebugEngineHandler>(); _mockProgram = Substitute.For <IGgpDebugProgram>(); _mockThread = Substitute.For <IDebugThread2>(); }
public void SetUp() { _metrics = Substitute.For <IMetrics>(); _eventScheduler = new EventSchedulerFake(); var eventSchedulerFactory = Substitute.For <IEventSchedulerFactory>(); eventSchedulerFactory.Create(Arg.Do <System.Action>(a => _eventScheduler.Callback = a)) .Returns(_eventScheduler); _timer = new TimerFake(); _timeSource = new MonotonicTimeSource(); _batchEventAggregator = new BatchEventAggregator <ExpressionEvaluationBatch, ExpressionEvaluationBatchParams, ExpressionEvaluationBatchSummary>(_minimumBatchSeparationMilliseconds, eventSchedulerFactory, _timer); _expressionEvaluationRecorder = new ExpressionEvaluationRecorder(_batchEventAggregator, _metrics); }