From: Steve F. <st...@m3...> - 2004-02-15 18:17:07
|
Do you have multiple tests that use these mocks? In which case, our practice is to make them instance variables of the test case, and use the Verifier. We haven't got a VerifiableCollection yet, because we tend to use this solution. S. Alban Peignier wrote: > Steve Freeman wrote: > >> How many mocks do you have in your tests? Is it worth collecting them >> in an array, rather than just calling verify on them? > > > In some complex test cases, I can use five or six mockobjects. I found > usefull to replace the needed lines to verify each one by a single one. > >> It strikes me that a better alternative for your case might be to have >> a VerifiableCollection that accepts Verifiables and then implements >> verify() across them. > > > Indeed, A VerifiableCollection can be a smarter solution. This class > doesn't seem to exist ? > |