When to use mocking versus faking in C# unit testing?

前端 未结 4 822
别那么骄傲
别那么骄傲 2020-12-22 17:34

Can anyone come up with guidelines suggesting the ideal scenarios to choose mocking versus faking, i.e., setting up the essentials manually?

I am a bit confused wit

4条回答
  •  無奈伤痛
    2020-12-22 18:00

    There are at leat 5 different kinds of test doubles: dummies, stubs, mocks, spies and fakes. A good overview is at http://code.google.com/testing/TotT-2008-06-12.pdf and they are also categorized at http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dummies.html

提交回复
热议问题