|
From: Guofeng Z. <guo...@vi...> - 2003-08-28 05:26:44
|
My question is how to set expection for a method with a lot of =
arguments in a mock object.
For example, there is a Timer interface:
public interface Timer=20
{ =20
int getTime( Type1 arg1, Type2 arg2, Type3 arg3, Type4 arg4, Type5 =
arg5 );
}
In the following test code:
Mock mockTimer =3D new Mock(Timer.class);
mockTimer.expectAndReturn("getTime", ???);=20
How to set the above expection. How to express that the getTime() can be =
invoked 5 times for example.
Another question is:=20
What is the difference between C.args() and C.eq(). How Constraint =
class and ConstraintMacher class are used.
Thanks
|