Multi-thread MSTest
<TestRunConfiguration ...>
...
<ExecutionThread apartmentState="MTA" />
</TestRunConfiguration>
还有其他方法,但是似乎not work...
可以这样测试是否是multi-thread
[TestMethod]
public void YourTest()
{
System.Diagnostics.Debug.WriteLine(System.Threading.Thread.CurrentThread.GetApartmentState().ToString());
// TODO: Add test logic here
}