示例#1
0
 public void Push_RemoteOnNewBranch_DoesNotThrow()
 {
     using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Push))
         using (var provider = GetTransportProviderForTest(e))
         {
             e.LocalAddAndCommit();
             e.CloneRemoteFromLocal();
             e.SetRemoteAdjunct(new BranchTestAdjunct()
             {
                 BranchName = "newRemoteBranch"
             });
             e.RemoteAddAndCommit();
             var transport = provider.Transport;
             Assert.That(() => transport.Push(), Throws.Nothing);
         }
 }
示例#2
0
 public void Pull_RemoteOnNewBranch_Success()
 {
     using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Pull))
         using (var provider = GetTransportProviderForTest(e))
         {
             e.LocalAddAndCommit();
             e.CloneRemoteFromLocal();
             e.SetRemoteAdjunct(new BranchTestAdjunct {
                 BranchName = "remoteBranch"
             });
             e.LocalAddAndCommit();
             e.RemoteAddAndCommit();
             var transport = provider.Transport;
             transport.Pull();
             Assert.That(e.Progress.AllMessages, Contains.Item("Pull operation completed successfully"));
         }
 }
示例#3
0
 public void Push_RemoteOnNewBranch_SendsData()
 {
     using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Push))
         using (var provider = GetTransportProviderForTest(e))
         {
             e.LocalAddAndCommit();
             e.CloneRemoteFromLocal();
             e.SetRemoteAdjunct(new BranchTestAdjunct()
             {
                 BranchName = "newRemoteBranch"
             });
             e.RemoteAddAndCommit();
             e.LocalAddAndCommit();
             var transport = provider.Transport;
             Assert.That(() => transport.Push(), Throws.Nothing);
             Assert.That(e.Progress.AllMessages, !Contains.Item("No changes to send.  Push operation completed"));
         }
 }
示例#4
0
 public void Push_RemoteOnNewBranch_SendsData()
 {
     using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Push))
     using (var provider = GetTransportProviderForTest(e))
     {
         e.LocalAddAndCommit();
         e.CloneRemoteFromLocal();
         e.SetRemoteAdjunct(new BranchTestAdjunct() { BranchName = "newRemoteBranch" });
         e.RemoteAddAndCommit();
         e.LocalAddAndCommit();
         var transport = provider.Transport;
         Assert.That(() => transport.Push(), Throws.Nothing);
         Assert.That(e.Progress.AllMessages, !Contains.Item("No changes to send.  Push operation completed"));
     }
 }
示例#5
0
 public void Push_RemoteOnNewBranch_DoesNotThrow()
 {
     using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Push))
     using (var provider = GetTransportProviderForTest(e))
     {
         e.LocalAddAndCommit();
         e.CloneRemoteFromLocal();
         e.SetRemoteAdjunct(new BranchTestAdjunct() { BranchName = "newRemoteBranch"});
         e.RemoteAddAndCommit();
         var transport = provider.Transport;
         Assert.That(() => transport.Push(), Throws.Nothing);
     }
 }
示例#6
0
 public void Pull_RemoteOnNewBranch_Success()
 {
     using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Pull))
     using (var provider = GetTransportProviderForTest(e))
     {
         e.LocalAddAndCommit();
         e.CloneRemoteFromLocal();
         e.SetRemoteAdjunct(new BranchTestAdjunct { BranchName = "remoteBranch" });
         e.LocalAddAndCommit();
         e.RemoteAddAndCommit();
         var transport = provider.Transport;
         transport.Pull();
         Assert.That(e.Progress.AllMessages, Contains.Item("Pull operation completed successfully"));
     }
 }