public class MockitoComponentManagerRule extends ComponentManagerRule
MethodRule to make it extra simple to register Mock Components using Mockito.componentRegistrator| Constructor and Description |
|---|
MockitoComponentManagerRule() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
registerMockComponent(Type roleType)
Registers a Mock component (using the default role hint).
|
<T> T |
registerMockComponent(Type roleType,
boolean force)
Registers a Mock component (using the default role hint).
|
<T> T |
registerMockComponent(Type roleType,
String roleHint)
Registers a Mock component.
|
<T> T |
registerMockComponent(Type roleType,
String roleHint,
boolean force)
Registers a Mock component.
|
after, apply, beforeinitializeTest, notifyComponentDescriptorEvent, registerComponent, registerComponent, registerComponent, registerComponentIfDontExist, registerMemoryConfigurationSource, shutdownTestcreateGenericProvider, createLogger, dispose, getComponentDescriptor, getComponentDescriptorList, getComponentDescriptorList, getComponentEventManager, getComponentInstance, getDependencyInstance, getInstance, getInstance, getInstanceList, getInstanceMap, getNamespace, getParent, hasComponent, hasComponent, initialize, registerComponent, registerComponent, release, setComponentEventManager, setParent, unregisterComponent, unregisterComponentpublic <T> T registerMockComponent(Type roleType, String roleHint) throws Exception
T - the mockroleType - the type of the component role to registerroleHint - the role hint of the component to registerException - in case of an error during registrationpublic <T> T registerMockComponent(Type roleType, String roleHint, boolean force) throws Exception
If force is false the method will do nothing if there is already a mock and will return it.
T - the mockroleType - the type of the component role to registerroleHint - the role hint of the component to registerforce - force registering a new mock even if there is already oneException - in case of an error during registrationpublic <T> T registerMockComponent(Type roleType) throws Exception
T - the mockroleType - the type of the component role to registerException - in case of an error during registrationpublic <T> T registerMockComponent(Type roleType, boolean force) throws Exception
If force is false the method will do nothing if there is already a mock and will return it.
T - the mockroleType - the type of the component role to registerforce - force registering a new mock even if there is already oneException - in case of an error during registrationCopyright © 2004–2015 XWiki. All rights reserved.