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(); }
private static void Checkout(string commit) { CheckoutOperation.Checkout(commit); }