예제 #1
0
        public void Configure(BehaviorGraph graph)
        {
            var settings = graph.Settings.Get <ValidationSettings>();
            var query    = new RemoteRuleQuery(settings.Filters);

            graph.Services.SetServiceIfNone(typeof(IRemoteRuleQuery), ObjectDef.ForValue(query));
        }
예제 #2
0
        public void SetUp()
        {
            theRule = new RequiredFieldRule();
            f1      = MockRepository.GenerateStub <IRemoteRuleFilter>();
            f2      = MockRepository.GenerateStub <IRemoteRuleFilter>();

            theQuery = new RemoteRuleQuery(new[] { f1, f2 });
        }
        public void SetUp()
        {
            theBehaviorGraph = BehaviorGraph.BuildFrom(r =>
            {
                r.Actions.IncludeType <RemoteRuleGraphEndpoint>();
                r.Import <FubuMvcValidation>();
            });

            theValidationGraph = ValidationGraph.BasicGraph();
            theRuleGraph       = new RemoteRuleGraph();
            theQuery           = RemoteRuleQuery.Basic();

            theActivator = new RemoteRuleGraphActivator(theValidationGraph, theRuleGraph, theBehaviorGraph, theQuery, new TypeDescriptorCache());

            theActivator.Activate(new IPackageInfo[0], new PackageLog());
        }
        public void SetUp()
        {
            theBehaviorGraph = BehaviorGraph.BuildFrom(r =>
            {
                r.Actions.IncludeType <RemoteRuleGraphEndpoint>();
                r.Features.Validation.Enable(true);
            });

            theValidationGraph = ValidationGraph.BasicGraph();
            theRuleGraph       = new RemoteRuleGraph();
            theQuery           = RemoteRuleQuery.Basic();

            theActivator = new RemoteRuleGraphActivator(theValidationGraph, theRuleGraph, theBehaviorGraph, theQuery, new TypeDescriptorCache());

            theActivator.Activate(new ActivationLog(), new PerfTimer());
        }