CachedAopProxyFactory doesn't take into account the ProxyTargetAttributes property for cache key generation [SPRNET-1371]

This commit is contained in:
bbaia
2010-09-22 10:21:20 +00:00
parent bc3e560ad3
commit 55d0c40aa8
3 changed files with 214 additions and 193 deletions

View File

@@ -80,6 +80,20 @@ namespace Spring.Aop.Framework.DynamicProxy
AssertAopProxyTypeCacheCount(2);
}
[Test]
public void DoesNotCacheWithDifferentProxyTargetAttributes()
{
ProxyFactory advisedSupport = new ProxyFactory(new GoodCommand());
advisedSupport.ProxyTargetAttributes = true;
CreateAopProxy(advisedSupport);
advisedSupport = new ProxyFactory(new GoodCommand());
advisedSupport.ProxyTargetAttributes = false;
CreateAopProxy(advisedSupport);
AssertAopProxyTypeCacheCount(2);
}
[Test]
public void DoesNotCacheWithDifferentInterfaces()
{