This commit is contained in:
eeichinger
2009-12-15 11:25:49 +00:00
parent bfb5f3758d
commit c3419eaf5b
2 changed files with 23 additions and 3 deletions

View File

@@ -21,8 +21,10 @@
#region Imports
using System;
using System.Reflection;
using System.Xml;
using NUnit.Framework;
using Spring.Aop.Config;
using Spring.Core.IO;
using Spring.Objects.Factory.Config;
using Spring.Objects.Factory.Support;
@@ -72,6 +74,15 @@ namespace Spring.Objects.Factory.Xml
{
try
{
Assembly[] loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach(Assembly assembly in loadedAssemblies)
{
if (assembly.GetName(true).Name.StartsWith("Spring.Data"))
{
Assert.Fail("Spring.Data is already loaded - this test checks if it gets loaded during xml parsing");
}
}
NamespaceParserRegistry.Reset();
DefaultListableObjectFactory of = new DefaultListableObjectFactory();
@@ -79,11 +90,12 @@ namespace Spring.Objects.Factory.Xml
reader.LoadObjectDefinitions(new StringResource(
@"<?xml version='1.0' encoding='UTF-8' ?>
<objects xmlns='http://www.springframework.net'
xmlns:v='http://www.springframework.net/validation'>
<v:required id='tripValidator' test='true' />
xmlns:tx='http://www.springframework.net/tx'>
<tx:attribute-driven />
</objects>
"));
Assert.AreEqual(typeof(RequiredValidator), of.GetObject("tripValidator").GetType());
object apc = of.GetObject(AopNamespaceUtils.AUTO_PROXY_CREATOR_OBJECT_NAME);
Assert.NotNull(apc);
}
finally
{

View File

@@ -906,10 +906,18 @@
<EmbeddedResource Include="TestResource.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Spring\Spring.Aop\Spring.Aop.2008.csproj">
<Project>{3A3A4E65-45A6-4B20-B460-0BEDC302C02C}</Project>
<Name>Spring.Aop.2008</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Spring\Spring.Core\Spring.Core.2008.csproj">
<Project>{710961A3-0DF4-49E4-A26E-F5B9C044AC84}</Project>
<Name>Spring.Core.2008</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\src\Spring\Spring.Data\Spring.Data.2008.csproj">
<Project>{AE00E5AB-C39A-436F-86D2-33BFE33E2E40}</Project>
<Name>Spring.Data.2008</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>