Details
-
Improvement
-
Resolution: Fixed
-
Major
-
6.4
-
None
-
N/A
-
N/A
-
Description
Example of usage:
@Documented @Retention(RUNTIME) @Target({ TYPE, METHOD, ANNOTATION_TYPE }) @ComponentList({ // Rendering DefaultSyntaxFactory.class, XWikiRenderingContext.class, DefaultTransformationManager.class, DefaultXWikiRenderingConfiguration.class, PlainTextBlockParser.class, DefaultContentParser.class, PlainTextRendererFactory.class, PlainTextBlockRenderer.class, // Transformation MacroTransformation.class, DefaultMacroManager.class, DefaultMacroIdFactory.class, // Properties DefaultBeanManager.class, DefaultConverterManager.class, EnumConverter.class, ConvertUtilsConverter.class, // XWiki 2.0 XWiki20Parser.class, XWiki20LinkReferenceParser.class, XWiki20ImageReferenceParser.class, URLResourceReferenceTypeParser.class, // XHTML 1.0 XHTMLBlockRenderer.class, XHTMLRendererFactory.class, XHTMLRenderer.class, DefaultXHTMLLinkRenderer.class, DefaultXHTMLLinkTypeRenderer.class, DefaultXHTMLImageRenderer.class, DefaultXHTMLImageTypeRenderer.class, // Display ConfiguredDocumentDisplayer.class, DefaultDisplayConfiguration.class, DefaultDocumentDisplayer.class, DocumentTitleDisplayer.class, DocumentContentDisplayer.class, SheetDocumentDisplayer.class, // Sheet DefaultSheetManager.class, DefaultModelBridge.class, DocumentSheetBinder.class, ClassSheetBinder.class, // Model DefaultDocumentAccessBridge.class, // Velocity // DefaultVelocityManager.class, DefaultScriptContextManager.class, DefaultVelocityFactory.class, DefaultVelocityConfiguration.class, DefaultVelocityEngine.class, DefaultVelocityContextFactory.class, // Skin DefaultSkinManager.class, InternalSkinManager.class, InternalSkinConfiguration.class, WikiSkinUtils.class, // Other (not categorized for now) DefaultObservationManager.class, DefaultExecutionContextManager.class, DefaultExecution.class, ScriptExecutionContextInitializer.class, XWikiScriptContextInitializer.class, ServicesScriptContextInitializer.class, DefaultScriptServiceManager.class, // Needed by the test itself VelocityMacro.class, DefaultVelocityMacroConfiguration.class, DefaultMacroContentParser.class, IndentVelocityMacroFilter.class, DefaultContextualLocalizationManager.class, // Needed by XWikiScriptContextInitializer DefaultLocalizationManager.class, DefaultTranslationBundleContext.class, XWikiLocalizationContext.class }) @Inherited public @interface PageComponentList { }
And then (for example):
@PageComponentList @ComponentList({ StubVelocityManager.class }) public class WebRssTest { @Rule public MockitoOldcoreRule oldcore = new MockitoOldcoreRule(); ...
Attachments
Issue Links
- blocks
-
XWIKI-12643 Add a test framework for making it easy to write unit tests for wiki pages
- Closed