|
From: Mike M. <mik...@gm...> - 2006-03-02 18:36:22
|
On 3/2/06, Nat Pryce <nat...@gm...> wrote: > > The latter. In the final example you show the use of "new" in an > expectation. We've tried to make that be considered bad style in > jMock and always show using a factory function so that tests are > expressive. It's not always caught on but more people use factory > functions than not. > The jMock docs have this page: http://jmock.codehaus.org/custom-constraints.html At the end of the page they suggest making a factory method by extending th= e base TestCase class provided by jMock, but this isn't how NMock 2 works. I'= m not sure how an end-user can add a syntactically nice looking factory method. I'm sorry to be dim, I guess what I'm asking for is a code sample. Cheers, Mike. |