org.jmock.core.constraint
Class IsEventFrom
- Constraint, SelfDescribing
Tests if the value is an event announced by a specific object.
IsEventFrom(Class eventClass, Object source) - Constructs an IsEventFrom predicate that returns true for any object
derived from event_class announced by source.
|
IsEventFrom(Object source) - Constructs an IsEventFrom predicate that returns true for any object
derived from
EventObject announced by source
.
|
StringBuffer | describeTo(StringBuffer buffer)
|
boolean | eval(Object o) - Evaluates the constraint for argument o.
|
IsEventFrom
public IsEventFrom(Class eventClass,
Object source)
Constructs an IsEventFrom predicate that returns true for any object
derived from event_class announced by source.
IsEventFrom
public IsEventFrom(Object source)
Constructs an IsEventFrom predicate that returns true for any object
derived from
EventObject
announced by
source
.
eval
public boolean eval(Object o)
Evaluates the constraint for argument o.
- eval in interface Constraint
o
- the object against which the constraint is evaluated.
true
if o meets the constraint,
false
if it does not.