Documented overloads of Has.Property do not exist
Bug #725718 reported by
Joe White
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit V2 |
Fix Released
|
High
|
Charlie Poole |
Bug Description
Using NUnit 2.5.9.
According to the documentation at http://
In reality, Has.Property only has one overload, which is the first of the three (only takes the property name). If you want to specify a constraint for the property value, you have to explicitly do "new PropertyConstra
Either fix the documentation, or (better yet) add the documented-
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The missing overloads once existed and were removed. The documentation
will be corrected.
However, the statement...
> If you want to specify a int(... )".
> constraint for the property value, you have to explicitly do "new
> PropertyConstra
is incorrect.
You can express constraints on properties using code similar to this...
Assert.That(obj, Has.Property( "PropertyName" ).EqualTo( expected) );
Charlie