示例#1
0
 public void CloneProjectWithChangesets()
 {
     h.SetupFake(r =>
     {
         r.Changeset(1, "Project created from template", DateTime.Parse("2012-01-01 12:12:12 -05:00"))
         .Change(TfsChangeType.Add, TfsItemType.Folder, "$/MyProject");
         r.Changeset(2, "First commit", DateTime.Parse("2012-01-02 12:12:12 -05:00"))
         .Change(TfsChangeType.Add, TfsItemType.Folder, "$/MyProject/Folder")
         .Change(TfsChangeType.Add, TfsItemType.File, "$/MyProject/Folder/File.txt", "File contents")
         .Change(TfsChangeType.Add, TfsItemType.File, "$/MyProject/README", "tldr");
     });
     h.Run("clone", h.TfsUrl, "$/MyProject");
     h.AssertCommitMessage("MyProject", "HEAD", "First commit", "", "git-tfs-id: [" + h.TfsUrl + "]$/MyProject;C2");
     h.AssertFileInWorkspace("MyProject", "Folder/File.txt", "File contents");
     h.AssertFileInWorkspace("MyProject", "README", "tldr");
     AssertNewClone("MyProject", RefsInNewClone,
                    commit: "d64d883266eca65bede947c79529318718a0d8eb",
                    tree: "41ab05d8f2a0f7f7f3a39c623e94fee68f64797e");
 }