How to make Moq ignore arguments that are ref or out

前端 未结 3 1131
故里飘歌
故里飘歌 2021-01-03 20:39

In RhinoMocks, you can just tell your mocks to IgnoreArguments as a blanket statement. In Moq, it seems, you have to specify It.IsAny() for each argument. However, this do

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 21:04

    Answered at: Setting up Moq to ignore a virtual method I believe setting "CallBase = true" on the mock will work. See the "Customizing Mock Behavior" section of the Quick Start

提交回复
热议问题