Dear sirs.
We have a situation, where tests throw exceptions wrapped in a general
purpose exception. So that one has to specify this general purpose
exception in the [ExpectedException] attribute, rather than actual
business exception.

Only there is another complication. We have build a framework, where
individual tests are combined in scenarios using XML files. The same
test may appear several times in one scenario and the test input
specifies whether the test is expected to fail or not. So, there is
neither hard coded [ExpectedException] attribute nor Assert.Throws
statements in the code. (We dynamically add the expected exception
metadata when needed).

Anyway, the person creating the scenario (i.e. writing the XML file)
now has to indicate that the particular test is expected to fail with
some artificial exception (like ShunraDataPortalException) instead of
a specific business exception (like LastChangedMismatchException).

I was wondering if any of the following possible:
 - Automatically and transparently wrap each test in a wrapper with
the same signature, that would try-execute-catch-strip-throw.
 - Somehow modify the exception checking, to extract the actual
business exception before asserting the expected exception.

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