public interface Imposteriser
Invocation
s and pass them to an
Invokable
object for mocking or stubbing.Modifier and Type | Method and Description |
---|---|
boolean |
canImposterise(Class<?> type)
Reports if the Imposteriser is able to imposterise a given type.
|
<T> T |
imposterise(Invokable mockObject,
Class<T> mockedType,
Class<?>... ancilliaryTypes)
Creates an imposter for a given type that forwards
Invocation s to an
Invokable object. |
boolean canImposterise(Class<?> type)
type
- The type in question.<T> T imposterise(Invokable mockObject, Class<T> mockedType, Class<?>... ancilliaryTypes)
Invocation
s to an
Invokable
object.T
- The static type of the imposter that is created.mockObject
- The object that is to receive invocations forwarded from the imposter.mockedType
- The class representing the static type of the imposter.ancilliaryTypes
- Other types for the imposter. It must be possible to dynamically cast the imposter to these types.
These types must all be interfaces because Java only allows single inheritance of classes.Copyright © 2003–2018 jMock. All rights reserved.