I prefer to use MVVM.
This translates most of the code into a ViewModel. ViewModel can be tested using testing tools in Visual Studio, such as MS Test or NUnit.
For the remaining user interface tests (mostly custom controls), you can use the UI Automation test suite, such as White on codeplex .
Erno de weerd
source share