I am curious what your usecase is.
However you can determine whether a test failed by looking at the  
TestContext.Current.TestOutcome property in TearDown.

Another solution is to create a custom decorator attribute by  
subclassing TestDecoratorAttribute and overriding Execute.

Jeff



On Apr 29, 2009, at 9:30 AM, Jason <[email protected]> wrote:

>
> I am looking for a way to catch the failure on a test with an
> ExpectedException attribute. Basically if the expected exception isn't
> thrown I want to be notified before the test is marked as a failure.
> On tests that use an Assert and fail, I can catch the
> AssertionFailureException. Is there a way to do this with
> ExpectedException tests? Thanks!
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to