Assert.That with Throws should allow asserting on lambda property
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
Triaged
|
Medium
|
Unassigned |
Bug Description
To assert a property name, one can use the following
Assert.That (testDelegate, Throws.
or this one, as a refactor-friendly way
Assert.That (testDelegate, Throws.
It works but the error text reported when the assert is not satisfied is rather generic:
Expected: <System.
There should be an easier way to express the intent and have a better error message, something like:
Assert.That (testDelegate, Throws.
with the error reporting:
Expected: Property lambda ex.ParamName with value "name"
but got
Property lambda ex.ParamName with value "myParam"
TestCaseData migh also benefit from this if it implemented the lambda property functionality.
As discussed here: https:/
Changed in nunitv2: | |
status: | New → Incomplete |
status: | Incomplete → New |
Changed in nunitv2: | |
status: | New → Triaged |
importance: | Undecided → Medium |
affects: | nunitv2 → nunit-3.0 |
tags: | added: github |