public class LenientMocksControl
extends org.easymock.internal.MocksControl
ReflectionComparatorMode.IGNORE_DEFAULTS mode will for example ignore all fields that
have default values as expected values. E.g. if a null value is recorded as argument it will not be checked when
the actual invocation occurs. The same applies for inner-fields of object arguments that contain default java values.
Setting the ReflectionComparatorMode.LENIENT_DATES mode will ignore the actual date values of arguments and
inner fields of arguments. It will only check whether both dates are null or both dates are not null. The actual
date and hour do not matter.
Setting the ReflectionComparatorMode.LENIENT_ORDER mode will ignore the actual order of collections and
arrays arguments and inner fields of arguments. It will only check whether they both contain the same elements.ReflectionComparatorMode,
ReflectionComparator,
Serialized Form| Constructor and Description |
|---|
LenientMocksControl(org.easymock.MockType type,
ReflectionComparatorMode... modes)
Creates a mock control.
|
LenientMocksControl(ReflectionComparatorMode... modes)
Creates a default (no default returns and no order checking) mock control.
|
| Modifier and Type | Method and Description |
|---|---|
org.easymock.internal.IMocksControlState |
getState()
Overriden to be able to replace the record behavior that going to record all method invocations.
|
andAnswer, andDelegateTo, andReturn, andStubAnswer, andStubDelegateTo, andStubReturn, andStubThrow, andThrow, anyTimes, asStub, atLeastOnce, checkIsUsedInOneThread, checkOrder, createMock, createMock, createMock, createMock, createMock, createMock, getControl, getInvocationHandler, getMockedType, getProxyFactory, getType, makeThreadSafe, once, replay, reset, resetToDefault, resetToNice, resetToStrict, times, times, verifypublic LenientMocksControl(ReflectionComparatorMode... modes)
modes - the modes for the reflection argument matcherpublic LenientMocksControl(org.easymock.MockType type,
ReflectionComparatorMode... modes)
type - the EasyMock mock typemodes - the modes for the reflection argument matcherpublic org.easymock.internal.IMocksControlState getState()
getState in class org.easymock.internal.MocksControlCopyright © 2016. All Rights Reserved.