Using the WPF Dispatcher in unit tests
By using the Visual Studio Unit Test Framework you don’t need to initialize the Dispatcher yourself. You are absolutely right, that the Dispatcher doesn’t automatically process its queue. You can write a simple helper method “DispatcherUtil.DoEvents()” which tells the Dispatcher to process its queue. C# Code: public static class DispatcherUtil { [SecurityPermissionAttribute(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)] … Read more