I am trying to test some exceptions in my project and one of the Exceptions I catch is SQlException.
It seems that you can\'t go new SqlException(
Theese solutions feel bloated.
The ctor is internal, yes.
(Without using reflection, the easiest way to just genuinely create this exception....
instance.Setup(x => x.MyMethod())
.Callback(() => new SqlConnection("Server=pleasethrow;Database=anexception;Connection Timeout=1").Open());
Perphaps there's another method that doesn't require the timeout of 1 second to throw.