예제 #1
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");
 }
예제 #2
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.AssertGitRepo("MyProject");
            const string expectedSha = "4053764b2868a2be71ae7f5f113ad84dff8a052a";

            h.AssertRef("MyProject", "HEAD", expectedSha);
            h.AssertRef("MyProject", "master", expectedSha);
            h.AssertRef("MyProject", "refs/remotes/tfs/default", expectedSha);
            h.AssertEmptyWorkspace("MyProject");
        }