Merge pull request #74 from thomast74/AdoTemplateInjection

Exclude AdoTemplate from dependency check by default
This commit is contained in:
Marko Lahma
2014-08-10 10:23:06 +03:00
2 changed files with 36 additions and 1 deletions

View File

@@ -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 <see cref="AbstractTransactionalDbProviderSpringContextTests"/> class.
/// </summary>
public AbstractTransactionalDbProviderSpringContextTests()
{
{
}
/// <summary>
@@ -77,6 +78,23 @@ namespace Spring.Testing.Microsoft
protected set { adoTemplate = value; }
}
/// <summary>
/// Inject dependencies into 'this' instance (that is, this test instance).
/// </summary>
/// <remarks>
/// <p>The default implementation populates protected variables if the
/// <see cref="PopulateProtectedVariables"/> property is set, else
/// uses autowiring if autowiring is switched on (which it is by default).</p>
/// <p>You can certainly override this method if you want to totally control
/// how dependencies are injected into 'this' instance.</p>
/// <p>AdoTemplate autowiring is Ignored</p>
/// </remarks>
protected override void InjectDependencies()
{
applicationContext.ObjectFactory.IgnoreDependencyType(typeof(AdoTemplate));
base.InjectDependencies();
}
/// <summary>
/// Convenient method to delete all rows from these tables.
/// Calling this method will make avoidance of rollback by calling

View File

@@ -57,6 +57,23 @@ namespace Spring.Testing.NUnit
protected set { adoTemplate = value; }
}
/// <summary>
/// Inject dependencies into 'this' instance (that is, this test instance).
/// </summary>
/// <remarks>
/// <p>The default implementation populates protected variables if the
/// <see cref="PopulateProtectedVariables"/> property is set, else
/// uses autowiring if autowiring is switched on (which it is by default).</p>
/// <p>You can certainly override this method if you want to totally control
/// how dependencies are injected into 'this' instance.</p>
/// <p>AdoTemplate autowiring is Ignored</p>
/// </remarks>
protected override void InjectDependencies()
{
applicationContext.ObjectFactory.IgnoreDependencyType(typeof(AdoTemplate));
base.InjectDependencies();
}
/// <summary>
/// Convenient method to delete all rows from these tables.
/// Calling this method will make avoidance of rollback by calling