private ProxyFactoryObject CreateFrozenProxyFactory()
        {
            ProxyFactoryObject fac = new ProxyFactoryObject();

            fac.AddInterface(typeof(ITestObject));
            fac.IsFrozen = true;
            fac.AddAdvisor(new PointcutForVoid()); // this is ok, no proxy created yet
            fac.GetObject();
            return(fac);
        }
        public void AddAdvisorWhenConfigIsFrozen()
        {
            ProxyFactoryObject fac = CreateFrozenProxyFactory();

            try
            {
                fac.AddAdvisor(new PointcutForVoid()); // not ok
                Assert.Fail("changing a frozen config must throw AopConfigException");
            }
            catch (AopConfigException)
            {}
        }