|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.agical.rmock.core.match.constraint.ConstraintFactory
public class ConstraintFactory
(c) Agical AB 2005
Field Summary | |
---|---|
Expression |
ANYTHING
Always passes |
Expression |
AS_RECORDED
Special expression to indicate that a recorded argument on this position should not be changed. |
ClassConstraintFactory |
clazz
A factory with expressions for checking attributes of java.lang.Class objects. |
Expression |
FALSE
Checks if the checked actual value is a boolen and false |
MethodConstraintFactory |
method
A factory with expressions for checking methods. |
Expression |
NoChange
Deprecated. Use AS_RECORDED instead |
Expression |
NOT_NULL
Checks if the checked actual value is a boolen and not null. |
Expression |
NULL
Passes if the checked actual value is null |
Expression |
TRUE
Checks if the checked actual value is a boolen and true |
Constructor Summary | |
---|---|
ConstraintFactory()
|
Method Summary | |
---|---|
Expression |
containing(java.lang.String string)
Passes if the actual string is containing the value of string |
Expression |
endingWith(java.lang.String string)
Passes if the actual string ends with the value of string |
Expression |
eq(boolean ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(byte ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(char ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(double ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(float ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(int ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(long ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(java.lang.Object ref)
Passes if the reference is equal to the actual object. |
Expression |
eq(short ref)
Passes if the reference is equal to the actual object. |
Expression |
ge(byte ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
ge(char ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
ge(double ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
ge(float ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
ge(int ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
ge(long ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
ge(java.lang.Object ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
ge(short ref)
Passes if the actual is greater than or equal to the reference. |
Expression |
gt(byte ref)
Passes if the actual is greater than the reference. |
Expression |
gt(char ref)
Passes if the actual is greater than the reference. |
Expression |
gt(double ref)
Passes if the actual is greater than the reference. |
Expression |
gt(float ref)
Passes if the actual is greater than the reference. |
Expression |
gt(int ref)
Passes if the actual is greater than the reference. |
Expression |
gt(long ref)
Passes if the actual is greater than the reference. |
Expression |
gt(java.lang.Object ref)
Passes if the actual is greater than the reference. |
Expression |
gt(short ref)
Passes if the actual is greater than the reference. |
Expression |
instanceOf(java.lang.Class clazz)
Passes if the actual object is an instance of the class passed as the parameter clazz. |
Expression |
le(byte ref)
Passes if the actual is less than or equal to the reference. |
Expression |
le(char ref)
Passes if the actual is less than or equal to the reference. |
Expression |
le(double ref)
Passes if the actual is less than or equal to the reference. |
Expression |
le(float ref)
Passes if the actual is less than or equal to the reference. |
Expression |
le(int ref)
Passes if the actual is less than or equal to the reference. |
Expression |
le(long ref)
Passes if the actual is less than or equal to the reference. |
Expression |
le(java.lang.Object ref)
Passes if the actual is less than or equal to the reference. |
Expression |
le(short ref)
Passes if the actual is less than or equal to the reference. |
Expression |
lt(byte ref)
Passes if the actual is less than the reference. |
Expression |
lt(char ref)
Passes if the actual is less than the reference. |
Expression |
lt(double ref)
Passes if the actual is less than the reference. |
Expression |
lt(float ref)
Passes if the actual is less than the reference. |
Expression |
lt(int ref)
Passes if the actual is less than the reference. |
Expression |
lt(long ref)
Passes if the actual is less than the reference. |
Expression |
lt(java.lang.Object ref)
Passes if the actual is less than the reference. |
Expression |
lt(short ref)
Passes if the actual is less than the reference. |
Expression |
not(Expression expression)
Inverts an expression |
Expression |
same(java.lang.Object ref)
Passes if the actual object is the same reference as the ref object. |
Expression |
startingWith(java.lang.String string)
Passes if the actual string begins with the value of string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Expression AS_RECORDED
public final Expression NoChange
public final Expression NULL
public final Expression TRUE
public final Expression FALSE
public final Expression NOT_NULL
public final Expression ANYTHING
public final ClassConstraintFactory clazz
public final MethodConstraintFactory method
Constructor Detail |
---|
public ConstraintFactory()
Method Detail |
---|
public Expression same(java.lang.Object ref)
ref
- the reference to check against
public Expression instanceOf(java.lang.Class clazz)
clazz
- The class to check if the actual object is an instance of.
public Expression eq(java.lang.Object ref)
ref
- the reference to check against
public Expression eq(boolean ref)
ref
- the reference to check against
public Expression eq(long ref)
ref
- the reference to check against
public Expression eq(int ref)
ref
- the reference to check against
public Expression eq(short ref)
ref
- the reference to check against
public Expression eq(byte ref)
ref
- the reference to check against
public Expression eq(double ref)
ref
- the reference to check against
public Expression eq(float ref)
ref
- the reference to check against
public Expression eq(char ref)
ref
- the reference to check against
public Expression gt(java.lang.Object ref)
ref
- the reference to check against
public Expression gt(long ref)
ref
- the reference to check against
public Expression gt(int ref)
ref
- the reference to check against
public Expression gt(short ref)
ref
- the reference to check against
public Expression gt(byte ref)
ref
- the reference to check against
public Expression gt(double ref)
ref
- the reference to check against
public Expression gt(float ref)
ref
- the reference to check against
public Expression gt(char ref)
ref
- the reference to check against
public Expression ge(java.lang.Object ref)
ref
- the reference to check against
public Expression ge(long ref)
ref
- the reference to check against
public Expression ge(int ref)
ref
- the reference to check against
public Expression ge(short ref)
ref
- the reference to check against
public Expression ge(byte ref)
ref
- the reference to check against
public Expression ge(double ref)
ref
- the reference to check against
public Expression ge(float ref)
ref
- the reference to check against
public Expression ge(char ref)
ref
- the reference to check against
public Expression lt(java.lang.Object ref)
i
- the reference to check against
public Expression lt(long ref)
ref
- the reference to check against
public Expression lt(int ref)
ref
- the reference to check against
public Expression lt(short ref)
ref
- the reference to check against
public Expression lt(byte ref)
ref
- the reference to check against
public Expression lt(double ref)
ref
- the reference to check against
public Expression lt(float ref)
ref
- the reference to check against
public Expression lt(char ref)
ref
- the reference to check against
public Expression le(java.lang.Object ref)
ref
- the reference to check against
public Expression le(long ref)
ref
- the reference to check against
public Expression le(int ref)
ref
- the reference to check against
public Expression le(short ref)
ref
- the reference to check against
public Expression le(byte ref)
ref
- the reference to check against
public Expression le(double ref)
ref
- the reference to check against
public Expression le(float ref)
ref
- the reference to check againsts
public Expression le(char ref)
ref
- the reference to check against
public Expression not(Expression expression)
expression
- the expression to invert
public Expression containing(java.lang.String string)
string
- the String that the actual object must contain for this expression to pass
public Expression startingWith(java.lang.String string)
string
- the String that the actual object must begin with for this expression to pass
public Expression endingWith(java.lang.String string)
string
- the String that the actual object must end with for this expression to pass
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |