1

Is there any best practice/guidelines available for using Code Contracts, Pex and Fake framework? Not able to find something concrete available with all 3 combined.

Yannick Blondeau
  • 9,465
  • 8
  • 52
  • 74

2 Answers2

3

PEX site provides a bunch of documentation for using PEX and Code Contracts.

Your entry point probably will be Getting Started With Microsoft Code Contracts and Pex .

They also have good Moles documentation Microsoft Moles Reference Manual

Martin Angler has a great introductory article on Code Contracts & Pex: Assertions and Assumptions

There are also good workshops on this topic:

Ilya Ivanov
  • 23,148
  • 4
  • 64
  • 90
  • Is Fake similar to Moles? As per MS, Moles is being replaced by Fake? – Ajay Aug 21 '12 at 05:53
  • Fakes are next step of Moles, or a new generation of them. For Code Exploration with isolation Moles will do fine in .net 4.0, but eventually you should consider Fakes in .net 4.5. I have used Moles with Pex and it did great. – Ilya Ivanov Aug 21 '12 at 07:52
  • 1
    Thanks InnerSelf. I was just checking for using Pex in VS2012 and could not find anything. Is there any guidance on how to use Pex in VS 2012? – Ajay Aug 21 '12 at 09:36
  • 1
    http://stackoverflow.com/questions/11009332/how-do-i-add-a-fakes-assembly-in-vs-2012-professional-rc will give you an answer. For now there is no integration of PEX and Fakes into VS 2012 – Ilya Ivanov Aug 21 '12 at 13:31
0

The Visual Studio ALM Rangers are working on guidance for Microsoft Fakes. I'd be very interested in hearing from users who have adopted it, been scared off, success stories, tips, failures.... etc. drop me a mail at fakes@freetodev.com

I'll post a link here to our guidance as soon as we start shipping.

Mike

Mike Fourie
  • 491
  • 1
  • 4
  • 3