public void can_preserve_an_exceptions_stack_trace()
{
Exception caught = null;
try
{
ThrowException();
}
catch(Exception exc)
{
caught = exc;
}
caught.PreserveStackTrace();
try
{
throw caught;
}
catch(Exception exc)
{
Assert.Contains("ExceptionExtensionsTest.ThrowException", exc.StackTrace);
}
}