|
From: Mike M. <mik...@gm...> - 2006-03-02 16:58:46
|
On 3/2/06, Nat Pryce <nat...@gm...> wrote: > > Hi. Sorry I jumped the gun a bit here. The tutorials on the site are > fine. > > One suggestion: the tutorial should describe the idiom of creating > factory methods for creating actions and matchers. Yes, you can do > ...Will(new BlahBlahBlahAction()) but doing that makes tests hard to > read. The whole point of jMock and NMock2 is to provide a embedded > domain-specific language that can be seamlessly extended by users, and > this should be demonstrated at every opportunity in the tutorials and > documentation. The end result -- clear tests/specifications -- is > really worth it. > Not 100% sure what you mean here -- do you not like the part where we explain how the syntactic sugar used earlier corresponds to new BlahBlah(), or would you like something added suggesting that if you make your own custom matchers, you should also create factory methods for them? Cheers, Mike. |