private ComponentRefreshTrigger CreateTestComponentRefreshTrigger(Action <Request> onUpdateBuffer = null) { onUpdateBuffer = onUpdateBuffer ?? ((_) => { }); var testUpdateBufferDispatcher = new TestUpdateBufferDispatcher(onUpdateBuffer); return(new ComponentRefreshTrigger(Dispatcher, new FilePathNormalizer(), ProjectInstanceEvaluator, testUpdateBufferDispatcher, LoggerFactory) { EnqueueDelay = 1, NotifyRefreshWorkStarting = new ManualResetEventSlim(initialState: false), NotifyRefreshWorkCompleting = new ManualResetEventSlim(initialState: false), }); }
private ComponentRefreshTrigger CreateTestComponentRefreshTrigger(Action <Request> onUpdateBuffer = null) { onUpdateBuffer = onUpdateBuffer ?? ((_) => { }); var testUpdateBufferDispatcher = new TestUpdateBufferDispatcher(onUpdateBuffer); var projectInstanceEvaluator = new Mock <ProjectInstanceEvaluator>(); projectInstanceEvaluator.Setup(instance => instance.Evaluate(It.IsAny <ProjectInstance>())) .Returns <ProjectInstance>(pi => pi); return(new ComponentRefreshTrigger(Dispatcher, new FilePathNormalizer(), projectInstanceEvaluator.Object, testUpdateBufferDispatcher, LoggerFactory) { EnqueueDelay = 1, NotifyRefreshWorkStarting = new ManualResetEventSlim(initialState: false), NotifyRefreshWorkCompleting = new ManualResetEventSlim(initialState: false), }); }