By default Spring.net uses autowire by type to populate properties on TestClass
es; iirc you can override this by forcing field level injection. You might find this earlier answer of mine useful when configuring field level injection on tests. I think this is the way to go in your case.
Disabling dependency checking for the TestContext
property would require configuring your Test
class, which would basically defeat the purpose of using AbstractDependencyInjectionSpringContextTests
in the first place. I think this is a normal autowire message that's somewhat misleading in the context of integration testing.
You can opt not to use dependency injection at all by not inheriting from AbstractDependencyInjectionSpringContextTests
, but from it base classAbstractSpringContextTests
; but that has the downside of not doing any injection at all.