Exemple #1
0
        public void IsWrapClassEligibleAcceptsNonSealedClasses(CastleDynamicProxyFactory sut)
        {
            var result = sut.IsWrapClassEligible(typeof(TestProxy));

            Assert.True(result);

            result = sut.IsWrapClassEligible(typeof(SealedTestProxy));
            Assert.False(result);
        }
Exemple #2
0
        public void ReturnFalseForAlreadyProxiedObjectsOnIsProxyable(CastleDynamicProxyFactory sut, List <IAlternateMethod> methodInvocations)
        {
            var result = sut.ExtendClass <TestProxy>(methodInvocations);

            Assert.False(sut.IsExtendClassEligible(result.GetType()));
            Assert.False(sut.IsWrapClassEligible(result.GetType()));
        }