public void ExecuteTest() { CheckoutDto dto = new CheckoutDto("master"); Checkout target = new Checkout(dto); target.Execute(); Assert.IsTrue(dto.Result.Length > 0, "Git checkout failed"); }
private void Ok_Click(object sender, EventArgs e) { try { CheckoutDto dto = new CheckoutDto(Branches.Text); GitCommands.Checkout commit = new GitCommands.Checkout(dto); commit.Execute(); MessageBox.Show("Command executed \n" + dto.Result, "Checkout"); } catch { } }
private void Ok_Click(object sender, EventArgs e) { try { if (RevisionGrid.GetRevisions().Count != 1) { MessageBox.Show("Select 1 revision to checkout.", "Checkout"); return; } CheckoutDto dto = new CheckoutDto(RevisionGrid.GetRevisions()[0].Guid); GitCommands.Checkout commit = new GitCommands.Checkout(dto); commit.Execute(); MessageBox.Show("Command executed \n" + dto.Result, "Checkout"); } catch { } }