Esempio n. 1
0
        public void CastleTestReallyCrazyConstructorClass()
        {
            var proxyGenerator = new ProxyGenerator();

            var originalObj = new ReallyCrazyConstructorSpecialDisposable("3");

            Assert.Throws <InvalidProxyConstructorArgumentsException>(
                () => proxyGenerator.CreateClassProxyWithTarget(originalObj.GetType(), originalObj, new object[] { "a", "b" }, Enumerable.Empty <IInterceptor>().ToArray()));
        }
Esempio n. 2
0
        public void CastleTestReallyCrazyConstructorClass()
        {
            var proxyGenerator = new ProxyGenerator();

            var originalObj = new ReallyCrazyConstructorSpecialDisposable("3");

            Assert.Throws<InvalidProxyConstructorArgumentsException>(
                () => proxyGenerator.CreateClassProxyWithTarget(originalObj.GetType(), originalObj, new object[] { "a", "b" }, Enumerable.Empty<IInterceptor>().ToArray()));
        }