Actually the point of the ExceptedExceptionTest is the opposite. Once
the exception throws you have passed the test.
Try this:
try {
DoSomethingThatThowsException();
Assert.Fail("Expected exception not thrown!");
}
catch (ExceptedException ex) {
Console.WriteLine("Expected exception was thrown, continuing...");
}
Important: make sure you catch a specific ExpectedException and don't
just do a generic catch of System.Exception; this will "catch" the
Assert.Fail (which relies on exceptions) and your test will not
function correctly.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---