assertNotNull(docElement);
assertDocumentation(docElement, context);
}
private void assertDocumentation(@NotNull PsiElement docElement, @NotNull PsiElement context) {
DocumentationProvider documentationProvider = DocumentationManager.getProviderFromElement(docElement);
String inlineDoc = documentationProvider.generateDoc(docElement, context);
assertNotNull("inline help is null", inlineDoc);
List<String> urlFor = documentationProvider.getUrlFor(docElement, context);
assertNotNull("external help is null", urlFor);
assertSameLinesWithFile(getTestDataPath() + "/" + getTestName(true) + ".txt", inlineDoc + "\n---\n" + StringUtil.join(urlFor, "\n"));
}