コード例 #1
0
        public void BaseInterfacesAreValid()
        {
            DefaultIntroductionAdvisor advisor = new DefaultIntroductionAdvisor(new TestIntroductionAdvice(), typeof(IBaseInterface));

            advisor.ValidateInterfaces();
        }
コード例 #2
0
        public void IntroductionMustImplementIntroducedInterfaces()
        {
            DefaultIntroductionAdvisor advisor = new DefaultIntroductionAdvisor(new TestIntroductionAdvice(), typeof(ICloneable));

            Assert.Throws <ArgumentException>(() => advisor.ValidateInterfaces(), "Introduction [Oragon.Spring.Aop.Support.DefaultIntroductionAdvisorTests+TestIntroductionAdvice] does not implement interface 'System.ICloneable' specified in introduction advice.");
        }