Asserting that a value is within an interval
"Simone Busoli" <[email protected]> Sat, 2 Aug 2008 12:01:00 +0200
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I would like to do something like: int a = 3; int b = 5; Assert.That(a, Is.InRangeOf(2).From(b)); which means that b - 2 <= a <= b + 2. I couldn't come up with anything but c# 3 expressions to do subtraction and addition. If anyone's interested I can write a patch for this. ------------------------------------------------------------------------- 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