private void CallbackSchedulesBackgroundTask( MockBackgroundFileSystemTaskRunner backgroundTaskRunner, Action <string> callback, string path, FileSystemTask.OperationType operationType) { callback(path); backgroundTaskRunner.Count.ShouldEqual(1); backgroundTaskRunner.BackgroundTasks[0].Operation.ShouldEqual(operationType); backgroundTaskRunner.BackgroundTasks[0].VirtualPath.ShouldEqual(path); backgroundTaskRunner.BackgroundTasks.Clear(); }
private void ValidateActionInvalidatesStatusCache( MockBackgroundFileSystemTaskRunner backgroundTaskRunner, MockGitStatusCache gitStatusCache, Action <string> action, string path, FileSystemTask.OperationType operationType) { action(path); backgroundTaskRunner.Count.ShouldEqual(1); backgroundTaskRunner.BackgroundTasks[0].Operation.ShouldEqual(operationType); backgroundTaskRunner.BackgroundTasks[0].VirtualPath.ShouldEqual(path); backgroundTaskRunner.ProcessTasks(); gitStatusCache.InvalidateCallCount.ShouldEqual(1); gitStatusCache.ResetCalls(); backgroundTaskRunner.BackgroundTasks.Clear(); }
public void BackgroundTaskShouldBeScheduled(string expectedPath, FileSystemTask.OperationType expectedOperationType) { this.BackgroundTaskRunner.Count.ShouldEqual(1); this.BackgroundTaskRunner.BackgroundTasks[0].Operation.ShouldEqual(expectedOperationType); this.BackgroundTaskRunner.BackgroundTasks[0].VirtualPath.ShouldEqual(expectedPath); }