ShouldThrow with ThreadAbortException

Posted in General by Rustem Zinnatullin Wed May 23 2018 09:48:53 GMT+0000 (UTC)·Viewed 194 times

ShouldThrow (3.0.0) doesn't catch ThreadAbortException. Consider this case: Action action = () => Thread.CurrentThread.Abort(); action.ShouldThrow<ThreadAbortException>(); To fix this, the ShouldThrow should call Thread.ResetAbort() if expected exception class is ThreadAbortException.
  
Markdown is allowed