fixed XmlApplicationContextTests.InnerObjectWithPostProcessing

This commit is contained in:
eeichinger
2008-10-27 19:38:39 +00:00
parent 23530e9bd2
commit ee14eaa489
2 changed files with 7 additions and 7 deletions

View File

@@ -42,17 +42,13 @@ namespace Spring.Context.Support
{
XmlApplicationContext ctx = new XmlApplicationContext(false, "assembly://Spring.Core.Tests/Spring.Context.Support/innerObjectsWithPostProcessor.xml");
ctx.GetObject("hasInnerObjects");
} catch (System.NullReferenceException e)
{
Assert.Fail("Should not throw NullReferenceException",e);
} catch (ObjectCreationException e)
Assert.Fail("should throw ObjectCreationException");
}
catch (ObjectCreationException e)
{
NoSuchObjectDefinitionException ex = e.InnerException as NoSuchObjectDefinitionException;
Assert.IsNotNull(ex);
//Pass
} catch (Exception e)
{
Assert.Fail("Expect only ObjectCreationException to be thrown", e);
}
}

View File

@@ -362,6 +362,10 @@
RelPath = "Context\Support\import1.xml"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "Context\Support\innerObjectsWithPostProcessor.xml"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "Context\Support\invalidType.xml"
BuildAction = "EmbeddedResource"