示例#1
0
 public void PointcutAppliesToOneMethodOnObject()
 {
     IPointcut pointcut = new OneMethodTestPointcut();
     Assert.IsTrue(AopUtils.CanApply(pointcut, typeof (object), null),
                   "Must return true if we're not proxying interfaces.");
     Assert.IsFalse(AopUtils.CanApply(pointcut, typeof (object),
                                      new Type[] {typeof (ITestObject)}),
                    "Must return false if we're proxying interfaces.");
 }
示例#2
0
        public void PointcutAppliesToOneMethodOnObject()
        {
            IPointcut pointcut = new OneMethodTestPointcut();

            Assert.IsTrue(AopUtils.CanApply(pointcut, typeof(object), null),
                          "Must return true if we're not proxying interfaces.");
            Assert.IsFalse(AopUtils.CanApply(pointcut, typeof(object),
                                             new Type[] { typeof(ITestObject) }),
                           "Must return false if we're proxying interfaces.");
        }