void (String fileName, String lookupObject, boolean testExternal, boolean testForElementUnderCaret, String... additional) { copyAdditionalFiles(additional); final DocumentationTestContext context = new DocumentationTestContext(fileName); if (testForElementUnderCaret) { assertNotNull("inline help for " + fileName, context.generateDoc()); if (testExternal) { assertNotNull("external help", context.documentationProvider.getUrlFor(context.element, context.originalElement)); } } if (lookupObject != null) { PsiElement docElement = context.documentationProvider.getDocumentationElementForLookupItem( context.psiFile.getManager(), lookupObject, context.originalElement); assertNotNull("no element for " + fileName, docElement); assertNotNull("inline help for lookup", context.documentationProvider.generateDoc(docElement, context.originalElement)); if (testExternal) { assertNotNull("external help for lookup", context.documentationProvider.getUrlFor(docElement, context.originalElement)); } } }