12 April 2011
Moles is Microsoft's code instrumentation, or mock framework, used to isolate environment dependencies. Moles was created expressly to enable Pex to function. Moles is discussed in greater detail, after the break.
Pex intelligently examines the logic branches of the code to be tested, and then generates a series of input values that should or should not fail, thereby maximizing test code coverage.
Before we start talking about Moles and Pex, there are some elementary, yet vitally important topics to review about unit testing. Adhering to these rules play into the effectiveness of Moles and Pex. I strongly advise reading, before moving on to part 2, but I really can't stop you, can I? (or can I? Muahaha!)