SPRNET-1547 - ScannedGenericObjectDefinition doesn't apply default autowire mode

This commit is contained in:
unknown
2013-05-29 10:28:37 -06:00
parent 01b1f57224
commit 88170e7974
3 changed files with 24 additions and 1 deletions

View File

@@ -119,6 +119,15 @@ namespace Spring.Context.Config
Assert.That(prototypeDef.IsLazyInit, Is.True);
}
[Test]
public void ComponentsUseDefaultAutoWire()
{
_applicationContext = new XmlApplicationContext(ReadOnlyXmlTestResource.GetFilePath("ConfigFiles.ComponentScan5.xml", GetType()));
var prototypeDef = _applicationContext.ObjectFactory.GetObjectDefinition("Prototype");
Assert.That(prototypeDef.AutowireMode == AutoWiringMode.ByName);
}
[Test]
public void ComponentWithQualifier()
{

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net"
xmlns:context="http://www.springframework.net/context"
default-lazy-init="true">
default-lazy-init="true" default-autowire="byName">
<context:component-scan base-assemblies="Spring.Core.Tests">
<context:include-filter type="regex" expression="ComponentScan.ComponentsUseDefaults.*"/>