MockitoComponentManagerRule
instead@Deprecated public class MockingComponentManager extends EmbeddableComponentManager
EmbeddableComponentManager
to easily register mock components when writing tests.Constructor and Description |
---|
MockingComponentManager()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
registerMockComponent(org.jmock.Mockery mockery,
Type role)
Deprecated.
Register a mock component.
|
<T> T |
registerMockComponent(org.jmock.Mockery mockery,
Type role,
String hint)
Deprecated.
Register a mock component.
|
<T> T |
registerMockComponent(org.jmock.Mockery mockery,
Type role,
String hint,
String mockId)
Deprecated.
Register a mock component.
|
<T> T |
registerMockComponentWithId(org.jmock.Mockery mockery,
Type role,
String mockId)
Deprecated.
Register a mock component.
|
createGenericProvider, createLogger, dispose, getComponentDescriptor, getComponentDescriptorList, getComponentDescriptorList, getComponentEventManager, getComponentInstance, getDependencyInstance, getInstance, getInstance, getInstanceList, getInstanceMap, getNamespace, getParent, hasComponent, hasComponent, initialize, registerComponent, registerComponent, release, setComponentEventManager, setParent, unregisterComponent, unregisterComponent
public <T> T registerMockComponent(org.jmock.Mockery mockery, Type role, String hint, String mockId) throws Exception
T
- the component role classmockery
- the JMock mockery instance to create the mock componentrole
- the role of the component to registerhint
- the hint of the component to registermockId
- the JMock id (this is needed when registering several mocks for the same interface)Exception
- if the registration failedpublic <T> T registerMockComponent(org.jmock.Mockery mockery, Type role, String hint) throws Exception
T
- the component role classmockery
- the JMock mockery instance to create the mock componentrole
- the role of the component to registerhint
- the hint of the component to registerException
- if the registration failedpublic <T> T registerMockComponent(org.jmock.Mockery mockery, Type role) throws Exception
T
- the component role classmockery
- the JMock mockery instance to create the mock componentrole
- the role of the component to registerException
- if the registration failedpublic <T> T registerMockComponentWithId(org.jmock.Mockery mockery, Type role, String mockId) throws Exception
T
- the component role classmockery
- the JMock mockery instance to create the mock componentrole
- the role of the component to registermockId
- the JMock id (this is needed when registering several mocks for the same interface)Exception
- if the registration failedCopyright © 2004–2021 XWiki. All rights reserved.