diff --git a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs index 92959f2e..6cda6b86 100644 --- a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs +++ b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs @@ -23,6 +23,7 @@ using System; using System.Data; using Spring.Data.Common; using Spring.Data.Core; +using Spring.Objects.Factory.Config; namespace Spring.Testing.Microsoft { @@ -55,7 +56,7 @@ namespace Spring.Testing.Microsoft /// Initializes a new instance of the class. /// public AbstractTransactionalDbProviderSpringContextTests() - { + { } /// @@ -77,6 +78,23 @@ namespace Spring.Testing.Microsoft protected set { adoTemplate = value; } } + /// + /// Inject dependencies into 'this' instance (that is, this test instance). + /// + /// + ///

The default implementation populates protected variables if the + /// property is set, else + /// uses autowiring if autowiring is switched on (which it is by default).

+ ///

You can certainly override this method if you want to totally control + /// how dependencies are injected into 'this' instance.

+ ///

AdoTemplate autowiring is Ignored

+ ///
+ protected override void InjectDependencies() + { + applicationContext.ObjectFactory.IgnoreDependencyType(typeof(AdoTemplate)); + base.InjectDependencies(); + } + /// /// Convenient method to delete all rows from these tables. /// Calling this method will make avoidance of rollback by calling diff --git a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs index f2e151b3..e9332a52 100644 --- a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs +++ b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs @@ -57,6 +57,23 @@ namespace Spring.Testing.NUnit protected set { adoTemplate = value; } } + /// + /// Inject dependencies into 'this' instance (that is, this test instance). + /// + /// + ///

The default implementation populates protected variables if the + /// property is set, else + /// uses autowiring if autowiring is switched on (which it is by default).

+ ///

You can certainly override this method if you want to totally control + /// how dependencies are injected into 'this' instance.

+ ///

AdoTemplate autowiring is Ignored

+ ///
+ protected override void InjectDependencies() + { + applicationContext.ObjectFactory.IgnoreDependencyType(typeof(AdoTemplate)); + base.InjectDependencies(); + } + /// /// Convenient method to delete all rows from these tables. /// Calling this method will make avoidance of rollback by calling