예제 #1
0
 public void ChecoutBranchTest()
 {
     dataProvider.Setup(d => d.GetOid("dev")).Returns("dev-oid");
     commitOperation.Setup(c => c.GetCommit("dev-oid")).Returns(new Commit
     {
         Tree = "dev-tree-oid"
     });
     treeOperation.Setup(t => t.ReadTree("dev-tree-oid", true));
     branchOperation.Setup(b => b.IsBranch("dev")).Returns(true);
     this.dataProvider.Setup(d => d.UpdateRef("HEAD", It.Is <RefValue>(r => r.Symbolic && r.Value == Path.Join("refs", "heads", "dev")), false));
     checkoutOperation.Checkout("dev");
     dataProvider.VerifyAll();
     commitOperation.VerifyAll();
     branchOperation.VerifyAll();
     treeOperation.VerifyAll();
 }
예제 #2
0
파일: Program.cs 프로젝트: gaufung/ugit
 private static void Checkout(string commit)
 {
     CheckoutOperation.Checkout(commit);
 }