|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockobjects.dynamic.Mock
Constructor Summary | |
Mock(CallFactory callFactory,
CallableAddable callableAddable,
java.lang.Class mockedClass,
java.lang.String name)
|
|
Mock(java.lang.Class mockedClass)
|
|
Mock(java.lang.Class mockedClass,
java.lang.String nonDefaultName)
|
Method Summary | |
static java.lang.String |
className(java.lang.Class c)
|
void |
expect(java.lang.String methodName)
|
void |
expect(java.lang.String methodName,
CallSequence deprecated)
Deprecated. @see OrderedMock |
void |
expect(java.lang.String methodName,
ConstraintMatcher args)
|
void |
expect(java.lang.String methodName,
java.lang.Object singleEqualArg)
|
void |
expectAndReturn(java.lang.String methodName,
boolean result)
|
void |
expectAndReturn(java.lang.String methodName,
CallSequence deprecated,
java.lang.Object result)
Deprecated. @see OrderedMock |
void |
expectAndReturn(java.lang.String methodName,
ConstraintMatcher args,
boolean result)
|
void |
expectAndReturn(java.lang.String methodName,
ConstraintMatcher args,
int result)
|
void |
expectAndReturn(java.lang.String methodName,
ConstraintMatcher args,
java.lang.Object result)
|
void |
expectAndReturn(java.lang.String methodName,
int result)
|
void |
expectAndReturn(java.lang.String methodName,
java.lang.Object result)
|
void |
expectAndReturn(java.lang.String methodName,
java.lang.Object singleEqualArg,
boolean result)
|
void |
expectAndReturn(java.lang.String methodName,
java.lang.Object singleEqualArg,
int result)
|
void |
expectAndReturn(java.lang.String methodName,
java.lang.Object singleEqualArg,
java.lang.Object result)
|
void |
expectAndThrow(java.lang.String methodName,
CallSequence deprecated,
java.lang.Throwable throwable)
Deprecated. @see OrderedMock |
void |
expectAndThrow(java.lang.String methodName,
ConstraintMatcher args,
java.lang.Throwable exception)
|
void |
expectAndThrow(java.lang.String methodName,
java.lang.Object singleEqualArg,
java.lang.Throwable exception)
|
void |
expectAndThrow(java.lang.String methodName,
java.lang.Throwable exception)
|
void |
expectNotCalled(java.lang.String methodName)
Deprecated. Not required, as if methodName is called, you will get a an exception |
void |
expectVoid(java.lang.String methodName)
Deprecated. @see expect |
void |
expectVoid(java.lang.String methodName,
ConstraintMatcher args)
Deprecated. @see expect |
void |
expectVoid(java.lang.String methodName,
java.lang.Object equalArg)
Deprecated. @see expect |
java.lang.String |
getMockName()
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
void |
matchAndReturn(java.lang.String methodName,
boolean result)
|
void |
matchAndReturn(java.lang.String methodName,
boolean singleEqualArg,
java.lang.Object result)
|
void |
matchAndReturn(java.lang.String methodName,
ConstraintMatcher args,
boolean result)
|
void |
matchAndReturn(java.lang.String methodName,
ConstraintMatcher args,
int result)
|
void |
matchAndReturn(java.lang.String methodName,
ConstraintMatcher args,
java.lang.Object result)
|
void |
matchAndReturn(java.lang.String methodName,
int result)
|
void |
matchAndReturn(java.lang.String methodName,
int singleEqualArg,
java.lang.Object result)
|
void |
matchAndReturn(java.lang.String methodName,
java.lang.Object result)
|
void |
matchAndReturn(java.lang.String methodName,
java.lang.Object singleEqualArg,
boolean result)
|
void |
matchAndReturn(java.lang.String methodName,
java.lang.Object singleEqualArg,
int result)
|
void |
matchAndReturn(java.lang.String methodName,
java.lang.Object singleEqualArg,
java.lang.Object result)
|
void |
matchAndThrow(java.lang.String methodName,
boolean singleEqualArg,
java.lang.Throwable throwable)
|
void |
matchAndThrow(java.lang.String methodName,
ConstraintMatcher args,
java.lang.Throwable throwable)
|
void |
matchAndThrow(java.lang.String methodName,
int singleEqualArg,
java.lang.Throwable throwable)
|
void |
matchAndThrow(java.lang.String methodName,
java.lang.Object singleEqualArg,
java.lang.Throwable throwable)
|
void |
matchAndThrow(java.lang.String methodName,
java.lang.Throwable throwable)
|
static java.lang.String |
mockNameFromClass(java.lang.Class c)
|
java.lang.Object |
proxy()
|
void |
reset()
|
java.lang.String |
toString()
|
void |
verify()
Throw an AssertionFailedException if any expectations have not been met. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Mock(CallFactory callFactory, CallableAddable callableAddable, java.lang.Class mockedClass, java.lang.String name)
public Mock(java.lang.Class mockedClass, java.lang.String nonDefaultName)
public Mock(java.lang.Class mockedClass)
Method Detail |
public void reset()
public static java.lang.String mockNameFromClass(java.lang.Class c)
public static java.lang.String className(java.lang.Class c)
public java.lang.String getMockName()
public java.lang.String toString()
public java.lang.Object proxy()
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
public void verify()
Verifiable
verify
in interface Verifiable
public void expect(java.lang.String methodName)
public void expect(java.lang.String methodName, java.lang.Object singleEqualArg)
public void expect(java.lang.String methodName, ConstraintMatcher args)
public void expectAndReturn(java.lang.String methodName, java.lang.Object result)
public void expectAndReturn(java.lang.String methodName, boolean result)
public void expectAndReturn(java.lang.String methodName, int result)
public void expectAndReturn(java.lang.String methodName, java.lang.Object singleEqualArg, java.lang.Object result)
public void expectAndReturn(java.lang.String methodName, java.lang.Object singleEqualArg, boolean result)
public void expectAndReturn(java.lang.String methodName, java.lang.Object singleEqualArg, int result)
public void expectAndReturn(java.lang.String methodName, ConstraintMatcher args, java.lang.Object result)
public void expectAndReturn(java.lang.String methodName, ConstraintMatcher args, boolean result)
public void expectAndReturn(java.lang.String methodName, ConstraintMatcher args, int result)
public void expectAndThrow(java.lang.String methodName, java.lang.Throwable exception)
public void expectAndThrow(java.lang.String methodName, java.lang.Object singleEqualArg, java.lang.Throwable exception)
public void expectAndThrow(java.lang.String methodName, ConstraintMatcher args, java.lang.Throwable exception)
public void matchAndReturn(java.lang.String methodName, java.lang.Object result)
public void matchAndReturn(java.lang.String methodName, boolean result)
public void matchAndReturn(java.lang.String methodName, int result)
public void matchAndReturn(java.lang.String methodName, java.lang.Object singleEqualArg, java.lang.Object result)
public void matchAndReturn(java.lang.String methodName, boolean singleEqualArg, java.lang.Object result)
public void matchAndReturn(java.lang.String methodName, int singleEqualArg, java.lang.Object result)
public void matchAndReturn(java.lang.String methodName, java.lang.Object singleEqualArg, boolean result)
public void matchAndReturn(java.lang.String methodName, java.lang.Object singleEqualArg, int result)
public void matchAndReturn(java.lang.String methodName, ConstraintMatcher args, java.lang.Object result)
public void matchAndReturn(java.lang.String methodName, ConstraintMatcher args, boolean result)
public void matchAndReturn(java.lang.String methodName, ConstraintMatcher args, int result)
public void matchAndThrow(java.lang.String methodName, java.lang.Throwable throwable)
public void matchAndThrow(java.lang.String methodName, java.lang.Object singleEqualArg, java.lang.Throwable throwable)
public void matchAndThrow(java.lang.String methodName, boolean singleEqualArg, java.lang.Throwable throwable)
public void matchAndThrow(java.lang.String methodName, int singleEqualArg, java.lang.Throwable throwable)
public void matchAndThrow(java.lang.String methodName, ConstraintMatcher args, java.lang.Throwable throwable)
public void expect(java.lang.String methodName, CallSequence deprecated)
public void expectAndReturn(java.lang.String methodName, CallSequence deprecated, java.lang.Object result)
public void expectAndThrow(java.lang.String methodName, CallSequence deprecated, java.lang.Throwable throwable)
public void expectVoid(java.lang.String methodName, ConstraintMatcher args)
public void expectVoid(java.lang.String methodName, java.lang.Object equalArg)
public void expectVoid(java.lang.String methodName)
public void expectNotCalled(java.lang.String methodName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |