Exemplo n.º 1
0
        public void CastleTestSealedClass()
        {
            var proxyGenerator = new ProxyGenerator();

            var originalObj = new SealedSpecialDisposable();

            Assert.Throws <TypeLoadException>(() => proxyGenerator.CreateClassProxyWithTarget(originalObj, Enumerable.Empty <IInterceptor>().ToArray()));
        }
Exemplo n.º 2
0
        public void CastleTestSealedClass()
        {
            var proxyGenerator = new ProxyGenerator();

            var originalObj = new SealedSpecialDisposable();

            Assert.Throws<TypeLoadException>(() => proxyGenerator.CreateClassProxyWithTarget(originalObj, Enumerable.Empty<IInterceptor>().ToArray()));
        }