Yes, but with a bit of effort. The trick is to create a Callable decorator
that matches a method invocation only when it is called in the correct
order. I've attached a test and support classes that implement this which
should make things more clear. We are currently working on providing more
convenient support for sequences across multiple mocks in the next version
of the dynamic mocks.
Cheers,
Nat.
_______________________
Dr. Nathaniel Pryce
B13media Ltd.
http://www.b13media.com
+44 (0)7712 526 661
----- Original Message -----
From: "François Beausoleil" <fb...@us...>
To: <moc...@li...>
Sent: Monday, September 08, 2003 2:57 AM
Subject: [MO-java-dev] Is it possible to verify call sequence between two or
more Mocks ?
Hi,
I'm using DynaMocks 0.09 and would like to know if one can check the
sequence of calls between more than one mock.
For example, I am writing tests for an object that should retry
operations once on the object, but must call another one in the mean time:
public void method() throws FailureException {
try {
obj.operation();
} catch (FailureException e) {
obj = obj2.factory();
obj.operation();
}
}
So, both mocks should cooperate to determine if the correct sequence of
operations was executed.
Thanks for any tips or pointers.
Bye !
François
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mockobjects-java-dev mailing list
Moc...@li...
https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev
|