Hard-Coded Mock Objects vs Mocking Framework

后端 未结 6 1961
悲&欢浪女
悲&欢浪女 2020-12-16 19:18

I\'m curious as to what method people like to use for mocking and why. The two methods that I know of are using hard coded mock objects and a mocking framework. To

6条回答
  •  温柔的废话
    2020-12-16 19:50

    I have been writing them by hand. I was having trouble using Moq, but then I read TDD: Introduction to Moq, and I think I get what they say about classical vs. mockist approaches now. I'll be giving Moq another try this evening, and I think understanding the "mockist" approach will give me what I need to make Moq work better for me.

提交回复
热议问题