public void MethodInfoClosedInGenIfcGenMethodValueTypeNoTarget()
        {
            KeepDataInterceptor interceptor        = new KeepDataInterceptor();
            GenInterfaceWithGenMethods <int> proxy =
                generator.CreateInterfaceProxyWithoutTarget <GenInterfaceWithGenMethods <int> >(interceptor);

            proxy.DoSomething(1, 1);
            GenericTestUtility.CheckMethodInfoIsClosed(interceptor.Invocation.GetConcreteMethod(), typeof(void), typeof(int),
                                                       typeof(int));

            proxy.DoSomething(new List <object>(), 1);
            GenericTestUtility.CheckMethodInfoIsClosed(interceptor.Invocation.GetConcreteMethod(), typeof(void),
                                                       typeof(List <object>), typeof(int));
        }
        public void ProxyWithGenericArgumentAndGenericMethod()
        {
            GenInterfaceWithGenMethods <int> proxy =
                generator.CreateInterfaceProxyWithTarget <GenInterfaceWithGenMethods <int> >(
                    new GenInterfaceWithGenMethodsImpl <int>(), logger);

            Assert.IsNotNull(proxy);

            proxy.DoSomething <long>(10L, 1);

            Assert.AreEqual("DoSomething ", logger.LogContents);
        }
        public void MethodInfoClosedInGenIfcGenMethodRefTypeWithTarget()
        {
            KeepDataInterceptor interceptor = new KeepDataInterceptor();
            GenInterfaceWithGenMethods <List <object> > target = new GenInterfaceWithGenMethodsImpl <List <object> >();
            GenInterfaceWithGenMethods <List <object> > proxy  =
                generator.CreateInterfaceProxyWithTarget <GenInterfaceWithGenMethods <List <object> > >(target, interceptor);

            proxy.DoSomething(1, null);
            GenericTestUtility.CheckMethodInfoIsClosed(interceptor.Invocation.GetConcreteMethod(), typeof(void), typeof(int),
                                                       typeof(List <object>));
            GenericTestUtility.CheckMethodInfoIsClosed(interceptor.Invocation.GetConcreteMethodInvocationTarget(), typeof(void),
                                                       typeof(int), typeof(List <object>));
            Assert.AreNotEqual(interceptor.Invocation.GetConcreteMethod(),
                               interceptor.Invocation.GetConcreteMethodInvocationTarget());

            proxy.DoSomething(new List <object>(), new List <object>());
            GenericTestUtility.CheckMethodInfoIsClosed(interceptor.Invocation.GetConcreteMethod(), typeof(void),
                                                       typeof(List <object>), typeof(List <object>));
            GenericTestUtility.CheckMethodInfoIsClosed(interceptor.Invocation.GetConcreteMethodInvocationTarget(), typeof(void),
                                                       typeof(List <object>), typeof(List <object>));
            Assert.AreNotEqual(interceptor.Invocation.GetConcreteMethod(),
                               interceptor.Invocation.GetConcreteMethodInvocationTarget());
        }