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, registerMockComponent
public void setUp() throws Exception
Exception
- in case of errorspublic void tearDown() throws Exception
Exception
- in case of errorsprotected void registerComponents() throws Exception
Exception
- in case of errorspublic MockingComponentManager getComponentManager() throws Exception
getComponentManager
in class AbstractMockingTestCase
Exception
- in case of errorspublic org.xwiki.test.internal.MockConfigurationSource getConfigurationSource()
Copyright © 2004–2019 XWiki. All rights reserved.