private void TestCodeFix(Document document, string expected, Diagnostic diagnostic, IDiagnosticLocator locator, int codeFixIndex = 0)
        {
            var codeFixes = GetCodeFixes(document, diagnostic);

            if (codeFixes.Length < codeFixIndex + 1)
            {
                throw RoslynTestKitException.CodeFixNotFound(codeFixIndex, codeFixes, locator);
            }
            Verify.CodeAction(codeFixes[codeFixIndex], document, expected);
        }
        private void TestCodeFix(Document document, string expected, Diagnostic diagnostic, IDiagnosticLocator locator, ICodeActionSelector codeActionSelector)
        {
            var codeFixes  = GetCodeFixes(document, diagnostic);
            var codeAction = codeActionSelector.Find(codeFixes);

            if (codeAction is null)
            {
                throw RoslynTestKitException.CodeFixNotFound(codeActionSelector, codeFixes, locator);
            }
            Verify.CodeAction(codeAction, document, expected);
        }