public void Push_LocalOnNewBranch_DoesNotThrow() { using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Push)) using (var provider = GetTransportProviderForTest(e)) { e.LocalAddAndCommit(); e.CloneRemoteFromLocal(); e.SetLocalAdjunct(new BranchTestAdjunct() { BranchName = "newLocalBranch" }); e.LocalAddAndCommit(); var transport = provider.Transport; Assert.That(() => transport.Push(), Throws.Nothing); } }
public void Push_OneLocalChangeNothingToPullOn2BranchRemote_Success() { using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Push)) using (var provider = GetTransportProviderForTest(e)) { e.LocalAddAndCommit(); e.SetLocalAdjunct(new BranchTestAdjunct { BranchName = "branch2" }); e.LocalAddAndCommit(); e.CloneRemoteFromLocal(); e.LocalAddAndCommit(); var transport = provider.Transport; transport.Push(); Assert.That(e.Progress.AllMessages, Contains.Item("Finished sending")); } }
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")); } }
public void Push_LocalOnNewBranchRevisionsExceedQuantity_SendsData() { using (var e = new BranchingTestEnvironment("localonnewbranch", ApiServerType.Push)) using (var provider = GetTransportProviderForTest(e)) { e.LocalAddAndCommit(); e.CloneRemoteFromLocal(); e.SetLocalAdjunct(new BranchTestAdjunct() { BranchName = "newLocalBranch" }); 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")); } }
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")); } }
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); } }
public void Push_OneLocalChangeNothingToPullOn2BranchRemote_Success() { using (var e = new BranchingTestEnvironment("hgresumetest", ApiServerType.Push)) using (var provider = GetTransportProviderForTest(e)) { e.LocalAddAndCommit(); e.SetLocalAdjunct(new BranchTestAdjunct { BranchName = "branch2" }); e.LocalAddAndCommit(); e.CloneRemoteFromLocal(); e.LocalAddAndCommit(); var transport = provider.Transport; transport.Push(); Assert.That(e.Progress.AllMessages, Contains.Item("Finished sending")); } }
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")); } }