Mocking SqlException
Posted by Andres on June 9th, 2006I still think sealed is bad. Today, I was working on some code that needed to handle SqlExceptions depending on the error number it contained. Naturally, I wanted to write a test for it. So, I wrote the test, and got so far as to try to create an instance of SqlException. Oops. Not only [...]