阅读背景:

CheckException只接受0参数方法;我如何测试其他方法抛出异常?

来源:互联网 

I'm wondering what's the best practice to test for exceptions in dunit. I am not very familiar with method pointers in Delphi. Is there any possibility to bind arguments to a method pointer so that it could be invoked without arguments. At the moment I always write an additional method which does this 'binding' manually. This is going to be annoying if the SUT has a lot of throwing methods.I'm wondering what's the best practice to test




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: