public async Task DownloadChangesAsync(Push push, string root, CancellationToken token)
        {
            _push = push;
            _root = root;
            _token = token;

            await DownloadChangesInAllCommitsAsync();
        }
 private static Push CreatePushRequest(Dictionary<string, string> commitIdsAndDates)
 {
     var commits = commitIdsAndDates.Select(c => CreateCommit(c));
     var push = new Push(new Repository(Guid.NewGuid()), commits);
     return push;
 }
        public void InitializeTest()
        {
            pushPassedToSource = null;
            rootPassedToSource = null;
            fakeSourceRepository = new SourceControlSync.Domain.Fakes.StubISourceRepository()
            {
                DownloadChangesAsyncPushStringCancellationToken = (push, root, token) =>
                {
                    token.ThrowIfCancellationRequested();
                    pushPassedToSource = push;
                    rootPassedToSource = root;
                    foreach (var commit in push.Commits)
                    {
                        commit.Changes = Enumerable.Empty<ItemChange>();
                    }
                    return Task.FromResult(0);
                }
            };

            commitsPassedToCalculator = null;
            changesReturnedByCalculator = null;
            fakeChangesCalculator = new SourceControlSync.Domain.Fakes.StubIChangesCalculator()
            {
                CalculateItemChangesIEnumerableOfCommit = (commits) =>
                {
                    commitsPassedToCalculator = commits;
                    changesReturnedByCalculator = commits.SelectMany(commit => commit.Changes).ToList();
                },
                ItemChangesGet = () => { return changesReturnedByCalculator; }
            };

            changesPassedToDestination = null;
            rootPassedToDestination = null;
            fakeDestinationRepository = new SourceControlSync.Domain.Fakes.StubIDestinationRepository()
            {
                PushItemChangesAsyncIEnumerableOfItemChangeString = (changes, root) =>
                {
                    changesPassedToDestination = changes;
                    rootPassedToDestination = root;
                    return Task.FromResult(0);
                },
                ExecutedCommandsGet = () => { return new SourceControlSync.Domain.Fakes.StubIExecutedCommands(); }
            };

            var fakeClock = new SourceControlSync.Domain.Fakes.StubIClock();
            fakeChangesReport = new ChangesReport(fakeClock);
            fakeErrorReport = new ErrorReport(fakeClock);
        }
 private static Push CreatePushRequest(string commitId)
 {
     var push = new Push(
         new Repository(Guid.NewGuid()),
         new Commit[] { new Commit(commitId, new UserDate(DateTime.Now)) }
         );
     return push;
 }