From ee14eaa489b0fc9f715d889dd9f197894c7e9ff5 Mon Sep 17 00:00:00 2001 From: eeichinger Date: Mon, 27 Oct 2008 19:38:39 +0000 Subject: [PATCH] fixed XmlApplicationContextTests.InnerObjectWithPostProcessing --- .../Context/Support/XmlApplicationContextTests.cs | 10 +++------- .../Spring.Core.Tests/Spring.Core.Tests.2003.csproj | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/Spring/Spring.Core.Tests/Context/Support/XmlApplicationContextTests.cs b/test/Spring/Spring.Core.Tests/Context/Support/XmlApplicationContextTests.cs index 17934d2a..d58cf62f 100644 --- a/test/Spring/Spring.Core.Tests/Context/Support/XmlApplicationContextTests.cs +++ b/test/Spring/Spring.Core.Tests/Context/Support/XmlApplicationContextTests.cs @@ -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); } } diff --git a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2003.csproj b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2003.csproj index 30edb8a8..204c0622 100644 --- a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2003.csproj +++ b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2003.csproj @@ -362,6 +362,10 @@ RelPath = "Context\Support\import1.xml" BuildAction = "EmbeddedResource" /> +