How to throw a SqlException(need for mocking)
- by chobo2
Hi
I am trying to test some exceptions in my project and one of the Exceptions I catch is SQlException.
Now It seems that you can't go new SqlException() so I am not sure how I can throw a exception especially without somehow calling the database(and since it is unit tests it is usually advised not to call the database since it is slow).
So I…