Tutorial by Examples

Suppose we want to write a constraint which matches a number, but approximatively. Say, you are supposed to have 95 people in a survey, but 93 or 96 will do as well. We can write a custom constraint of the form: public class AlmostEqualToConstraint : Constraint { readonly int _expected; ...
We're going to integrate the AlmostEqualToConstraint with the fluent NUnit interfaces, specifically the Is one. We'll need to extend the NUnit provided Is and use that throughout our code. public class Is : NUnit.Framework.Is { public static AlmostEqualToConstraint AlmostEqualTo(int expected,...

Page 1 of 1