public void GenericClassWithGenericMethodWitoutTarget() { var interceptor = new SetReturnValueInterceptor(3); IDoubleGeneric <int> proxy = (IDoubleGeneric <int>)generator.CreateInterfaceProxyWithoutTarget(typeof(IDoubleGeneric <int>), interceptor); object o = proxy.Call(1, ""); Assert.AreEqual(3, o); }
public void GenericClassWithGenericMethod() { LogInvocationInterceptor logger = new LogInvocationInterceptor(); IDoubleGeneric <int> proxy = (IDoubleGeneric <int>)generator.CreateInterfaceProxyWithTarget(typeof(IDoubleGeneric <int>), new DoubleGenericImpl <int>(), logger); proxy.Call <string>(1, ""); Assert.AreEqual("Call", logger.Invocations[0]); }