Mocking method results

前端 未结 6 1655
情歌与酒
情歌与酒 2021-02-08 16:00

I\'m trying to find a way to fake the result of a method called from within another method.

I have a \"LoadData\" method which calls a separate helper to get some data a

6条回答
  •  天命终不由人
    2021-02-08 16:26

    You might want to look into Typemock Isolator, which can "fake" method calls without forcing you to refactor your code. I am a dev in that company, but the solution is viable if you would want to choose not to change your design (or forced not to change it for testability) it's at www.Typemock.com

    Roy blog: ISerializable.com

提交回复
热议问题