Re: Assert.Throws Syntax
"Charlie Poole" <[email protected]> Thu, 14 Aug 2008 09:53:04 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <003a01c8fe2e$3b728210$6401a8c0@ferrari> |
Your initial curly brace is in the wrong place.
It should be
> Assert.Throws<CommBrokerNotInjected>( delegate {
> Hardware.PhysicalHardware } );
Of course, I'm assuming that PhysicalHardware is
a static property of the Hardware class.
Charlie
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf
> Of Kelly Anderson
> Sent: Thursday, August 14, 2008 9:19 AM
> To: [email protected]
> Subject: [Nunit-users] Assert.Throws Syntax
>
> This syntax comes from the documentation...
>
> Assert.Throws<CommBrokerNotInjected>( { delegate
> Hardware.PhysicalHardware } );
>
> Is this using C# 3.0 syntax? It doesn't compile on my 2.0
> compiler, so I just wondered if it's using a 2008 syntax.
>
> -Kelly
>
> --------------------------------------------------------------
> -----------
> 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
>
-------------------------------------------------------------------------
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=/