This generally makes sense to me. It's similar to something I have
thought about doing
for the exceptions generated by well-known mocking frameworks. Further
comments inline...
On Mon, Oct 17, 2011 at 10:59 PM, Kenneth Xu <kenn...@gmail.com> wrote:
> Hello, this is a feature request.
>
> As more and more test assertion libs rise from the horizon, we'll soon be
> able to choose our favorite assertion syntax to use with NUnit. Just like we
> are able to use our favorite mocking frameworks.
>
> You can use 3rd party assertion libs with NUnit today. Assertion libs
> typically throw exception when assertion fails, and NUnit show it just like
> any other exception failure.
Note that any library that already uses NUnit could also throw an NUnit
AssertionException, rather than it's own exception.
I hadn't thought about the stack trace. That's certainly doable as
well, although
we might need more info about what to exclude.
> Further, NUnit can dynamically pre-register some assertion exceptions from
> well known assertion libs. In such a way it can provide out of box support
> to those assertion libs without strongly referencing to them.
Another possibility is for the third-party library to apply an
attribute known to
NUnit to it's exception classes.
> Thoughts?
This sounds reasonably doable for 2.6, so long as we avoid any need for NUnit
to have a reference to the exception class - we would need to use a
string rather
than a typeof expression with the attribute. For 3.0, we can use the
type itself.
Charlie
> Cheers,
> Kenneth
>
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to
> nunit-discus...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nunit-discuss?hl=en.
>
Hi Kenneth,
This generally makes sense to me. It's similar to something I have
thought about doing
for the exceptions generated by well-known mocking frameworks. Further
comments inline...
Note that any library that already uses NUnit could also throw an NUnit
On Mon, Oct 17, 2011 at 10:59 PM, Kenneth Xu <kenn...@gmail.com> wrote:
> Hello, this is a feature request.
>
> As more and more test assertion libs rise from the horizon, we'll soon be
> able to choose our favorite assertion syntax to use with NUnit. Just like we
> are able to use our favorite mocking frameworks.
>
> You can use 3rd party assertion libs with NUnit today. Assertion libs
> typically throw exception when assertion fails, and NUnit show it just like
> any other exception failure.
AssertionException, rather than it's own exception.
> Further, NUnit can dynamically pre-register some assertion exceptions fromAnother possibility is for the third-party library to apply an
> well known assertion libs. In such a way it can provide out of box support
> to those assertion libs without strongly referencing to them.
attribute known to
NUnit to it's exception classes.
> Thoughts?
This sounds reasonably doable for 2.6, so long as we avoid any need for NUnit
to have a reference to the exception class - we would need to use a
string rather
than a typeof expression with the attribute. For 3.0, we can use the
type itself.