无返回值方法,rhinomock的例子是这么做的:
无参数方法:
最需要的是忽略参数,ignorearguments()正可以达到目的
do里面是委托的基类型,但是需要注意,方法的参数数目和委托的参数数目需要一致。
否则会报异常invalidoperationexception callback arguments didn`t match the method
arguments.
无返回值方法,rhinomock的例子是这么做的:
无参数方法:
最需要的是忽略参数,ignorearguments()正可以达到目的
do里面是委托的基类型,但是需要注意,方法的参数数目和委托的参数数目需要一致。
否则会报异常invalidoperationexception callback arguments didn`t match the method
arguments.