public void SetResult_is_noop_when_not_implemented()
        {
            var handler = new Mock<HandlerBase>();
            var wrappedHandler = new WrappedHandler(handler.Object);

            wrappedHandler.SetResult("Value1");
        }
        public void SetResult_is_noop_when_not_implemented()
        {
            var handler        = new Mock <HandlerBase>();
            var wrappedHandler = new WrappedHandler(handler.Object);

            wrappedHandler.SetResult("Value1");
        }
        public void SetResult_invokes_when_implemented()
        {
            var handler = new Mock<HandlerBase>().As<IResultHandler>();
            var wrappedHandler = new WrappedHandler(handler.Object);

            wrappedHandler.SetResult("Value1");

            handler.Verify(h => h.SetResult("Value1"));
        }
        public void SetResult_invokes_when_implemented()
        {
            var handler        = new Mock <HandlerBase>().As <IResultHandler>();
            var wrappedHandler = new WrappedHandler(handler.Object);

            wrappedHandler.SetResult("Value1");

            handler.Verify(h => h.SetResult("Value1"));
        }
Exemple #5
0
            public GetProviderServices(
                Executor executor,
                object handler,
                string invariantName,
                IDictionary <string, object> anonymousArguments)
            {
                Check.NotNull(executor, "executor");
                Check.NotNull(handler, "handler");
                Check.NotEmpty(invariantName, "invariantName");

                var wrappedHandler = new WrappedHandler(handler);

                var providerServicesTypeName = executor.GetProviderServicesInternal(invariantName);

                wrappedHandler.SetResult(providerServicesTypeName);
            }
Exemple #6
0
            public GetProviderServices(
                Executor executor,
                object handler,
                string invariantName,
                IDictionary<string, object> anonymousArguments)
            {
                Check.NotNull(executor, "executor");
                Check.NotNull(handler, "handler");
                Check.NotEmpty(invariantName, "invariantName");

                var wrappedHandler = new WrappedHandler(handler);

                var providerServicesTypeName = executor.GetProviderServicesInternal(invariantName);
                wrappedHandler.SetResult(providerServicesTypeName);
            }