10

I want to start writing unit test cases using the Microsoft Fakes framework in Visual Studio 2013 Professional.

Please advise on how I can achieve this.

tomRedox
  • 28,092
  • 24
  • 117
  • 154
Neeraj Dubey
  • 4,401
  • 8
  • 30
  • 49

2 Answers2

19

Fakes is only available with VS Ultimate and Premium. There is no installer that will allow you add the fakes functionality to VSPro

http://www.visualstudio.com/products/compare-visual-studio-products-vs

allen
  • 4,627
  • 1
  • 22
  • 33
  • 6
    I have used MOQ, RhinoMocks, TypeMock Isolator, and Fakes. I believe Fakes and TypeMock Isolator are the only mocking frameworks that allow "Detours" where a dependency in the code-under-test in unavoidable. But I find 99.9% of the time any other mocking framework will suffice. As a result of MS restricting use of 'Fakes' with the most expensive version of VS has caused me to become proficient in RhinoMocks, and now I prefer it over MS Fakes. The strategy of including a mocking framework with the most expensive VS version is likely to bite back in the long run. – barrypicker Jul 06 '15 at 17:48
2

Although Fakes is only available to VS Ultimate/Enterprise users, its predecessor, Moles, is available for free.

They're largely the same, except Fakes uses a different naming scheme, and plays slightly better with non-MSTest testing frameworks.

There is also an open-source alternative named Prig which I know nothing about.

BlueRaja - Danny Pflughoeft
  • 84,206
  • 33
  • 197
  • 283