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

}

posted @ 2008-10-26 18:30  new 维生素C.net()  阅读(278)  评论(0编辑  收藏  举报