Re: How to extend the constraint model with custom constraints

"Simone Busoli" <[email protected]> Thu, 7 Aug 2008 21:47:39 +0200
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <[email protected]>
What about, instead of this:

Assert.That(value, Is.Not.EqualTo(other));

this one?

Assert.That(value).Is.Not.EqualTo(other));

I don't know it if would ever work, but I like it more, and I think it could
be extensible since Is/Has is no longer forced to be a static class.

On Thu, Aug 7, 2008 at 9:39 PM, Simone Busoli <[email protected]>wrote:

> What's the best way of adding a new constraint so that I can use it,
> preferably before a patch is submitted, applied and a new version is
> released?
> I am thinking about extension methods, but the classes Is, Has... expose
> constraints with static methods. I can create my constraint manually in the
> second argument of Assert.That, but I would lose the fluency of the syntax.
>

-------------------------------------------------------------------------
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