MockConfiguration
@Beta public interface IMockConfiguration
getNature()
and getImplementation()
are mandatory options that are typically
determined by choosing the appropriate MockingApi
factory method. getType()
is a mandatory option that is typically passed directly to a MockingApi
factory method, or inferred
from the left-hand side of the enclosing variable assignment. The remaining options are optional and are
typically passed to a MockingApi
factory method as named arguments. For example,
getConstructorArgs()
corresponds to the constructorArgs:
named argument,
isGlobal()
to the global:
named argument, etc.
Modifier and Type | Method | Description |
---|---|---|
java.util.List<java.lang.Object> |
getConstructorArgs() |
Returns the constructor arguments to be used for creating the mock object.
|
IDefaultResponse |
getDefaultResponse() |
Returns the default response strategy for the mock object.
|
MockImplementation |
getImplementation() |
Returns the implementation of the mock object.
|
java.lang.String |
getName() |
Returns the name of the mock object.
|
MockNature |
getNature() |
Returns the nature of the mock object.
|
java.lang.Class<?> |
getType() |
Returns the interface or class type of the mock object.
|
boolean |
isGlobal() |
Tells whether a mock object stands in for all objects of the mocked type, or just for itself.
|
boolean |
isUseObjenesis() |
Tells whether the Objenesis library, if available on the class path, should be used for constructing
the mock object, rather than calling a constructor.
|
boolean |
isVerified() |
Tells whether invocations on the mock object should be verified.
|
java.lang.String getName()
java.lang.Class<?> getType()
MockNature getNature()
MockImplementation getImplementation()
java.util.List<java.lang.Object> getConstructorArgs()
IDefaultResponse getDefaultResponse()
boolean isGlobal()
MockImplementation
.boolean isVerified()
boolean isUseObjenesis()
Copyright © 2018. All rights reserved