Re: Blog: Four Ways to test Expected Exceptions
"David Jeske" <[email protected]> Sun, 3 Aug 2008 08:38:08 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user,gmane.comp.windows.dotnet.nunit.devel |
|---|---|
| Message-ID | <[email protected]> |
I admit that I have not experimented with anonymous delegates, but my
assumption about how they are implemented in the runtime say that I don't
expect they have access to local scope... that is, I don't expect I could do
this:
DbHandle db = Db.open()
Assert.That( delegate { db.do_something(); },
Throws.Exception<MyException>() );
If I can, then I should definetly switch to this syntax.
On Sat, Aug 2, 2008 at 4:38 PM, Charlie Poole
<[email protected]>wrote:
> I think I'm missing something... Why isn't that code equivaent to...
> Assert.That( delegate { do_something() }, Throws.Exception<MyException>()
> );
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users