示例#1
0
 public void InitializesConfig()
 {
     h.SetupFake(r => { });
     h.Run("init", "http://my-tfs.local/tfs", "$/MyProject", "MyProject");
     h.AssertConfig("MyProject", "tfs-remote.default.url", "http://my-tfs.local/tfs");
     h.AssertConfig("MyProject", "tfs-remote.default.repository", "$/MyProject");
 }
示例#2
0
 private void CloneRepoWithTwoCommits()
 {
     integrationHelper.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, "Add Readme", 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");
     });
     integrationHelper.Run("clone", integrationHelper.TfsUrl, "$/MyProject");
     integrationHelper.AssertGitRepo("MyProject");
 }
示例#3
0
 public void ClonesEmptyProject()
 {
     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");
     });
     h.Run("clone", h.TfsUrl, "$/MyProject");
     h.AssertEmptyWorkspace("MyProject");
     AssertNewClone("MyProject", RefsInNewClone,
                    commit: "4053764b2868a2be71ae7f5f113ad84dff8a052a",
                    tree: "4b825dc642cb6eb9a060e54bf8d69288fbee4904");
 }