ComponentManagerRule instead@Deprecated public abstract class AbstractComponentTestCase extends AbstractMockingTestCase
XWiki 2.2M1 also introduced AbstractMockingComponentTestCase which provides automatic mocking for injected
component dependencies and which is thus better when writing pure unit tests, isolated from the rest.
Consider using this class only for integration tests.
mockery| Constructor and Description |
|---|
AbstractComponentTestCase()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
MockingComponentManager |
getComponentManager()
Deprecated.
|
org.xwiki.test.internal.MockConfigurationSource |
getConfigurationSource()
Deprecated.
|
void |
registerComponent(Class<?> componentClass)
Deprecated.
|
protected void |
registerComponents()
Deprecated.
Register custom/mock components
|
void |
setUp()
Deprecated.
Tests that require fine-grained initializations can override this method and not call super.
|
void |
tearDown()
Deprecated.
Clean up test states.
|
getMockery, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponentpublic void setUp()
throws Exception
Exceptionpublic void tearDown()
throws Exception
Exceptionprotected void registerComponents()
throws Exception
Exceptionpublic MockingComponentManager getComponentManager() throws Exception
getComponentManager in class AbstractMockingTestCaseExceptionpublic org.xwiki.test.internal.MockConfigurationSource getConfigurationSource()
Copyright © 2004–2014 XWiki. All rights reserved.