public void IsInheritanceBasedProxy() { using (var ctx = new XmlApplicationContext(ReadOnlyXmlTestResource.GetFilePath("IsAopProxyTests.xml", this.GetType()))) { var proxy = (TestObject)ctx["michael"]; Assert.AreEqual("Michael", proxy.Name); Assert.True(AopUtils.IsInheritanceAopProxyType(proxy.GetType())); Assert.True(AopUtils.IsAopProxyType(proxy.GetType())); Assert.True(AopUtils.IsInheritanceAopProxy(proxy)); Assert.True(AopUtils.IsAopProxy(proxy)); } }
public void IsInheritanceBasedProxyReturnsFalseForNull() { Assert.False(AopUtils.IsInheritanceAopProxy(null)); }
public void TargetIsNotAProxy() { Assert.False(AopUtils.IsAopProxy(_target)); Assert.False(AopUtils.IsInheritanceAopProxy(_target)); Assert.False(AopUtils.IsInheritanceAopProxyType(_target.GetType())); }