From 07eb2ed5bcec218ae9d23bf1b195f98ef3186153 Mon Sep 17 00:00:00 2001 From: ohad Date: Fri, 8 Feb 2013 13:10:28 +0200 Subject: [PATCH] Added test for bug fix (CompositionProxyTypeBuilder crashed when type had protected constructor) --- .../Context/Support/ContextRegistryTests.cs | 8 ++++++++ .../Spring.Core.Tests/Spring.Core.Tests.2010.csproj | 1 + 2 files changed, 9 insertions(+) diff --git a/test/Spring/Spring.Core.Tests/Context/Support/ContextRegistryTests.cs b/test/Spring/Spring.Core.Tests/Context/Support/ContextRegistryTests.cs index 27b3437c..af94a10b 100644 --- a/test/Spring/Spring.Core.Tests/Context/Support/ContextRegistryTests.cs +++ b/test/Spring/Spring.Core.Tests/Context/Support/ContextRegistryTests.cs @@ -169,6 +169,14 @@ namespace Spring.Context.Support IApplicationContext context = ContextRegistry.GetContext("bingo"); } + [Test] + public void CanBuildProxyForClassWithProtectedConstructor() + { + CompositionProxyTypeBuilder typeBuilder = new CompositionProxyTypeBuilder(); + typeBuilder.TargetType = typeof(ClassWithProtectedCtor); + typeBuilder.BuildProxyType(); + } + [Test] public void ClearWithDynamicProxies() { diff --git a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj index 990c40ae..6a53c693 100644 --- a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj +++ b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj @@ -338,6 +338,7 @@ Code +