예제 #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"));
         }
 }
예제 #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));
         }
 }
예제 #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));
     }
 }
예제 #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());
             }
         }
 }
예제 #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());
         }
     }
 }
예제 #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"));
     }
 }