From: Steve F. <st...@m3...> - 2003-09-08 06:58:35
|
There's a constructor in Mock (for the release) and CoreMock (for the=20 CVS head) that allows you to pass in the collection that gathers=20 expectations. I think you can achieve what you want by making both mock=20 implementations share a common expectation collection. We have some ideas about how to specify precedence but we have to do=20 some more clean-up first. S. Fran=E7ois Beausoleil wrote: > I'm using DynaMocks 0.09 and would like to know if one can check the=20 > sequence of calls between more than one mock. >=20 > For example, I am writing tests for an object that should retry=20 > operations once on the object, but must call another one in the mean ti= me: >=20 > public void method() throws FailureException { > try { > obj.operation(); > } catch (FailureException e) { > obj =3D obj2.factory(); > obj.operation(); > } > } >=20 > So, both mocks should cooperate to determine if the correct sequence of= =20 > operations was executed. |