Can Tests be written in 3.5 MsTest Unit Test assemblies?
Hi: I've enjoyed playing around with Pex and Moles...now it's time to use it in earnest to cover an legacy app as much as possible.
We've started by converted to .NET 3.5 (the client can't yet host in .NET 4.0)
We noticed that we are having trouble with getting Moles to work.
Seems to work if the Test Project assembly is a .NET 4.0 -- but when converted the Unit Tests assembly frame开发者_开发问答work back to .NET 3.5 (after installing Visual Studio 2010 SP1 to give that ability) it stops working.
Keeps complaining with "you can only run tests using the default host adapter from a test assembly that targets .NET framework 3.5"
If the client wants everything to be in .NET 3.5 -- including the unit tests...any ideas?
At the end of this post from the MS Visual Studio Test Team blog, in the 'Known limitations' section, it states that:
Execution of .NET Framework 3.5 tests is supported only in the default host adapter.
Moles uses a MolesAgentAdapter
instead of the default and so the unit test library must be .NET 4.0 compatible.
精彩评论