|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Expectation
An object that matches, checks and fakes an Invocation
| Method Summary | |
|---|---|
boolean |
allowsMoreInvocations()
Can more Invocations expected by this Expectation still occur? |
void |
describeMismatch(Invocation invocation,
Description description)
|
Object |
invoke(Invocation invocation)
Invokes the expectation: records that the invocation has occurred and fakes some behaviour in response. |
boolean |
isSatisfied()
Have enough Invocations expected by this Expectation occurred? |
boolean |
matches(Invocation invocation)
Can the Expectation be invoked with invocation? |
| Methods inherited from interface org.hamcrest.SelfDescribing |
|---|
describeTo |
| Method Detail |
|---|
boolean isSatisfied()
Invocations expected by this Expectation occurred?
true if the expectation has received enough
of its expected invocations, false otherwise.boolean allowsMoreInvocations()
Invocations expected by this Expectation still occur?
true if invocations expected by this expectation can still
occur, false otherwise.boolean matches(Invocation invocation)
invocation -
true if the expectation can be invoked with
invocation, false otherwise.
void describeMismatch(Invocation invocation,
Description description)
Object invoke(Invocation invocation)
throws Throwable
invocation - The invocation to record and fake.
Throwable - An exception that is eventually thrown from the method call
that caused the invocation.
IllegalStateException - The expectation has been invoked with a method that it doesn't
match or the faked behaviour has been set up incorrectly.
For example, IllegalStateException is thrown when trying to return
a value or throw a checked exception that is incompatible with the
return type of the method being mocked
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||