|
From: Nat P. <nat...@gm...> - 2007-10-14 11:12:59
|
What about error messages? It looks convenient to write, but does it
generate useful diagnostics when tests fail? What is the name of an
anonymous delegate?
JMock and NMock2 were designed favour ease of maintenance over ease of
writing. E.g. when writing a test it's worth spending a couple of
minutes writing a new action class that can generate good error
messages to save a couple of hours debugging time later in the project
when that test fails unexpectedly.
--Nat
On 14/10/2007, Andrey Shchekin <as...@gm...> wrote:
> On 10/14/07, Steve Mitcham <Ste...@ty...> wrote:
> > I see what you are saying with the delegate now. I think that we get
> > that into the action by adding an action delegate with no parameters and
> > allow an anonymous method to be added perhaps something like
> >
> > .Will(Cause.Action(new delegate { DoSomething(); }))
> >
> > And later in 3.5
> >
> > .Will(Cause.Action(()=> DoSomething();)); // At least I think that would
> > be the syntax.
>
> That is cool, but that is one part.
>
> I actually passed the original method parameters to the Action so you
> could provide full method implementation. I also passed the return
> value back if there was one (in this case delegate was not Action, of
> course).
>
> I am attaching code for the Be class to demonstrate the point.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> NMock-two-dev mailing list
> NMo...@li...
> https://lists.sourceforge.net/lists/listinfo/nmock-two-dev
>
>
>
|