Exemple #1
0
 public void Commit_WLockExists_GetTimeoutException()
 {
     HgRunner.TimeoutSecondsOverrideForUnitTests = 1;
     using (var setup = new HgTestSetup())
         using (setup.GetWLock())
         {
             Assert.Throws <TimeoutException>(() => setup.Repository.Commit(false, "test"));
         }
 }
Exemple #2
0
 public void AddAndCheckinFile_WLockExists_GetTimeoutException()
 {
     HgRunner.TimeoutSecondsOverrideForUnitTests = 1;
     using (var setup = new HgTestSetup())
         using (setup.GetWLock())
         {
             Assert.Throws <TimeoutException>(() =>
                                              setup.Repository.AddAndCheckinFile(setup.Root.GetNewTempFile(true).Path));
         }
 }
Exemple #3
0
 public void AddAndCheckinFile_WLockExists_GetTimeoutException()
 {
     HgRunner.TimeoutSecondsOverrideForUnitTests = 1;
     using (var setup = new HgTestSetup())
     using (setup.GetWLock())
     {
         Assert.Throws<TimeoutException>(() =>
             setup.Repository.AddAndCheckinFile(setup.Root.GetNewTempFile(true).Path));
     }
 }
Exemple #4
0
 public void Pull_FileIsLocked_GetTimeoutException()
 {
     HgRunner.TimeoutSecondsOverrideForUnitTests = 1;
     using (var setup = new HgTestSetup())
         using (setup.GetWLock())
         {
             var path = setup.Root.GetNewTempFile(true).Path;
             setup.Repository.AddAndCheckinFile(path);
             using (new StreamWriter(path))
             {
                 Assert.Throws <TimeoutException>(() => setup.Repository.Update());
             }
         }
 }
Exemple #5
0
 public void Pull_FileIsLocked_GetTimeoutException()
 {
     HgRunner.TimeoutSecondsOverrideForUnitTests = 1;
     using (var setup = new HgTestSetup())
     using (setup.GetWLock())
     {
         var path = setup.Root.GetNewTempFile(true).Path;
         setup.Repository.AddAndCheckinFile(path);
         using (new StreamWriter(path))
         {
            Assert.Throws<TimeoutException>(() => setup.Repository.Update());
         }
     }
 }
Exemple #6
0
 public void Commit_WLockExists_GetTimeoutException()
 {
     HgRunner.TimeoutSecondsOverrideForUnitTests = 1;
     using (var setup = new HgTestSetup())
     using (setup.GetWLock())
     {
        Assert.Throws<TimeoutException>(() => setup.Repository.Commit(false, "test"));
     }
 }