public void Run_Does_Not_Catch_BadSqlException() { BadSqlException ex = new BadSqlException(); _parser1.Stub(p => p.Parse(null)) .IgnoreArguments() .Throw(ex); CreateEngine(); TestDelegate td = () => _engine.Run("SELECT me FROM there"); BadSqlException thrown = Assert.Throws <BadSqlException>(td); Assert.That(thrown, Is.SameAs(ex)); }
public void Run_Does_Not_Catch_BadSqlException() { BadSqlException ex = new BadSqlException(); _parser1.Stub(p => p.Parse(null)) .IgnoreArguments() .Throw(ex); CreateEngine(); TestDelegate td = () => _engine.Run("SELECT me FROM there"); BadSqlException thrown = Assert.Throws<BadSqlException>(td); Assert.That(thrown, Is.SameAs(ex)); }