RhinoMocks - Not specifying all parameters in AssertWasCalled

后端 未结 1 1365
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-01 09:21

I am using RhinoMocks. Now I want to assert that some function was called, but I only care about one of the arguments. Can I do a AssertWasCalled where I only s

相关标签:
1条回答
  • 2021-01-01 09:32

    You can specify the 2nd argument as Arg<T>.Is.Anything, then the actual value gets ignored.

    However note that using this you need to use Arg for all arguments. Which means you need to use on the first argument: Arg<int>.Is.Equal(123).

    0 讨论(0)
提交回复
热议问题