MSTest TestMethod Dependency Injection

I'm using a DI container and I want to do MSTest (VS 2010) unit tests with instances resolved from the container.

I'd like to get these instances injected into my TestMethod or at least my TestClass. Is this possible?

Right now my TestMethods directly call container.Resolve(xxx) which I'd prefer to avoid so that my injection testing is more realistic.

Anyone have experience with this?

Thanks in advance.

6
задан Tim Lloyd 24 November 2010 в 16:55
поделиться