|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IHammockExceptionErrors
This interface contains text messages describing the most common problems when invoking methods on a test double or verifying that a mock object was invoked as expected.
Field Summary | |
---|---|
static java.lang.String |
ARGUMENT_MATCHER_ALREADY_SET
An argument matcher can only be set once for a particular argument for a method. |
static java.lang.String |
CANT_SET_VOID_RETURN_VALUE
If a method is of type void, it doesn't make sense to set a value
that should be returned when the method is invoked. |
static java.lang.String |
CLASS_IS_NOT_THROWABLE
An argument passed as an exception is not a subclass of Throwable. |
static java.lang.String |
DOES_NOT_SUBCLASS_MOCK_OBJECT
The Hammock framework requires that some methods can only be invoked on objects that implement the IMockObject interface. |
static java.lang.String |
HANDLER_NOT_SET
It is a mistake to invoke a method on an instance of AMockObject if no invocation handler has been set. |
static java.lang.String |
INCORRECT_MOCK_OBJECT
An expectation was set that some method would be invoked on a mock object where the method is not applicable for the mock object's class. |
static java.lang.String |
INCORRECT_RETURN_CLASS
When setting the return value for a mocked method, the return value must be an instance of the class that is returned by the method. |
static java.lang.String |
INCORRECT_THROWABLE_CLASS
When setting an exception to be thrown by a mock object, the exception must be in accordance with the method's signature. |
static java.lang.String |
METHOD_CANNOT_BE_EVALUATED
A message stating that an invocation handler cannot evaluate some method invoked on a test double. |
static java.lang.String |
METHOD_INVOKED_OUT_OF_SEQUENCE
For a strict mock object, methods must be invoked in the same order as specified in the expectations. |
static java.lang.String |
METHOD_INVOKED_TOO_MANY_TIMES
When verifying the behaviour of an object under test, it must invoke mock objects a certain number of times to satisfy the expectations. |
static java.lang.String |
METHOD_INVOKED_UNEXPECTED_NUMBER_OF_TIMES
When verifying the behaviour of an object under test, it must invoke mock objects a certain number of times to satisfy the expectations. |
static java.lang.String |
NO_RETURN_VALUE
If a method on a mock object is expected to return a primitive value, it is a mistake if the method tries to return null . |
static java.lang.String |
NO_RETURN_VALUE_SET
For a non-void method, one must specify a return value when setting an expectation that a method will be invoked. |
static java.lang.String |
NUM_INVOCATIONS_ALREADY_SET
The expected number of invocations can only be set once for a handler. |
static java.lang.String |
RETURN_VALUE_ALREADY_SET
A return value for a method handler can only be set once, it does not make sense to specify two or more values that should be returned when the method is invoked. |
static java.lang.String |
WRONG_ARGUMENT_CLASS
When setting an expectation for a method invocation, the class of the arguments must agree with the method's signature. |
static java.lang.String |
WRONG_NUMBER_OF_ARGS
When setting an expectation for a method invocation, the number of arguments specified in the expectation must agree with the number of arguments in the method's signature. |
Field Detail |
---|
static final java.lang.String METHOD_CANNOT_BE_EVALUATED
static final java.lang.String CLASS_IS_NOT_THROWABLE
static final java.lang.String DOES_NOT_SUBCLASS_MOCK_OBJECT
IMockObject
interface.
static final java.lang.String HANDLER_NOT_SET
static final java.lang.String NO_RETURN_VALUE
null
.
static final java.lang.String RETURN_VALUE_ALREADY_SET
static final java.lang.String CANT_SET_VOID_RETURN_VALUE
void, it doesn't make sense to set a value
that should be returned when the method is invoked.
- See Also:
- Constant Field Values
static final java.lang.String INCORRECT_RETURN_CLASS
static final java.lang.String INCORRECT_THROWABLE_CLASS
static final java.lang.String WRONG_NUMBER_OF_ARGS
static final java.lang.String WRONG_ARGUMENT_CLASS
static final java.lang.String NO_RETURN_VALUE_SET
static final java.lang.String METHOD_INVOKED_UNEXPECTED_NUMBER_OF_TIMES
static final java.lang.String METHOD_INVOKED_TOO_MANY_TIMES
static final java.lang.String METHOD_INVOKED_OUT_OF_SEQUENCE
static final java.lang.String INCORRECT_MOCK_OBJECT
static final java.lang.String NUM_INVOCATIONS_ALREADY_SET
static final java.lang.String ARGUMENT_MATCHER_ALREADY_SET
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |