
The PEX tool is useful for general testing. However it is especially useful for testing refactored source code. So you can take your legacy code and refactor it. PEX can generate unit tests to ensure that the refactored code behaves the same as the legacy version of the code. This addresses one of the chief concerns about refactoring. If you have a tool which ensures that refactoring does not break existing functionality, it might be easier to justify refactoring efforts.