Ejemplo n.º 1
0
 public void Should_create_a_proxy_using_a_target_object_and_a_lambda()
 {
     var target = new Goo();
     var factory = new ProxyFactory(AppConfig.ProxyBehavior);
     var proxy = factory.Create(target, mi => mi.Method.Invoke(mi.Target, mi.Arguments));
     Assert.Equal("ack", proxy.Go());
 }
Ejemplo n.º 2
0
        public void Should_create_a_proxy_using_a_target_object_and_a_lambda()
        {
            var target  = new Goo();
            var factory = new ProxyFactory(AppConfig.ProxyBehavior);
            var proxy   = factory.Create(target, mi => mi.Method.Invoke(mi.Target, mi.Arguments));

            Assert.Equal("ack", proxy.Go());
        }
Ejemplo n.º 3
0
 public void Should_create_a_proxy_using_a_target_object_and_an_interceptor()
 {
     var interceptor = new ForwardExecutionInterceptor();
     var target = new Goo();
     var factory = new ProxyFactory(AppConfig.ProxyBehavior);
     var proxy = factory.Create(target, interceptor);
     Assert.Equal("ack", proxy.Go());
 }
Ejemplo n.º 4
0
        public void Should_create_a_proxy_using_a_target_object_and_an_interceptor()
        {
            var interceptor = new ForwardExecutionInterceptor();
            var target      = new Goo();
            var factory     = new ProxyFactory(AppConfig.ProxyBehavior);
            var proxy       = factory.Create(target, interceptor);

            Assert.Equal("ack", proxy.Go());
        }