private void RunFormTest(Func <FormCommit, Task> testDriverAsync, CommitKind commitKind = CommitKind.Normal)
        {
            UITest.RunForm(
                () =>
            {
                switch (commitKind)
                {
                case CommitKind.Normal:
                    Assert.True(_commands.StartCommitDialog(owner: null));
                    break;

                case CommitKind.Squash:
                    Assert.True(_commands.StartSquashCommitDialog(owner: null, _referenceRepository.Module.GetRevision()));
                    break;

                case CommitKind.Fixup:
                    Assert.True(_commands.StartFixupCommitDialog(owner: null, _referenceRepository.Module.GetRevision()));
                    break;

                default:
                    throw new ArgumentException($"Unsupported commit kind: {commitKind}", nameof(commitKind));
                }
            },
                testDriverAsync);
        }
 private void RunFormTest(Func <FormCommit, Task> testDriverAsync, CommitKind commitKind = CommitKind.Normal)
 {
     UITest.RunForm(
         showForm: () =>
     {
         Assert.True(commitKind switch
         {
             CommitKind.Normal => _commands.StartCommitDialog(owner: null),
             CommitKind.Squash => _commands.StartSquashCommitDialog(owner: null, _referenceRepository.Module.GetRevision()),
             CommitKind.Fixup => _commands.StartFixupCommitDialog(owner: null, _referenceRepository.Module.GetRevision()),
             _ => throw new ArgumentException($"Unsupported commit kind: {commitKind}", nameof(commitKind))
         });
     },