Running Tests as ‘MTA’

There was an internal discussion this week about the need to run unit tests under MTA threads, rather than the default STA — either for COM, or in this specific discussion for WaitHandle.WaitAll. Mark Seemann went and posted a short guide on how to enable this in both Visual Studio 2005 (whidbey) and Visual Studio…

1

Private[Object|Type|Accessors] & Automatic unpacking of ref/out params

I was writing some unit tests yesterday, and needed to test a private method. As I was gleely tapping in the code to call my static method using PrivateType, I noticed that two of my parameters were “out” parameters. I immediately went ‘Hmm, I bet private type doesn’t do anything special for those parameters’. I…


Unit Testing Dependency Properties with VSTT, a first stab

I’ve been playing around with WPF recently, and one of the things I’ve ended up doing is creating a set of custom controls (rather than User controls), as well as what I will call ‘aggregation’ classes[1]. Some of these have had a fair chunk of code that has been in need of unit testing. We…

1