public void PointcutAppliesToOneInterfaceOfSeveral() { IPointcut pointcut = new OneInterfaceTestPointcut(); // Will return true if we're proxying interfaces including ITestObject Assert.IsTrue(AopUtils.CanApply(pointcut, typeof(TestObject), new Type[] { typeof(ITestObject), typeof(IComparable) })); // Will return true if we're proxying interfaces including ITestObject Assert.IsFalse(AopUtils.CanApply(pointcut, typeof(TestObject), new Type[] { typeof(IComparable) })); }
public void PointcutAppliesToOneInterfaceOfSeveral() { IPointcut pointcut = new OneInterfaceTestPointcut(); // Will return true if we're proxying interfaces including ITestObject Assert.IsTrue(AopUtils.CanApply(pointcut, typeof (TestObject), new Type[] {typeof (ITestObject), typeof (IComparable)})); // Will return true if we're proxying interfaces including ITestObject Assert.IsFalse(AopUtils.CanApply(pointcut, typeof (TestObject), new Type[] {typeof (IComparable)})); }