Exemplo n.º 1
0
        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) }));
        }
Exemplo n.º 2
0
        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)}));
        }