关于[Running xUnit.net Tests on Specific Threads for WPF and Other UI Tests]的摘要:
Sometimes when you write a test with xUnit.net (or other testing frameworks) you may run into problems if UI technologies are involved. This usually relates to the fact that the test must execute using a specific threading model such as single-threaded apartment (STA). For example suppose you had a WPF app that you wanted to add tests for.