|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.test.AbstractMockingTestCase
org.xwiki.test.AbstractComponentTestCase
public abstract class AbstractComponentTestCase
Tests which needs to have XWiki Components set up should extend this class which makes the Component Manager available. Use this class for JUnit 4.x tests.
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.
| Constructor Summary | |
|---|---|
AbstractComponentTestCase()
|
|
| Method Summary | |
|---|---|
EmbeddableComponentManager |
getComponentManager()
|
MockConfigurationSource |
getConfigurationSource()
|
void |
registerComponent(Class<?> componentClass)
|
protected void |
registerComponents()
Register custom/mock components |
void |
setUp()
Tests that require fine-grained initializations can override this method and not call super. |
void |
tearDown()
Clean up test states. |
| Methods inherited from class org.xwiki.test.AbstractMockingTestCase |
|---|
getMockery, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractComponentTestCase()
| Method Detail |
|---|
public void setUp()
throws Exception
Exception
public void tearDown()
throws Exception
Exception
protected void registerComponents()
throws Exception
Exception
public EmbeddableComponentManager getComponentManager()
throws Exception
getComponentManager in class AbstractMockingTestCaseExceptionpublic MockConfigurationSource getConfigurationSource()
public void registerComponent(Class<?> componentClass)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||