Inheritance: ITfsWorkspaceModifier, IDisposable
Ejemplo n.º 1
0
 private void PendChangesToWorkspace(string head, string parent, ITfsWorkspaceModifier workspace)
 {
     using (var tidyWorkspace = new DirectoryTidier(workspace, GetLatestChangeset().GetFullTree()))
     {
         foreach (var change in Repository.GetChangedFiles(parent, head))
         {
             change.Apply(tidyWorkspace);
         }
     }
 }
Ejemplo n.º 2
0
 private void PendChangesToWorkspace(string head, string parent, ITfsWorkspaceModifier workspace)
 {
     using (var tidyWorkspace = new DirectoryTidier(workspace, GetLatestChangeset().GetFullTree()))
     {
         foreach (var change in Repository.GetChangedFiles(parent, head))
         {
             change.Apply(tidyWorkspace);
         }
     }
 }
Ejemplo n.º 3
0
        public void TidyThrowsWhenMultipleOperationsOnTheSameFileOccur()
        {
            var workspace = mocks.StrictMock<ITfsWorkspaceModifier>();
            ITfsWorkspaceModifier tidy = new DirectoryTidier(workspace, Enumerable.Empty<TfsTreeEntry>);

            tidy.Delete("file.txt");
            Assert.Throws<ArgumentException>(() =>
                tidy.Add("FILE.TXT"));
            Assert.Throws<ArgumentException>(() =>
                tidy.Delete("File.TXT"));
            Assert.Throws<ArgumentException>(() =>
                tidy.Edit("File.txt"));
            Assert.Throws<ArgumentException>(() =>
                tidy.Rename("File.txt", "renamed.txt", ScoreIsIrrelevant));
            Assert.Throws<ArgumentException>(() =>
                tidy.Rename("oldFile.txt", "File.txt", ScoreIsIrrelevant));
        }