I just published an article on CodeProject which discusses how to write unit tests for classes that depend on DispatcherTimer to get their work done.
It seemed like a pretty straightforward task when I first tried to write a unit test for functionality which uses DispatcherTimer. Wow, was I wrong! It was actually a mind-bending experience, which required me to learn a lot about how WPF’s Dispatcher and DispatcherTimer work. If you want to read more about what I learned along the way, here’s the link: http://www.codeproject.com/KB/WPF/UnitTestDispatcherTimer.aspx
The link is dead. I think this is the correct link:
http://www.codeproject.com/KB/WPF/UnitTestDispatcherTimer.aspx
Regards
Lee Campbell
Thanks Lee. I updated the links in the post. A while back, CodeProject did a major site upgrade, and broke all article links in the process.
Josh