fixed XmlApplicationContextTests.InnerObjectWithPostProcessing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user