|
From: Steve M. <Ste...@ty...> - 2007-10-13 21:25:48
|
Your syntax adds complexity to the API without benefit. There is
nothing stopping you from calling your own 'new MyAction()' or 'new
delegate(){}' at the Will clause in the call. I mean that for the
elements in the provided interface, I don't want to have to use new.
There was an earlier request to provide 'lazy' resolution for the
methods being passed in, but that hasn't been addressed yet.
Also, for the Change instead of Cause, we are not changing parameters
we are setting them. I agree that ToBe might be hard to remember, but
that's what intellisense is for :) and once written it reads very well.
-----Original Message-----
From: nmo...@li...
[mailto:nmo...@li...] On Behalf Of Andrey
Shchekin
Sent: Saturday, October 13, 2007 4:06 PM
To: NMock2 Development Discussion
Subject: Re: [NMock2-Dev] Fire syntax
On 10/14/07, Steve Mitcham <Ste...@ty...> wrote:
> I'm trying to avoid calling new in the fluent interface part
I do not know how you can do Be.A(delegate) without having to call new.
One possible way could be Be.An<Action<T>>(delegate(T value) {}) which
does seem better, but I am not sure if it would actually compile (I do
not have time to check now).
I agree that both ways are too cryptic and verbose.
But being able to provide method body just-in-place for some cases is
very convenient.
------------------------------------------------------------------------
-
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
|