protected void TestCodeRefactoring(string markupCode, string expected, int refactoringIndex = 0) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); TestCodeRefactoring(document, expected, locator, refactoringIndex); }
protected void TestNoCodeRefactoring(string markupCode) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); TestNoCodeRefactoring(document, locator); }
protected void TestCodeFix(string markupCode, string expected, string diagnosticId, int codeFixIndex = 0) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); TestCodeFix(document, expected, diagnosticId, locator, codeFixIndex); }
protected void NoCodeFix(string markupCode, string diagnosticId) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); NoCodeFix(document, diagnosticId, locator); }
protected void TestCompletion(string markupCode, Action <ImmutableArray <CompletionItem> > assertion, CompletionTrigger?trigger = null) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); VerifyExpectations(document, locator, trigger, assertion); }
protected void TestCodeFix(string markupCode, string expected, DiagnosticDescriptor descriptor, int codeFixIndex = 0) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); var diagnostic = FindOrCreateDiagnosticForDescriptor(document, descriptor, locator); TestCodeFix(document, expected, diagnostic, locator, codeFixIndex); }
protected void NoCodeFix(string markupCode, DiagnosticDescriptor descriptor) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); var diagnostic = FindOrCreateDiagnosticForDescriptor(document, descriptor, locator); NoCodeFix(document, diagnostic, locator); }
protected void TestCompletion(string markupCode, string[] expectedCompletions, CompletionTrigger?trigger = null) { var document = MarkupHelper.GetDocumentFromMarkup(markupCode, LanguageName, References); var locator = MarkupHelper.GetLocator(markupCode); var assertion = CreateAssertionBasedOnExpectedSet(expectedCompletions, locator); VerifyExpectations(document, locator, trigger, assertion); }
protected IDiagnosticLocator GetMarkerLocation(string markupCode) { return(MarkupHelper.GetLocator(markupCode)); }