示例#1
0
        public void CommitWithMergeHasCommitFileAndMergeFile()
        {
            using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
                using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
                {
                    bob.ReplaceSomething("bobWasHere");
                    bob.AddAndCheckIn();
                    sally.ReplaceSomething("sallyWasHere");

                    var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
                    CheckNoFilesExist(syncAdjunct);

                    var options = new SyncOptions
                    {
                        DoMergeWithOthers = true,
                        DoPullFromOthers  = true,
                        DoSendToOthers    = true
                    };
                    options.RepositorySourcesToTry.Add(bob.RepoPath);
                    var synchronizer = sally.Synchronizer;
                    synchronizer.SynchronizerAdjunct = syncAdjunct;

                    var syncResults = sally.SyncWithOptions(options, synchronizer);
                    Assert.That(syncResults.DidGetChangesFromOthers, Is.True);
                    CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, true, true, true);
                }
        }
示例#2
0
 public void SendReceiveWithTrivialMergeCallsSimpleUpdate()
 {
     using (var alistair = RepositoryWithFilesSetup.CreateWithLiftFile("alistair"))
         using (var susanna = RepositoryWithFilesSetup.CreateByCloning("suzy", alistair))
         {
             var syncAdjunct = new FileWriterSychronizerAdjunct(susanna.RootFolder.Path);
             CheckNoFilesExist(syncAdjunct);
             var options = new SyncOptions
             {
                 DoMergeWithOthers = true,
                 DoPullFromOthers  = true,
                 DoSendToOthers    = true
             };
             var bobOptions = new SyncOptions
             {
                 DoMergeWithOthers      = true,
                 DoPullFromOthers       = true,
                 DoSendToOthers         = true,
                 RepositorySourcesToTry = { alistair.RepoPath }
             };
             var synchronizer = susanna.Synchronizer;
             synchronizer.SynchronizerAdjunct = syncAdjunct;
             alistair.ReplaceSomething("nice.");
             alistair.SyncWithOptions(options);
             susanna.ReplaceSomethingElse("no problems.");
             var syncResults = susanna.SyncWithOptions(bobOptions, synchronizer);
             Assert.That(syncResults.DidGetChangesFromOthers, Is.True);
             CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, true, true, true);
         }
 }
示例#3
0
        public void TheyMadeChanges_WeDidNothing_Fires_SimpleUpdate_WithFalse()
        {
            // 1. Simple pull got new stuff, while we changed nothing
            //		UpdateToTheDescendantRevision repository.Update(); //update to the tip (line 556)
            //		Expected files to exist: CommitPathname and PullPathname, but not RollbackPathname or MergePathname.
            using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
                using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
                {
                    bob.ReplaceSomething("bobWasHere");
                    bob.AddAndCheckIn();

                    var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
                    CheckNoFilesExist(syncAdjunct);

                    var options = new SyncOptions
                    {
                        DoMergeWithOthers = true,
                        DoPullFromOthers  = true,
                        DoSendToOthers    = true
                    };
                    options.RepositorySourcesToTry.Add(bob.RepoPath);
                    var synchronizer = sally.Synchronizer;
                    synchronizer.SynchronizerAdjunct = syncAdjunct;

                    var syncResults = sally.SyncWithOptions(options, synchronizer);
                    Assert.That(syncResults.DidGetChangesFromOthers, Is.True);
                    CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, false, true, true);
                }
        }
示例#4
0
        public void EachOneChangedOrAddedFileButNotSameFile_HasCommitAndPullAndMergeFilesOnly()
        {
            using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
                using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
                {
                    bob.ReplaceSomething("bobWasHere");
                    bob.AddAndCheckIn();

                    sally.ProjectConfiguration.IncludePatterns.Add("sally.txt");

                    var newFileForSally = TempFile.WithFilename(Path.Combine(sally.ProjectFolder.Path, "sally.txt"));
                    File.WriteAllText(newFileForSally.Path, "Sally's new text.");

                    var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
                    CheckNoFilesExist(syncAdjunct);

                    var options = new SyncOptions
                    {
                        DoMergeWithOthers = true,
                        DoPullFromOthers  = true,
                        DoSendToOthers    = true
                    };
                    options.RepositorySourcesToTry.Add(bob.RepoPath);
                    var synchronizer = sally.Synchronizer;
                    synchronizer.SynchronizerAdjunct = syncAdjunct;

                    var syncResults = sally.SyncWithOptions(options, synchronizer);
                    Assert.That(syncResults.DidGetChangesFromOthers, Is.True);
                    CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, true, true, true);
                }
        }
示例#5
0
        public void CheckBranchesGetsRightNumberOfBranches()
        {
            using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
                using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
                {
                    bob.ReplaceSomething("bobWasHere");
                    bob.Synchronizer.SynchronizerAdjunct = new ProgrammableSynchronizerAdjunct("NOTDEFAULT");
                    bob.AddAndCheckIn();
                    sally.ReplaceSomething("sallyWasHere");

                    var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);

                    var options = new SyncOptions
                    {
                        DoMergeWithOthers = true,
                        DoPullFromOthers  = true,
                        DoSendToOthers    = true
                    };
                    options.RepositorySourcesToTry.Add(bob.RepoPath);
                    var synchronizer = sally.Synchronizer;
                    synchronizer.SynchronizerAdjunct = syncAdjunct;

                    var syncResults = sally.SyncWithOptions(options, synchronizer);
                    Assert.That(syncResults.DidGetChangesFromOthers, Is.True);
                    CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, false, true, true);
                    var lines = File.ReadAllLines(syncAdjunct.CheckRepoBranchesPathName);
                    Assert.AreEqual(lines.Length, 2, "Wrong number of branches on CheckBranches call");
                }
        }
示例#6
0
        public void BothMadeChanges_MergeFailure_Fires_SimpleUpdate_WithTrue()
        {
            // 2. Rollback on merge failure, when we changed stuff.
            //		UpdateToTheDescendantRevision repository.RollbackWorkingDirectoryToRevision(head.Number.LocalRevisionNumber); (line 570)
            //		Expected files to exist: CommitPathname and RollbackPathname, but not PullPathname or MergePathname.
            using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
                using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
                {
                    bob.ReplaceSomething("bobWasHere");
                    bob.AddAndCheckIn();
                    sally.ReplaceSomething("sallyWasHere");

                    var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
                    CheckNoFilesExist(syncAdjunct);

                    var options = new SyncOptions
                    {
                        DoMergeWithOthers = true,
                        DoPullFromOthers  = true,
                        DoSendToOthers    = true
                    };
                    options.RepositorySourcesToTry.Add(bob.RepoPath);
                    var synchronizer = sally.Synchronizer;
                    synchronizer.SynchronizerAdjunct = syncAdjunct;

                    using (new FailureSimulator("SychronizerAdjunct"))
                    {
                        var syncResults = sally.SyncWithOptions(options, synchronizer);
                        Assert.That(syncResults.DidGetChangesFromOthers, Is.True);
                        Assert.That(syncResults.Cancelled, Is.False);
                        Assert.That(syncResults.Succeeded, Is.False);
                        CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, true, false, true, false);
                    }
                }
        }
示例#7
0
        public void OurCommitOnlyFailsCommitCopCheck()
        {
            // 3. Backout after CommitCop bailout.
            //		UpdateToTheDescendantRevision repository.RollbackWorkingDirectoryToRevision(head.Number.LocalRevisionNumber); (line 570)
            //		Expected files to exist: CommitPathname, and RollbackPathname, but not PullPathname or MergePathname.
            using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
            {
                File.WriteAllText(bob.UserFile.Path, "New contents");

                var syncAdjunct = new FileWriterSychronizerAdjunct(bob.RootFolder.Path);
                CheckNoFilesExist(syncAdjunct);

                var options = new SyncOptions
                {
                    DoMergeWithOthers = false,
                    DoPullFromOthers  = false,
                    DoSendToOthers    = false
                };
                var synchronizer = bob.Synchronizer;
                synchronizer.SynchronizerAdjunct = syncAdjunct;

                var syncResults = bob.SyncWithOptions(options, synchronizer);
                Assert.That(syncResults.Cancelled, Is.False);
                Assert.That(syncResults.DidGetChangesFromOthers, Is.False);
                Assert.That(syncResults.Succeeded, Is.False);
                CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, true, false, true, false);
            }
        }
示例#8
0
        private static void CheckExistanceOfAdjunctFiles(FileWriterSychronizerAdjunct syncAdjunct, bool commitFileShouldExist,
                                                         bool pullFileShouldExist, bool rollbackFileShouldExist,
                                                         bool mergeFileShouldExist, bool branchNameFileShouldExist,
                                                         bool branchesFileShouldExist)
        {
            if (commitFileShouldExist)
            {
                Assert.That(syncAdjunct.CommitPathname, Does.Exist, "CommitFile should exist.");
            }
            else
            {
                Assert.That(syncAdjunct.CommitPathname, Does.Not.Exist, "CommitFile should not exist.");
            }

            if (pullFileShouldExist)
            {
                Assert.That(syncAdjunct.PullPathname, Does.Exist, "PullFile should exist.");
            }
            else
            {
                Assert.That(syncAdjunct.PullPathname, Does.Not.Exist, "PullFile should not exist.");
            }

            if (rollbackFileShouldExist)
            {
                Assert.That(syncAdjunct.RollbackPathname, Does.Exist, "RollbackFile should exist.");
            }
            else
            {
                Assert.That(syncAdjunct.RollbackPathname, Does.Not.Exist, "RollbackFile shouldn't exist.");
            }

            if (mergeFileShouldExist)
            {
                Assert.That(syncAdjunct.MergePathname, Does.Exist, "MergeFile should exist.");
            }
            else
            {
                Assert.That(syncAdjunct.MergePathname, Does.Not.Exist, "MergeFile shouldn't exist.");
            }

            if (branchNameFileShouldExist)
            {
                Assert.That(syncAdjunct.BranchNamePathName, Does.Exist, "BranchNameFile should exist.");
            }
            else
            {
                Assert.That(syncAdjunct.BranchNamePathName, Does.Not.Exist, "BranchNameFile shouldn't exist.");
            }

            if (branchesFileShouldExist)
            {
                Assert.That(syncAdjunct.CheckRepoBranchesPathName, Does.Exist, "CheckRepoBranchesFile should exist.");
            }
            else
            {
                Assert.That(syncAdjunct.CheckRepoBranchesPathName, Does.Not.Exist, "CheckRepoBranchesFile shouldn't exist.");
            }
        }
示例#9
0
 private static void CheckNoFilesExist(FileWriterSychronizerAdjunct syncAdjunct)
 {
     Assert.That(syncAdjunct.CommitPathname, Does.Not.Exist);
     Assert.That(syncAdjunct.PullPathname, Does.Not.Exist);
     Assert.That(syncAdjunct.RollbackPathname, Does.Not.Exist);
     Assert.That(syncAdjunct.MergePathname, Does.Not.Exist);
     Assert.That(syncAdjunct.BranchNamePathName, Does.Not.Exist);
     Assert.That(syncAdjunct.CheckRepoBranchesPathName, Does.Not.Exist);
 }
示例#10
0
 private static void CheckNoFilesExist(FileWriterSychronizerAdjunct syncAdjunct)
 {
     Assert.IsFalse(File.Exists(syncAdjunct.CommitPathname));
     Assert.IsFalse(File.Exists(syncAdjunct.PullPathname));
     Assert.IsFalse(File.Exists(syncAdjunct.RollbackPathname));
     Assert.IsFalse(File.Exists(syncAdjunct.MergePathname));
     Assert.IsFalse(File.Exists(syncAdjunct.BranchNamePathName));
     Assert.IsFalse(File.Exists(syncAdjunct.CheckRepoBranchesPathName));
 }
示例#11
0
 public void SendReceiveWithNoRemoteChangesGetsNoFiles()
 {
     using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
     {
         var syncAdjunct = new FileWriterSychronizerAdjunct(bob.RootFolder.Path);
         CheckNoFilesExist(syncAdjunct);
         var options = new SyncOptions
         {
             DoMergeWithOthers = true,
             DoPullFromOthers  = true,
             DoSendToOthers    = true
         };
         var synchronizer = bob.Synchronizer;
         synchronizer.SynchronizerAdjunct = syncAdjunct;
         var syncResults = bob.SyncWithOptions(options, synchronizer);
         Assert.That(syncResults.DidGetChangesFromOthers, Is.False);
         CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, false, false, true, true);
     }
 }
示例#12
0
        public void BasicCommitHasCommitFileButNotMergeFile()
        {
            using (var bob = new RepositorySetup("bob", true))
            {
                var syncAdjunct = new FileWriterSychronizerAdjunct(bob.RootFolder.Path);
                CheckNoFilesExist(syncAdjunct);

                var options = new SyncOptions
                {
                    DoMergeWithOthers = false,
                    DoPullFromOthers  = false,
                    DoSendToOthers    = false
                };
                var synchronizer = bob.CreateSynchronizer();
                synchronizer.SynchronizerAdjunct = syncAdjunct;

                var syncResults = bob.SyncWithOptions(options, synchronizer);
                Assert.That(syncResults.DidGetChangesFromOthers, Is.False);
                CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, false, false, true, false);
            }
        }
		public void SendReceiveWithTrivialMergeCallsSimpleUpdate()
		{
			using (var alistair = RepositoryWithFilesSetup.CreateWithLiftFile("alistair"))
			using (var susanna = RepositoryWithFilesSetup.CreateByCloning("suzy", alistair))
			{
				var syncAdjunct = new FileWriterSychronizerAdjunct(susanna.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);
				var options = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true
				};
				var bobOptions = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true,
					RepositorySourcesToTry = {alistair.RepoPath}
				};
				var synchronizer = susanna.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;
				alistair.ReplaceSomething("nice.");
				alistair.SyncWithOptions(options);
				susanna.ReplaceSomethingElse("no problems.");
				var syncResults = susanna.SyncWithOptions(bobOptions, synchronizer);
				Assert.IsTrue(syncResults.DidGetChangesFromOthers);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, true, true, true);
			}
		}
		public void BasicCommitHasCommitFileButNotMergeFile()
		{
			using (var bob = new RepositorySetup("bob", true))
			{
				var syncAdjunct = new FileWriterSychronizerAdjunct(bob.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);

				var options = new SyncOptions
				{
					DoMergeWithOthers = false,
					DoPullFromOthers = false,
					DoSendToOthers = false
				};
				var synchronizer = bob.CreateSynchronizer();
				synchronizer.SynchronizerAdjunct = syncAdjunct;

				var syncResults = bob.SyncWithOptions(options, synchronizer);
				Assert.IsFalse(syncResults.DidGetChangesFromOthers);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, false, false, true, false);
			}
		}
		public void EachOneChangedOrAddedFileButNotSameFile_HasCommitAndPullAndMergeFilesOnly()
		{
			using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
			using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
			{
				bob.ReplaceSomething("bobWasHere");
				bob.AddAndCheckIn();

				sally.ProjectConfiguration.IncludePatterns.Add("sally.txt");

				var newFileForSally = TempFile.WithFilename(Path.Combine(sally.ProjectFolder.Path, "sally.txt"));
				File.WriteAllText(newFileForSally.Path, "Sally's new text.");

				var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);

				var options = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true
				};
				options.RepositorySourcesToTry.Add(bob.RepoPath);
				var synchronizer = sally.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;

				var syncResults = sally.SyncWithOptions(options, synchronizer);
				Assert.IsTrue(syncResults.DidGetChangesFromOthers);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, true, true, true);
			}
		}
		public void CommitWithMergeHasCommitFileAndMergeFile()
		{
			using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
			using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
			{
				bob.ReplaceSomething("bobWasHere");
				bob.AddAndCheckIn();
				sally.ReplaceSomething("sallyWasHere");

				var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);

				var options = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true
				};
				options.RepositorySourcesToTry.Add(bob.RepoPath);
				var synchronizer = sally.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;

				var syncResults = sally.SyncWithOptions(options, synchronizer);
				Assert.IsTrue(syncResults.DidGetChangesFromOthers);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, true, true, true);
			}
		}
		public void BothMadeChanges_MergeFailure_Fires_SimpleUpdate_WithTrue()
		{
			// 2. Rollback on merge failure, when we changed stuff.
			//		UpdateToTheDescendantRevision repository.RollbackWorkingDirectoryToRevision(head.Number.LocalRevisionNumber); (line 570)
			//		Expected files to exist: CommitPathname and RollbackPathname, but not PullPathname or MergePathname.
			using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
			using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
			{
				bob.ReplaceSomething("bobWasHere");
				bob.AddAndCheckIn();
				sally.ReplaceSomething("sallyWasHere");

				var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);

				var options = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true
				};
				options.RepositorySourcesToTry.Add(bob.RepoPath);
				var synchronizer = sally.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;

				using (new FailureSimulator("SychronizerAdjunct"))
				{
					var syncResults = sally.SyncWithOptions(options, synchronizer);
					Assert.IsTrue(syncResults.DidGetChangesFromOthers);
					Assert.IsFalse(syncResults.Cancelled);
					Assert.IsFalse(syncResults.Succeeded);
					CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, true, false, true, false);
				}
			}
		}
		public void TheyMadeChanges_WeDidNothing_Fires_SimpleUpdate_WithFalse()
		{
			// 1. Simple pull got new stuff, while we changed nothing
			//		UpdateToTheDescendantRevision repository.Update(); //update to the tip (line 556)
			//		Expected files to exist: CommitPathname and PullPathname, but not RollbackPathname or MergePathname.
			using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
			using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
			{
				bob.ReplaceSomething("bobWasHere");
				bob.AddAndCheckIn();

				var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);

				var options = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true
				};
				options.RepositorySourcesToTry.Add(bob.RepoPath);
				var synchronizer = sally.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;

				var syncResults = sally.SyncWithOptions(options, synchronizer);
				Assert.IsTrue(syncResults.DidGetChangesFromOthers);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, false, true, true);
			}
		}
		public void CheckBranchesGetsRightNumberOfBranches()
		{
			using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
			using (var sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob))
			{
				bob.ReplaceSomething("bobWasHere");
				bob.Synchronizer.SynchronizerAdjunct = new ProgrammableSynchronizerAdjunct("NOTDEFAULT");
				bob.AddAndCheckIn();
				sally.ReplaceSomething("sallyWasHere");

				var syncAdjunct = new FileWriterSychronizerAdjunct(sally.RootFolder.Path);

				var options = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true
				};
				options.RepositorySourcesToTry.Add(bob.RepoPath);
				var synchronizer = sally.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;

				var syncResults = sally.SyncWithOptions(options, synchronizer);
				Assert.IsTrue(syncResults.DidGetChangesFromOthers);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, true, false, false, true, true);
				var lines = File.ReadAllLines(syncAdjunct.CheckRepoBranchesPathName);
				Assert.AreEqual(lines.Length, 2, "Wrong number of branches on CheckBranches call");
			}
		}
		public void OurCommitOnlyFailsCommitCopCheck()
		{
			// 3. Backout after CommitCop bailout.
			//		UpdateToTheDescendantRevision repository.RollbackWorkingDirectoryToRevision(head.Number.LocalRevisionNumber); (line 570)
			//		Expected files to exist: CommitPathname, and RollbackPathname, but not PullPathname or MergePathname.
			using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
			{
				File.WriteAllText(bob.UserFile.Path, "New contents");

				var syncAdjunct = new FileWriterSychronizerAdjunct(bob.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);

				var options = new SyncOptions
				{
					DoMergeWithOthers = false,
					DoPullFromOthers = false,
					DoSendToOthers = false
				};
				var synchronizer = bob.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;

				var syncResults = bob.SyncWithOptions(options, synchronizer);
				Assert.IsFalse(syncResults.Cancelled);
				Assert.IsFalse(syncResults.DidGetChangesFromOthers);
				Assert.IsFalse(syncResults.Succeeded);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, true, false, true, false);
			}
		}
		private static void CheckExistanceOfAdjunctFiles(FileWriterSychronizerAdjunct syncAdjunct, bool commitFileShouldExist,
														 bool pullFileShouldExist, bool rollbackFileShouldExist,
														 bool mergeFileShouldExist, bool branchNameFileShouldExist,
														 bool branchesFileShouldExist)
		{
			if (commitFileShouldExist)
				Assert.IsTrue(File.Exists(syncAdjunct.CommitPathname), "CommitFile should exist.");
			else
				Assert.IsFalse(File.Exists(syncAdjunct.CommitPathname), "CommitFile should not exist.");

			if (pullFileShouldExist)
				Assert.IsTrue(File.Exists(syncAdjunct.PullPathname), "PullFile should exist.");
			else
				Assert.IsFalse(File.Exists(syncAdjunct.PullPathname), "PullFile should not exist.");

			if (rollbackFileShouldExist)
				Assert.IsTrue(File.Exists(syncAdjunct.RollbackPathname), "RollbackFile should exist.");
			else
				Assert.IsFalse(File.Exists(syncAdjunct.RollbackPathname), "RollbackFile shouldn't exist.");

			if (mergeFileShouldExist)
				Assert.IsTrue(File.Exists(syncAdjunct.MergePathname), "MergeFile should exist.");
			else
				Assert.IsFalse(File.Exists(syncAdjunct.MergePathname), "MergeFile shouldn't exist.");

			if (branchNameFileShouldExist)
				Assert.IsTrue(File.Exists(syncAdjunct.BranchNamePathName), "BranchNameFile should exist.");
			else
				Assert.IsFalse(File.Exists(syncAdjunct.BranchNamePathName), "BranchNameFile shouldn't exist.");

			if (branchesFileShouldExist)
				Assert.IsTrue(File.Exists(syncAdjunct.CheckRepoBranchesPathName), "CheckRepoBranchesFile should exist.");
			else
				Assert.IsFalse(File.Exists(syncAdjunct.CheckRepoBranchesPathName), "CheckRepoBranchesFile shouldn't exist.");
		}
		private static void CheckNoFilesExist(FileWriterSychronizerAdjunct syncAdjunct)
		{
			Assert.IsFalse(File.Exists(syncAdjunct.CommitPathname));
			Assert.IsFalse(File.Exists(syncAdjunct.PullPathname));
			Assert.IsFalse(File.Exists(syncAdjunct.RollbackPathname));
			Assert.IsFalse(File.Exists(syncAdjunct.MergePathname));
			Assert.IsFalse(File.Exists(syncAdjunct.BranchNamePathName));
			Assert.IsFalse(File.Exists(syncAdjunct.CheckRepoBranchesPathName));
		}
		public void SendReceiveWithNoRemoteChangesGetsNoFiles()
		{
			using (var bob = RepositoryWithFilesSetup.CreateWithLiftFile("bob"))
			{
				var syncAdjunct = new FileWriterSychronizerAdjunct(bob.RootFolder.Path);
				CheckNoFilesExist(syncAdjunct);
				var options = new SyncOptions
				{
					DoMergeWithOthers = true,
					DoPullFromOthers = true,
					DoSendToOthers = true
				};
				var synchronizer = bob.Synchronizer;
				synchronizer.SynchronizerAdjunct = syncAdjunct;
				var syncResults = bob.SyncWithOptions(options, synchronizer);
				Assert.IsFalse(syncResults.DidGetChangesFromOthers);
				CheckExistanceOfAdjunctFiles(syncAdjunct, true, false, false, false, true, true);
			}
		}