diff options
author | Jameson Miller <jamill@microsoft.com> | 2013-10-18 21:22:58 +0400 |
---|---|---|
committer | Jameson Miller <jamill@microsoft.com> | 2013-10-18 21:48:44 +0400 |
commit | 981f43909ca79b3b9e5c5a34590d76ecd5c82e3f (patch) | |
tree | 948efcf47ccffb102b6c8e4652c7039e744cb5ce /LibGit2Sharp.Tests | |
parent | 31291febe2322e10059e54c353fffb3ec7fe4c6d (diff) |
Expose Push progress reporting
Diffstat (limited to 'LibGit2Sharp.Tests')
-rw-r--r-- | LibGit2Sharp.Tests/PushFixture.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/LibGit2Sharp.Tests/PushFixture.cs b/LibGit2Sharp.Tests/PushFixture.cs index af26b757..2b836e45 100644 --- a/LibGit2Sharp.Tests/PushFixture.cs +++ b/LibGit2Sharp.Tests/PushFixture.cs @@ -60,9 +60,20 @@ namespace LibGit2Sharp.Tests [Fact] public void CanPushABranchTrackingAnUpstreamBranch() { + bool packBuilderCalled = false; + Handlers.PackBuilderProgressHandler packBuilderCb = (x, y, z) => { packBuilderCalled = true; return false; }; + AssertPush(repo => repo.Network.Push(repo.Head)); AssertPush(repo => repo.Network.Push(repo.Branches["master"])); - AssertPush(repo => repo.Network.Push(repo.Network.Remotes["origin"], "HEAD", @"refs/heads/master", OnPushStatusError)); + + PushOptions options = new PushOptions() + { + OnPushStatusError = OnPushStatusError, + OnPackBuilderProgress = packBuilderCb, + }; + + AssertPush(repo => repo.Network.Push(repo.Network.Remotes["origin"], "HEAD", @"refs/heads/master", options)); + Assert.True(packBuilderCalled); } [Fact] |