예제 #1
0
        public void SetUp()
        {
            graph1 = new FubuRegistry(x =>
            {
                x.Route("method1/{Name}/{Age}")
                .Calls <TestController>(c => c.AnotherAction(null)).OutputToJson();

                x.Route("method2/{Name}/{Age}")
                .Calls <TestController>(c => c.AnotherAction(null)).OutputToJson();

                x.Route("method3/{Name}/{Age}")
                .Calls <TestController>(c => c.AnotherAction(null)).OutputToJson();
            }).BuildGraph();

            chain = new BehaviorChain();
            graph1.AddChain(chain);

            graph2 = new FubuRegistry(x =>
            {
                x.Route("/root/{Name}/{Age}")
                .Calls <TestController>(c => c.AnotherAction(null)).OutputToJson();
            }).BuildGraph();

            graph2.As <IChainImporter>().Import(graph1, b => b.PrependToUrl("area1"));
        }
        public void setup()
        {
            var graph = new FubuRegistry(registry =>
            {
                registry.Applies.ToThisAssembly();
                registry.Actions.IncludeType <Test>();
                registry.Actions.IncludeMethods(method => method.Name == "Index" || method.Name == "Continuation");
            })
                        .BuildLightGraph();

            graph.AddChain(new BehaviorChain());

            _policy = new NoOutputsNotificationPolicy(graph, new ViewFilter(new ViewColumn()));
        }