Added test for bug fix (CompositionProxyTypeBuilder crashed when type had protected constructor)

This commit is contained in:
ohad
2013-02-08 13:10:28 +02:00
parent 2204ce8ea5
commit 07eb2ed5bc
2 changed files with 9 additions and 0 deletions

View File

@@ -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()
{

View File

@@ -338,6 +338,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="HookableContextHandler.cs" />
<Compile Include="Objects\ClassWithProtectedCtor.cs" />
<Compile Include="Objects\ExpressionTestObject.cs" />
<Compile Include="Objects\Factory\Attributes\PostConstructAttributeTests.cs" />
<Compile Include="Objects\Factory\Attributes\AutowireByTypeNormalTests.cs" />