コード例 #1
0
        public void SetResult_is_noop_when_not_implemented()
        {
            var handler = new Mock<HandlerBase>();
            var wrappedHandler = new WrappedHandler(handler.Object);

            wrappedHandler.SetResult("Value1");
        }
コード例 #2
0
        public void SetResult_is_noop_when_not_implemented()
        {
            var handler        = new Mock <HandlerBase>();
            var wrappedHandler = new WrappedHandler(handler.Object);

            wrappedHandler.SetResult("Value1");
        }
コード例 #3
0
        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"));
        }
コード例 #4
0
        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"));
        }
コード例 #5
0
ファイル: Executor.cs プロジェクト: hallco978/entityframework
            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);
            }