예제 #1
0
        public void use_custom_failure_handler_by_value()
        {
            var node = new AuthorizationNode();

            var handler = new FakeAuthHandler();

            node.FailureHandler(handler);

            var def = node.As <IContainerModel>().ToInstance().As <IConfiguredInstance>();

            def.FindDependencyValueFor <IAuthorizationFailureHandler>().ShouldBeTheSameAs(handler);
        }
        public void use_custom_failure_handler_by_value()
        {
            var node = new AuthorizationNode();

            var handler = new FakeAuthHandler();

            node.FailureHandler(handler);

            var def = node.As<IContainerModel>().ToInstance().As<IConfiguredInstance>();

            def.FindDependencyValueFor<IAuthorizationFailureHandler>().ShouldBeTheSameAs(handler);
        }